From cac01b3565bca0b44eec35e18aa7101daa9b6f77 Mon Sep 17 00:00:00 2001 From: Outscale Bot Date: Tue, 1 Oct 2024 14:18:22 +0000 Subject: [PATCH] oapi-cli v0.6.0 Signed-off-by: Outscale Bot --- main.c | 565 ++++++++++++++++++++++++++++++++++++++- oapi-cli-completion.bash | 20 +- osc_sdk.c | 510 +++++++++++++++++++++++++++++------ osc_sdk.h | 459 +++++++++++++++++++++++-------- version | 2 +- 5 files changed, 1349 insertions(+), 207 deletions(-) diff --git a/main.c b/main.c index 148f4eb..edb7d19 100644 --- a/main.c +++ b/main.c @@ -47,7 +47,7 @@ #define OAPI_RAW_OUTPUT 1 -#define OAPI_CLI_VERSION "0.5.0" +#define OAPI_CLI_VERSION "0.6.0" #define OAPI_CLI_UAGENT "oapi-cli/"OAPI_CLI_VERSION"; osc-sdk-c/" @@ -316,6 +316,7 @@ int filters_subnet_parser(void *s, char *str, char *aa, struct ptr_array *pa); int filters_subregion_parser(void *s, char *str, char *aa, struct ptr_array *pa); int filters_tag_parser(void *s, char *str, char *aa, struct ptr_array *pa); int filters_user_group_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int filters_users_parser(void *s, char *str, char *aa, struct ptr_array *pa); int filters_virtual_gateway_parser(void *s, char *str, char *aa, struct ptr_array *pa); int filters_vm_parser(void *s, char *str, char *aa, struct ptr_array *pa); int filters_vm_group_parser(void *s, char *str, char *aa, struct ptr_array *pa); @@ -352,6 +353,7 @@ int load_balancer_tag_parser(void *s, char *str, char *aa, struct ptr_array *pa) int location_parser(void *s, char *str, char *aa, struct ptr_array *pa); int log_parser(void *s, char *str, char *aa, struct ptr_array *pa); int maintenance_event_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int minimal_policy_parser(void *s, char *str, char *aa, struct ptr_array *pa); int nat_service_parser(void *s, char *str, char *aa, struct ptr_array *pa); int net_parser(void *s, char *str, char *aa, struct ptr_array *pa); int net_access_point_parser(void *s, char *str, char *aa, struct ptr_array *pa); @@ -371,6 +373,7 @@ int phase1_options_parser(void *s, char *str, char *aa, struct ptr_array *pa); int phase2_options_parser(void *s, char *str, char *aa, struct ptr_array *pa); int placement_parser(void *s, char *str, char *aa, struct ptr_array *pa); int policy_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int policy_entities_parser(void *s, char *str, char *aa, struct ptr_array *pa); int policy_version_parser(void *s, char *str, char *aa, struct ptr_array *pa); int private_ip_parser(void *s, char *str, char *aa, struct ptr_array *pa); int private_ip_light_parser(void *s, char *str, char *aa, struct ptr_array *pa); @@ -403,6 +406,7 @@ int state_comment_parser(void *s, char *str, char *aa, struct ptr_array *pa); int subnet_parser(void *s, char *str, char *aa, struct ptr_array *pa); int subregion_parser(void *s, char *str, char *aa, struct ptr_array *pa); int tag_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int unit_price_entry_parser(void *s, char *str, char *aa, struct ptr_array *pa); int user_parser(void *s, char *str, char *aa, struct ptr_array *pa); int user_group_parser(void *s, char *str, char *aa, struct ptr_array *pa); int vgw_telemetry_parser(void *s, char *str, char *aa, struct ptr_array *pa); @@ -8626,6 +8630,44 @@ int filters_user_group_parser(void *v_s, char *str, char *aa, struct ptr_array * return 0; } +int filters_users_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct filters_users *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "UserIds")) == 0 || aret == '=' || aret == '.') { + if (aret == '.') { + int pos; + char *endptr; + int last = 0; + char *dot_pos = strchr(str, '.'); + + TRY(!(dot_pos++), "UserIds argument missing\n"); + pos = strtoul(dot_pos, &endptr, 0); + TRY(endptr == dot_pos, "UserIds require an index\n"); + if (s->user_ids) { + for (; s->user_ids[last]; ++last); + } + if (pos < last) { + s->user_ids[pos] = (aa); + } else { + for (int i = last; i < pos; ++i) + SET_NEXT(s->user_ids, "", pa); + SET_NEXT(s->user_ids, (aa), pa); + } + } else { + TRY(!aa, "UserIds argument missing\n"); + s->user_ids_str = aa; + } + } else if (!(aret = argcmp(str, "UserIds[]")) || aret == '=') { + TRY(!aa, "UserIds[] argument missing\n"); + SET_NEXT(s->user_ids, (aa), pa); + } else + { + fprintf(stderr, "'%s' not an argumemt of 'FiltersUsers'\n", str); + return -1; + } + return 0; +} + int filters_virtual_gateway_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct filters_virtual_gateway *s = v_s; int aret = 0; @@ -13934,6 +13976,31 @@ int maintenance_event_parser(void *v_s, char *str, char *aa, struct ptr_array *p return 0; } +int minimal_policy_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct minimal_policy *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "Id")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Id argument missing\n"); + s->id = aa; // string string + + } else + if ((aret = argcmp(str, "Name")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Name argument missing\n"); + s->name = aa; // string string + + } else + if ((aret = argcmp(str, "Orn")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Orn argument missing\n"); + s->orn = aa; // string string + + } else + { + fprintf(stderr, "'%s' not an argumemt of 'MinimalPolicy'\n", str); + return -1; + } + return 0; +} + int nat_service_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct nat_service *s = v_s; int aret = 0; @@ -15264,6 +15331,121 @@ int policy_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { return 0; } +int policy_entities_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct policy_entities *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "Accounts")) == 0 || aret == '=' || aret == '.') { + char *dot_pos = strchr(str, '.'); + + if (dot_pos) { + int pos; + char *endptr; + + ++dot_pos; + pos = strtoul(dot_pos, &endptr, 0); + if (endptr == dot_pos) + BAD_RET("'Accounts' require an index (example array ref MinimalPolicy.Accounts.0)\n"); + else if (*endptr != '.') + BAD_RET("'Accounts' require a .\n"); + TRY_ALLOC_AT(s,accounts, pa, pos, sizeof(*s->accounts)); + cascade_struct = &s->accounts[pos]; + cascade_parser = minimal_policy_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(minimal_policy_parser(&s->accounts[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "Accounts argument missing\n"); + s->accounts_str = aa; // array ref MinimalPolicy ref + } + } else + if ((aret = argcmp(str, "Groups")) == 0 || aret == '=' || aret == '.') { + char *dot_pos = strchr(str, '.'); + + if (dot_pos) { + int pos; + char *endptr; + + ++dot_pos; + pos = strtoul(dot_pos, &endptr, 0); + if (endptr == dot_pos) + BAD_RET("'Groups' require an index (example array ref MinimalPolicy.Groups.0)\n"); + else if (*endptr != '.') + BAD_RET("'Groups' require a .\n"); + TRY_ALLOC_AT(s,groups, pa, pos, sizeof(*s->groups)); + cascade_struct = &s->groups[pos]; + cascade_parser = minimal_policy_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(minimal_policy_parser(&s->groups[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "Groups argument missing\n"); + s->groups_str = aa; // array ref MinimalPolicy ref + } + } else + if ((aret = argcmp(str, "HasMoreItems")) == 0 || aret == '=' || aret == '.') { + s->is_set_has_more_items = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->has_more_items = 1; + } else if (!strcasecmp(aa, "false")) { + s->has_more_items = 0; + } else { + BAD_RET("HasMoreItems require true/false\n"); + } + } else + if ((aret = argcmp(str, "ItemsCount")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "ItemsCount argument missing\n"); + s->is_set_items_count = 1; + s->items_count = atoll(aa); + } else + if ((aret = argcmp(str, "MaxResultsLimit")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "MaxResultsLimit argument missing\n"); + s->is_set_max_results_limit = 1; + s->max_results_limit = atoll(aa); + } else + if ((aret = argcmp(str, "MaxResultsTruncated")) == 0 || aret == '=' || aret == '.') { + s->is_set_max_results_truncated = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->max_results_truncated = 1; + } else if (!strcasecmp(aa, "false")) { + s->max_results_truncated = 0; + } else { + BAD_RET("MaxResultsTruncated require true/false\n"); + } + } else + if ((aret = argcmp(str, "Users")) == 0 || aret == '=' || aret == '.') { + char *dot_pos = strchr(str, '.'); + + if (dot_pos) { + int pos; + char *endptr; + + ++dot_pos; + pos = strtoul(dot_pos, &endptr, 0); + if (endptr == dot_pos) + BAD_RET("'Users' require an index (example array ref MinimalPolicy.Users.0)\n"); + else if (*endptr != '.') + BAD_RET("'Users' require a .\n"); + TRY_ALLOC_AT(s,users, pa, pos, sizeof(*s->users)); + cascade_struct = &s->users[pos]; + cascade_parser = minimal_policy_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(minimal_policy_parser(&s->users[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "Users argument missing\n"); + s->users_str = aa; // array ref MinimalPolicy ref + } + } else + { + fprintf(stderr, "'%s' not an argumemt of 'PolicyEntities'\n", str); + return -1; + } + return 0; +} + int policy_version_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct policy_version *s = v_s; int aret = 0; @@ -16666,6 +16848,46 @@ int tag_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { return 0; } +int unit_price_entry_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct unit_price_entry *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "Currency")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Currency argument missing\n"); + s->currency = aa; // string string + + } else + if ((aret = argcmp(str, "Operation")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Operation argument missing\n"); + s->operation = aa; // string string + + } else + if ((aret = argcmp(str, "Service")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Service argument missing\n"); + s->service = aa; // string string + + } else + if ((aret = argcmp(str, "Type")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Type argument missing\n"); + s->type = aa; // string string + + } else + if ((aret = argcmp(str, "Unit")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Unit argument missing\n"); + s->unit = aa; // string string + + } else + if ((aret = argcmp(str, "UnitPrice")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "UnitPrice argument missing\n"); + s->is_set_unit_price = 1; + s->unit_price = atof(aa); + } else + { + fprintf(stderr, "'%s' not an argumemt of 'UnitPriceEntry'\n", str); + return -1; + } + return 0; +} + int user_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct user *s = v_s; int aret = 0; @@ -16683,6 +16905,11 @@ int user_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { TRY(!aa, "Path argument missing\n"); s->path = aa; // string string + } else + if ((aret = argcmp(str, "UserEmail")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "UserEmail argument missing\n"); + s->user_email = aa; // string string + } else if ((aret = argcmp(str, "UserId")) == 0 || aret == '=' || aret == '.') { TRY(!aa, "UserId argument missing\n"); @@ -19336,6 +19563,17 @@ int main(int ac, char **av) TRY(!aa, "NewPath argument missing\n"); s->new_path = aa; // string string + } else + if ((aret = argcmp(next_a, "NewUserEmail")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NewUserEmail argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NewUserEmail argument missing\n"); + s->new_user_email = aa; // string string + } else if ((aret = argcmp(next_a, "NewUserName")) == 0 || aret == '=' || aret == '.') { char *eq_ptr = strchr(next_a, '='); @@ -26165,6 +26403,51 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else + if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Filters argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + char *dot_pos; + + TRY(!aa, "Filters argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->filters; + cascade_parser = filters_users_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(filters_users_parser(&s->filters, dot_pos, aa, pa)); + s->is_set_filters = 1; + } else { + s->filters_str = aa; + } + } else + if ((aret = argcmp(next_a, "FirstItem")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "FirstItem argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "FirstItem argument missing\n"); + s->is_set_first_item = 1; + s->first_item = atoll(aa); + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoll(aa); + } else { BAD_RET("'%s' is not a valide argument for 'ReadUsers'\n", next_a); } @@ -26840,6 +27123,118 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else + if (!strcmp("ReadUnitPrice", av[i])) { + auto_osc_json_c json_object *jobj = NULL; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_read_unit_price_arg a = {0}; + struct osc_read_unit_price_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + read_unit_price_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa, "cascade need an argument\n"); + META_ARGS({CHK_BAD_RET(aa[0] == '-', "cascade need an argument"); }) + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto read_unit_price_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-' && strcmp(av[i + 1] + 2, "set-var")) { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + (void)str; + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + META_ARGS({ aa = 0; incr = 1; }); + } + if ((aret = argcmp(next_a, "Operation")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Operation argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Operation argument missing\n"); + s->operation = aa; // string string + + } else + if ((aret = argcmp(next_a, "Service")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Service argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Service argument missing\n"); + s->service = aa; // string string + + } else + if ((aret = argcmp(next_a, "Type")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Type argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Type argument missing\n"); + s->type = aa; // string string + + } else + { + BAD_RET("'%s' is not a valide argument for 'ReadUnitPrice'\n", next_a); + } + i += incr; + goto read_unit_price_arg; + } + cret = osc_read_unit_price(&e, &r, &a); + TRY(cret, "fail to call ReadUnitPrice: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + jobj = NULL; + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + } + while (i + 1 < ac && !strcmp(av[i + 1], "--set-var")) { + ++i; + TRY(i + 1 >= ac, "--set-var require an argument"); + if (!jobj) + jobj = json_tokener_parse(r.buf); + if (parse_variable(jobj, av, ac, i)) + return -1; + ++i; + } + + if (jobj) { + json_object_put(jobj); + jobj = NULL; + } + osc_deinit_str(&r); + } else if (!strcmp("ReadTags", av[i])) { auto_osc_json_c json_object *jobj = NULL; auto_ptr_array struct ptr_array opa = {0}; @@ -31589,6 +31984,152 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else + if (!strcmp("ReadEntitiesLinkedToPolicy", av[i])) { + auto_osc_json_c json_object *jobj = NULL; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_read_entities_linked_to_policy_arg a = {0}; + struct osc_read_entities_linked_to_policy_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + read_entities_linked_to_policy_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa, "cascade need an argument\n"); + META_ARGS({CHK_BAD_RET(aa[0] == '-', "cascade need an argument"); }) + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto read_entities_linked_to_policy_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-' && strcmp(av[i + 1] + 2, "set-var")) { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + (void)str; + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + META_ARGS({ aa = 0; incr = 1; }); + } + if ((aret = argcmp(next_a, "EntitiesType")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "EntitiesType argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + if (aret == '.') { + int pos; + char *endptr; + int last = 0; + char *dot_pos = strchr(str, '.'); + + TRY(!(dot_pos++), "EntitiesType argument missing\n"); + pos = strtoul(dot_pos, &endptr, 0); + TRY(endptr == dot_pos, "EntitiesType require an index\n"); + if (s->entities_type) { + for (; s->entities_type[last]; ++last); + } + if (pos < last) { + s->entities_type[pos] = (aa); + } else { + for (int i = last; i < pos; ++i) + SET_NEXT(s->entities_type, "", pa); + SET_NEXT(s->entities_type, (aa), pa); + } + } else { + TRY(!aa, "EntitiesType argument missing\n"); + s->entities_type_str = aa; + } + } else if (!(aret = argcmp(str, "EntitiesType[]")) || aret == '=') { + TRY(!aa, "EntitiesType[] argument missing\n"); + SET_NEXT(s->entities_type, (aa), pa); + } else + if ((aret = argcmp(next_a, "FirstItem")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "FirstItem argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "FirstItem argument missing\n"); + s->is_set_first_item = 1; + s->first_item = atoll(aa); + } else + if ((aret = argcmp(next_a, "PolicyOrn")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "PolicyOrn argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "PolicyOrn argument missing\n"); + s->policy_orn = aa; // string string + + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoll(aa); + } else + { + BAD_RET("'%s' is not a valide argument for 'ReadEntitiesLinkedToPolicy'\n", next_a); + } + i += incr; + goto read_entities_linked_to_policy_arg; + } + cret = osc_read_entities_linked_to_policy(&e, &r, &a); + TRY(cret, "fail to call ReadEntitiesLinkedToPolicy: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + jobj = NULL; + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + } + while (i + 1 < ac && !strcmp(av[i + 1], "--set-var")) { + ++i; + TRY(i + 1 >= ac, "--set-var require an argument"); + if (!jobj) + jobj = json_tokener_parse(r.buf); + if (parse_variable(jobj, av, ac, i)) + return -1; + ++i; + } + + if (jobj) { + json_object_put(jobj); + jobj = NULL; + } + osc_deinit_str(&r); + } else if (!strcmp("ReadDirectLinks", av[i])) { auto_osc_json_c json_object *jobj = NULL; auto_ptr_array struct ptr_array opa = {0}; @@ -41989,6 +42530,17 @@ int main(int ac, char **av) TRY(!aa, "Path argument missing\n"); s->path = aa; // string string + } else + if ((aret = argcmp(next_a, "UserEmail")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "UserEmail argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "UserEmail argument missing\n"); + s->user_email = aa; // string string + } else if ((aret = argcmp(next_a, "UserName")) == 0 || aret == '=' || aret == '.') { char *eq_ptr = strchr(next_a, '='); @@ -44088,6 +44640,17 @@ int main(int ac, char **av) TRY(!aa, "AccepterNetId argument missing\n"); s->accepter_net_id = aa; // string string + } else + if ((aret = argcmp(next_a, "AccepterOwnerId")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "AccepterOwnerId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "AccepterOwnerId argument missing\n"); + s->accepter_owner_id = aa; // string string + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' || aret == '.') { char *eq_ptr = strchr(next_a, '='); diff --git a/oapi-cli-completion.bash b/oapi-cli-completion.bash index b8a7cb4..7b6416f 100644 --- a/oapi-cli-completion.bash +++ b/oapi-cli-completion.bash @@ -19,7 +19,7 @@ UpdateUserGroup() { COMPREPLY=($(compgen -W " --DryRun --NewPath --NewUserGroupName --Path --UserGroupName" -- ${cur})) } UpdateUser() { - COMPREPLY=($(compgen -W " --DryRun --NewPath --NewUserName --UserName" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --NewPath --NewUserEmail --NewUserName --UserName" -- ${cur})) } UpdateSubnet() { COMPREPLY=($(compgen -W " --DryRun --MapPublicIpOnLaunch --SubnetId" -- ${cur})) @@ -169,7 +169,7 @@ ReadVirtualGateways() { COMPREPLY=($(compgen -W " --DryRun --Filters.ConnectionTypes --Filters.LinkNetIds --Filters.LinkStates --Filters.States --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VirtualGatewayIds --NextPageToken --ResultsPerPage" -- ${cur})) } ReadUsers() { - COMPREPLY=($(compgen -W " --DryRun" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.UserIds --FirstItem --ResultsPerPage" -- ${cur})) } ReadUserGroupsPerUser() { COMPREPLY=($(compgen -W " --DryRun --UserName --UserPath" -- ${cur})) @@ -186,6 +186,9 @@ ReadUserGroupPolicies() { ReadUserGroup() { COMPREPLY=($(compgen -W " --DryRun --Path --UserGroupName" -- ${cur})) } +ReadUnitPrice() { + COMPREPLY=($(compgen -W " --Operation --Service --Type" -- ${cur})) +} ReadTags() { COMPREPLY=($(compgen -W " --DryRun --Filters.Keys --Filters.ResourceIds --Filters.ResourceTypes --Filters.Values --NextPageToken --ResultsPerPage" -- ${cur})) } @@ -297,6 +300,9 @@ ReadFlexibleGpus() { ReadFlexibleGpuCatalog() { COMPREPLY=($(compgen -W " --DryRun" -- ${cur})) } +ReadEntitiesLinkedToPolicy() { + COMPREPLY=($(compgen -W " --EntitiesType --FirstItem --PolicyOrn --ResultsPerPage" -- ${cur})) +} ReadDirectLinks() { COMPREPLY=($(compgen -W " --DryRun --Filters.DirectLinkIds --NextPageToken --ResultsPerPage" -- ${cur})) } @@ -541,7 +547,7 @@ CreateUserGroup() { COMPREPLY=($(compgen -W " --DryRun --Path --UserGroupName" -- ${cur})) } CreateUser() { - COMPREPLY=($(compgen -W " --DryRun --Path --UserName" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Path --UserEmail --UserName" -- ${cur})) } CreateTags() { COMPREPLY=($(compgen -W " --DryRun --ResourceIds --Tags" -- ${cur})) @@ -586,7 +592,7 @@ CreateNic() { COMPREPLY=($(compgen -W " --Description --DryRun --PrivateIps --SecurityGroupIds --SubnetId" -- ${cur})) } CreateNetPeering() { - COMPREPLY=($(compgen -W " --AccepterNetId --DryRun --SourceNetId" -- ${cur})) + COMPREPLY=($(compgen -W " --AccepterNetId --AccepterOwnerId --DryRun --SourceNetId" -- ${cur})) } CreateNetAccessPoint() { COMPREPLY=($(compgen -W " --DryRun --NetId --RouteTableIds --ServiceName" -- ${cur})) @@ -682,15 +688,15 @@ _cognac() case ${COMP_CWORD} in *) case ${prev} in - UpdateVpnConnection | UpdateVolume | UpdateVmTemplate | UpdateVmGroup | UpdateVm | UpdateUserGroup | UpdateUser | UpdateSubnet | UpdateSnapshot | UpdateServerCertificate | UpdateRouteTableLink | UpdateRoutePropagation | UpdateRoute | UpdateNic | UpdateNetAccessPoint | UpdateNet | UpdateLoadBalancer | UpdateListenerRule | UpdateImage | UpdateFlexibleGpu | UpdateDirectLinkInterface | UpdateDedicatedGroup | UpdateCa | UpdateApiAccessRule | UpdateApiAccessPolicy | UpdateAccount | UpdateAccessKey | UnlinkVolume | UnlinkVirtualGateway | UnlinkRouteTable | UnlinkPublicIp | UnlinkPrivateIps | UnlinkPolicy | UnlinkNic | UnlinkManagedPolicyFromUserGroup | UnlinkLoadBalancerBackendMachines | UnlinkInternetService | UnlinkFlexibleGpu | StopVms | StartVms | SetDefaultPolicyVersion | ScaleUpVmGroup | ScaleDownVmGroup | RemoveUserFromUserGroup | RejectNetPeering | RegisterVmsInLoadBalancer | RebootVms | ReadVpnConnections | ReadVolumes | ReadVmsState | ReadVmsHealth | ReadVms | ReadVmTypes | ReadVmTemplates | ReadVmGroups | ReadVirtualGateways | ReadUsers | ReadUserGroupsPerUser | ReadUserGroups | ReadUserGroupPolicy | ReadUserGroupPolicies | ReadUserGroup | ReadTags | ReadSubregions | ReadSubnets | ReadSnapshots | ReadSnapshotExportTasks | ReadServerCertificates | ReadSecurityGroups | ReadSecretAccessKey | ReadRouteTables | ReadRegions | ReadQuotas | ReadPublicIps | ReadPublicIpRanges | ReadPublicCatalog | ReadProductTypes | ReadPolicyVersions | ReadPolicyVersion | ReadPolicy | ReadPolicies | ReadNics | ReadNets | ReadNetPeerings | ReadNetAccessPoints | ReadNetAccessPointServices | ReadNatServices | ReadManagedPoliciesLinkedToUserGroup | ReadLocations | ReadLoadBalancers | ReadLoadBalancerTags | ReadListenerRules | ReadLinkedPolicies | ReadKeypairs | ReadInternetServices | ReadImages | ReadImageExportTasks | ReadFlexibleGpus | ReadFlexibleGpuCatalog | ReadDirectLinks | ReadDirectLinkInterfaces | ReadDhcpOptions | ReadDedicatedGroups | ReadConsumptionAccount | ReadConsoleOutput | ReadClientGateways | ReadCatalogs | ReadCatalog | ReadCas | ReadApiLogs | ReadApiAccessRules | ReadApiAccessPolicy | ReadAdminPassword | ReadAccounts | ReadAccessKeys | PutUserGroupPolicy | LinkVolume | LinkVirtualGateway | LinkRouteTable | LinkPublicIp | LinkPrivateIps | LinkPolicy | LinkNic | LinkManagedPolicyToUserGroup | LinkLoadBalancerBackendMachines | LinkInternetService | LinkFlexibleGpu | DeregisterVmsInLoadBalancer | DeleteVpnConnectionRoute | DeleteVpnConnection | DeleteVolume | DeleteVms | DeleteVmTemplate | DeleteVmGroup | DeleteVirtualGateway | DeleteUserGroupPolicy | DeleteUserGroup | DeleteUser | DeleteTags | DeleteSubnet | DeleteSnapshot | DeleteServerCertificate | DeleteSecurityGroupRule | DeleteSecurityGroup | DeleteRouteTable | DeleteRoute | DeletePublicIp | DeletePolicyVersion | DeletePolicy | DeleteNic | DeleteNetPeering | DeleteNetAccessPoint | DeleteNet | DeleteNatService | DeleteLoadBalancerTags | DeleteLoadBalancerPolicy | DeleteLoadBalancerListeners | DeleteLoadBalancer | DeleteListenerRule | DeleteKeypair | DeleteInternetService | DeleteImage | DeleteFlexibleGpu | DeleteExportTask | DeleteDirectLinkInterface | DeleteDirectLink | DeleteDhcpOptions | DeleteDedicatedGroup | DeleteClientGateway | DeleteCa | DeleteApiAccessRule | DeleteAccessKey | CreateVpnConnectionRoute | CreateVpnConnection | CreateVolume | CreateVms | CreateVmTemplate | CreateVmGroup | CreateVirtualGateway | CreateUserGroup | CreateUser | CreateTags | CreateSubnet | CreateSnapshotExportTask | CreateSnapshot | CreateServerCertificate | CreateSecurityGroupRule | CreateSecurityGroup | CreateRouteTable | CreateRoute | CreatePublicIp | CreateProductType | CreatePolicyVersion | CreatePolicy | CreateNic | CreateNetPeering | CreateNetAccessPoint | CreateNet | CreateNatService | CreateLoadBalancerTags | CreateLoadBalancerPolicy | CreateLoadBalancerListeners | CreateLoadBalancer | CreateListenerRule | CreateKeypair | CreateInternetService | CreateImageExportTask | CreateImage | CreateFlexibleGpu | CreateDirectLinkInterface | CreateDirectLink | CreateDhcpOptions | CreateDedicatedGroup | CreateClientGateway | CreateCa | CreateApiAccessRule | CreateAccount | CreateAccessKey | CheckAuthentication | AddUserToUserGroup | AcceptNetPeering) + UpdateVpnConnection | UpdateVolume | UpdateVmTemplate | UpdateVmGroup | UpdateVm | UpdateUserGroup | UpdateUser | UpdateSubnet | UpdateSnapshot | UpdateServerCertificate | UpdateRouteTableLink | UpdateRoutePropagation | UpdateRoute | UpdateNic | UpdateNetAccessPoint | UpdateNet | UpdateLoadBalancer | UpdateListenerRule | UpdateImage | UpdateFlexibleGpu | UpdateDirectLinkInterface | UpdateDedicatedGroup | UpdateCa | UpdateApiAccessRule | UpdateApiAccessPolicy | UpdateAccount | UpdateAccessKey | UnlinkVolume | UnlinkVirtualGateway | UnlinkRouteTable | UnlinkPublicIp | UnlinkPrivateIps | UnlinkPolicy | UnlinkNic | UnlinkManagedPolicyFromUserGroup | UnlinkLoadBalancerBackendMachines | UnlinkInternetService | UnlinkFlexibleGpu | StopVms | StartVms | SetDefaultPolicyVersion | ScaleUpVmGroup | ScaleDownVmGroup | RemoveUserFromUserGroup | RejectNetPeering | RegisterVmsInLoadBalancer | RebootVms | ReadVpnConnections | ReadVolumes | ReadVmsState | ReadVmsHealth | ReadVms | ReadVmTypes | ReadVmTemplates | ReadVmGroups | ReadVirtualGateways | ReadUsers | ReadUserGroupsPerUser | ReadUserGroups | ReadUserGroupPolicy | ReadUserGroupPolicies | ReadUserGroup | ReadUnitPrice | ReadTags | ReadSubregions | ReadSubnets | ReadSnapshots | ReadSnapshotExportTasks | ReadServerCertificates | ReadSecurityGroups | ReadSecretAccessKey | ReadRouteTables | ReadRegions | ReadQuotas | ReadPublicIps | ReadPublicIpRanges | ReadPublicCatalog | ReadProductTypes | ReadPolicyVersions | ReadPolicyVersion | ReadPolicy | ReadPolicies | ReadNics | ReadNets | ReadNetPeerings | ReadNetAccessPoints | ReadNetAccessPointServices | ReadNatServices | ReadManagedPoliciesLinkedToUserGroup | ReadLocations | ReadLoadBalancers | ReadLoadBalancerTags | ReadListenerRules | ReadLinkedPolicies | ReadKeypairs | ReadInternetServices | ReadImages | ReadImageExportTasks | ReadFlexibleGpus | ReadFlexibleGpuCatalog | ReadEntitiesLinkedToPolicy | ReadDirectLinks | ReadDirectLinkInterfaces | ReadDhcpOptions | ReadDedicatedGroups | ReadConsumptionAccount | ReadConsoleOutput | ReadClientGateways | ReadCatalogs | ReadCatalog | ReadCas | ReadApiLogs | ReadApiAccessRules | ReadApiAccessPolicy | ReadAdminPassword | ReadAccounts | ReadAccessKeys | PutUserGroupPolicy | LinkVolume | LinkVirtualGateway | LinkRouteTable | LinkPublicIp | LinkPrivateIps | LinkPolicy | LinkNic | LinkManagedPolicyToUserGroup | LinkLoadBalancerBackendMachines | LinkInternetService | LinkFlexibleGpu | DeregisterVmsInLoadBalancer | DeleteVpnConnectionRoute | DeleteVpnConnection | DeleteVolume | DeleteVms | DeleteVmTemplate | DeleteVmGroup | DeleteVirtualGateway | DeleteUserGroupPolicy | DeleteUserGroup | DeleteUser | DeleteTags | DeleteSubnet | DeleteSnapshot | DeleteServerCertificate | DeleteSecurityGroupRule | DeleteSecurityGroup | DeleteRouteTable | DeleteRoute | DeletePublicIp | DeletePolicyVersion | DeletePolicy | DeleteNic | DeleteNetPeering | DeleteNetAccessPoint | DeleteNet | DeleteNatService | DeleteLoadBalancerTags | DeleteLoadBalancerPolicy | DeleteLoadBalancerListeners | DeleteLoadBalancer | DeleteListenerRule | DeleteKeypair | DeleteInternetService | DeleteImage | DeleteFlexibleGpu | DeleteExportTask | DeleteDirectLinkInterface | DeleteDirectLink | DeleteDhcpOptions | DeleteDedicatedGroup | DeleteClientGateway | DeleteCa | DeleteApiAccessRule | DeleteAccessKey | CreateVpnConnectionRoute | CreateVpnConnection | CreateVolume | CreateVms | CreateVmTemplate | CreateVmGroup | CreateVirtualGateway | CreateUserGroup | CreateUser | CreateTags | CreateSubnet | CreateSnapshotExportTask | CreateSnapshot | CreateServerCertificate | CreateSecurityGroupRule | CreateSecurityGroup | CreateRouteTable | CreateRoute | CreatePublicIp | CreateProductType | CreatePolicyVersion | CreatePolicy | CreateNic | CreateNetPeering | CreateNetAccessPoint | CreateNet | CreateNatService | CreateLoadBalancerTags | CreateLoadBalancerPolicy | CreateLoadBalancerListeners | CreateLoadBalancer | CreateListenerRule | CreateKeypair | CreateInternetService | CreateImageExportTask | CreateImage | CreateFlexibleGpu | CreateDirectLinkInterface | CreateDirectLink | CreateDhcpOptions | CreateDedicatedGroup | CreateClientGateway | CreateCa | CreateApiAccessRule | CreateAccount | CreateAccessKey | CheckAuthentication | AddUserToUserGroup | AcceptNetPeering) eval ${prev} ;; --help) - COMPREPLY=($(compgen -W "UpdateVpnConnection UpdateVolume UpdateVmTemplate UpdateVmGroup UpdateVm UpdateUserGroup UpdateUser UpdateSubnet UpdateSnapshot UpdateServerCertificate UpdateRouteTableLink UpdateRoutePropagation UpdateRoute UpdateNic UpdateNetAccessPoint UpdateNet UpdateLoadBalancer UpdateListenerRule UpdateImage UpdateFlexibleGpu UpdateDirectLinkInterface UpdateDedicatedGroup UpdateCa UpdateApiAccessRule UpdateApiAccessPolicy UpdateAccount UpdateAccessKey UnlinkVolume UnlinkVirtualGateway UnlinkRouteTable UnlinkPublicIp UnlinkPrivateIps UnlinkPolicy UnlinkNic UnlinkManagedPolicyFromUserGroup UnlinkLoadBalancerBackendMachines UnlinkInternetService UnlinkFlexibleGpu StopVms StartVms SetDefaultPolicyVersion ScaleUpVmGroup ScaleDownVmGroup RemoveUserFromUserGroup RejectNetPeering RegisterVmsInLoadBalancer RebootVms ReadVpnConnections ReadVolumes ReadVmsState ReadVmsHealth ReadVms ReadVmTypes ReadVmTemplates ReadVmGroups ReadVirtualGateways ReadUsers ReadUserGroupsPerUser ReadUserGroups ReadUserGroupPolicy ReadUserGroupPolicies ReadUserGroup ReadTags ReadSubregions ReadSubnets ReadSnapshots ReadSnapshotExportTasks ReadServerCertificates ReadSecurityGroups ReadSecretAccessKey ReadRouteTables ReadRegions ReadQuotas ReadPublicIps ReadPublicIpRanges ReadPublicCatalog ReadProductTypes ReadPolicyVersions ReadPolicyVersion ReadPolicy ReadPolicies ReadNics ReadNets ReadNetPeerings ReadNetAccessPoints ReadNetAccessPointServices ReadNatServices ReadManagedPoliciesLinkedToUserGroup ReadLocations ReadLoadBalancers ReadLoadBalancerTags ReadListenerRules ReadLinkedPolicies ReadKeypairs ReadInternetServices ReadImages ReadImageExportTasks ReadFlexibleGpus ReadFlexibleGpuCatalog ReadDirectLinks ReadDirectLinkInterfaces ReadDhcpOptions ReadDedicatedGroups ReadConsumptionAccount ReadConsoleOutput ReadClientGateways ReadCatalogs ReadCatalog ReadCas ReadApiLogs ReadApiAccessRules ReadApiAccessPolicy ReadAdminPassword ReadAccounts ReadAccessKeys PutUserGroupPolicy LinkVolume LinkVirtualGateway LinkRouteTable LinkPublicIp LinkPrivateIps LinkPolicy LinkNic LinkManagedPolicyToUserGroup LinkLoadBalancerBackendMachines LinkInternetService LinkFlexibleGpu DeregisterVmsInLoadBalancer DeleteVpnConnectionRoute DeleteVpnConnection DeleteVolume DeleteVms DeleteVmTemplate DeleteVmGroup DeleteVirtualGateway DeleteUserGroupPolicy DeleteUserGroup DeleteUser DeleteTags DeleteSubnet DeleteSnapshot DeleteServerCertificate DeleteSecurityGroupRule DeleteSecurityGroup DeleteRouteTable DeleteRoute DeletePublicIp DeletePolicyVersion DeletePolicy DeleteNic DeleteNetPeering DeleteNetAccessPoint DeleteNet DeleteNatService DeleteLoadBalancerTags DeleteLoadBalancerPolicy DeleteLoadBalancerListeners DeleteLoadBalancer DeleteListenerRule DeleteKeypair DeleteInternetService DeleteImage DeleteFlexibleGpu DeleteExportTask DeleteDirectLinkInterface DeleteDirectLink DeleteDhcpOptions DeleteDedicatedGroup DeleteClientGateway DeleteCa DeleteApiAccessRule DeleteAccessKey CreateVpnConnectionRoute CreateVpnConnection CreateVolume CreateVms CreateVmTemplate CreateVmGroup CreateVirtualGateway CreateUserGroup CreateUser CreateTags CreateSubnet CreateSnapshotExportTask CreateSnapshot CreateServerCertificate CreateSecurityGroupRule CreateSecurityGroup CreateRouteTable CreateRoute CreatePublicIp CreateProductType CreatePolicyVersion CreatePolicy CreateNic CreateNetPeering CreateNetAccessPoint CreateNet CreateNatService CreateLoadBalancerTags CreateLoadBalancerPolicy CreateLoadBalancerListeners CreateLoadBalancer CreateListenerRule CreateKeypair CreateInternetService CreateImageExportTask CreateImage CreateFlexibleGpu CreateDirectLinkInterface CreateDirectLink CreateDhcpOptions CreateDedicatedGroup CreateClientGateway CreateCa CreateApiAccessRule CreateAccount CreateAccessKey CheckAuthentication AddUserToUserGroup AcceptNetPeering" -- ${cur})) + COMPREPLY=($(compgen -W "UpdateVpnConnection UpdateVolume UpdateVmTemplate UpdateVmGroup UpdateVm UpdateUserGroup UpdateUser UpdateSubnet UpdateSnapshot UpdateServerCertificate UpdateRouteTableLink UpdateRoutePropagation UpdateRoute UpdateNic UpdateNetAccessPoint UpdateNet UpdateLoadBalancer UpdateListenerRule UpdateImage UpdateFlexibleGpu UpdateDirectLinkInterface UpdateDedicatedGroup UpdateCa UpdateApiAccessRule UpdateApiAccessPolicy UpdateAccount UpdateAccessKey UnlinkVolume UnlinkVirtualGateway UnlinkRouteTable UnlinkPublicIp UnlinkPrivateIps UnlinkPolicy UnlinkNic UnlinkManagedPolicyFromUserGroup UnlinkLoadBalancerBackendMachines UnlinkInternetService UnlinkFlexibleGpu StopVms StartVms SetDefaultPolicyVersion ScaleUpVmGroup ScaleDownVmGroup RemoveUserFromUserGroup RejectNetPeering RegisterVmsInLoadBalancer RebootVms ReadVpnConnections ReadVolumes ReadVmsState ReadVmsHealth ReadVms ReadVmTypes ReadVmTemplates ReadVmGroups ReadVirtualGateways ReadUsers ReadUserGroupsPerUser ReadUserGroups ReadUserGroupPolicy ReadUserGroupPolicies ReadUserGroup ReadUnitPrice ReadTags ReadSubregions ReadSubnets ReadSnapshots ReadSnapshotExportTasks ReadServerCertificates ReadSecurityGroups ReadSecretAccessKey ReadRouteTables ReadRegions ReadQuotas ReadPublicIps ReadPublicIpRanges ReadPublicCatalog ReadProductTypes ReadPolicyVersions ReadPolicyVersion ReadPolicy ReadPolicies ReadNics ReadNets ReadNetPeerings ReadNetAccessPoints ReadNetAccessPointServices ReadNatServices ReadManagedPoliciesLinkedToUserGroup ReadLocations ReadLoadBalancers ReadLoadBalancerTags ReadListenerRules ReadLinkedPolicies ReadKeypairs ReadInternetServices ReadImages ReadImageExportTasks ReadFlexibleGpus ReadFlexibleGpuCatalog ReadEntitiesLinkedToPolicy ReadDirectLinks ReadDirectLinkInterfaces ReadDhcpOptions ReadDedicatedGroups ReadConsumptionAccount ReadConsoleOutput ReadClientGateways ReadCatalogs ReadCatalog ReadCas ReadApiLogs ReadApiAccessRules ReadApiAccessPolicy ReadAdminPassword ReadAccounts ReadAccessKeys PutUserGroupPolicy LinkVolume LinkVirtualGateway LinkRouteTable LinkPublicIp LinkPrivateIps LinkPolicy LinkNic LinkManagedPolicyToUserGroup LinkLoadBalancerBackendMachines LinkInternetService LinkFlexibleGpu DeregisterVmsInLoadBalancer DeleteVpnConnectionRoute DeleteVpnConnection DeleteVolume DeleteVms DeleteVmTemplate DeleteVmGroup DeleteVirtualGateway DeleteUserGroupPolicy DeleteUserGroup DeleteUser DeleteTags DeleteSubnet DeleteSnapshot DeleteServerCertificate DeleteSecurityGroupRule DeleteSecurityGroup DeleteRouteTable DeleteRoute DeletePublicIp DeletePolicyVersion DeletePolicy DeleteNic DeleteNetPeering DeleteNetAccessPoint DeleteNet DeleteNatService DeleteLoadBalancerTags DeleteLoadBalancerPolicy DeleteLoadBalancerListeners DeleteLoadBalancer DeleteListenerRule DeleteKeypair DeleteInternetService DeleteImage DeleteFlexibleGpu DeleteExportTask DeleteDirectLinkInterface DeleteDirectLink DeleteDhcpOptions DeleteDedicatedGroup DeleteClientGateway DeleteCa DeleteApiAccessRule DeleteAccessKey CreateVpnConnectionRoute CreateVpnConnection CreateVolume CreateVms CreateVmTemplate CreateVmGroup CreateVirtualGateway CreateUserGroup CreateUser CreateTags CreateSubnet CreateSnapshotExportTask CreateSnapshot CreateServerCertificate CreateSecurityGroupRule CreateSecurityGroup CreateRouteTable CreateRoute CreatePublicIp CreateProductType CreatePolicyVersion CreatePolicy CreateNic CreateNetPeering CreateNetAccessPoint CreateNet CreateNatService CreateLoadBalancerTags CreateLoadBalancerPolicy CreateLoadBalancerListeners CreateLoadBalancer CreateListenerRule CreateKeypair CreateInternetService CreateImageExportTask CreateImage CreateFlexibleGpu CreateDirectLinkInterface CreateDirectLink CreateDhcpOptions CreateDedicatedGroup CreateClientGateway CreateCa CreateApiAccessRule CreateAccount CreateAccessKey CheckAuthentication AddUserToUserGroup AcceptNetPeering" -- ${cur})) ;; *) PROFILES=$(_mk_profiles) - COMPREPLY=($(compgen -W "$PROFILES --config --login --password --authentication_method --color --insecure --raw-print --verbose --help -h --list-calls --version UpdateVpnConnection UpdateVolume UpdateVmTemplate UpdateVmGroup UpdateVm UpdateUserGroup UpdateUser UpdateSubnet UpdateSnapshot UpdateServerCertificate UpdateRouteTableLink UpdateRoutePropagation UpdateRoute UpdateNic UpdateNetAccessPoint UpdateNet UpdateLoadBalancer UpdateListenerRule UpdateImage UpdateFlexibleGpu UpdateDirectLinkInterface UpdateDedicatedGroup UpdateCa UpdateApiAccessRule UpdateApiAccessPolicy UpdateAccount UpdateAccessKey UnlinkVolume UnlinkVirtualGateway UnlinkRouteTable UnlinkPublicIp UnlinkPrivateIps UnlinkPolicy UnlinkNic UnlinkManagedPolicyFromUserGroup UnlinkLoadBalancerBackendMachines UnlinkInternetService UnlinkFlexibleGpu StopVms StartVms SetDefaultPolicyVersion ScaleUpVmGroup ScaleDownVmGroup RemoveUserFromUserGroup RejectNetPeering RegisterVmsInLoadBalancer RebootVms ReadVpnConnections ReadVolumes ReadVmsState ReadVmsHealth ReadVms ReadVmTypes ReadVmTemplates ReadVmGroups ReadVirtualGateways ReadUsers ReadUserGroupsPerUser ReadUserGroups ReadUserGroupPolicy ReadUserGroupPolicies ReadUserGroup ReadTags ReadSubregions ReadSubnets ReadSnapshots ReadSnapshotExportTasks ReadServerCertificates ReadSecurityGroups ReadSecretAccessKey ReadRouteTables ReadRegions ReadQuotas ReadPublicIps ReadPublicIpRanges ReadPublicCatalog ReadProductTypes ReadPolicyVersions ReadPolicyVersion ReadPolicy ReadPolicies ReadNics ReadNets ReadNetPeerings ReadNetAccessPoints ReadNetAccessPointServices ReadNatServices ReadManagedPoliciesLinkedToUserGroup ReadLocations ReadLoadBalancers ReadLoadBalancerTags ReadListenerRules ReadLinkedPolicies ReadKeypairs ReadInternetServices ReadImages ReadImageExportTasks ReadFlexibleGpus ReadFlexibleGpuCatalog ReadDirectLinks ReadDirectLinkInterfaces ReadDhcpOptions ReadDedicatedGroups ReadConsumptionAccount ReadConsoleOutput ReadClientGateways ReadCatalogs ReadCatalog ReadCas ReadApiLogs ReadApiAccessRules ReadApiAccessPolicy ReadAdminPassword ReadAccounts ReadAccessKeys PutUserGroupPolicy LinkVolume LinkVirtualGateway LinkRouteTable LinkPublicIp LinkPrivateIps LinkPolicy LinkNic LinkManagedPolicyToUserGroup LinkLoadBalancerBackendMachines LinkInternetService LinkFlexibleGpu DeregisterVmsInLoadBalancer DeleteVpnConnectionRoute DeleteVpnConnection DeleteVolume DeleteVms DeleteVmTemplate DeleteVmGroup DeleteVirtualGateway DeleteUserGroupPolicy DeleteUserGroup DeleteUser DeleteTags DeleteSubnet DeleteSnapshot DeleteServerCertificate DeleteSecurityGroupRule DeleteSecurityGroup DeleteRouteTable DeleteRoute DeletePublicIp DeletePolicyVersion DeletePolicy DeleteNic DeleteNetPeering DeleteNetAccessPoint DeleteNet DeleteNatService DeleteLoadBalancerTags DeleteLoadBalancerPolicy DeleteLoadBalancerListeners DeleteLoadBalancer DeleteListenerRule DeleteKeypair DeleteInternetService DeleteImage DeleteFlexibleGpu DeleteExportTask DeleteDirectLinkInterface DeleteDirectLink DeleteDhcpOptions DeleteDedicatedGroup DeleteClientGateway DeleteCa DeleteApiAccessRule DeleteAccessKey CreateVpnConnectionRoute CreateVpnConnection CreateVolume CreateVms CreateVmTemplate CreateVmGroup CreateVirtualGateway CreateUserGroup CreateUser CreateTags CreateSubnet CreateSnapshotExportTask CreateSnapshot CreateServerCertificate CreateSecurityGroupRule CreateSecurityGroup CreateRouteTable CreateRoute CreatePublicIp CreateProductType CreatePolicyVersion CreatePolicy CreateNic CreateNetPeering CreateNetAccessPoint CreateNet CreateNatService CreateLoadBalancerTags CreateLoadBalancerPolicy CreateLoadBalancerListeners CreateLoadBalancer CreateListenerRule CreateKeypair CreateInternetService CreateImageExportTask CreateImage CreateFlexibleGpu CreateDirectLinkInterface CreateDirectLink CreateDhcpOptions CreateDedicatedGroup CreateClientGateway CreateCa CreateApiAccessRule CreateAccount CreateAccessKey CheckAuthentication AddUserToUserGroup AcceptNetPeering" -- ${cur})) + COMPREPLY=($(compgen -W "$PROFILES --config --login --password --authentication_method --color --insecure --raw-print --verbose --help -h --list-calls --version UpdateVpnConnection UpdateVolume UpdateVmTemplate UpdateVmGroup UpdateVm UpdateUserGroup UpdateUser UpdateSubnet UpdateSnapshot UpdateServerCertificate UpdateRouteTableLink UpdateRoutePropagation UpdateRoute UpdateNic UpdateNetAccessPoint UpdateNet UpdateLoadBalancer UpdateListenerRule UpdateImage UpdateFlexibleGpu UpdateDirectLinkInterface UpdateDedicatedGroup UpdateCa UpdateApiAccessRule UpdateApiAccessPolicy UpdateAccount UpdateAccessKey UnlinkVolume UnlinkVirtualGateway UnlinkRouteTable UnlinkPublicIp UnlinkPrivateIps UnlinkPolicy UnlinkNic UnlinkManagedPolicyFromUserGroup UnlinkLoadBalancerBackendMachines UnlinkInternetService UnlinkFlexibleGpu StopVms StartVms SetDefaultPolicyVersion ScaleUpVmGroup ScaleDownVmGroup RemoveUserFromUserGroup RejectNetPeering RegisterVmsInLoadBalancer RebootVms ReadVpnConnections ReadVolumes ReadVmsState ReadVmsHealth ReadVms ReadVmTypes ReadVmTemplates ReadVmGroups ReadVirtualGateways ReadUsers ReadUserGroupsPerUser ReadUserGroups ReadUserGroupPolicy ReadUserGroupPolicies ReadUserGroup ReadUnitPrice ReadTags ReadSubregions ReadSubnets ReadSnapshots ReadSnapshotExportTasks ReadServerCertificates ReadSecurityGroups ReadSecretAccessKey ReadRouteTables ReadRegions ReadQuotas ReadPublicIps ReadPublicIpRanges ReadPublicCatalog ReadProductTypes ReadPolicyVersions ReadPolicyVersion ReadPolicy ReadPolicies ReadNics ReadNets ReadNetPeerings ReadNetAccessPoints ReadNetAccessPointServices ReadNatServices ReadManagedPoliciesLinkedToUserGroup ReadLocations ReadLoadBalancers ReadLoadBalancerTags ReadListenerRules ReadLinkedPolicies ReadKeypairs ReadInternetServices ReadImages ReadImageExportTasks ReadFlexibleGpus ReadFlexibleGpuCatalog ReadEntitiesLinkedToPolicy ReadDirectLinks ReadDirectLinkInterfaces ReadDhcpOptions ReadDedicatedGroups ReadConsumptionAccount ReadConsoleOutput ReadClientGateways ReadCatalogs ReadCatalog ReadCas ReadApiLogs ReadApiAccessRules ReadApiAccessPolicy ReadAdminPassword ReadAccounts ReadAccessKeys PutUserGroupPolicy LinkVolume LinkVirtualGateway LinkRouteTable LinkPublicIp LinkPrivateIps LinkPolicy LinkNic LinkManagedPolicyToUserGroup LinkLoadBalancerBackendMachines LinkInternetService LinkFlexibleGpu DeregisterVmsInLoadBalancer DeleteVpnConnectionRoute DeleteVpnConnection DeleteVolume DeleteVms DeleteVmTemplate DeleteVmGroup DeleteVirtualGateway DeleteUserGroupPolicy DeleteUserGroup DeleteUser DeleteTags DeleteSubnet DeleteSnapshot DeleteServerCertificate DeleteSecurityGroupRule DeleteSecurityGroup DeleteRouteTable DeleteRoute DeletePublicIp DeletePolicyVersion DeletePolicy DeleteNic DeleteNetPeering DeleteNetAccessPoint DeleteNet DeleteNatService DeleteLoadBalancerTags DeleteLoadBalancerPolicy DeleteLoadBalancerListeners DeleteLoadBalancer DeleteListenerRule DeleteKeypair DeleteInternetService DeleteImage DeleteFlexibleGpu DeleteExportTask DeleteDirectLinkInterface DeleteDirectLink DeleteDhcpOptions DeleteDedicatedGroup DeleteClientGateway DeleteCa DeleteApiAccessRule DeleteAccessKey CreateVpnConnectionRoute CreateVpnConnection CreateVolume CreateVms CreateVmTemplate CreateVmGroup CreateVirtualGateway CreateUserGroup CreateUser CreateTags CreateSubnet CreateSnapshotExportTask CreateSnapshot CreateServerCertificate CreateSecurityGroupRule CreateSecurityGroup CreateRouteTable CreateRoute CreatePublicIp CreateProductType CreatePolicyVersion CreatePolicy CreateNic CreateNetPeering CreateNetAccessPoint CreateNet CreateNatService CreateLoadBalancerTags CreateLoadBalancerPolicy CreateLoadBalancerListeners CreateLoadBalancer CreateListenerRule CreateKeypair CreateInternetService CreateImageExportTask CreateImage CreateFlexibleGpu CreateDirectLinkInterface CreateDirectLink CreateDhcpOptions CreateDedicatedGroup CreateClientGateway CreateCa CreateApiAccessRule CreateAccount CreateAccessKey CheckAuthentication AddUserToUserGroup AcceptNetPeering" -- ${cur})) ;; esac ;; diff --git a/osc_sdk.c b/osc_sdk.c index e5e84d6..f638269 100644 --- a/osc_sdk.c +++ b/osc_sdk.c @@ -141,6 +141,7 @@ static const char *calls_name[] = { "ReadUserGroupPolicy", "ReadUserGroupPolicies", "ReadUserGroup", + "ReadUnitPrice", "ReadTags", "ReadSubregions", "ReadSubnets", @@ -178,6 +179,7 @@ static const char *calls_name[] = { "ReadImageExportTasks", "ReadFlexibleGpus", "ReadFlexibleGpuCatalog", + "ReadEntitiesLinkedToPolicy", "ReadDirectLinks", "ReadDirectLinkInterfaces", "ReadDhcpOptions", @@ -427,10 +429,12 @@ static const char *calls_descriptions[] = { "Usage: oapi-cli ReadUserGroupPolicies --UserGroupName=usergroupname [OPTIONS]\n" "Lists the names of the inline policies embedded in a specific group.\n" "\nRequired Argument: UserGroupName \n" , "Usage: oapi-cli ReadUserGroup --UserGroupName=usergroupname [OPTIONS]\n" "Lists information about a specified user group, including its users.\n" "\nRequired Argument: UserGroupName \n" +, + "Usage: oapi-cli ReadUnitPrice --Operation=operation --Service=service --Type=type [OPTIONS]\n" "Gets unit price information for the specified parameters.\n" "\nRequired Argument: Operation, Service, Type \n" , "Usage: oapi-cli ReadTags [OPTIONS]\n" "Lists one or more tags for your resources.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadSubregions [OPTIONS]\n" "Lists one or more of the enabled Subregions that you can access in the current \n" "Region.\n\nFor more information, see [About Regions, Endpoints, and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-Endpoints-and-S\n" "ubregions.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadSubregions [OPTIONS]\n" "Lists one or more of the enabled Subregions that you can access in the current \n" "Region.\n\nFor more information, see [About Regions and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-and-Subregions.\n" "html).\n" "\nRequired Argument: \n" , "Usage: oapi-cli ReadSubnets [OPTIONS]\n" "Lists one or more of your Subnets.\nIf you do not specify any Subnet ID, this \n" "action describes all of your Subnets.\n" "\nRequired Argument: \n" , @@ -442,19 +446,19 @@ static const char *calls_descriptions[] = { , "Usage: oapi-cli ReadSecurityGroups [OPTIONS]\n" "Lists one or more security groups.\nYou can specify either the name of the \n" "security groups or their IDs.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadSecretAccessKey --AccessKeyId=accesskeyid [OPTIONS]\n" "Lists information about the specified access key of your root account, \n" "including its secret key.\n" "\nRequired Argument: AccessKeyId \n" + "Usage: oapi-cli ReadSecretAccessKey --AccessKeyId=accesskeyid [OPTIONS]\n" "> [WARNING]\n> Deprecated: This call will be removed after October 1, \n" "2024.\n\nLists information about the specified access key of your root account, \n" "including its secret key.\n" "\nRequired Argument: AccessKeyId \n" , "Usage: oapi-cli ReadRouteTables [OPTIONS]\n" "Lists one or more of your route tables.\nIn your Net, each Subnet must be \n" "associated with a route table. If a Subnet is not explicitly associated with a \n" "route table, it is implicitly associated with the main route table of the Net.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadRegions [OPTIONS]\n" "Lists one or more Regions of the OUTSCALE Cloud.\nFor more information, see \n" "[About Regions, Endpoints, and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-Endpoints-and-S\n" "ubregions.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadRegions [OPTIONS]\n" "Lists one or more Regions of the OUTSCALE Cloud.\nFor more information, see \n" "[About Regions and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-and-Subregions.\n" "html).\n" "\nRequired Argument: \n" , "Usage: oapi-cli ReadQuotas [OPTIONS]\n" "Lists one or more of your quotas.\nFor more information, see [About Your \n" "Account](https://docs.outscale.com/en/userguide/About-Your-Account.html).\n" "\nRequired Argument: \n" , "Usage: oapi-cli ReadPublicIps [OPTIONS]\n" "Lists one or more public IPs allocated to your account.\nBy default, this \n" "action returns information about all your public IPs: available or associated \n" "with a virtual machine (VM), a network interface card (NIC) or a NAT service.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadPublicIpRanges [OPTIONS]\n" "Gets the public IPv4 addresses in CIDR notation for the Region specified in the \n" "endpoint of the request. For more information, see [Regions, Endpoints, and \n" "Subregions \n" "Reference](https://docs.outscale.com/en/userguide/Regions-Endpoints-and-Subregio\n" "ns-Reference.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadPublicIpRanges [OPTIONS]\n" "Gets the public IPv4 addresses in CIDR notation for the Region specified in the \n" "endpoint of the request. For more information, see [About Regions and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-and-Subregions.\n" "html).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadPublicCatalog [OPTIONS]\n" "Returns the price list of OUTSCALE products and services for the Region \n" "specified in the endpoint of the request. For more information, see [Regions, \n" "Endpoints, and Subregions \n" "Reference](https://docs.outscale.com/en/userguide/Regions-Endpoints-and-Subregio\n" "ns-Reference.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadPublicCatalog [OPTIONS]\n" "Returns the price list of OUTSCALE products and services for the Region \n" "specified in the endpoint of the request. For more information, see [About \n" "Regions and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-and-Subregions.\n" "html).\n" "\nRequired Argument: \n" , "Usage: oapi-cli ReadProductTypes [OPTIONS]\n" "Lists one or more product types.\n" "\nRequired Argument: \n" , @@ -492,7 +496,7 @@ static const char *calls_descriptions[] = { , "Usage: oapi-cli ReadKeypairs [OPTIONS]\n" "Lists one or more of your keypairs.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadInternetServices [OPTIONS]\n" "Lists one or more of your Internet services.\nAn Internet service enables your \n" "virtual machines (VMs) launched in a Net to connect to the Internet. By \n" "default, a Net includes an Internet service, and each Subnet is public. Every \n" "VM launched within a default Subnet has a private IP and a public IP.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadInternetServices [OPTIONS]\n" "Lists one or more of your Internet services.\nAn Internet service enables \n" "virtual machines (VMs) launched in a Net to connect to the Internet. It allows \n" "routing of incoming and outgoing Internet traffic and management of public IP \n" "addresses.\n" "\nRequired Argument: \n" , "Usage: oapi-cli ReadImages [OPTIONS]\n" "Lists one or more OUTSCALE machine images (OMIs) you can use.\n" "\nRequired Argument: \n" , @@ -501,6 +505,8 @@ static const char *calls_descriptions[] = { "Usage: oapi-cli ReadFlexibleGpus [OPTIONS]\n" "Lists one or more flexible GPUs (fGPUs) allocated to your account.\n" "\nRequired Argument: \n" , "Usage: oapi-cli ReadFlexibleGpuCatalog [OPTIONS]\n" "Lists all flexible GPUs available in the public catalog.\n" "\nRequired Argument: \n" +, + "Usage: oapi-cli ReadEntitiesLinkedToPolicy [OPTIONS]\n" "Lists all entities (account, users, or user groups) linked to a specific \n" "managed policy.\n" "\nRequired Argument: \n" , "Usage: oapi-cli ReadDirectLinks [OPTIONS]\n" "Lists all DirectLinks in the Region.\n" "\nRequired Argument: \n" , @@ -556,7 +562,7 @@ static const char *calls_descriptions[] = { , "Usage: oapi-cli LinkInternetService --InternetServiceId=internetserviceid --NetId=netid [OPTIONS]\n" "Attaches an Internet service to a Net.\nTo enable the connection between the \n" "Internet and a Net, you must attach an Internet service to this Net.\n" "\nRequired Argument: InternetServiceId, NetId \n" , - "Usage: oapi-cli LinkFlexibleGpu --FlexibleGpuId=flexiblegpuid --VmId=vmid [OPTIONS]\n" "Attaches one of your allocated flexible GPUs (fGPUs) to one of your virtual \n" "machines (VMs).\nThe fGPU is in the `attaching` state until the VM is stopped, \n" "after which it becomes `attached`. \n\n**[NOTE]**\nYou can attach fGPUs only to \n" "VMs with the `highest` (1) performance flag. For more information see [About \n" "Flexible GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html) \n" "and [VM Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" "\nRequired Argument: FlexibleGpuId, VmId \n" + "Usage: oapi-cli LinkFlexibleGpu --FlexibleGpuId=flexiblegpuid --VmId=vmid [OPTIONS]\n" "Attaches one of your allocated flexible GPUs (fGPUs) to one of your virtual \n" "machines (VMs).\nTo complete the linking of the fGPU, you need to do a \n" "stop/start of the VM. A simple restart is not sufficient, as the linking of the \n" "fGPU is done when the VM goes through the `stopped` state. For the difference \n" "between stop/start and restart, see [About VM \n" "Lifecycle](https://docs.outscale.com/en/userguide/About-VM-Lifecycle.html).\n\n*\n" "*[NOTE]**\nYou can attach fGPUs only to VMs with the `highest` (1) performance \n" "flag. For more information see [About Flexible \n" "GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html) and [VM \n" "Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" "\nRequired Argument: FlexibleGpuId, VmId \n" , "Usage: oapi-cli DeregisterVmsInLoadBalancer --BackendVmIds=backendvmids --LoadBalancerName=loadbalancername [OPTIONS]\n" "Deregisters a specified virtual machine (VM) from a load balancer.\n" "\nRequired Argument: BackendVmIds, LoadBalancerName \n" , @@ -670,9 +676,9 @@ static const char *calls_descriptions[] = { , "Usage: oapi-cli CreateSubnet --IpRange=iprange --NetId=netid [OPTIONS]\n" "Creates a Subnet in an existing Net.\nTo create a Subnet in a Net, you have to \n" "provide the ID of the Net and the IP range for the Subnet (its network range). \n" "Once the Subnet is created, you cannot modify its IP range.\nFor more \n" "information, see [About \n" "Nets](https://docs.outscale.com/en/userguide/About-Nets.html).\n" "\nRequired Argument: IpRange, NetId \n" , - "Usage: oapi-cli CreateSnapshotExportTask --OsuExport=osuexport --SnapshotId=snapshotid [OPTIONS]\n" "Exports a snapshot to an OUTSCALE Object Storage (OOS) bucket that belongs to \n" "you. This action enables you to create a backup of your snapshot.\nYou can \n" "share this snapshot with others accounts by granting permission to read it via \n" "pre-signed URLs or Access Control Lists (ACLs). For more information, see \n" "[Managing Access to Your Buckets and \n" "Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-Buckets-\n" "and-Objects.html).\nFor more information, see [About \n" "Snapshots](https://docs.outscale.com/en/userguide/About-Snapshots.html).\n" "\nRequired Argument: OsuExport, SnapshotId \n" + "Usage: oapi-cli CreateSnapshotExportTask --OsuExport=osuexport --SnapshotId=snapshotid [OPTIONS]\n" "Exports a snapshot to an OUTSCALE Object Storage (OOS) bucket that belongs to \n" "you. This action enables you to create a backup of your snapshot.\nYou can \n" "share this snapshot with others accounts by granting permission to read it via \n" "pre-signed URLs. For more information, see [Creating a Pre-Signed \n" "URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\nFo\n" "r more information, see [About \n" "Snapshots](https://docs.outscale.com/en/userguide/About-Snapshots.html).\n" "\nRequired Argument: OsuExport, SnapshotId \n" , - "Usage: oapi-cli CreateSnapshot [OPTIONS]\n" "Creates a snapshot. Snapshots are point-in-time images of a volume that you can \n" "use to back up your data or to create replicas of this volume.\nYou can use \n" "this method in three different ways:\n* **Creating from a volume**: You create \n" "a snapshot from one of your volumes.\n* **Copying a snapshot**: You copy an \n" "existing snapshot. The source snapshot can be one of your own snapshots, or a \n" "snapshot owned by another account that has granted you permission via the \n" "[UpdateSnapshot](#updatesnapshot) method.\n* **Importing from a bucket**: You \n" "import a snapshot located in an OUTSCALE Object Storage (OOS) bucket. First, \n" "the owner of the source snapshot must export it to a bucket by using the \n" "[CreateSnapshotExportTask](#createsnapshotexporttask) method. Then, they must \n" "grant you permission to read the snapshot via a pre-signed URL or Access \n" "Control Lists. For more information, see [Managing Access to Your Buckets and \n" "Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-Buckets-\n" "and-Objects.html).\n\n**[NOTE]**\nIn case of excessive use of the snapshot \n" "creation feature on the same volume over a short period of time, 3DS OUTSCALE \n" "reserves the right to temporarily block the feature.\n\nFor more information, \n" "see [About \n" "Snapshots](https://docs.outscale.com/en/userguide/About-Snapshots.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli CreateSnapshot [OPTIONS]\n" "Creates a snapshot. Snapshots are point-in-time images of a volume that you can \n" "use to back up your data or to create replicas of this volume.\nYou can use \n" "this method in three different ways:\n* **Creating from a volume**: You create \n" "a snapshot from one of your volumes.\n* **Copying a snapshot**: You copy an \n" "existing snapshot. The source snapshot can be one of your own snapshots, or a \n" "snapshot owned by another account that has granted you permission via the \n" "[UpdateSnapshot](#updatesnapshot) method.\n* **Importing from a bucket**: You \n" "import a snapshot located in an OUTSCALE Object Storage (OOS) bucket. First, \n" "the owner of the source snapshot must export it to a bucket by using the \n" "[CreateSnapshotExportTask](#createsnapshotexporttask) method. Then, they must \n" "grant you permission to read the snapshot via a pre-signed URL. For more \n" "information, see [Creating a Pre-Signed \n" "URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\n\n\n" "**[NOTE]**\nIn case of excessive use of the snapshot creation feature on the \n" "same volume over a short period of time, 3DS OUTSCALE reserves the right to \n" "temporarily block the feature.\n\nFor more information, see [About \n" "Snapshots](https://docs.outscale.com/en/userguide/About-Snapshots.html).\n" "\nRequired Argument: \n" , "Usage: oapi-cli CreateServerCertificate --Body=body --PrivateKey=privatekey --Name=name [OPTIONS]\n" "Creates a server certificate and its matching private key.\nThese elements can \n" "be used with other services (for example, to configure SSL termination on load \n" "balancers).\nYou can also specify the chain of intermediate certification \n" "authorities if your certificate is not directly signed by a root one. You can \n" "specify multiple intermediate certification authorities in the \n" "`CertificateChain` parameter. To do so, concatenate all certificates in the \n" "correct order (the first certificate must be the authority of your certificate, \n" "the second must be the authority of the first one, and so on).\nThe private key \n" "must be a RSA key in PKCS1 form. To check this, open the PEM file and ensure \n" "its header reads as follows: BEGIN RSA PRIVATE KEY.\n[IMPORTANT]\nThis private \n" "key must not be protected by a password or a passphrase.\nFor more information, \n" "see [About Server Certificates in \n" "EIM](https://docs.outscale.com/en/userguide/About-Server-Certificates-in-EIM.htm\n" "l).\n" "\nRequired Argument: Body, PrivateKey, Name \n" , @@ -694,7 +700,7 @@ static const char *calls_descriptions[] = { , "Usage: oapi-cli CreateNic --SubnetId=subnetid [OPTIONS]\n" "Creates a network interface card (NIC) in the specified Subnet.\nFor more \n" "information, see [About \n" "NICs](https://docs.outscale.com/en/userguide/About-NICs.html).\n" "\nRequired Argument: SubnetId \n" , - "Usage: oapi-cli CreateNetPeering --AccepterNetId=accepternetid --SourceNetId=sourcenetid [OPTIONS]\n" "Requests a Net peering between a Net you own and a peer Net that belongs to you \n" "or another account.\nThis action creates a Net peering that remains in the \n" "`pending-acceptance` state until it is accepted by the owner of the peer Net. \n" "If the owner of the peer Net does not accept the request within 7 days, the \n" "state of the Net peering becomes `expired`. For more information, see \n" "[AcceptNetPeering](#acceptnetpeering).\n\n**[IMPORTANT]**\n* Peered Nets must \n" "contain at least one virtual machine (VM) each before the creation of the Net \n" "peering.\n* The two Nets must not have overlapping IP ranges. Otherwise, the \n" "Net peering is in the `failed` state.\n* A peering connection between two Nets \n" "works both ways. Therefore, you do not need to create a B-to-A connection if an \n" "A-to-B connection is created and accepted.\n\nFor more information, see [About \n" "Net Peerings](https://docs.outscale.com/en/userguide/About-Net-Peerings.html).\n" "\nRequired Argument: AccepterNetId, SourceNetId \n" + "Usage: oapi-cli CreateNetPeering --AccepterNetId=accepternetid --SourceNetId=sourcenetid [OPTIONS]\n" "Requests a Net peering between a Net you own and a peer Net that belongs to you \n" "or another account.\nThis action creates a Net peering that remains in the \n" "`pending-acceptance` state until it is accepted by the owner of the peer Net. \n" "If the owner of the peer Net does not accept the request within 7 days, the \n" "state of the Net peering becomes `expired`. For more information, see \n" "[AcceptNetPeering](#acceptnetpeering).\n\n**[IMPORTANT]**\n* Peered Nets must \n" "contain at least one virtual machine (VM) each before the creation of the Net \n" "peering.\n* The two Nets must not have overlapping IP ranges. Otherwise, the \n" "Net peering is in the `failed` state.\n* A peering connection between two Nets \n" "works both ways. If an A-to-B connection is already created and accepted, \n" "creating a B-to-A connection is not necessary and would be automatically \n" "rejected.\n\nFor more information, see [About Net \n" "Peerings](https://docs.outscale.com/en/userguide/About-Net-Peerings.html).\n" "\nRequired Argument: AccepterNetId, SourceNetId \n" , "Usage: oapi-cli CreateNetAccessPoint --ServiceName=servicename --NetId=netid [OPTIONS]\n" "Creates a Net access point to access an OUTSCALE service from this Net without \n" "using the Internet and public IPs.\nYou specify the service using its name. For \n" "more information about the available services, see \n" "[ReadNetAccessPointServices](#readnetaccesspointservices). \nTo control the \n" "routing of traffic between the Net and the specified service, you can specify \n" "one or more route tables. Virtual machines placed in Subnets associated with \n" "the specified route table thus use the Net access point to access the service. \n" "When you specify a route table, a route is automatically added to it with the \n" "destination set to the prefix list ID of the service, and the target set to the \n" "ID of the access point.\nWhen a Net access point is created, a public IP is \n" "automatically allocated to your account and used for the Net access point. This \n" "public IP is not connected to the Internet. It is counted in your quota, but it \n" "is not billed. \nFor more information, see [About Net Access \n" "Points](https://docs.outscale.com/en/userguide/About-Net-Access-Points.html).\n" "\nRequired Argument: ServiceName, NetId \n" , @@ -714,11 +720,11 @@ static const char *calls_descriptions[] = { , "Usage: oapi-cli CreateKeypair --KeypairName=keypairname [OPTIONS]\n" "Creates a keypair to use with your virtual machines (VMs).\nYou can use this \n" "method in two different ways:\n* **Creating a keypair**: In that case, 3DS \n" "OUTSCALE creates a 2048-bit RSA keypair, stores its public key in your account, \n" "and returns its private key in the response of the call so that you can save it \n" "in a file.\nWhen you save the returned private key, make sure you replace the \n" "`\\n` escape sequences with real line breaks.\n* **Importing a keypair created \n" "locally**: If you already have a keypair that you have created locally with a \n" "third-party tool, you can import its public key in your account. The following \n" "types of key can be imported: RSA (2048 bits or preferably 4096 bits), Ed25519, \n" "and ECDSA (256 bits, 384 bits, or 521 bits). The following formats can be used: \n" "PEM, PKCS8, RFC4716, and OpenSSH.\n\nFor more information, see [About \n" "Keypairs](https://docs.outscale.com/en/userguide/About-Keypairs.html).\n" "\nRequired Argument: KeypairName \n" , - "Usage: oapi-cli CreateInternetService [OPTIONS]\n" "Creates an Internet service you can use with a Net.\nAn Internet service \n" "enables your virtual machines (VMs) launched in a Net to connect to the \n" "Internet. By default, a Net includes an Internet service, and each Subnet is \n" "public. Every VM launched within a default Subnet has a private IP and a public \n" "IP.\nFor more information, see [About Internet \n" "Services](https://docs.outscale.com/en/userguide/About-Internet-Services.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli CreateInternetService [OPTIONS]\n" "Creates an Internet service you can use with a Net.\nAn Internet service \n" "enables virtual machines (VMs) launched in a Net to connect to the Internet. It \n" "allows routing of incoming and outgoing Internet traffic and management of \n" "public IP addresses.\nFor more information, see [About Internet \n" "Services](https://docs.outscale.com/en/userguide/About-Internet-Services.html).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli CreateImageExportTask --OsuExport=osuexport --ImageId=imageid [OPTIONS]\n" "Exports an OUTSCALE machine image (OMI) to an OUTSCALE Object Storage (OOS) \n" "bucket.\nThis action enables you to copy an OMI between accounts in different \n" "Regions. To copy an OMI in the same Region, you can also use the \n" "[CreateImage](#createimage) method.\nThe copy of the OMI belongs to you and is \n" "independent from the source OMI.\n\n**[IMPORTANT]**\nYou cannot export a shared \n" "or public OMI, as they do not belong to you. To do so, you must first copy it \n" "to your account. The copy then belongs to you and you can export it.\nFor more \n" "information, see [About \n" "OMIs](https://docs.outscale.com/en/userguide/About-OMIs.html).\n" "\nRequired Argument: OsuExport, ImageId \n" + "Usage: oapi-cli CreateImageExportTask --OsuExport=osuexport --ImageId=imageid [OPTIONS]\n" "Exports an OUTSCALE machine image (OMI) to an OUTSCALE Object Storage (OOS) \n" "bucket.\nThis enables you to copy an OMI between accounts in different \n" "Regions.\nThis action creates the necessary snapshots and manifest file in the \n" "bucket. The OMI can then be imported to another account using a pre-signed URL \n" "of its manifest file. For more information, see [Creating a Pre-Signed \n" "URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\nTo\n" " copy an OMI in the same Region, you can also use the \n" "[CreateImage](#createimage) method.\n\n**[IMPORTANT]**\nYou cannot export a \n" "shared or public OMI, as they do not belong to you. To do so, you must first \n" "copy it to your account. The copy then belongs to you and you can export \n" "it.\nFor more information, see [About \n" "OMIs](https://docs.outscale.com/en/userguide/About-OMIs.html).\n" "\nRequired Argument: OsuExport, ImageId \n" , - "Usage: oapi-cli CreateImage [OPTIONS]\n" "Creates an OUTSCALE machine image (OMI).\nYou can use this method in different \n" "ways:\n* **Creating from a VM**: You create an OMI from one of your virtual \n" "machines (VMs).
\n* **Copying an OMI**: You copy an existing OMI. The source \n" "OMI can be one of your own OMIs, or an OMI owned by another account that has \n" "granted you permission via the [UpdateImage](#updateimage) method.
\n* \n" "**Registering from a snapshot**: You register an OMI from an existing snapshot. \n" "The source snapshot can be one of your own snapshots, or a snapshot owned by \n" "another account that has granted you permission via the \n" "[UpdateSnapshot](#updatesnapshot) method.
\n* **Registering from a bucket by \n" "using a manifest file**: You register an OMI from the manifest file of an OMI \n" "that was exported to an OUTSCALE Object Storage (OOS) bucket. First, the owner \n" "of the source OMI must export it to the bucket by using the \n" "[CreateImageExportTask](#createimageexporttask) method. Then, they must grant \n" "you permission to read the manifest file via a pre-signed URL or Access Control \n" "Lists. For more information, see [Managing Access to Your Buckets and \n" "Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-Buckets-\n" "and-Objects.html).\n* **Registering from a bucket without using a manifest \n" "file**: This is similar to the previous case but you manually specify all the \n" "information that would be in a manifest file instead of using a manifest \n" "file.\n\n**[TIP]**\nRegistering from a bucket enables you to copy an OMI across \n" "Regions.\n\nFor more information, see [About \n" "OMIs](https://docs.outscale.com/en/userguide/About-OMIs.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli CreateImage [OPTIONS]\n" "Creates an OUTSCALE machine image (OMI).\nYou can use this method in different \n" "ways:\n* **Creating from a VM**: You create an OMI from one of your virtual \n" "machines (VMs).
\n* **Copying an OMI**: You copy an existing OMI. The source \n" "OMI can be one of your own OMIs, or an OMI owned by another account that has \n" "granted you permission via the [UpdateImage](#updateimage) method.
\n* \n" "**Registering from a snapshot**: You register an OMI from an existing snapshot. \n" "The source snapshot can be one of your own snapshots, or a snapshot owned by \n" "another account that has granted you permission via the \n" "[UpdateSnapshot](#updatesnapshot) method.
\n* **Registering from a bucket by \n" "using a manifest file**: You register an OMI from the manifest file of an OMI \n" "that was exported to an OUTSCALE Object Storage (OOS) bucket. First, the owner \n" "of the source OMI must export it to the bucket by using the \n" "[CreateImageExportTask](#createimageexporttask) method. Then, they must grant \n" "you permission to read the manifest file via a pre-signed URL. For more \n" "information, see [Creating a Pre-Signed \n" "URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\n\n\n" "**[TIP]**\nRegistering from a bucket enables you to copy an OMI across \n" "Regions.\n\nFor more information, see [About \n" "OMIs](https://docs.outscale.com/en/userguide/About-OMIs.html).\n" "\nRequired Argument: \n" , "Usage: oapi-cli CreateFlexibleGpu --ModelName=modelname --SubregionName=subregionname [OPTIONS]\n" "Allocates a flexible GPU (fGPU) to your account.\nYou can then attach this fGPU \n" "to a virtual machine (VM).\nFor more information, see [About Flexible \n" "GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html).\n" "\nRequired Argument: ModelName, SubregionName \n" , @@ -929,6 +935,8 @@ static const char *calls_args_descriptions[] = { " If true, checks whether you have the required permissions to perform the action.\n" "--NewPath: string\n" " A new path for the EIM user.\n" +"--NewUserEmail: string\n" + " A new email address for the EIM user.\n" "--NewUserName: string\n" " A new name for the EIM user.\n" "--UserName: string\n" @@ -1116,13 +1124,13 @@ static const char *calls_args_descriptions[] = { "--HostPattern: string\n" " A host-name pattern for the rule, with a maximum length of 128 characters. This host-name \n" " pattern supports maximum three wildcards, and must not contain any special characters \n" - " except [-.?].\n" + " except `-.?`.\n" "--ListenerRuleName: string\n" " The name of the listener rule.\n" "--PathPattern: string\n" " A path pattern for the rule, with a maximum length of 128 characters. This path pattern \n" " supports maximum three wildcards, and must not contain any special characters except \n" - " [_-.$/~\"'@:+?].\n" + " `_-.$/~\"'@:+?`.\n" , "--Description: string\n" " A new description for the image.\n" @@ -1436,7 +1444,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -1482,7 +1490,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--AllVms: bool\n" @@ -1511,7 +1519,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--BackendVmIds: array string\n" @@ -1677,7 +1685,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -1707,7 +1715,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -1795,11 +1803,19 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +"--Filters: ref FiltersUsers\n" + " One or more filters.\n" + " --Filters.UserIds: array string\n" + " The IDs of the users.\n" +"--FirstItem: long long int\n" + " The item starting the list of users requested.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of items that can be returned in a single response (by default, `100`).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" @@ -1848,6 +1864,15 @@ static const char *calls_args_descriptions[] = { " The path to the group. If not specified, it is set to a slash (`/`).\n" "--UserGroupName: string\n" " The name of the group.\n" +, + "--Operation: string\n" + " The operation associated with the catalog entry (for example, `RunInstances-OD` or \n" + " `CreateVolume`).\n" +"--Service: string\n" + " The service associated with the catalog entry (for example, `TinaOS-FCU` or `TinaOS-OOS`).\n" +"--Type: string\n" + " The type associated with the catalog entry (for example, `BSU:VolumeIOPS:io1` or \n" + " `BoxUsage:tinav6.c6r16p3`).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" @@ -1872,7 +1897,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -1888,7 +1913,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -1919,7 +1944,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -1965,7 +1990,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -1977,7 +2002,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2046,7 +2071,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--AccessKeyId: string\n" @@ -2097,7 +2122,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2119,7 +2144,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2153,7 +2178,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2161,7 +2186,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2176,7 +2201,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--FirstItem: long long int\n" @@ -2310,7 +2335,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2351,7 +2376,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2379,7 +2404,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2393,7 +2418,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2422,7 +2447,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2446,7 +2471,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2496,7 +2521,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2522,7 +2547,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2583,7 +2608,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2595,7 +2620,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2621,6 +2646,17 @@ static const char *calls_args_descriptions[] = { , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +, + "--EntitiesType: array string\n" + " The type of entity linked to the policy (`ACCOUNT` \\| `USER` \\| `GROUP`) you want to get \n" + " information about.\n" +"--FirstItem: long long int\n" + " The item starting the list of entities requested.\n" +"--PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" +"--ResultsPerPage: long long int\n" + " The maximum number of items that can be returned in a single response (by default, 100).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" @@ -2631,7 +2667,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2645,7 +2681,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2677,7 +2713,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2696,7 +2732,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2753,7 +2789,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" , "--DryRun: bool\n" @@ -2818,7 +2854,7 @@ static const char *calls_args_descriptions[] = { "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1`and `1000`, both \n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" "--With: ref With\n" " The information to display in each returned log.\n" @@ -3506,7 +3542,10 @@ static const char *calls_args_descriptions[] = { " must not specify the `Nics` parameter.\n" "--UserData: string\n" " Data or script used to add a specific configuration to the VM. It must be Base64-encoded \n" - " and is limited to 500 kibibytes (KiB).\n" + " and is limited to 500 kibibytes (KiB). For more information about user data, see \n" + " [Configuring a VM with User Data and OUTSCALE \n" + " Tags](https://docs.outscale.com/en/userguide/Configuring-a-VM-with-User-Data-and-OUTSCALE-Ta\n" + " gs.html).\n" "--VmInitiatedShutdownBehavior: string\n" " The VM behavior when you stop it. By default or if set to `stop`, the VM stops. If set to \n" " `restart`, the VM stops then automatically restarts. If set to `terminate`, the VM stops \n" @@ -3591,11 +3630,13 @@ static const char *calls_args_descriptions[] = { "--Path: string\n" " The path to the EIM user you want to create (by default, `/`). This path name must begin \n" " and end with a slash (`/`), and contain between 1 and 512 alphanumeric characters and/or \n" - " slashes (`/`), or underscores (_).\n" + " slashes (`/`), or underscores (`_`).\n" +"--UserEmail: string\n" + " The email address of the EIM user.\n" "--UserName: string\n" " The name of the EIM user. This user name must contain between 1 and 64 alphanumeric \n" - " characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes \n" - " (-), or underscores (_).\n" + " characters and/or pluses (`+`), equals (`=`), commas (`,`), periods (`.`), at signs (`@`), \n" + " dashes (`-`), or underscores (`_`).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" @@ -3648,13 +3689,9 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--FileLocation: string\n" - " **(when importing from a bucket)** The pre-signed URL of the snapshot you want to import, \n" - " or the normal URL of the snapshot if you have permission on the OOS bucket. For more \n" - " information, see [Configuring a Pre-signed \n" - " URL](https://docs.outscale.com/en/userguide/Configuring-a-Pre-signed-URL.html) or [Managing \n" - " Access to Your Buckets and \n" - " Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-Buckets-and-Objects.\n" - " html).\n" + " **(when importing from a bucket)** The pre-signed URL of the snapshot you want to import. \n" + " For more information, see [Creating a Pre-signed \n" + " URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\n" "--SnapshotSize: long long int\n" " **(when importing from a bucket)** The size of the snapshot you want to create in your \n" " account, in bytes. This size must be greater than or equal to the size of the original, \n" @@ -3677,10 +3714,11 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Name: string\n" - " A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), \n" - " equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).\n" + " A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses \n" + " (`+`), equals (`=`), commas (`,`), periods (`.`), at signs (`@`), minuses (`-`), or \n" + " underscores (`_`).\n" "--Path: string\n" - " The path to the server certificate, set to a slash (/) if not specified.\n" + " The path to the server certificate, set to a slash (`/`) if not specified.\n" "--PrivateKey: string\n" " The PEM-encoded private key matching the certificate.With OSC CLI, use the following syntax \n" " to make sure your key file is correctly parsed: `--PrivateKey=\"$(cat FILENAME)\"`.\n" @@ -3839,6 +3877,9 @@ static const char *calls_args_descriptions[] = { , "--AccepterNetId: string\n" " The ID of the Net you want to connect with.\n" +"--AccepterOwnerId: string\n" + " The account ID of the owner of the Net you want to connect with. By default, the account ID \n" + " of the owner of the Net from which the peering request is sent.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--SourceNetId: string\n" @@ -3898,7 +3939,7 @@ static const char *calls_args_descriptions[] = { " The name of the load balancer for which you want to create a policy.\n" "--PolicyName: string\n" " The unique name of the policy, with a maximum length of 32 alphanumeric characters and \n" - " dashes (-).\n" + " dashes (`-`).\n" "--PolicyType: string\n" " The type of stickiness policy you want to create: `app` or `load_balancer`.\n" , @@ -3949,7 +3990,7 @@ static const char *calls_args_descriptions[] = { " outscale_resource_names_orns).\n" "--LoadBalancerName: string\n" " The unique name of the load balancer, with a maximum length of 32 alphanumeric characters \n" - " and dashes (-). This name must not start or end with a dash.\n" + " and dashes (`-`). This name must not start or end with a dash.\n" "--LoadBalancerType: string\n" " The type of load balancer: `internet-facing` or `internal`. Use this parameter only for \n" " load balancers in a Net.\n" @@ -3991,13 +4032,13 @@ static const char *calls_args_descriptions[] = { " --ListenerRule.HostNamePattern: string\n" " A host-name pattern for the rule, with a maximum length of 128 \n" " characters. This host-name pattern supports maximum three wildcards, and \n" - " must not contain any special characters except [-.?].\n" + " must not contain any special characters except `-.?`.\n" " --ListenerRule.ListenerRuleName: string\n" " A human-readable name for the listener rule.\n" " --ListenerRule.PathPattern: string\n" " A path pattern for the rule, with a maximum length of 128 characters. \n" " This path pattern supports maximum three wildcards, and must not contain \n" - " any special characters except [_-.$/~\"'@:+?].\n" + " any special characters except `_-.$/~\"'@:+?`.\n" " --ListenerRule.Priority: long long int\n" " The priority level of the listener rule, between `1` and `19999` both \n" " included. Each rule must have a unique priority level. Otherwise, an \n" @@ -4039,11 +4080,9 @@ static const char *calls_args_descriptions[] = { " The prefix for the key of the OOS object.\n" , "--Architecture: string\n" - " **(when registering from a snapshot, or from a bucket without using a manifest file)** The \n" - " architecture of the OMI (`i386` or `x86_64`).\n" + " **(when registering from a snapshot)** The architecture of the OMI (`i386` or `x86_64`).\n" "--BlockDeviceMappings: array ref BlockDeviceMappingImage\n" - " **(when registering from a snapshot, or from a bucket without using a manifest file)** One \n" - " or more block device mappings.\n" + " **(when registering from a snapshot)** One or more block device mappings.\n" " One or more parameters used to automatically set up volumes when the VM \n" " is created.\n" " --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate\n" @@ -4082,14 +4121,8 @@ static const char *calls_args_descriptions[] = { " If true, checks whether you have the required permissions to perform the action.\n" "--FileLocation: string\n" " **(when registering from a bucket by using a manifest file)** The pre-signed URL of the \n" - " manifest file for the OMI you want to register. For more information, see [Configuring a \n" - " Pre-signed URL](https://docs.outscale.com/en/userguide/Configuring-a-Pre-signed-URL.html) \n" - " or [Managing Access to Your Buckets and \n" - " Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-Buckets-and-Objects.\n" - " html).\nYou can also specify the normal URL of the OMI if you have permission on the OOS \n" - " bucket, without using the manifest file, but in that case, you need to manually specify \n" - " through the other parameters all the information that would otherwise be read from the \n" - " manifest file.\n" + " manifest file for the OMI you want to register. For more information, see [Creating a \n" + " Pre-signed URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\n" "--ImageName: string\n" " A unique name for the new OMI.\nConstraints: 3-128 alphanumeric characters, underscores \n" " (`_`), spaces (` `), parentheses (`()`), slashes (`/`), periods (`.`), or dashes (`-`).\n" @@ -4099,8 +4132,7 @@ static const char *calls_args_descriptions[] = { "--ProductCodes: array string\n" " The product codes associated with the OMI.\n" "--RootDeviceName: string\n" - " **(when registering from a snapshot, or from a bucket without using a manifest file)** The \n" - " name of the root device for the new OMI.\n" + " **(when registering from a snapshot)** The name of the root device for the new OMI.\n" "--SourceImageId: string\n" " **(when copying an OMI)** The ID of the OMI you want to copy.\n" "--SourceRegionName: string\n" @@ -4736,6 +4768,7 @@ static int filters_subnet_setter(struct filters_subnet *args, struct osc_str *da static int filters_subregion_setter(struct filters_subregion *args, struct osc_str *data); static int filters_tag_setter(struct filters_tag *args, struct osc_str *data); static int filters_user_group_setter(struct filters_user_group *args, struct osc_str *data); +static int filters_users_setter(struct filters_users *args, struct osc_str *data); static int filters_virtual_gateway_setter(struct filters_virtual_gateway *args, struct osc_str *data); static int filters_vm_setter(struct filters_vm *args, struct osc_str *data); static int filters_vm_group_setter(struct filters_vm_group *args, struct osc_str *data); @@ -4772,6 +4805,7 @@ static int load_balancer_tag_setter(struct load_balancer_tag *args, struct osc_s static int location_setter(struct location *args, struct osc_str *data); static int log_setter(struct log *args, struct osc_str *data); static int maintenance_event_setter(struct maintenance_event *args, struct osc_str *data); +static int minimal_policy_setter(struct minimal_policy *args, struct osc_str *data); static int nat_service_setter(struct nat_service *args, struct osc_str *data); static int net_setter(struct net *args, struct osc_str *data); static int net_access_point_setter(struct net_access_point *args, struct osc_str *data); @@ -4791,6 +4825,7 @@ static int phase1_options_setter(struct phase1_options *args, struct osc_str *da static int phase2_options_setter(struct phase2_options *args, struct osc_str *data); static int placement_setter(struct placement *args, struct osc_str *data); static int policy_setter(struct policy *args, struct osc_str *data); +static int policy_entities_setter(struct policy_entities *args, struct osc_str *data); static int policy_version_setter(struct policy_version *args, struct osc_str *data); static int private_ip_setter(struct private_ip *args, struct osc_str *data); static int private_ip_light_setter(struct private_ip_light *args, struct osc_str *data); @@ -4823,6 +4858,7 @@ static int state_comment_setter(struct state_comment *args, struct osc_str *data static int subnet_setter(struct subnet *args, struct osc_str *data); static int subregion_setter(struct subregion *args, struct osc_str *data); static int tag_setter(struct tag *args, struct osc_str *data); +static int unit_price_entry_setter(struct unit_price_entry *args, struct osc_str *data); static int user_setter(struct user *args, struct osc_str *data); static int user_group_setter(struct user_group *args, struct osc_str *data); static int vgw_telemetry_setter(struct vgw_telemetry *args, struct osc_str *data); @@ -9804,6 +9840,28 @@ static int filters_user_group_setter(struct filters_user_group *args, struct osc return !!ret; } +static int filters_users_setter(struct filters_users *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->user_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"UserIds\":[" )); + for (as = args->user_ids; *as; ++as) { + if (as != args->user_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->user_ids_str) { + ARG_TO_JSON(UserIds, string, args->user_ids_str); + ret += 1; + } + + return !!ret; +} static int filters_virtual_gateway_setter(struct filters_virtual_gateway *args, struct osc_str *data) { int count_args = 0; int ret = 0; @@ -13110,6 +13168,27 @@ static int maintenance_event_setter(struct maintenance_event *args, struct osc_s return !!ret; } +static int minimal_policy_setter(struct minimal_policy *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Id\":", args->id); + ret += 1; + } + if (args->name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Name\":", args->name); + ret += 1; + } + if (args->orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Orn\":", args->orn); + ret += 1; + } + + return !!ret; +} static int nat_service_setter(struct nat_service *args, struct osc_str *data) { int count_args = 0; int ret = 0; @@ -14060,6 +14139,82 @@ static int policy_setter(struct policy *args, struct osc_str *data) { return !!ret; } +static int policy_entities_setter(struct policy_entities *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->accounts) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Accounts\":[" )); + for (int i = 0; i < args->nb_accounts; ++i) { + struct minimal_policy *p = &args->accounts[i]; + if (p != args->accounts) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(minimal_policy_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->accounts_str) { + ARG_TO_JSON(Accounts, string, args->accounts_str); + ret += 1; + } + if (args->groups) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Groups\":[" )); + for (int i = 0; i < args->nb_groups; ++i) { + struct minimal_policy *p = &args->groups[i]; + if (p != args->groups) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(minimal_policy_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->groups_str) { + ARG_TO_JSON(Groups, string, args->groups_str); + ret += 1; + } + if (args->is_set_has_more_items) { + ARG_TO_JSON(HasMoreItems, bool, args->has_more_items); + ret += 1; + } + if (args->is_set_items_count || args->items_count) { + ARG_TO_JSON(ItemsCount, int, args->items_count); + ret += 1; + } + if (args->is_set_max_results_limit || args->max_results_limit) { + ARG_TO_JSON(MaxResultsLimit, int, args->max_results_limit); + ret += 1; + } + if (args->is_set_max_results_truncated) { + ARG_TO_JSON(MaxResultsTruncated, bool, args->max_results_truncated); + ret += 1; + } + if (args->users) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Users\":[" )); + for (int i = 0; i < args->nb_users; ++i) { + struct minimal_policy *p = &args->users[i]; + if (p != args->users) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(minimal_policy_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->users_str) { + ARG_TO_JSON(Users, string, args->users_str); + ret += 1; + } + + return !!ret; +} static int policy_version_setter(struct policy_version *args, struct osc_str *data) { int count_args = 0; int ret = 0; @@ -15135,6 +15290,41 @@ static int tag_setter(struct tag *args, struct osc_str *data) { return !!ret; } +static int unit_price_entry_setter(struct unit_price_entry *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->currency) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Currency\":", args->currency); + ret += 1; + } + if (args->operation) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Operation\":", args->operation); + ret += 1; + } + if (args->service) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Service\":", args->service); + ret += 1; + } + if (args->type) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Type\":", args->type); + ret += 1; + } + if (args->unit) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Unit\":", args->unit); + ret += 1; + } + if (args->is_set_unit_price || args->unit_price) { + ARG_TO_JSON(UnitPrice, double, args->unit_price); + ret += 1; + } + + return !!ret; +} static int user_setter(struct user *args, struct osc_str *data) { int count_args = 0; int ret = 0; @@ -15153,6 +15343,11 @@ static int user_setter(struct user *args, struct osc_str *data) { ARG_TO_JSON_STR("\"Path\":", args->path); ret += 1; } + if (args->user_email) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserEmail\":", args->user_email); + ret += 1; + } if (args->user_id) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"UserId\":", args->user_id); @@ -16583,6 +16778,11 @@ static int update_user_data(struct osc_update_user_arg *args, struct osc_str *d ARG_TO_JSON_STR("\"NewPath\":", args->new_path); ret += 1; } + if (args->new_user_email) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NewUserEmail\":", args->new_user_email); + ret += 1; + } if (args->new_user_name) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"NewUserName\":", args->new_user_name); @@ -19647,6 +19847,24 @@ static int read_users_data(struct osc_read_users_arg *args, struct osc_str *dat ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_users_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->is_set_first_item || args->first_item) { + ARG_TO_JSON(FirstItem, int, args->first_item); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); return !!ret; } @@ -19964,6 +20182,60 @@ int osc_read_user_group(struct osc_env *e, struct osc_str *out, struct osc_read_ osc_deinit_str(&data); return res; } +static int read_unit_price_data(struct osc_read_unit_price_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->operation) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Operation\":", args->operation); + ret += 1; + } + if (args->service) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Service\":", args->service); + ret += 1; + } + if (args->type) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Type\":", args->type); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_read_unit_price(struct osc_env *e, struct osc_str *out, struct osc_read_unit_price_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = read_unit_price_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/ReadUnitPrice"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} static int read_tags_data(struct osc_read_tags_arg *args, struct osc_str *data) { int ret = 0; @@ -22085,6 +22357,74 @@ int osc_read_flexible_gpu_catalog(struct osc_env *e, struct osc_str *out, struct osc_deinit_str(&data); return res; } +static int read_entities_linked_to_policy_data(struct osc_read_entities_linked_to_policy_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->entities_type) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"EntitiesType\":[" )); + for (as = args->entities_type; *as; ++as) { + if (as != args->entities_type) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->entities_type_str) { + ARG_TO_JSON(EntitiesType, string, args->entities_type_str); + ret += 1; + } + if (args->is_set_first_item || args->first_item) { + ARG_TO_JSON(FirstItem, int, args->first_item); + ret += 1; + } + if (args->policy_orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_read_entities_linked_to_policy(struct osc_env *e, struct osc_str *out, struct osc_read_entities_linked_to_policy_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = read_entities_linked_to_policy_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/ReadEntitiesLinkedToPolicy"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} static int read_direct_links_data(struct osc_read_direct_links_arg *args, struct osc_str *data) { int ret = 0; @@ -26761,6 +27101,11 @@ static int create_user_data(struct osc_create_user_arg *args, struct osc_str *d ARG_TO_JSON_STR("\"Path\":", args->path); ret += 1; } + if (args->user_email) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserEmail\":", args->user_email); + ret += 1; + } if (args->user_name) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"UserName\":", args->user_name); @@ -27725,6 +28070,11 @@ static int create_net_peering_data(struct osc_create_net_peering_arg *args, str ARG_TO_JSON_STR("\"AccepterNetId\":", args->accepter_net_id); ret += 1; } + if (args->accepter_owner_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"AccepterOwnerId\":", args->accepter_owner_id); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; diff --git a/osc_sdk.h b/osc_sdk.h index 1e58956..bc13cb9 100644 --- a/osc_sdk.h +++ b/osc_sdk.h @@ -77,8 +77,8 @@ struct osc_str { #define OSC_ENV_FREE_AK_SK (OSC_ENV_FREE_AK | OSC_ENV_FREE_SK) -#define OSC_API_VERSION "1.30.0" -#define OSC_SDK_VERSION 0X001100 +#define OSC_API_VERSION "1.33.1" +#define OSC_SDK_VERSION 0X001200 enum osc_auth_method { OSC_AKSK_METHOD, @@ -649,9 +649,9 @@ struct catalog { * --Entries.INDEX.Type: string * The type of resource associated with the catalog entry. * --Entries.INDEX.UnitPrice: double - * The unit price of the catalog entry, in the currency of the - * Region's - * catalog. + * The unit price of the catalog entry in the currency of your + * account, in + * the ISO-4217 format (for example, `EUR`). */ char *entries_str; int nb_entries; @@ -691,8 +691,8 @@ struct catalog_entry { */ char *type; /* - * The unit price of the catalog entry, in the currency of the Region's - * catalog. + * The unit price of the catalog entry in the currency of your account, + * in the ISO-4217 format (for example, `EUR`). */ int is_set_unit_price; double unit_price; @@ -722,9 +722,9 @@ struct catalogs { * --Entries.INDEX.Type: string * The type of resource associated with the catalog entry. * --Entries.INDEX.UnitPrice: double - * The unit price of the catalog entry, in the currency of the - * Region's - * catalog. + * The unit price of the catalog entry in the currency of your + * account, in + * the ISO-4217 format (for example, `EUR`). */ char *entries_str; int nb_entries; @@ -834,8 +834,8 @@ struct consumption_entry { */ char *type; /* - * The unit price of the consumed resource, in the currency of the - * Region's catalog. + * The unit price of the consumed resource in the currency of your + * account, in the ISO-4217 format (for example, `EUR`). */ int is_set_unit_price; double unit_price; @@ -2488,6 +2488,14 @@ struct filters_user_group { char **user_group_ids; }; +struct filters_users { + /* + * The IDs of the users. + */ + char *user_ids_str; + char **user_ids; +}; + struct filters_virtual_gateway { /* * The types of the virtual gateways (always `ipsec.1`). @@ -3935,7 +3943,7 @@ struct listener_rule { /* * A host-name pattern for the rule, with a maximum length of 128 * characters. This host-name pattern supports maximum three wildcards, - * and must not contain any special characters except [-.?]. + * and must not contain any special characters except `-.?`. */ char *host_name_pattern; /* @@ -3955,7 +3963,7 @@ struct listener_rule { /* * A path pattern for the rule, with a maximum length of 128 characters. * This path pattern supports maximum three wildcards, and must not - * contain any special characters except [_-.$/~"'@:+?]. + * contain any special characters except `_-.$/~"'@:+?`. */ char *path_pattern; /* @@ -3980,7 +3988,7 @@ struct listener_rule_for_creation { /* * A host-name pattern for the rule, with a maximum length of 128 * characters. This host-name pattern supports maximum three wildcards, - * and must not contain any special characters except [-.?]. + * and must not contain any special characters except `-.?`. */ char *host_name_pattern; /* @@ -3990,7 +3998,7 @@ struct listener_rule_for_creation { /* * A path pattern for the rule, with a maximum length of 128 characters. * This path pattern supports maximum three wildcards, and must not - * contain any special characters except [_-.$/~"'@:+?]. + * contain any special characters except `_-.$/~"'@:+?`. */ char *path_pattern; /* @@ -4361,6 +4369,24 @@ struct maintenance_event { char *not_before; }; +struct minimal_policy { + /* + * The ID of the entity. + */ + char *id; + /* + * The name of the entity. + */ + char *name; + /* + * The OUTSCALE Resource Name (ORN) of the entity. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). + */ + char *orn; +}; + struct nat_service { /* * The idempotency token provided when creating the NAT service. @@ -5116,6 +5142,84 @@ struct policy { long long int resources_count; }; +struct policy_entities { + /* + * Information about the entity. + * --Accounts.INDEX.Id: string + * The ID of the entity. + * --Accounts.INDEX.Name: string + * The name of the entity. + * --Accounts.INDEX.Orn: string + * The OUTSCALE Resource Name (ORN) of the entity. For more + * information, + * see [Resource + * + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.h + * tml). + */ + char *accounts_str; + int nb_accounts; + struct minimal_policy *accounts; + /* + * Information about the entity. + * --Groups.INDEX.Id: string + * The ID of the entity. + * --Groups.INDEX.Name: string + * The name of the entity. + * --Groups.INDEX.Orn: string + * The OUTSCALE Resource Name (ORN) of the entity. For more + * information, + * see [Resource + * + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.h + * tml). + */ + char *groups_str; + int nb_groups; + struct minimal_policy *groups; + /* + * If true, there are more items to return using the `FirstItem` + * parameter in a new request. + */ + int is_set_has_more_items; + int has_more_items; + /* + * The number of entities the specified policy is linked to. + */ + int is_set_items_count; + long long int items_count; + /* + * Indicates maximum results defined for the operation. + */ + int is_set_max_results_limit; + long long int max_results_limit; + /* + * If true, indicates whether requested page size is more than allowed. + */ + int is_set_max_results_truncated; + int max_results_truncated; + /* + * Information about the entity. + * --Users.INDEX.Id: string + * The ID of the entity. + * --Users.INDEX.Name: string + * The name of the entity. + * --Users.INDEX.Orn: string + * The OUTSCALE Resource Name (ORN) of the entity. For more + * information, + * see [Resource + * + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.h + * tml). + */ + char *users_str; + int nb_users; + struct minimal_policy *users; +}; + struct policy_version { /* * The policy document, corresponding to a JSON string that contains the @@ -5997,7 +6101,11 @@ struct subnet { struct subregion { /* - * The location code of the Subregion. + * The location code (physical zone) of the Subregion. For more + * information, see [About Regions > Mapping Between Subregions and + * Physical + * Zones](https://docs.outscale.com/en/userguide/About-Regions-and-Subreg + * ions.html#_mapping_between_subregions_and_physical_zones). */ char *location_code; /* @@ -6033,6 +6141,40 @@ struct tag { char *value; }; +struct unit_price_entry { + /* + * The currency of your account for the `UnitPrice` parameter, in the + * ISO-4217 format (for example, `EUR`). + */ + char *currency; + /* + * The operation associated with the catalog entry (for example, + * `RunInstances-OD` or `CreateVolume`). + */ + char *operation; + /* + * The service associated with the catalog entry (for example, + * `TinaOS-FCU` or `TinaOS-OOS`). + */ + char *service; + /* + * The type associated with the catalog entry (for example, + * `BSU:VolumeIOPS:io1` or `BoxUsage:tinav6.c6r16p3`). + */ + char *type; + /* + * The unit associated with the catalog entry (for example, `PER_MONTH` + * or `PER_COUNT`). + */ + char *unit; + /* + * The unit price of the catalog entry in the currency of your account, + * in the ISO-4217 format (for example, `EUR`). + */ + int is_set_unit_price; + double unit_price; +}; + struct user { /* * The date and time (UTC) of creation of the EIM user. @@ -6046,6 +6188,10 @@ struct user { * The path to the EIM user. */ char *path; + /* + * The email address of the EIM user. + */ + char *user_email; /* * The ID of the EIM user. */ @@ -7374,6 +7520,10 @@ struct osc_update_user_arg { * A new path for the EIM user. */ char *new_path; + /* + * A new email address for the EIM user. + */ + char *new_user_email; /* * A new name for the EIM user. */ @@ -7761,7 +7911,7 @@ struct osc_update_listener_rule_arg { /* * A host-name pattern for the rule, with a maximum length of 128 * characters. This host-name pattern supports maximum three wildcards, - * and must not contain any special characters except [-.?]. + * and must not contain any special characters except `-.?`. */ char *host_pattern; /* @@ -7771,7 +7921,7 @@ struct osc_update_listener_rule_arg { /* * A path pattern for the rule, with a maximum length of 128 characters. * This path pattern supports maximum three wildcards, and must not - * contain any special characters except [_-.$/~"'@:+?]. + * contain any special characters except `_-.$/~"'@:+?`. */ char *path_pattern; }; @@ -8494,8 +8644,8 @@ struct osc_read_vpn_connections_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -8563,8 +8713,8 @@ struct osc_read_volumes_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -8612,8 +8762,8 @@ struct osc_read_vms_state_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -8830,8 +8980,8 @@ struct osc_read_vms_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -8878,8 +9028,8 @@ struct osc_read_vm_types_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -9012,8 +9162,8 @@ struct osc_read_virtual_gateways_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -9027,6 +9177,25 @@ struct osc_read_users_arg { */ int is_set_dry_run; int dry_run; + /* + * One or more filters. + * --Filters.UserIds: array string + * The IDs of the users. + */ + char *filters_str; + int is_set_filters; + struct filters_users filters; + /* + * The item starting the list of users requested. + */ + int is_set_first_item; + long long int first_item; + /* + * The maximum number of items that can be returned in a single response + * (by default, `100`). + */ + int is_set_results_per_page; + long long int results_per_page; }; struct osc_read_user_groups_per_user_arg { @@ -9149,6 +9318,25 @@ struct osc_read_user_group_arg { char *user_group_name; }; +struct osc_read_unit_price_arg { + /* Required: operation, service, type */ + /* + * The operation associated with the catalog entry (for example, + * `RunInstances-OD` or `CreateVolume`). + */ + char *operation; + /* + * The service associated with the catalog entry (for example, + * `TinaOS-FCU` or `TinaOS-OOS`). + */ + char *service; + /* + * The type associated with the catalog entry (for example, + * `BSU:VolumeIOPS:io1` or `BoxUsage:tinav6.c6r16p3`). + */ + char *type; +}; + struct osc_read_tags_arg { /* Required:none */ /* @@ -9195,8 +9383,8 @@ struct osc_read_tags_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -9228,8 +9416,8 @@ struct osc_read_subregions_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -9279,8 +9467,8 @@ struct osc_read_subnets_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -9349,8 +9537,8 @@ struct osc_read_snapshots_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -9378,8 +9566,8 @@ struct osc_read_snapshot_export_tasks_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -9488,8 +9676,8 @@ struct osc_read_security_groups_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -9568,8 +9756,8 @@ struct osc_read_route_tables_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -9615,8 +9803,8 @@ struct osc_read_quotas_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -9670,8 +9858,8 @@ struct osc_read_public_ips_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -9691,8 +9879,8 @@ struct osc_read_public_ip_ranges_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -9730,8 +9918,8 @@ struct osc_read_product_types_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -9951,8 +10139,8 @@ struct osc_read_nets_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10012,8 +10200,8 @@ struct osc_read_net_peerings_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10060,8 +10248,8 @@ struct osc_read_net_access_points_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10091,8 +10279,8 @@ struct osc_read_net_access_point_services_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10140,8 +10328,8 @@ struct osc_read_nat_services_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10198,8 +10386,8 @@ struct osc_read_locations_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10319,8 +10507,8 @@ struct osc_read_keypairs_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10366,8 +10554,8 @@ struct osc_read_internet_services_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10447,8 +10635,8 @@ struct osc_read_images_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10476,8 +10664,8 @@ struct osc_read_image_export_tasks_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10529,6 +10717,34 @@ struct osc_read_flexible_gpu_catalog_arg { int dry_run; }; +struct osc_read_entities_linked_to_policy_arg { + /* Required:none */ + /* + * The type of entity linked to the policy (`ACCOUNT` \\| `USER` \\| + * `GROUP`) you want to get information about. + */ + char *entities_type_str; + char **entities_type; + /* + * The item starting the list of entities requested. + */ + int is_set_first_item; + long long int first_item; + /* + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). + */ + char *policy_orn; + /* + * The maximum number of items that can be returned in a single response + * (by default, 100). + */ + int is_set_results_per_page; + long long int results_per_page; +}; + struct osc_read_direct_links_arg { /* Required:none */ /* @@ -10551,8 +10767,8 @@ struct osc_read_direct_links_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10582,8 +10798,8 @@ struct osc_read_direct_link_interfaces_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10634,8 +10850,8 @@ struct osc_read_dhcp_options_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10671,8 +10887,8 @@ struct osc_read_dedicated_groups_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10779,8 +10995,8 @@ struct osc_read_client_gateways_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -10900,8 +11116,8 @@ struct osc_read_api_logs_arg { */ char *next_page_token; /* - * The maximum number of logs returned in a single response (between - * `1`and `1000`, both included). By default, `100`. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ int is_set_results_per_page; long long int results_per_page; @@ -12455,7 +12671,11 @@ struct osc_create_vms_arg { char *subnet_id; /* * Data or script used to add a specific configuration to the VM. It - * must be Base64-encoded and is limited to 500 kibibytes (KiB). + * must be Base64-encoded and is limited to 500 kibibytes (KiB). For + * more information about user data, see [Configuring a VM with User + * Data and OUTSCALE + * Tags](https://docs.outscale.com/en/userguide/Configuring-a-VM-with-Use + * r-Data-and-OUTSCALE-Tags.html). */ char *user_data; /* @@ -12635,13 +12855,18 @@ struct osc_create_user_arg { * The path to the EIM user you want to create (by default, `/`). This * path name must begin and end with a slash (`/`), and contain between * 1 and 512 alphanumeric characters and/or slashes (`/`), or - * underscores (_). + * underscores (`_`). */ char *path; + /* + * The email address of the EIM user. + */ + char *user_email; /* * The name of the EIM user. This user name must contain between 1 and - * 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), - * periods (.), at signs (@), dashes (-), or underscores (_). + * 64 alphanumeric characters and/or pluses (`+`), equals (`=`), commas + * (`,`), periods (`.`), at signs (`@`), dashes (`-`), or underscores + * (`_`). */ char *user_name; }; @@ -12750,13 +12975,9 @@ struct osc_create_snapshot_arg { int dry_run; /* * **(when importing from a bucket)** The pre-signed URL of the snapshot - * you want to import, or the normal URL of the snapshot if you have - * permission on the OOS bucket. For more information, see [Configuring - * a Pre-signed - * URL](https://docs.outscale.com/en/userguide/Configuring-a-Pre-signed-U - * RL.html) or [Managing Access to Your Buckets and - * Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-You - * r-Buckets-and-Objects.html). + * you want to import. For more information, see [Creating a Pre-signed + * URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL. + * html). */ char *file_location; /* @@ -12804,12 +13025,12 @@ struct osc_create_server_certificate_arg { int dry_run; /* * A unique name for the certificate. Constraints: 1-128 alphanumeric - * characters, pluses (+), equals (=), commas (,), periods (.), at signs - * (@), minuses (-), or underscores (_). + * characters, pluses (`+`), equals (`=`), commas (`,`), periods (`.`), + * at signs (`@`), minuses (`-`), or underscores (`_`). */ char *name; /* - * The path to the server certificate, set to a slash (/) if not + * The path to the server certificate, set to a slash (`/`) if not * specified. */ char *path; @@ -13140,6 +13361,12 @@ struct osc_create_net_peering_arg { * The ID of the Net you want to connect with. */ char *accepter_net_id; + /* + * The account ID of the owner of the Net you want to connect with. By + * default, the account ID of the owner of the Net from which the + * peering request is sent. + */ + char *accepter_owner_id; /* * If true, checks whether you have the required permissions to perform * the action. @@ -13275,7 +13502,7 @@ struct osc_create_load_balancer_policy_arg { char *load_balancer_name; /* * The unique name of the policy, with a maximum length of 32 - * alphanumeric characters and dashes (-). + * alphanumeric characters and dashes (`-`). */ char *policy_name; /* @@ -13365,7 +13592,7 @@ struct osc_create_load_balancer_arg { struct listener_for_creation *listeners; /* * The unique name of the load balancer, with a maximum length of 32 - * alphanumeric characters and dashes (-). This name must not start or + * alphanumeric characters and dashes (`-`). This name must not start or * end with a dash. */ char *load_balancer_name; @@ -13442,7 +13669,7 @@ struct osc_create_listener_rule_arg { * A host-name pattern for the rule, with a maximum length of 128 * characters. This host-name pattern supports maximum three * wildcards, and - * must not contain any special characters except [-.?]. + * must not contain any special characters except `-.?`. * --ListenerRule.ListenerRuleName: string * A human-readable name for the listener rule. * --ListenerRule.PathPattern: string @@ -13450,7 +13677,7 @@ struct osc_create_listener_rule_arg { * characters. * This path pattern supports maximum three wildcards, and must not * contain - * any special characters except [_-.$/~"'@:+?]. + * any special characters except `_-.$/~"'@:+?`. * --ListenerRule.Priority: long long int * The priority level of the listener rule, between `1` and `19999` * both @@ -13538,13 +13765,13 @@ struct osc_create_image_export_task_arg { struct osc_create_image_arg { /* Required:none */ /* - * **(when registering from a snapshot, or from a bucket without using a - * manifest file)** The architecture of the OMI (`i386` or `x86_64`). + * **(when registering from a snapshot)** The architecture of the OMI + * (`i386` or `x86_64`). */ char *architecture; /* - * **(when registering from a snapshot, or from a bucket without using a - * manifest file)** One or more block device mappings. + * **(when registering from a snapshot)** One or more block device + * mappings. * One or more parameters used to automatically set up volumes when * the VM * is created. @@ -13610,15 +13837,9 @@ struct osc_create_image_arg { /* * **(when registering from a bucket by using a manifest file)** The * pre-signed URL of the manifest file for the OMI you want to register. - * For more information, see [Configuring a Pre-signed - * URL](https://docs.outscale.com/en/userguide/Configuring-a-Pre-signed-U - * RL.html) or [Managing Access to Your Buckets and - * Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-You - * r-Buckets-and-Objects.html).
\nYou can also specify the normal - * URL of the OMI if you have permission on the OOS bucket, without - * using the manifest file, but in that case, you need to manually - * specify through the other parameters all the information that would - * otherwise be read from the manifest file. + * For more information, see [Creating a Pre-signed + * URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL. + * html). */ char *file_location; /* @@ -13639,8 +13860,8 @@ struct osc_create_image_arg { char *product_codes_str; char **product_codes; /* - * **(when registering from a snapshot, or from a bucket without using a - * manifest file)** The name of the root device for the new OMI. + * **(when registering from a snapshot)** The name of the root device + * for the new OMI. */ char *root_device_name; /* @@ -14198,6 +14419,7 @@ int osc_read_user_groups(struct osc_env *e, struct osc_str *out, struct osc_read int osc_read_user_group_policy(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_policy_arg *args); int osc_read_user_group_policies(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_policies_arg *args); int osc_read_user_group(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_arg *args); +int osc_read_unit_price(struct osc_env *e, struct osc_str *out, struct osc_read_unit_price_arg *args); int osc_read_tags(struct osc_env *e, struct osc_str *out, struct osc_read_tags_arg *args); int osc_read_subregions(struct osc_env *e, struct osc_str *out, struct osc_read_subregions_arg *args); int osc_read_subnets(struct osc_env *e, struct osc_str *out, struct osc_read_subnets_arg *args); @@ -14235,6 +14457,7 @@ int osc_read_images(struct osc_env *e, struct osc_str *out, struct osc_read_imag int osc_read_image_export_tasks(struct osc_env *e, struct osc_str *out, struct osc_read_image_export_tasks_arg *args); int osc_read_flexible_gpus(struct osc_env *e, struct osc_str *out, struct osc_read_flexible_gpus_arg *args); int osc_read_flexible_gpu_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_flexible_gpu_catalog_arg *args); +int osc_read_entities_linked_to_policy(struct osc_env *e, struct osc_str *out, struct osc_read_entities_linked_to_policy_arg *args); int osc_read_direct_links(struct osc_env *e, struct osc_str *out, struct osc_read_direct_links_arg *args); int osc_read_direct_link_interfaces(struct osc_env *e, struct osc_str *out, struct osc_read_direct_link_interfaces_arg *args); int osc_read_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_read_dhcp_options_arg *args); diff --git a/version b/version index 8f0916f..a918a2a 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.5.0 +0.6.0