归档存储
更新时间:2024-04-09
归档存储
取回
C
1 bos_pool_t *p = NULL;
2 bos_string_t bucket;
3 bos_string_t object;
4 int is_cname = 0;
5 bos_table_t *resp_headers = NULL;
6 bos_request_options_t *options = NULL;
7 bos_status_t *s = NULL;
8
9 bos_pool_create(&p, NULL);
10 options = bos_request_options_create(p);
11 init_test_request_options(options, is_cname);
12 bos_str_set(&bucket, TEST_BUCKET_NAME);
13 bos_str_set(&object, "test_restore.dat");
14 bos_object_restore_params_t *restore_params = bos_create_object_restore_params(p);
15 restore_params->days = 30;
16 bos_str_set(&restore_params->tier, "Standard");
17 s = bos_post_object_restore(options, &bucket, &object, restore_params, NULL, NULL, &resp_headers);
18 bos_pool_destroy(p);
19
20 printf("test_object_restore ok\n");