From 3ca4104e957760b1e2696e557c54fac4cb574872 Mon Sep 17 00:00:00 2001 From: Outscale Bot Date: Thu, 13 Nov 2025 15:11:29 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20release:=20oapi-cli=20v0.12.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Outscale Bot --- COGNAC | 2 +- main.c | 723 +++++++++++++++++++++++++++++++++++++++++++++++++++++- osc-sdk-C | 2 +- osc_sdk.c | 621 ++++++++++++++++++++++++++++++++++++++++++++-- osc_sdk.h | 598 ++++++++++++++++++++++++++++++++++++++++---- version | 2 +- 6 files changed, 1872 insertions(+), 76 deletions(-) diff --git a/COGNAC b/COGNAC index 0f02d8c..c854c86 160000 --- a/COGNAC +++ b/COGNAC @@ -1 +1 @@ -Subproject commit 0f02d8c37dd453d094d84b2a41a9a80c64e75c63 +Subproject commit c854c86864678a7d4bd67547470a22f6f52653ee diff --git a/main.c b/main.c index b9566fd..1c020d1 100644 --- a/main.c +++ b/main.c @@ -47,7 +47,7 @@ #define OAPI_RAW_OUTPUT 1 -#define OAPI_CLI_VERSION "0.11.0" +#define OAPI_CLI_VERSION "0.12.0" #define OAPI_CLI_UAGENT "oapi-cli/"OAPI_CLI_VERSION"; osc-sdk-c/" @@ -271,6 +271,9 @@ int block_device_mapping_vm_update_parser(void *s, char *str, char *aa, struct p int bsu_created_parser(void *s, char *str, char *aa, struct ptr_array *pa); int bsu_to_create_parser(void *s, char *str, char *aa, struct ptr_array *pa); int bsu_to_update_vm_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int co2_category_distribution_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int co2_emission_entry_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int co2_factor_distribution_parser(void *s, char *str, char *aa, struct ptr_array *pa); int ca_parser(void *s, char *str, char *aa, struct ptr_array *pa); int catalog_parser(void *s, char *str, char *aa, struct ptr_array *pa); int catalog_entry_parser(void *s, char *str, char *aa, struct ptr_array *pa); @@ -316,6 +319,7 @@ int filters_snapshot_parser(void *s, char *str, char *aa, struct ptr_array *pa); 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_update_volume_task_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); @@ -419,6 +423,9 @@ int vm_states_parser(void *s, char *str, char *aa, struct ptr_array *pa); int vm_template_parser(void *s, char *str, char *aa, struct ptr_array *pa); int vm_type_parser(void *s, char *str, char *aa, struct ptr_array *pa); int volume_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int volume_update_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int volume_update_parameters_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int volume_update_task_parser(void *s, char *str, char *aa, struct ptr_array *pa); int vpn_connection_parser(void *s, char *str, char *aa, struct ptr_array *pa); int vpn_options_parser(void *s, char *str, char *aa, struct ptr_array *pa); int with_parser(void *s, char *str, char *aa, struct ptr_array *pa); @@ -1133,6 +1140,126 @@ int bsu_to_update_vm_parser(void *v_s, char *str, char *aa, struct ptr_array *pa return 0; } +int co2_category_distribution_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct co2_category_distribution *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "Category")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Category argument missing\n"); + s->category = aa; // string string + + } else + if ((aret = argcmp(str, "Value")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Value argument missing\n"); + s->is_set_value = 1; + s->value = atof(aa); + } else + { + fprintf(stderr, "'%s' is not an argumemt of 'CO2CategoryDistribution'\n", str); + return -1; + } + return 0; +} + +int co2_emission_entry_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct co2_emission_entry *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "AccountId")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "AccountId argument missing\n"); + s->account_id = aa; // string string + + } else + if ((aret = argcmp(str, "CategoryDistribution")) == 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("'CategoryDistribution' require an index (example array ref CO2CategoryDistribution.CategoryDistribution.0)\n"); + else if (*endptr != '.') + BAD_RET("'CategoryDistribution' require a '.'\n"); + TRY_ALLOC_AT(s,category_distribution, pa, pos, sizeof(*s->category_distribution)); + cascade_struct = &s->category_distribution[pos]; + cascade_parser = co2_category_distribution_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(co2_category_distribution_parser(&s->category_distribution[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "CategoryDistribution argument missing\n"); + s->category_distribution_str = aa; // array ref CO2CategoryDistribution ref + } + } else + if ((aret = argcmp(str, "FactorDistribution")) == 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("'FactorDistribution' require an index (example array ref CO2FactorDistribution.FactorDistribution.0)\n"); + else if (*endptr != '.') + BAD_RET("'FactorDistribution' require a '.'\n"); + TRY_ALLOC_AT(s,factor_distribution, pa, pos, sizeof(*s->factor_distribution)); + cascade_struct = &s->factor_distribution[pos]; + cascade_parser = co2_factor_distribution_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(co2_factor_distribution_parser(&s->factor_distribution[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "FactorDistribution argument missing\n"); + s->factor_distribution_str = aa; // array ref CO2FactorDistribution ref + } + } else + if ((aret = argcmp(str, "Month")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Month argument missing\n"); + s->month = aa; // string string + + } else + if ((aret = argcmp(str, "PayingAccountId")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "PayingAccountId argument missing\n"); + s->paying_account_id = aa; // string string + + } else + if ((aret = argcmp(str, "Value")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Value argument missing\n"); + s->is_set_value = 1; + s->value = atof(aa); + } else + { + fprintf(stderr, "'%s' is not an argumemt of 'CO2EmissionEntry'\n", str); + return -1; + } + return 0; +} + +int co2_factor_distribution_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct co2_factor_distribution *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "Factor")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Factor argument missing\n"); + s->factor = aa; // string string + + } else + if ((aret = argcmp(str, "Value")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Value argument missing\n"); + s->is_set_value = 1; + s->value = atof(aa); + } else + { + fprintf(stderr, "'%s' is not an argumemt of 'CO2FactorDistribution'\n", str); + return -1; + } + return 0; +} + int ca_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct ca *s = v_s; int aret = 0; @@ -3304,6 +3431,31 @@ int filters_flexible_gpu_parser(void *v_s, char *str, char *aa, struct ptr_array TRY(!aa, "SubregionNames[] argument missing\n"); SET_NEXT(s->subregion_names, (aa), pa); } else + if ((aret = argcmp(str, "Tags")) == 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("'Tags' require an index (example array ref Tag.Tags.0)\n"); + else if (*endptr != '.') + BAD_RET("'Tags' require a '.'\n"); + TRY_ALLOC_AT(s,tags, pa, pos, sizeof(*s->tags)); + cascade_struct = &s->tags[pos]; + cascade_parser = tag_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(tag_parser(&s->tags[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "Tags argument missing\n"); + s->tags_str = aa; // array ref Tag ref + } + } else if ((aret = argcmp(str, "VmIds")) == 0 || aret == '=' || aret == '.') { if (aret == '.') { int pos; @@ -3988,6 +4140,16 @@ int filters_image_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { TRY(!aa, "Tags[] argument missing\n"); SET_NEXT(s->tags, (aa), pa); } else + if ((aret = argcmp(str, "TpmMandatory")) == 0 || aret == '=' || aret == '.') { + s->is_set_tpm_mandatory = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->tpm_mandatory = 1; + } else if (!strcasecmp(aa, "false")) { + s->tpm_mandatory = 0; + } else { + BAD_RET("TpmMandatory require true/false\n"); + } + } else if ((aret = argcmp(str, "VirtualizationTypes")) == 0 || aret == '=' || aret == '.') { if (aret == '.') { int pos; @@ -8801,6 +8963,44 @@ int filters_tag_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { return 0; } +int filters_update_volume_task_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct filters_update_volume_task *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "TaskIds")) == 0 || aret == '=' || aret == '.') { + if (aret == '.') { + int pos; + char *endptr; + int last = 0; + char *dot_pos = strchr(str, '.'); + + TRY(!(dot_pos++), "TaskIds argument missing\n"); + pos = strtoul(dot_pos, &endptr, 0); + TRY(endptr == dot_pos, "TaskIds require an index\n"); + if (s->task_ids) { + for (; s->task_ids[last]; ++last); + } + if (pos < last) { + s->task_ids[pos] = (aa); + } else { + for (int i = last; i < pos; ++i) + SET_NEXT(s->task_ids, "", pa); + SET_NEXT(s->task_ids, (aa), pa); + } + } else { + TRY(!aa, "TaskIds argument missing\n"); + s->task_ids_str = aa; + } + } else if (!(aret = argcmp(str, "TaskIds[]")) || aret == '=') { + TRY(!aa, "TaskIds[] argument missing\n"); + SET_NEXT(s->task_ids, (aa), pa); + } else + { + fprintf(stderr, "'%s' is not an argumemt of 'FiltersUpdateVolumeTask'\n", str); + return -1; + } + return 0; +} + int filters_user_group_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct filters_user_group *s = v_s; int aret = 0; @@ -10681,6 +10881,16 @@ int filters_vm_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { TRY(!aa, "Tenancies[] argument missing\n"); SET_NEXT(s->tenancies, (aa), pa); } else + if ((aret = argcmp(str, "TpmEnabled")) == 0 || aret == '=' || aret == '.') { + s->is_set_tpm_enabled = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->tpm_enabled = 1; + } else if (!strcasecmp(aa, "false")) { + s->tpm_enabled = 0; + } else { + BAD_RET("TpmEnabled require true/false\n"); + } + } else if ((aret = argcmp(str, "VmIds")) == 0 || aret == '=' || aret == '.') { if (aret == '.') { int pos; @@ -12720,6 +12930,31 @@ int flexible_gpu_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { s->subregion_name = aa; // string string } else + if ((aret = argcmp(str, "Tags")) == 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("'Tags' require an index (example array ref Tag.Tags.0)\n"); + else if (*endptr != '.') + BAD_RET("'Tags' require a '.'\n"); + TRY_ALLOC_AT(s,tags, pa, pos, sizeof(*s->tags)); + cascade_struct = &s->tags[pos]; + cascade_parser = tag_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(tag_parser(&s->tags[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "Tags argument missing\n"); + s->tags_str = aa; // array ref Tag ref + } + } else if ((aret = argcmp(str, "VmId")) == 0 || aret == '=' || aret == '.') { TRY(!aa, "VmId argument missing\n"); s->vm_id = aa; // string string @@ -13048,6 +13283,16 @@ int image_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { s->tags_str = aa; // array ref ResourceTag ref } } else + if ((aret = argcmp(str, "TpmMandatory")) == 0 || aret == '=' || aret == '.') { + s->is_set_tpm_mandatory = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->tpm_mandatory = 1; + } else if (!strcasecmp(aa, "false")) { + s->tpm_mandatory = 0; + } else { + BAD_RET("TpmMandatory require true/false\n"); + } + } else { fprintf(stderr, "'%s' is not an argumemt of 'Image'\n", str); return -1; @@ -17771,6 +18016,16 @@ int vm_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { s->tags_str = aa; // array ref ResourceTag ref } } else + if ((aret = argcmp(str, "TpmEnabled")) == 0 || aret == '=' || aret == '.') { + s->is_set_tpm_enabled = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->tpm_enabled = 1; + } else if (!strcasecmp(aa, "false")) { + s->tpm_enabled = 0; + } else { + BAD_RET("TpmEnabled require true/false\n"); + } + } else if ((aret = argcmp(str, "UserData")) == 0 || aret == '=' || aret == '.') { TRY(!aa, "UserData argument missing\n"); s->user_data = aa; // string string @@ -18247,18 +18502,179 @@ int volume_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { s->tags_str = aa; // array ref ResourceTag ref } } else + if ((aret = argcmp(str, "TaskId")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "TaskId argument missing\n"); + s->task_id = aa; // string string + + } else + if ((aret = argcmp(str, "VolumeId")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "VolumeId argument missing\n"); + s->volume_id = aa; // string string + + } else + if ((aret = argcmp(str, "VolumeType")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "VolumeType argument missing\n"); + s->volume_type = aa; // string string + + } else + { + fprintf(stderr, "'%s' is not an argumemt of 'Volume'\n", str); + return -1; + } + return 0; +} + +int volume_update_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct volume_update *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "Origin")) == 0 || aret == '=' || aret == '.') { + char *dot_pos; + + TRY(!aa, "Origin argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->origin; + cascade_parser = volume_update_parameters_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(volume_update_parameters_parser(&s->origin, dot_pos, aa, pa)); + s->is_set_origin = 1; + } else { + s->origin_str = aa; + } + } else + if ((aret = argcmp(str, "Target")) == 0 || aret == '=' || aret == '.') { + char *dot_pos; + + TRY(!aa, "Target argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->target; + cascade_parser = volume_update_parameters_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(volume_update_parameters_parser(&s->target, dot_pos, aa, pa)); + s->is_set_target = 1; + } else { + s->target_str = aa; + } + } else + { + fprintf(stderr, "'%s' is not an argumemt of 'VolumeUpdate'\n", str); + return -1; + } + return 0; +} + +int volume_update_parameters_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct volume_update_parameters *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "Iops")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Iops argument missing\n"); + s->is_set_iops = 1; + s->iops = atoll(aa); + } else + if ((aret = argcmp(str, "Size")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Size argument missing\n"); + s->is_set_size = 1; + s->size = atoll(aa); + } else + if ((aret = argcmp(str, "VolumeType")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "VolumeType argument missing\n"); + s->volume_type = aa; // string string + + } else + { + fprintf(stderr, "'%s' is not an argumemt of 'VolumeUpdateParameters'\n", str); + return -1; + } + return 0; +} + +int volume_update_task_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct volume_update_task *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "Comment")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Comment argument missing\n"); + s->comment = aa; // string string + + } else + if ((aret = argcmp(str, "CompletionDate")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "CompletionDate argument missing\n"); + s->completion_date = aa; // string string + + } else + if ((aret = argcmp(str, "Progress")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "Progress argument missing\n"); + s->is_set_progress = 1; + s->progress = atoll(aa); + } else + if ((aret = argcmp(str, "StartDate")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "StartDate argument missing\n"); + s->start_date = aa; // string string + + } else + if ((aret = argcmp(str, "State")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "State argument missing\n"); + s->state = aa; // string string + + } else + if ((aret = argcmp(str, "Tags")) == 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("'Tags' require an index (example array ref ResourceTag.Tags.0)\n"); + else if (*endptr != '.') + BAD_RET("'Tags' require a '.'\n"); + TRY_ALLOC_AT(s,tags, pa, pos, sizeof(*s->tags)); + cascade_struct = &s->tags[pos]; + cascade_parser = resource_tag_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(resource_tag_parser(&s->tags[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "Tags argument missing\n"); + s->tags_str = aa; // array ref ResourceTag ref + } + } else + if ((aret = argcmp(str, "TaskId")) == 0 || aret == '=' || aret == '.') { + TRY(!aa, "TaskId argument missing\n"); + s->task_id = aa; // string string + + } else if ((aret = argcmp(str, "VolumeId")) == 0 || aret == '=' || aret == '.') { TRY(!aa, "VolumeId argument missing\n"); s->volume_id = aa; // string string } else - if ((aret = argcmp(str, "VolumeType")) == 0 || aret == '=' || aret == '.') { - TRY(!aa, "VolumeType argument missing\n"); - s->volume_type = aa; // string string + if ((aret = argcmp(str, "VolumeUpdate")) == 0 || aret == '=' || aret == '.') { + char *dot_pos; + TRY(!aa, "VolumeUpdate argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->volume_update; + cascade_parser = volume_update_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(volume_update_parser(&s->volume_update, dot_pos, aa, pa)); + s->is_set_volume_update = 1; + } else { + s->volume_update_str = aa; + } } else { - fprintf(stderr, "'%s' is not an argumemt of 'Volume'\n", str); + fprintf(stderr, "'%s' is not an argumemt of 'VolumeUpdateTask'\n", str); return -1; } return 0; @@ -21244,6 +21660,22 @@ int main(int ac, char **av) s->source_region_name = aa; // string string } else + if ((aret = argcmp(next_a, "TpmMandatory")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "TpmMandatory argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_tpm_mandatory = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->tpm_mandatory = 1; + } else if (!strcasecmp(aa, "false")) { + s->tpm_mandatory = 0; + } else { + BAD_RET("TpmMandatory require true/false\n"); + } + } else if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' || aret == '.') { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -26286,6 +26718,22 @@ int main(int ac, char **av) s->subnet_id = aa; // string string } else + if ((aret = argcmp(next_a, "TpmEnabled")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "TpmEnabled argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_tpm_enabled = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->tpm_enabled = 1; + } else if (!strcasecmp(aa, "false")) { + s->tpm_enabled = 0; + } else { + BAD_RET("TpmEnabled require true/false\n"); + } + } else if ((aret = argcmp(next_a, "UserData")) == 0 || aret == '=' || aret == '.') { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -35620,6 +36068,127 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else + if (!strcmp("ReadCO2EmissionAccount", 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_co2_emission_account_arg a = {0}; + struct osc_read_co2_emission_account_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_co2_emission_account_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 set 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_co2_emission_account_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, "FromMonth")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "FromMonth argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "FromMonth argument missing\n"); + s->from_month = aa; // string string + + } else + if ((aret = argcmp(next_a, "Overall")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Overall argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_overall = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->overall = 1; + } else if (!strcasecmp(aa, "false")) { + s->overall = 0; + } else { + BAD_RET("Overall require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "ToMonth")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ToMonth argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ToMonth argument missing\n"); + s->to_month = aa; // string string + + } else + { + BAD_RET("'%s' is not a valid argument for 'ReadCO2EmissionAccount'\n", next_a); + } + i += incr; + goto read_co2_emission_account_arg; + } + cret = osc_read_co2_emission_account(&e, &r, &a); + jobj = NULL; + if (program_flag & OAPI_RAW_OUTPUT) { + if (r.buf) + puts(r.buf); + else if (cret) + fprintf(stderr, "fail to call ReadCO2EmissionAccount: %s", curl_easy_strerror(cret)); + } else if (r.buf) { + 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)); + } else fprintf(stderr, "called ReadCO2EmissionAccount (%s) and received an empty body. ", cret ? "failed" : "succeeded"); + + if (cret) + return cret; + + 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("ReadCas", av[i])) { auto_osc_json_c json_object *jobj = NULL; auto_ptr_array struct ptr_array opa = {0}; @@ -44037,6 +44606,150 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else + if (!strcmp("ReadVolumeUpdateTasks", 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_volume_update_tasks_arg a = {0}; + struct osc_read_volume_update_tasks_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_volume_update_tasks_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 set 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_volume_update_tasks_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, "DryRun")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + 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_update_volume_task_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(filters_update_volume_task_parser(&s->filters, dot_pos, aa, pa)); + s->is_set_filters = 1; + } else { + s->filters_str = aa; + } + } else + if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' || aret == '.') { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NextPageToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NextPageToken argument missing\n"); + s->next_page_token = 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 valid argument for 'ReadVolumeUpdateTasks'\n", next_a); + } + i += incr; + goto read_volume_update_tasks_arg; + } + cret = osc_read_volume_update_tasks(&e, &r, &a); + jobj = NULL; + if (program_flag & OAPI_RAW_OUTPUT) { + if (r.buf) + puts(r.buf); + else if (cret) + fprintf(stderr, "fail to call ReadVolumeUpdateTasks: %s", curl_easy_strerror(cret)); + } else if (r.buf) { + 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)); + } else fprintf(stderr, "called ReadVolumeUpdateTasks (%s) and received an empty body. ", cret ? "failed" : "succeeded"); + + if (cret) + return cret; + + 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("ReadVolumes", av[i])) { auto_osc_json_c json_object *jobj = NULL; auto_ptr_array struct ptr_array opa = {0}; diff --git a/osc-sdk-C b/osc-sdk-C index 05b7a27..a42637f 160000 --- a/osc-sdk-C +++ b/osc-sdk-C @@ -1 +1 @@ -Subproject commit 05b7a275cc40341b1372e2632986099022322231 +Subproject commit a42637f12dca2c9f6650e50452f4159c5ce3bb2e diff --git a/osc_sdk.c b/osc_sdk.c index 8c57c71..8f59f0f 100644 --- a/osc_sdk.c +++ b/osc_sdk.c @@ -201,6 +201,7 @@ static const char *calls_name[] = { "ReadApiAccessPolicy", "ReadApiAccessRules", "ReadApiLogs", + "ReadCO2EmissionAccount", "ReadCas", "ReadCatalog", "ReadCatalogs", @@ -264,6 +265,7 @@ static const char *calls_name[] = { "ReadVmsHealth", "ReadVms", "ReadVmsState", + "ReadVolumeUpdateTasks", "ReadVolumes", "ReadVpnConnections", "RebootVms", @@ -558,6 +560,8 @@ static const char *calls_descriptions[] = { "Usage: oapi-cli ReadApiAccessRules [OPTIONS]\n" "null\n" "\nRequired Argument: null \n" , "Usage: oapi-cli ReadApiLogs [OPTIONS]\n" "null\n" "\nRequired Argument: null \n" +, + "Usage: oapi-cli ReadCO2EmissionAccount --FromMonth=frommonth --ToMonth=tomonth [OPTIONS]\n" "null\n" "\nRequired Argument: FromMonth ToMonth \n" , "Usage: oapi-cli ReadCas [OPTIONS]\n" "null\n" "\nRequired Argument: null \n" , @@ -579,7 +583,7 @@ static const char *calls_descriptions[] = { , "Usage: oapi-cli ReadDirectLinks [OPTIONS]\n" "null\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadEntitiesLinkedToPolicy [OPTIONS]\n" "null\n" "\nRequired Argument: null \n" + "Usage: oapi-cli ReadEntitiesLinkedToPolicy --PolicyOrn=policyorn [OPTIONS]\n" "null\n" "\nRequired Argument: PolicyOrn \n" , "Usage: oapi-cli ReadFlexibleGpuCatalog [OPTIONS]\n" "null\n" "\nRequired Argument: null \n" , @@ -684,6 +688,8 @@ static const char *calls_descriptions[] = { "Usage: oapi-cli ReadVms [OPTIONS]\n" "null\n" "\nRequired Argument: null \n" , "Usage: oapi-cli ReadVmsState [OPTIONS]\n" "null\n" "\nRequired Argument: null \n" +, + "Usage: oapi-cli ReadVolumeUpdateTasks [OPTIONS]\n" "null\n" "\nRequired Argument: null \n" , "Usage: oapi-cli ReadVolumes [OPTIONS]\n" "null\n" "\nRequired Argument: null \n" , @@ -921,6 +927,7 @@ static const char *calls_args_descriptions[] = { "--DirectLinkId: string\n" " The ID of the existing DirectLink for which you want to create the DirectLink interface.\n" "--DirectLinkInterface: ref DirectLinkInterface\n" + " Information about the DirectLink interface.\n" " Information about the DirectLink interface.\n" " --DirectLinkInterface.BgpAsn: long long int\n" " The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the \n" @@ -974,10 +981,12 @@ static const char *calls_args_descriptions[] = { "--ImageId: string\n" " The ID of the OMI to export.\n" "--OsuExport: ref OsuExportToCreate\n" + " Information about the OOS export task to create.\n" " Information about the OOS export task to create.\n" " --OsuExport.DiskImageFormat: string\n" " The format of the export disk (`qcow2` \\| `raw`).\n" " --OsuExport.OsuApiKey: ref OsuApiKey\n" + " Information about the OOS API key.\n" " Information about the OOS API key.\n" " --OsuExport.OsuApiKey.ApiKeyId: string\n" " The API key of the OOS account that enables you to access the bucket.\n" @@ -997,6 +1006,7 @@ static const char *calls_args_descriptions[] = { " One or more parameters used to automatically set up volumes when the VM \n" " is created.\n" " --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate\n" + " Information about the BSU volume to create.\n" " Information about the BSU volume to create.\n" " --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool\n" " If set to true, the volume is deleted when terminating the VM. If false, \n" @@ -1052,6 +1062,9 @@ static const char *calls_args_descriptions[] = { "--SourceRegionName: string\n" " **(required) When copying an OMI:** The name of the source Region (always the same as the \n" " Region of your account).\n" +"--TpmMandatory: bool\n" + " By default or if set to false, a virtual Trusted Platform Module (vTPM) is not mandatory on \n" + " VMs created from this OMI. If true, VMs created from this OMI must have a vTPM enabled.\n" "--VmId: string\n" " **(required) When creating from a VM:** The ID of the VM from which you want to create the \n" " OMI.\n" @@ -1071,6 +1084,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Listener: ref LoadBalancerLight\n" + " Information about the load balancer.\n" " Information about the load balancer.\n" " --Listener.LoadBalancerName: string\n" " The name of the load balancer to which the listener is attached.\n" @@ -1078,6 +1092,7 @@ static const char *calls_args_descriptions[] = { " The port of load balancer on which the load balancer is listening \n" " (between `1` and `65535` both included).\n" "--ListenerRule: ref ListenerRuleForCreation\n" + " Information about the listener rule.\n" " Information about the listener rule.\n" " --ListenerRule.Action: string\n" " The type of action for the rule (always `forward`).\n" @@ -1420,10 +1435,12 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--OsuExport: ref OsuExportToCreate\n" + " Information about the OOS export task to create.\n" " Information about the OOS export task to create.\n" " --OsuExport.DiskImageFormat: string\n" " The format of the export disk (`qcow2` \\| `raw`).\n" " --OsuExport.OsuApiKey: ref OsuApiKey\n" + " Information about the OOS API key.\n" " Information about the OOS API key.\n" " --OsuExport.OsuApiKey.ApiKeyId: string\n" " The API key of the OOS account that enables you to access the bucket.\n" @@ -1565,16 +1582,22 @@ static const char *calls_args_descriptions[] = { " The name of the VM template.\n" , "--ActionsOnNextBoot: ref ActionsOnNextBoot\n" + " The action to perform on the next boot of the VM.\n" " The action to perform on the next boot of the VM.\n" " --ActionsOnNextBoot.SecureBoot: string\n" - " One action to perform on the next boot of the VM. For more information, \n" - " see [About Secure \n" + " One action to perform on the next boot of the VM. For more information, \n" + " see [About Secure \n" + " Boot](https://docs.outscale.com/en/userguide/About-Secure-Boot.html#_secur\n" + " e_boot_actions).\n" + " One action to perform on the next boot of the VM (`enable` | `disable` | \n" + " `setup-mode` | `none`). For more information, see [About Secure \n" " Boot](https://docs.outscale.com/en/userguide/About-Secure-Boot.html#_secur\n" " e_boot_actions).\n" "--BlockDeviceMappings: array ref BlockDeviceMappingVmCreation\n" " One or more block device mappings.\n" " Information about the block device mapping.\n" " --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate\n" + " Information about the BSU volume to create.\n" " Information about the BSU volume to create.\n" " --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool\n" " If set to true, the volume is deleted when terminating the VM. If false, \n" @@ -1608,6 +1631,7 @@ static const char *calls_args_descriptions[] = { " --BlockDeviceMappings.INDEX.VirtualDeviceName: string\n" " The name of the virtual device (`ephemeralN`).\n" "--BootMode: string\n" + " The boot mode of the VM.\n" " Information about the boot mode of the VM.\n" "--BootOnCreation: bool\n" " If true, the VM is started on creation. If false, the VM is stopped on creation.\n" @@ -1676,6 +1700,7 @@ static const char *calls_args_descriptions[] = { " The performance of the VM. This parameter is ignored if you specify a performance flag \n" " directly in the `VmType` parameter.\n" "--Placement: ref Placement\n" + " Information about the placement of the VM.\n" " Information about the placement of the VM.\n" " --Placement.SubregionName: string\n" " The name of the Subregion. If you specify this parameter, you must not \n" @@ -1691,6 +1716,8 @@ static const char *calls_args_descriptions[] = { "--SubnetId: string\n" " The ID of the Subnet in which you want to create the VM. If you specify this parameter, you \n" " must not specify the `Nics` parameter.\n" +"--TpmEnabled: bool\n" + " If true, a virtual Trusted Platform Module (vTPM) is enabled on the VM. If false, it is not.\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). For more information about user data, see \n" @@ -2250,6 +2277,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersAccessKeys\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.AccessKeyIds: array string\n" " The IDs of the access keys.\n" @@ -2275,6 +2303,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersApiAccessRule\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.ApiAccessRuleIds: array string\n" " One or more IDs of API access rules.\n" @@ -2290,6 +2319,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersApiLog\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.QueryAccessKeys: array string\n" " The access keys used for the logged calls.\n" @@ -2322,6 +2352,7 @@ static const char *calls_args_descriptions[] = { " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included).\n" "--With: ref With\n" + " The information to display in each returned log.\n" " The information to display in each returned log.\n" " --With.AccountId: bool\n" " If true, the account ID is displayed.\n" @@ -2355,10 +2386,24 @@ static const char *calls_args_descriptions[] = { " If true, the size of the response is displayed.\n" " --With.ResponseStatusCode: bool\n" " If true, the HTTP status code of the response is displayed.\n" +, + "--FromMonth: string\n" + " The beginning of the time period, in ISO 8601 date format (for example, `2020-06-01`). This \n" + " value must correspond to the first day of the month and is included in the time period.\n" +"--Overall: bool\n" + " If false, returns only the CO2 emission of the specific account that sends the request. If \n" + " true, returns either the overall CO2 emission of your paying account and all linked \n" + " accounts (if the account that sends this request is a paying account) or returns nothing \n" + " (if the account that sends this request is a linked account).\n" +"--ToMonth: string\n" + " The end of the time period, in ISO 8601 date format (for example, `2020-06-14`). This value \n" + " must correspond to the first day of the month and is excluded from the time period. It must \n" + " be set to a later date than `FromMonth`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersCa\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.CaFingerprints: array string\n" " The fingerprints of the CAs.\n" @@ -2373,6 +2418,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersCatalogs\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.CurrentCatalogOnly: bool\n" " By default or if set to true, only returns the current catalog. If \n" @@ -2389,6 +2435,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersClientGateway\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.BgpAsns: array integer\n" " The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of \n" @@ -2446,6 +2493,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersDedicatedGroup\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.CpuGenerations: array integer\n" " The processor generation for the VMs in the dedicated group (for \n" @@ -2465,6 +2513,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersDhcpOptions\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.Default: bool\n" " If true, lists all default DHCP options set. If false, lists all \n" @@ -2497,6 +2546,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersDirectLinkInterface\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.DirectLinkIds: array string\n" " The IDs of the DirectLinks.\n" @@ -2511,6 +2561,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersDirectLink\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.DirectLinkIds: array string\n" " The IDs of the DirectLinks.\n" @@ -2536,6 +2587,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersFlexibleGpu\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.DeleteOnVmDeletion: bool\n" " Indicates whether the fGPU is deleted when terminating the VM.\n" @@ -2551,12 +2603,24 @@ static const char *calls_args_descriptions[] = { " `detaching`).\n" " --Filters.SubregionNames: array string\n" " The Subregions where the fGPUs are located.\n" + " --Filters.Tags: array ref Tag\n" + " One or more tags associated with the fGPUs.\n" + " Information about the tag.\n" + " --Filters.Tags.INDEX.Key: string\n" + " The key of the tag, with a minimum of 1 character.\n" + " --Filters.Tags.INDEX.ResourceId: string\n" + " The ID of the resource.\n" + " --Filters.Tags.INDEX.ResourceType: string\n" + " The type of the resource.\n" + " --Filters.Tags.INDEX.Value: string\n" + " The value of the tag, between 0 and 255 characters.\n" " --Filters.VmIds: array string\n" " One or more IDs of VMs.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersExportTask\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.TaskIds: array string\n" " The IDs of the export tasks.\n" @@ -2569,6 +2633,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersImage\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.AccountAliases: array string\n" " The account aliases of the owners of the OMIs.\n" @@ -2623,6 +2688,9 @@ static const char *calls_args_descriptions[] = { " The key/value combination of the tags associated with the OMIs, in the \n" " following format: \n" " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" + " --Filters.TpmMandatory: bool\n" + " Whether a virtual Trusted Platform Module (vTPM) is mandatory for VMs \n" + " created from this OMI (true) or not (false).\n" " --Filters.VirtualizationTypes: array string\n" " The virtualization types (always `hvm`).\n" "--NextPageToken: string\n" @@ -2634,6 +2702,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersInternetService\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.InternetServiceIds: array string\n" " The IDs of the internet services.\n" @@ -2660,6 +2729,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersKeypair\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.KeypairFingerprints: array string\n" " The fingerprints of the keypairs.\n" @@ -2687,6 +2757,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref ReadLinkedPoliciesFilters\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.PathPrefix: string\n" " The path prefix of the policies. If not specified, it is set to a slash \n" @@ -2701,6 +2772,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersListenerRule\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.ListenerRuleNames: array string\n" " The names of the listener rules.\n" @@ -2713,6 +2785,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersLoadBalancer\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.LoadBalancerNames: array string\n" " The names of the load balancers.\n" @@ -2728,6 +2801,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersUserGroup\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.PathPrefix: string\n" " The path prefix of the groups. If not specified, it is set to a slash \n" @@ -2744,6 +2818,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersNatService\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.ClientTokens: array string\n" " The idempotency tokens provided when creating the NAT services.\n" @@ -2773,6 +2848,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersService\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.ServiceIds: array string\n" " The IDs of the services.\n" @@ -2787,6 +2863,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersNetAccessPoint\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.NetAccessPointIds: array string\n" " The IDs of the Net access points.\n" @@ -2815,6 +2892,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersNetPeering\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.AccepterNetAccountIds: array string\n" " The account IDs of the owners of the peer Nets.\n" @@ -2856,6 +2934,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersNet\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.DhcpOptionsSetIds: array string\n" " The IDs of the DHCP options sets.\n" @@ -2885,6 +2964,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersNic\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.Descriptions: array string\n" " The descriptions of the NICs.\n" @@ -2961,6 +3041,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref ReadPoliciesFilters\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.OnlyLinked: bool\n" " If set to true, lists only the policies attached to a user.\n" @@ -2997,6 +3078,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersProductType\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.ProductTypeIds: array string\n" " The IDs of the product types.\n" @@ -3020,6 +3102,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersPublicIp\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.LinkPublicIpIds: array string\n" " The IDs representing the associations of public IPs with VMs or NICs.\n" @@ -3054,6 +3137,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersQuota\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.Collections: array string\n" " The group names of the quotas.\n" @@ -3076,6 +3160,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersRouteTable\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.LinkRouteTableIds: array string\n" " The IDs of the route tables involved in the associations.\n" @@ -3122,6 +3207,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersSecurityGroup\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.Descriptions: array string\n" " The descriptions of the security groups.\n" @@ -3184,6 +3270,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersServerCertificate\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.Paths: array string\n" " The paths to the server certificates.\n" @@ -3191,6 +3278,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersExportTask\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.TaskIds: array string\n" " The IDs of the export tasks.\n" @@ -3203,6 +3291,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersSnapshot\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.AccountAliases: array string\n" " The account aliases of the owners of the snapshots.\n" @@ -3251,6 +3340,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersSubnet\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.AvailableIpsCounts: array integer\n" " The number of available IPs.\n" @@ -3282,6 +3372,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersSubregion\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.RegionNames: array string\n" " The names of the Regions containing the Subregions.\n" @@ -3298,6 +3389,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersTag\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.Keys: array string\n" " The keys of the tags that are assigned to the resources. You can use \n" @@ -3306,11 +3398,12 @@ static const char *calls_args_descriptions[] = { " --Filters.ResourceIds: array string\n" " The IDs of the resources with which the tags are associated.\n" " --Filters.ResourceTypes: array string\n" - " The resource type (`customer-gateway` \\| `dhcpoptions` \\| `image` \\| \n" - " `instance` \\| `keypair` \\| `natgateway` \\| `network-interface` \\| \n" - " `public-ip` \\| `route-table` \\| `security-group` \\| `snapshot` \\| \n" - " `subnet` \\| `task` \\| `virtual-private-gateway` \\| `volume` \\| `vpc` \n" - " \\| `vpc-endpoint` \\| `vpc-peering-connection`\\| `vpn-connection`).\n" + " The resource type (`customer-gateway` \\| `dhcpoptions` \\| \n" + " `flexible-gpu` \\| `image` \\| `instance` \\| `keypair` \\| `natgateway` \n" + " \\| `network-interface` \\| `public-ip` \\| `route-table` \\| \n" + " `security-group` \\| `snapshot` \\| `subnet` \\| `task` \\| \n" + " `virtual-private-gateway` \\| `volume` \\| `vpc` \\| `vpc-endpoint` \\| \n" + " `vpc-peering-connection`\\| `vpn-connection`).\n" " --Filters.Values: array string\n" " The values of the tags that are assigned to the resources. You can use \n" " this filter alongside the `TagKeys` filter. In that case, you filter the \n" @@ -3367,6 +3460,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersUserGroup\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.PathPrefix: string\n" " The path prefix of the groups. If not specified, it is set to a slash \n" @@ -3393,6 +3487,7 @@ static const char *calls_args_descriptions[] = { "--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" " One or more filters.\n" " --Filters.UserIds: array string\n" " The IDs of the users.\n" @@ -3404,6 +3499,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersVirtualGateway\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.ConnectionTypes: array string\n" " The types of the virtual gateways (always `ipsec.1`).\n" @@ -3434,6 +3530,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersVmGroup\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.Descriptions: array string\n" " The descriptions of the VM groups.\n" @@ -3461,6 +3558,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersVmTemplate\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.CpuCores: array integer\n" " The number of vCores.\n" @@ -3492,6 +3590,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersVmType\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.BsuOptimized: bool\n" " This parameter is not available. It is present in our API for the sake \n" @@ -3529,6 +3628,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersVm\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.Architectures: array string\n" " The architectures of the VMs (`i386` \\| `x86_64`).\n" @@ -3665,6 +3765,9 @@ static const char *calls_args_descriptions[] = { " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" " --Filters.Tenancies: array string\n" " The tenancies of the VMs (`dedicated` \\| `default` \\| `host`).\n" + " --Filters.TpmEnabled: bool\n" + " Whether a virtual Trusted Platform Module (vTPM) is enabled (true) or \n" + " disabled (false) on the VM.\n" " --Filters.VmIds: array string\n" " One or more IDs of VMs.\n" " --Filters.VmSecurityGroupIds: array string\n" @@ -3692,6 +3795,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersVmsState\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.MaintenanceEventCodes: array string\n" " The code for the scheduled event (`system-reboot` \\| \n" @@ -3717,7 +3821,21 @@ static const char *calls_args_descriptions[] = { , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +"--Filters: ref FiltersUpdateVolumeTask\n" + " One or more filters.\n" + " One or more filters.\n" + " --Filters.TaskIds: array string\n" + " The IDs of the volume update tasks.\n" +"--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" + " included). By default, `100`.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersVolume\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.ClientTokens: array string\n" " The idempotency tokens provided when creating the volumes.\n" @@ -3766,6 +3884,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Filters: ref FiltersVpnConnection\n" + " One or more filters.\n" " One or more filters.\n" " --Filters.BgpAsns: array integer\n" " The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of \n" @@ -4055,9 +4174,12 @@ static const char *calls_args_descriptions[] = { "--ImageId: string\n" " The ID of the OMI you want to modify.\n" "--PermissionsToLaunch: ref PermissionsOnResourceCreation\n" + " Information about the permissions for the resource.\nSpecify either the `Additions` or the \n" + " `Removals` parameter.\n" " Information about the permissions for the resource.\nSpecify \n" " either the `Additions` or the `Removals` parameter.\n" " --PermissionsToLaunch.Additions: ref PermissionsOnResource\n" + " Permissions for the resource.\n" " Permissions for the resource.\n" " --PermissionsToLaunch.Additions.AccountIds: array string\n" " One or more account IDs that the permission is associated with.\n" @@ -4068,6 +4190,7 @@ static const char *calls_args_descriptions[] = { " `Removals`).\n(Response) If true, the resource is public. If false, \n" " the resource is private.\n" " --PermissionsToLaunch.Removals: ref PermissionsOnResource\n" + " Permissions for the resource.\n" " Permissions for the resource.\n" " --PermissionsToLaunch.Removals.AccountIds: array string\n" " One or more account IDs that the permission is associated with.\n" @@ -4095,6 +4218,7 @@ static const char *calls_args_descriptions[] = { " `_-.$/~\"'@:+?`.\n" , "--AccessLog: ref AccessLog\n" + " Information about access logs.\n" " Information about access logs.\n" " --AccessLog.IsEnabled: bool\n" " If true, access logs are enabled for your load balancer. If false, they \n" @@ -4111,6 +4235,7 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--HealthCheck: ref HealthCheck\n" + " Information about the health check configuration.\n" " Information about the health check configuration.\n" " --HealthCheck.CheckInterval: long long int\n" " The number of seconds between two requests (between `5` and `600` both \n" @@ -4179,6 +4304,8 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--LinkNic: ref LinkNicToUpdate\n" + " Information about the NIC attachment. If you are modifying the `DeleteOnVmDeletion` \n" + " attribute, you must specify the ID of the NIC attachment.\n" " Information about the NIC attachment. If you are modifying the \n" " `DeleteOnVmDeletion` attribute, you must specify the ID of the NIC \n" " attachment.\n" @@ -4239,9 +4366,12 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--PermissionsToCreateVolume: ref PermissionsOnResourceCreation\n" + " Information about the permissions for the resource.\nSpecify either the `Additions` or the \n" + " `Removals` parameter.\n" " Information about the permissions for the resource.\nSpecify \n" " either the `Additions` or the `Removals` parameter.\n" " --PermissionsToCreateVolume.Additions: ref PermissionsOnResource\n" + " Permissions for the resource.\n" " Permissions for the resource.\n" " --PermissionsToCreateVolume.Additions.AccountIds: array string\n" " One or more account IDs that the permission is associated with.\n" @@ -4252,6 +4382,7 @@ static const char *calls_args_descriptions[] = { " `Removals`).\n(Response) If true, the resource is public. If false, \n" " the resource is private.\n" " --PermissionsToCreateVolume.Removals: ref PermissionsOnResource\n" + " Permissions for the resource.\n" " Permissions for the resource.\n" " --PermissionsToCreateVolume.Removals.AccountIds: array string\n" " One or more account IDs that the permission is associated with.\n" @@ -4313,16 +4444,22 @@ static const char *calls_args_descriptions[] = { " A new VM template ID for your VM group.\n" , "--ActionsOnNextBoot: ref ActionsOnNextBoot\n" + " The action to perform on the next boot of the VM.\n" " The action to perform on the next boot of the VM.\n" " --ActionsOnNextBoot.SecureBoot: string\n" - " One action to perform on the next boot of the VM. For more information, \n" - " see [About Secure \n" + " One action to perform on the next boot of the VM. For more information, \n" + " see [About Secure \n" + " Boot](https://docs.outscale.com/en/userguide/About-Secure-Boot.html#_secur\n" + " e_boot_actions).\n" + " One action to perform on the next boot of the VM (`enable` | `disable` | \n" + " `setup-mode` | `none`). For more information, see [About Secure \n" " Boot](https://docs.outscale.com/en/userguide/About-Secure-Boot.html#_secur\n" " e_boot_actions).\n" "--BlockDeviceMappings: array ref BlockDeviceMappingVmUpdate\n" " One or more block device mappings of the VM.\n" " Information about the block device mapping.\n" " --BlockDeviceMappings.INDEX.Bsu: ref BsuToUpdateVm\n" + " Information about the BSU volume.\n" " Information about the BSU volume.\n" " --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool\n" " If set to true, the volume is deleted when terminating the VM. If set to \n" @@ -4392,22 +4529,16 @@ static const char *calls_args_descriptions[] = { "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Iops: long long int\n" - " **Cold volume**: the new number of I/O operations per second (IOPS). This parameter can be \n" - " specified only if you update an `io1` volume or if you change the type of the volume for an \n" - " `io1`. This modification is instantaneous. \n**Hot volume**: the new number of I/O \n" - " operations per second (IOPS). This parameter can be specified only if you update an `io1` \n" - " volume. This modification is not instantaneous. \nThe maximum number of IOPS allowed for \n" - " `io1` volumes is `13000` with a maximum performance ratio of 300 IOPS per gibibyte.\n" + " The new number of I/O operations per second (IOPS). This parameter can be specified only if \n" + " you update an `io1` volume or if you change the type of the volume for an `io1`.\n" "--Size: long long int\n" - " **Cold volume**: the new size of the volume, in gibibytes (GiB). This value must be equal \n" - " to or greater than the current size of the volume. This modification is not instantaneous. \n" - " \n**Hot volume**: you cannot change the size of a hot volume.\n" + " The new size of the volume, in gibibytes (GiB). This value must be equal to or greater than \n" + " the current size of the volume. This modification is not instantaneous.\n" "--VolumeId: string\n" " The ID of the volume you want to update.\n" "--VolumeType: string\n" - " **Cold volume**: the new type of the volume (`standard` \\| `io1` \\| `gp2`). This \n" - " modification is instantaneous. If you update to an `io1` volume, you must also specify the \n" - " `Iops` parameter.\n**Hot volume**: you cannot change the type of a hot volume.\n" + " The new type of the volume (`standard` \\| `io1` \\| `gp2`). If you update to an `io1` \n" + " volume, you must also specify the `Iops` parameter.\n" , "--ClientGatewayId: string\n" " The ID of the client gateway.\n" @@ -4418,8 +4549,11 @@ static const char *calls_args_descriptions[] = { "--VpnConnectionId: string\n" " The ID of the VPN connection you want to modify.\n" "--VpnOptions: ref VpnOptions\n" + " Information about the VPN options.\n" " Information about the VPN options.\n" " --VpnOptions.Phase1Options: ref Phase1Options\n" + " This parameter is not available. It is present in our API for the sake \n" + " of historical compatibility with AWS.\n" " This parameter is not available. It is present in our API for the sake \n" " of historical compatibility with AWS.\n" " --VpnOptions.Phase1Options.DpdTimeoutAction: string\n" @@ -4450,6 +4584,8 @@ static const char *calls_args_descriptions[] = { " This parameter is not available. It is present in our API for the sake \n" " of historical compatibility with AWS.\n" " --VpnOptions.Phase2Options: ref Phase2Options\n" + " Information about Phase 2 of the Internet Key Exchange (IKE) \n" + " negotiation.\n" " Information about Phase 2 of the Internet Key Exchange (IKE) \n" " negotiation.\n" " --VpnOptions.Phase2Options.Phase2DhGroupNumbers: array integer\n" @@ -4917,6 +5053,9 @@ static int block_device_mapping_vm_update_setter(struct block_device_mapping_vm_ static int bsu_created_setter(struct bsu_created *args, struct osc_str *data); static int bsu_to_create_setter(struct bsu_to_create *args, struct osc_str *data); static int bsu_to_update_vm_setter(struct bsu_to_update_vm *args, struct osc_str *data); +static int co2_category_distribution_setter(struct co2_category_distribution *args, struct osc_str *data); +static int co2_emission_entry_setter(struct co2_emission_entry *args, struct osc_str *data); +static int co2_factor_distribution_setter(struct co2_factor_distribution *args, struct osc_str *data); static int ca_setter(struct ca *args, struct osc_str *data); static int catalog_setter(struct catalog *args, struct osc_str *data); static int catalog_entry_setter(struct catalog_entry *args, struct osc_str *data); @@ -4962,6 +5101,7 @@ static int filters_snapshot_setter(struct filters_snapshot *args, struct osc_str static int filters_subnet_setter(struct filters_subnet *args, struct osc_str *data); 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_update_volume_task_setter(struct filters_update_volume_task *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); @@ -5065,6 +5205,9 @@ static int vm_states_setter(struct vm_states *args, struct osc_str *data); static int vm_template_setter(struct vm_template *args, struct osc_str *data); static int vm_type_setter(struct vm_type *args, struct osc_str *data); static int volume_setter(struct volume *args, struct osc_str *data); +static int volume_update_setter(struct volume_update *args, struct osc_str *data); +static int volume_update_parameters_setter(struct volume_update_parameters *args, struct osc_str *data); +static int volume_update_task_setter(struct volume_update_task *args, struct osc_str *data); static int vpn_connection_setter(struct vpn_connection *args, struct osc_str *data); static int vpn_options_setter(struct vpn_options *args, struct osc_str *data); static int with_setter(struct with *args, struct osc_str *data); @@ -5594,6 +5737,97 @@ static int bsu_to_update_vm_setter(struct bsu_to_update_vm *args, struct osc_str return !!ret; } +static int co2_category_distribution_setter(struct co2_category_distribution *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->category) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Category\":", args->category); + ret += 1; + } + if (args->is_set_value || args->value) { + ARG_TO_JSON(Value, double, args->value); + ret += 1; + } + + return !!ret; +} +static int co2_emission_entry_setter(struct co2_emission_entry *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->account_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"AccountId\":", args->account_id); + ret += 1; + } + if (args->category_distribution) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"CategoryDistribution\":[" )); + for (int i = 0; i < args->nb_category_distribution; ++i) { + struct co2_category_distribution *p = &args->category_distribution[i]; + if (p != args->category_distribution) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(co2_category_distribution_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->category_distribution_str) { + ARG_TO_JSON(CategoryDistribution, string, args->category_distribution_str); + ret += 1; + } + if (args->factor_distribution) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"FactorDistribution\":[" )); + for (int i = 0; i < args->nb_factor_distribution; ++i) { + struct co2_factor_distribution *p = &args->factor_distribution[i]; + if (p != args->factor_distribution) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(co2_factor_distribution_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->factor_distribution_str) { + ARG_TO_JSON(FactorDistribution, string, args->factor_distribution_str); + ret += 1; + } + if (args->month) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Month\":", args->month); + ret += 1; + } + if (args->paying_account_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PayingAccountId\":", args->paying_account_id); + ret += 1; + } + if (args->is_set_value || args->value) { + ARG_TO_JSON(Value, double, args->value); + ret += 1; + } + + return !!ret; +} +static int co2_factor_distribution_setter(struct co2_factor_distribution *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->factor) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Factor\":", args->factor); + ret += 1; + } + if (args->is_set_value || args->value) { + ARG_TO_JSON(Value, double, args->value); + ret += 1; + } + + return !!ret; +} static int ca_setter(struct ca *args, struct osc_str *data) { int count_args = 0; int ret = 0; @@ -6998,6 +7232,24 @@ static int filters_flexible_gpu_setter(struct filters_flexible_gpu *args, struct ARG_TO_JSON(SubregionNames, string, args->subregion_names_str); ret += 1; } + if (args->tags) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tags\":[" )); + for (int i = 0; i < args->nb_tags; ++i) { + struct tag *p = &args->tags[i]; + if (p != args->tags) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(tag_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->tags_str) { + ARG_TO_JSON(Tags, string, args->tags_str); + ret += 1; + } if (args->vm_ids) { char **as; @@ -7384,6 +7636,10 @@ static int filters_image_setter(struct filters_image *args, struct osc_str *data ARG_TO_JSON(Tags, string, args->tags_str); ret += 1; } + if (args->is_set_tpm_mandatory) { + ARG_TO_JSON(TpmMandatory, bool, args->tpm_mandatory); + ret += 1; + } if (args->virtualization_types) { char **as; @@ -10133,6 +10389,28 @@ static int filters_tag_setter(struct filters_tag *args, struct osc_str *data) { return !!ret; } +static int filters_update_volume_task_setter(struct filters_update_volume_task *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->task_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"TaskIds\":[" )); + for (as = args->task_ids; *as; ++as) { + if (as != args->task_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->task_ids_str) { + ARG_TO_JSON(TaskIds, string, args->task_ids_str); + ret += 1; + } + + return !!ret; +} static int filters_user_group_setter(struct filters_user_group *args, struct osc_str *data) { int count_args = 0; int ret = 0; @@ -11203,6 +11481,10 @@ static int filters_vm_setter(struct filters_vm *args, struct osc_str *data) { ARG_TO_JSON(Tenancies, string, args->tenancies_str); ret += 1; } + if (args->is_set_tpm_enabled) { + ARG_TO_JSON(TpmEnabled, bool, args->tpm_enabled); + ret += 1; + } if (args->vm_ids) { char **as; @@ -12374,6 +12656,24 @@ static int flexible_gpu_setter(struct flexible_gpu *args, struct osc_str *data) ARG_TO_JSON_STR("\"SubregionName\":", args->subregion_name); ret += 1; } + if (args->tags) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tags\":[" )); + for (int i = 0; i < args->nb_tags; ++i) { + struct tag *p = &args->tags[i]; + if (p != args->tags) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(tag_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->tags_str) { + ARG_TO_JSON(Tags, string, args->tags_str); + ret += 1; + } if (args->vm_id) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"VmId\":", args->vm_id); @@ -12612,6 +12912,10 @@ static int image_setter(struct image *args, struct osc_str *data) { ARG_TO_JSON(Tags, string, args->tags_str); ret += 1; } + if (args->is_set_tpm_mandatory) { + ARG_TO_JSON(TpmMandatory, bool, args->tpm_mandatory); + ret += 1; + } return !!ret; } @@ -16142,6 +16446,10 @@ static int vm_setter(struct vm *args, struct osc_str *data) { ARG_TO_JSON(Tags, string, args->tags_str); ret += 1; } + if (args->is_set_tpm_enabled) { + ARG_TO_JSON(TpmEnabled, bool, args->tpm_enabled); + ret += 1; + } if (args->user_data) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"UserData\":", args->user_data); @@ -16517,6 +16825,11 @@ static int volume_setter(struct volume *args, struct osc_str *data) { ARG_TO_JSON(Tags, string, args->tags_str); ret += 1; } + if (args->task_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"TaskId\":", args->task_id); + ret += 1; + } if (args->volume_id) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); @@ -16530,6 +16843,119 @@ static int volume_setter(struct volume *args, struct osc_str *data) { return !!ret; } +static int volume_update_setter(struct volume_update *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->origin_str) { + ARG_TO_JSON(Origin, string, args->origin_str); + ret += 1; + } else if (args->is_set_origin) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Origin\": { " )); + STRY(volume_update_parameters_setter(&args->origin, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->target_str) { + ARG_TO_JSON(Target, string, args->target_str); + ret += 1; + } else if (args->is_set_target) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Target\": { " )); + STRY(volume_update_parameters_setter(&args->target, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + + return !!ret; +} +static int volume_update_parameters_setter(struct volume_update_parameters *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->is_set_iops || args->iops) { + ARG_TO_JSON(Iops, int, args->iops); + ret += 1; + } + if (args->is_set_size || args->size) { + ARG_TO_JSON(Size, int, args->size); + ret += 1; + } + if (args->volume_type) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VolumeType\":", args->volume_type); + ret += 1; + } + + return !!ret; +} +static int volume_update_task_setter(struct volume_update_task *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->comment) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Comment\":", args->comment); + ret += 1; + } + if (args->completion_date) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"CompletionDate\":", args->completion_date); + ret += 1; + } + if (args->is_set_progress || args->progress) { + ARG_TO_JSON(Progress, int, args->progress); + ret += 1; + } + if (args->start_date) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"StartDate\":", args->start_date); + ret += 1; + } + if (args->state) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"State\":", args->state); + ret += 1; + } + if (args->tags) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tags\":[" )); + for (int i = 0; i < args->nb_tags; ++i) { + struct resource_tag *p = &args->tags[i]; + if (p != args->tags) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(resource_tag_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->tags_str) { + ARG_TO_JSON(Tags, string, args->tags_str); + ret += 1; + } + if (args->task_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"TaskId\":", args->task_id); + ret += 1; + } + if (args->volume_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); + ret += 1; + } + if (args->volume_update_str) { + ARG_TO_JSON(VolumeUpdate, string, args->volume_update_str); + ret += 1; + } else if (args->is_set_volume_update) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VolumeUpdate\": { " )); + STRY(volume_update_setter(&args->volume_update, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + + return !!ret; +} static int vpn_connection_setter(struct vpn_connection *args, struct osc_str *data) { int count_args = 0; int ret = 0; @@ -17979,6 +18405,10 @@ static int create_image_data(struct osc_env *e, struct osc_create_image_arg *ar ARG_TO_JSON_STR("\"SourceRegionName\":", args->source_region_name); ret += 1; } + if (args->is_set_tpm_mandatory) { + ARG_TO_JSON(TpmMandatory, bool, args->tpm_mandatory); + ret += 1; + } if (args->vm_id) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"VmId\":", args->vm_id); @@ -20668,6 +21098,10 @@ static int create_vms_data(struct osc_env *e, struct osc_create_vms_arg *args, ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); ret += 1; } + if (args->is_set_tpm_enabled) { + ARG_TO_JSON(TpmEnabled, bool, args->tpm_enabled); + ret += 1; + } if (args->user_data) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"UserData\":", args->user_data); @@ -25825,6 +26259,73 @@ int osc_read_api_logs(struct osc_env *e, struct osc_str *out, struct osc_read_ap osc_deinit_str(&data); return res; } +static int read_co2_emission_account_data(struct osc_env *e, struct osc_read_co2_emission_account_arg *args, struct osc_str *data) +{ + struct osc_str end_call; + int ret = 0; + int count_args = 0; + + (void)count_args; /* if use only query/header and path, this is unused */ + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + if (!args) + goto no_data; + + osc_str_append_string(data, "{"); + if (args->from_month) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"FromMonth\":", args->from_month); + ret += 1; + } + if (args->is_set_overall) { + ARG_TO_JSON(Overall, bool, args->overall); + ret += 1; + } + if (args->to_month) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ToMonth\":", args->to_month); + ret += 1; + } + osc_str_append_string(data, "}"); + +no_data: + osc_str_append_string(&end_call, "/api/v1/ReadCO2EmissionAccount"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); + return !!ret; +} + +int osc_read_co2_emission_account(struct osc_env *e, struct osc_str *out, struct osc_read_co2_emission_account_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + int r; + + osc_init_str(&data); + r = read_co2_emission_account_data(e, args, &data); + if (r < 0) + goto out; + + 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 = osc_easy_perform(e); + if (res != CURLE_OK) + goto out; + + long statuscode = 200; + res = curl_easy_getinfo(e->c, CURLINFO_RESPONSE_CODE, &statuscode); + if (res != CURLE_OK) + goto out; + + if (statuscode >= 400) + res = 1; +out: + osc_deinit_str(&data); + return res; +} static int read_cas_data(struct osc_env *e, struct osc_read_cas_arg *args, struct osc_str *data) { struct osc_str end_call; @@ -30349,6 +30850,82 @@ int osc_read_vms_state(struct osc_env *e, struct osc_str *out, struct osc_read_v osc_deinit_str(&data); return res; } +static int read_volume_update_tasks_data(struct osc_env *e, struct osc_read_volume_update_tasks_arg *args, struct osc_str *data) +{ + struct osc_str end_call; + int ret = 0; + int count_args = 0; + + (void)count_args; /* if use only query/header and path, this is unused */ + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + if (!args) + goto no_data; + + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + 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_update_volume_task_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + 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, "}"); + +no_data: + osc_str_append_string(&end_call, "/api/v1/ReadVolumeUpdateTasks"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); + return !!ret; +} + +int osc_read_volume_update_tasks(struct osc_env *e, struct osc_str *out, struct osc_read_volume_update_tasks_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + int r; + + osc_init_str(&data); + r = read_volume_update_tasks_data(e, args, &data); + if (r < 0) + goto out; + + 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 = osc_easy_perform(e); + if (res != CURLE_OK) + goto out; + + long statuscode = 200; + res = curl_easy_getinfo(e->c, CURLINFO_RESPONSE_CODE, &statuscode); + if (res != CURLE_OK) + goto out; + + if (statuscode >= 400) + res = 1; +out: + osc_deinit_str(&data); + return res; +} static int read_volumes_data(struct osc_env *e, struct osc_read_volumes_arg *args, struct osc_str *data) { struct osc_str end_call; diff --git a/osc_sdk.h b/osc_sdk.h index 126d6ce..8a3a58b 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.35.5" -#define OSC_SDK_VERSION 0X001700 +#define OSC_API_VERSION "1.37.1" +#define OSC_SDK_VERSION 0X001800 enum osc_auth_method { OSC_AKSK_METHOD, @@ -311,9 +311,13 @@ struct account { struct actions_on_next_boot { /* - * One action to perform on the next boot of the VM. For more - * information, - * see [About Secure + * One action to perform on the next boot of the VM. For more + * information, see [About Secure + * Boot](https://docs.outscale.com/en/userguide/About-Secure-Boot.html#_s + * ecure_boot_actions). + * One action to perform on the next boot of the VM (`enable` | + * `disable` | + * `setup-mode` | `none`). For more information, see [About Secure * * Boot](https://docs.outscale.com/en/userguide/About-Secure-Boot.html#_s * ecur @@ -431,6 +435,7 @@ struct bsu_created { struct block_device_mapping_created { /* + * Information about the created BSU volume. * Information about the created BSU volume. * --Bsu.DeleteOnVmDeletion: bool * If true, the volume is deleted when terminating the VM. If false, @@ -494,6 +499,7 @@ struct bsu_to_create { struct block_device_mapping_image { /* + * Information about the BSU volume to create. * Information about the BSU volume to create. * --Bsu.DeleteOnVmDeletion: bool * If set to true, the volume is deleted when terminating the VM. If @@ -546,6 +552,7 @@ struct block_device_mapping_image { struct block_device_mapping_vm_creation { /* + * Information about the BSU volume to create. * Information about the BSU volume to create. * --Bsu.DeleteOnVmDeletion: bool * If set to true, the volume is deleted when terminating the VM. If @@ -616,6 +623,7 @@ struct bsu_to_update_vm { struct block_device_mapping_vm_update { /* + * Information about the BSU volume. * Information about the BSU volume. * --Bsu.DeleteOnVmDeletion: bool * If set to true, the volume is deleted when terminating the VM. If @@ -645,6 +653,74 @@ struct block_device_mapping_vm_update { char *virtual_device_name; }; +struct co2_category_distribution { + /* + * The category of the resource (for example, `storage`). + */ + char *category; + /* + * The total CO2 emissions for the category. + */ + int is_set_value; + double value; +}; + +struct co2_emission_entry { + /* + * The ID of the account associated with the consumption. + */ + char *account_id; + /* + * The allocation of the `Value` among categories. + * The allocation of the `Value` among categories. + * --CategoryDistribution.INDEX.Category: string + * The category of the resource (for example, `storage`). + * --CategoryDistribution.INDEX.Value: double + * The total CO2 emissions for the category. + */ + char *category_distribution_str; + int nb_category_distribution; + struct co2_category_distribution *category_distribution; + /* + * The allocation of the `Value` among factors. + * The allocation of the `Value` among factors. + * --FactorDistribution.INDEX.Factor: string + * The emission source (for example, `hardware`). + * --FactorDistribution.INDEX.Value: double + * The total CO2 emissions for the factor. + */ + char *factor_distribution_str; + int nb_factor_distribution; + struct co2_factor_distribution *factor_distribution; + /* + * The month associated with the CO2 emission entry. + */ + char *month; + /* + * The ID of the paying account related to the `AccountId` parameter. + */ + char *paying_account_id; + /* + * The total CO2 emissions for the `Month` and `AccountId` specified. + * This value corresponds to the sum of all entries in + * `CategoryDistribution` and `FactorDistributionEntry`. + */ + int is_set_value; + double value; +}; + +struct co2_factor_distribution { + /* + * The emission source (for example, `hardware`). + */ + char *factor; + /* + * The total CO2 emissions for the factor. + */ + int is_set_value; + double value; +}; + struct ca { /* * The fingerprint of the CA. @@ -849,7 +925,7 @@ struct consumption_entry { double price; /* * The service of the API call (`TinaOS-FCU`, `TinaOS-LBU`, - * `TinaOS-DirectLink`, `TinaOS-OOS`, or `TinaOS-OSU`). + * `TinaOS-DirectLink`, `TinaOS-OOS`, `TinaOS-OSU`, or `OKS`). */ char *service; /* @@ -1437,6 +1513,21 @@ struct filters_flexible_gpu { */ char *subregion_names_str; char **subregion_names; + /* + * One or more tags associated with the fGPUs. + * Information about the tag. + * --Tags.INDEX.Key: string + * The key of the tag, with a minimum of 1 character. + * --Tags.INDEX.ResourceId: string + * The ID of the resource. + * --Tags.INDEX.ResourceType: string + * The type of the resource. + * --Tags.INDEX.Value: string + * The value of the tag, between 0 and 255 characters. + */ + char *tags_str; + int nb_tags; + struct tag *tags; /* * One or more IDs of VMs. */ @@ -1573,6 +1664,12 @@ struct filters_image { */ char *tags_str; char **tags; + /* + * Whether a virtual Trusted Platform Module (vTPM) is mandatory for VMs + * created from this OMI (true) or not (false). + */ + int is_set_tpm_mandatory; + int tpm_mandatory; /* * The virtualization types (always `hvm`). */ @@ -2531,12 +2628,12 @@ struct filters_tag { char *resource_ids_str; char **resource_ids; /* - * The resource type (`customer-gateway` \\| `dhcpoptions` \\| `image` - * \\| `instance` \\| `keypair` \\| `natgateway` \\| `network-interface` - * \\| `public-ip` \\| `route-table` \\| `security-group` \\| `snapshot` - * \\| `subnet` \\| `task` \\| `virtual-private-gateway` \\| `volume` - * \\| `vpc` \\| `vpc-endpoint` \\| `vpc-peering-connection`\\| - * `vpn-connection`). + * The resource type (`customer-gateway` \\| `dhcpoptions` \\| + * `flexible-gpu` \\| `image` \\| `instance` \\| `keypair` \\| + * `natgateway` \\| `network-interface` \\| `public-ip` \\| + * `route-table` \\| `security-group` \\| `snapshot` \\| `subnet` \\| + * `task` \\| `virtual-private-gateway` \\| `volume` \\| `vpc` \\| + * `vpc-endpoint` \\| `vpc-peering-connection`\\| `vpn-connection`). */ char *resource_types_str; char **resource_types; @@ -2550,6 +2647,14 @@ struct filters_tag { char **values; }; +struct filters_update_volume_task { + /* + * The IDs of the volume update tasks. + */ + char *task_ids_str; + char **task_ids; +}; + struct filters_user_group { /* * The path prefix of the groups. If not specified, it is set to a slash @@ -2933,6 +3038,12 @@ struct filters_vm { */ char *tenancies_str; char **tenancies; + /* + * Whether a virtual Trusted Platform Module (vTPM) is enabled (true) or + * disabled (false) on the VM. + */ + int is_set_tpm_enabled; + int tpm_enabled; /* * One or more IDs of VMs. */ @@ -3363,6 +3474,21 @@ struct flexible_gpu { * The Subregion where the fGPU is located. */ char *subregion_name; + /* + * One or more tags associated with the fGPU. + * Information about the tag. + * --Tags.INDEX.Key: string + * The key of the tag, with a minimum of 1 character. + * --Tags.INDEX.ResourceId: string + * The ID of the resource. + * --Tags.INDEX.ResourceType: string + * The type of the resource. + * --Tags.INDEX.Value: string + * The value of the tag, between 0 and 255 characters. + */ + char *tags_str; + int nb_tags; + struct tag *tags; /* * The ID of the VM the fGPU is attached to, if any. */ @@ -3485,6 +3611,7 @@ struct image { * the VM * is created. * --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate + * Information about the BSU volume to create. * Information about the BSU volume to create. * --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool * If set to true, the volume is deleted when terminating the @@ -3562,6 +3689,7 @@ struct image { */ char *image_type; /* + * Permissions for the resource. * Permissions for the resource. * --PermissionsToLaunch.AccountIds: array string * One or more account IDs that the permission is associated with. @@ -3601,6 +3729,7 @@ struct image { */ char *state; /* + * Information about the change of state. * Information about the change of state. * --StateComment.StateCode: string * The code of the change of state. @@ -3621,6 +3750,12 @@ struct image { char *tags_str; int nb_tags; struct resource_tag *tags; + /* + * If true, a virtual Trusted Platform Module (vTPM) is mandatory for + * VMs created from this OMI. If false, a vTPM is not mandatory. + */ + int is_set_tpm_mandatory; + int tpm_mandatory; }; struct osu_export_image_export_task { @@ -3652,6 +3787,7 @@ struct image_export_task { */ char *image_id; /* + * Information about the OMI export task. * Information about the OMI export task. * --OsuExport.DiskImageFormat: string * The format of the export disk (`qcow2` \\| `raw`). @@ -4149,6 +4285,7 @@ struct source_security_group { struct load_balancer { /* + * Information about access logs. * Information about access logs. * --AccessLog.IsEnabled: bool * If true, access logs are enabled for your load balancer. If @@ -4198,6 +4335,7 @@ struct load_balancer { */ char *dns_name; /* + * Information about the health check configuration. * Information about the health check configuration. * --HealthCheck.CheckInterval: long long int * The number of seconds between two requests (between `5` and `600` @@ -4310,6 +4448,11 @@ struct load_balancer { char *security_groups_str; char **security_groups; /* + * Information about the source security group of the load balancer, + * which you can use as part of your inbound rules for your registered + * VMs.
\nTo only allow traffic from load balancers, add a security + * group rule that specifies this source security group as the inbound + * source. * Information about the source security group of the load balancer, * which * you can use as part of your inbound rules for your registered @@ -4665,6 +4808,7 @@ struct net_peering_state { struct net_peering { /* + * Information about the accepter Net. * Information about the accepter Net. * --AccepterNet.AccountId: string * The account ID of the owner of the accepter Net. @@ -4686,6 +4830,7 @@ struct net_peering { */ char *net_peering_id; /* + * Information about the source Net. * Information about the source Net. * --SourceNet.AccountId: string * The account ID of the owner of the source Net. @@ -4699,6 +4844,7 @@ struct net_peering { int is_set_source_net; struct source_net source_net; /* + * Information about the state of the Net peering. * Information about the state of the Net peering. * --State.Message: string * Additional information about the state of the Net peering. @@ -4751,6 +4897,7 @@ struct nic { int is_set_is_source_dest_checked; int is_source_dest_checked; /* + * Information about the NIC attachment. * Information about the NIC attachment. * --LinkNic.DeleteOnVmDeletion: bool * If true, the NIC is deleted when the VM is terminated. @@ -4773,6 +4920,7 @@ struct nic { int is_set_link_nic; struct link_nic link_nic; /* + * Information about the public IP association. * Information about the public IP association. * --LinkPublicIp.LinkPublicIpId: string * (Required in a Net) The ID representing the association of the @@ -4812,6 +4960,7 @@ struct nic { * --PrivateIps.INDEX.IsPrimary: bool * If true, the IP is the primary private IP of the NIC. * --PrivateIps.INDEX.LinkPublicIp: ref LinkPublicIp + * Information about the public IP association. * Information about the public IP association. * --PrivateIps.INDEX.LinkPublicIp.LinkPublicIpId: string * (Required in a Net) The ID representing the association of @@ -4944,6 +5093,7 @@ struct nic_light { int is_set_is_source_dest_checked; int is_source_dest_checked; /* + * Information about the network interface card (NIC). * Information about the network interface card (NIC). * --LinkNic.DeleteOnVmDeletion: bool * If true, the NIC is deleted when the VM is terminated. @@ -4962,6 +5112,7 @@ struct nic_light { int is_set_link_nic; struct link_nic_light link_nic; /* + * Information about the public IP associated with the NIC. * Information about the public IP associated with the NIC. * --LinkPublicIp.PublicDnsName: string * The name of the public DNS. @@ -4995,6 +5146,7 @@ struct nic_light { * --PrivateIps.INDEX.IsPrimary: bool * If true, the IP is the primary private IP of the NIC. * --PrivateIps.INDEX.LinkPublicIp: ref LinkPublicIpLightForVm + * Information about the public IP associated with the NIC. * Information about the public IP associated with the NIC. * --PrivateIps.INDEX.LinkPublicIp.PublicDnsName: string * The name of the public DNS. @@ -5066,6 +5218,7 @@ struct osu_export_to_create { */ char *disk_image_format; /* + * Information about the OOS API key. * Information about the OOS API key. * --OsuApiKey.ApiKeyId: string * The API key of the OOS account that enables you to access the @@ -5093,6 +5246,7 @@ struct osu_export_to_create { struct permissions_on_resource_creation { /* + * Permissions for the resource. * Permissions for the resource. * --Additions.AccountIds: array string * One or more account IDs that the permission is associated with. @@ -5110,6 +5264,7 @@ struct permissions_on_resource_creation { int is_set_additions; struct permissions_on_resource additions; /* + * Permissions for the resource. * Permissions for the resource. * --Removals.AccountIds: array string * One or more account IDs that the permission is associated with. @@ -5390,6 +5545,7 @@ struct private_ip { int is_set_is_primary; int is_primary; /* + * Information about the public IP association. * Information about the public IP association. * --LinkPublicIp.LinkPublicIpId: string * (Required in a Net) The ID representing the association of the @@ -5436,6 +5592,7 @@ struct private_ip_light_for_vm { int is_set_is_primary; int is_primary; /* + * Information about the public IP associated with the NIC. * Information about the public IP associated with the NIC. * --LinkPublicIp.PublicDnsName: string * The name of the public DNS. @@ -6029,7 +6186,7 @@ struct security_groups_member { struct server_certificate { /* - * The date on which the server certificate expires. + * The date and time (UTC) on which the server certificate expires. */ char *expiration_date; /* @@ -6052,7 +6209,8 @@ struct server_certificate { */ char *path; /* - * The date on which the server certificate has been uploaded. + * The date and time (UTC) on which the server certificate has been + * uploaded. */ char *upload_date; }; @@ -6095,6 +6253,7 @@ struct snapshot { */ char *description; /* + * Permissions for the resource. * Permissions for the resource. * --PermissionsToCreateVolume.AccountIds: array string * One or more account IDs that the permission is associated with. @@ -6154,6 +6313,7 @@ struct snapshot_export_task { */ char *comment; /* + * Information about the snapshot export task. * Information about the snapshot export task. * --OsuExport.DiskImageFormat: string * The format of the export disk (`qcow2` \\| `raw`). @@ -6450,11 +6610,19 @@ struct virtual_gateway { struct vm { /* + * The action to perform on the next boot of the VM. * The action to perform on the next boot of the VM. * --ActionsOnNextBoot.SecureBoot: string - * One action to perform on the next boot of the VM. For more + * One action to perform on the next boot of the VM. For more * information, - * see [About Secure + * see [About Secure + * + * Boot](https://docs.outscale.com/en/userguide/About-Secure-Boot.html#_s + * ecur + * e_boot_actions). + * One action to perform on the next boot of the VM (`enable` | + * `disable` | + * `setup-mode` | `none`). For more information, see [About Secure * * Boot](https://docs.outscale.com/en/userguide/About-Secure-Boot.html#_s * ecur @@ -6471,6 +6639,7 @@ struct vm { * The block device mapping of the VM. * Information about the created block device mapping. * --BlockDeviceMappings.INDEX.Bsu: ref BsuCreated + * Information about the created BSU volume. * Information about the created BSU volume. * --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool * If true, the volume is deleted when terminating the VM. If @@ -6491,6 +6660,7 @@ struct vm { int nb_block_device_mappings; struct block_device_mapping_created *block_device_mappings; /* + * The boot mode of the VM. * Information about the boot mode of the VM. */ char *boot_mode; @@ -6559,6 +6729,7 @@ struct vm { * false, * it is disabled. * --Nics.INDEX.LinkNic: ref LinkNicLight + * Information about the network interface card (NIC). * Information about the network interface card (NIC). * --Nics.INDEX.LinkNic.DeleteOnVmDeletion: bool * If true, the NIC is deleted when the VM is terminated. @@ -6573,6 +6744,7 @@ struct vm { * `detaching` * \\| `detached`). * --Nics.INDEX.LinkPublicIp: ref LinkPublicIpLightForVm + * Information about the public IP associated with the NIC. * Information about the public IP associated with the NIC. * --Nics.INDEX.LinkPublicIp.PublicDnsName: string * The name of the public DNS. @@ -6595,6 +6767,7 @@ struct vm { * If true, the IP is the primary private IP of the NIC. * --Nics.INDEX.PrivateIps.INDEX.LinkPublicIp: ref * LinkPublicIpLightForVm + * Information about the public IP associated with the NIC. * Information about the public IP associated with the NIC. * --Nics.INDEX.PrivateIps.INDEX.LinkPublicIp.PublicDnsName: * string @@ -6634,6 +6807,7 @@ struct vm { */ char *performance; /* + * Information about the placement of the VM. * Information about the placement of the VM. * --Placement.SubregionName: string * The name of the Subregion. If you specify this parameter, you @@ -6714,6 +6888,12 @@ struct vm { char *tags_str; int nb_tags; struct resource_tag *tags; + /* + * If true, a virtual Trusted Platform Module (vTPM) is enabled on the + * VM. If false, it is not. + */ + int is_set_tpm_enabled; + int tpm_enabled; /* * The Base64-encoded MIME user data. */ @@ -7023,6 +7203,11 @@ struct volume { char *tags_str; int nb_tags; struct resource_tag *tags; + /* + * The ID of the volume update task in progress. Otherwise, it is not + * returned. + */ + char *task_id; /* * The ID of the volume. */ @@ -7033,8 +7218,144 @@ struct volume { char *volume_type; }; +struct volume_update_parameters { + /* + * The new number of I/O operations per second (IOPS):
\n- For + * `io1` volumes, the number of provisioned IOPS.
\n- For `gp2` + * volumes, the baseline performance of the volume. + */ + int is_set_iops; + long long int iops; + /* + * The new size of the volume, in gibibytes (GiB). + */ + int is_set_size; + long long int size; + /* + * The type of the volume (`standard` \\| `io1` \\| `gp2`). + */ + char *volume_type; +}; + +struct volume_update { + /* + * Information about the parameters of the update of a volume. + * Information about the parameters of the update of a volume. + * --Origin.Iops: long long int + * The new number of I/O operations per second (IOPS):
\n- For + * `io1` + * volumes, the number of provisioned IOPS.
\n- For `gp2` + * volumes, the + * baseline performance of the volume. + * --Origin.Size: long long int + * The new size of the volume, in gibibytes (GiB). + * --Origin.VolumeType: string + * The type of the volume (`standard` \\| `io1` \\| `gp2`). + */ + char *origin_str; + int is_set_origin; + struct volume_update_parameters origin; + /* + * Information about the parameters of the update of a volume. + * Information about the parameters of the update of a volume. + * --Target.Iops: long long int + * The new number of I/O operations per second (IOPS):
\n- For + * `io1` + * volumes, the number of provisioned IOPS.
\n- For `gp2` + * volumes, the + * baseline performance of the volume. + * --Target.Size: long long int + * The new size of the volume, in gibibytes (GiB). + * --Target.VolumeType: string + * The type of the volume (`standard` \\| `io1` \\| `gp2`). + */ + char *target_str; + int is_set_target; + struct volume_update_parameters target; +}; + +struct volume_update_task { + /* + * If the update volume task fails, an error message appears. + */ + char *comment; + /* + * The date at which the volume update task was marked as completed. + */ + char *completion_date; + /* + * The progress of the volume update task, as a percentage. + */ + int is_set_progress; + long long int progress; + /* + * The creation date of the volume update task. + */ + char *start_date; + /* + * The state of the volume (`pending` \\| `active` \\| `completed` \\| + * `failed` \\| `canceled`). + */ + char *state; + /* + * One or more tags associated with the volume update task. + * Information about the tag. + * --Tags.INDEX.Key: string + * The key of the tag, with a minimum of 1 character. + * --Tags.INDEX.Value: string + * The value of the tag, between 0 and 255 characters. + */ + char *tags_str; + int nb_tags; + struct resource_tag *tags; + /* + * The ID of the volume update task in progress. Otherwise, it is not + * returned. + */ + char *task_id; + /* + * The ID of the updated volume. + */ + char *volume_id; + /* + * Information about the update of a volume. + * Information about the update of a volume. + * --VolumeUpdate.Origin: ref VolumeUpdateParameters + * Information about the parameters of the update of a volume. + * Information about the parameters of the update of a volume. + * --VolumeUpdate.Origin.Iops: long long int + * The new number of I/O operations per second (IOPS):
\n- + * For `io1` + * volumes, the number of provisioned IOPS.
\n- For `gp2` + * volumes, the + * baseline performance of the volume. + * --VolumeUpdate.Origin.Size: long long int + * The new size of the volume, in gibibytes (GiB). + * --VolumeUpdate.Origin.VolumeType: string + * The type of the volume (`standard` \\| `io1` \\| `gp2`). + * --VolumeUpdate.Target: ref VolumeUpdateParameters + * Information about the parameters of the update of a volume. + * Information about the parameters of the update of a volume. + * --VolumeUpdate.Target.Iops: long long int + * The new number of I/O operations per second (IOPS):
\n- + * For `io1` + * volumes, the number of provisioned IOPS.
\n- For `gp2` + * volumes, the + * baseline performance of the volume. + * --VolumeUpdate.Target.Size: long long int + * The new size of the volume, in gibibytes (GiB). + * --VolumeUpdate.Target.VolumeType: string + * The type of the volume (`standard` \\| `io1` \\| `gp2`). + */ + char *volume_update_str; + int is_set_volume_update; + struct volume_update volume_update; +}; + struct vpn_options { /* + * This parameter is not available. It is present in our API for the + * sake of historical compatibility with AWS. * This parameter is not available. It is present in our API for the * sake * of historical compatibility with AWS. @@ -7079,6 +7400,8 @@ struct vpn_options { int is_set_phase1_options; struct phase1_options phase1_options; /* + * Information about Phase 2 of the Internet Key Exchange (IKE) + * negotiation. * Information about Phase 2 of the Internet Key Exchange (IKE) * negotiation. * --Phase2Options.Phase2DhGroupNumbers: array integer @@ -7198,8 +7521,12 @@ struct vpn_connection { */ char *vpn_connection_id; /* + * Information about the VPN options. * Information about the VPN options. * --VpnOptions.Phase1Options: ref Phase1Options + * This parameter is not available. It is present in our API for the + * sake + * of historical compatibility with AWS. * This parameter is not available. It is present in our API for * the sake * of historical compatibility with AWS. @@ -7242,6 +7569,8 @@ struct vpn_connection { * the sake * of historical compatibility with AWS. * --VpnOptions.Phase2Options: ref Phase2Options + * Information about Phase 2 of the Internet Key Exchange (IKE) + * negotiation. * Information about Phase 2 of the Internet Key Exchange (IKE) * negotiation. * --VpnOptions.Phase2Options.Phase2DhGroupNumbers: array integer @@ -7678,6 +8007,7 @@ struct osc_create_direct_link_interface_arg { */ char *direct_link_id; /* + * Information about the DirectLink interface. * Information about the DirectLink interface. * --DirectLinkInterface.BgpAsn: long long int * The BGP (Border Gateway Protocol) ASN (Autonomous System Number) @@ -7789,10 +8119,12 @@ struct osc_create_image_export_task_arg { */ char *image_id; /* + * Information about the OOS export task to create. * Information about the OOS export task to create. * --OsuExport.DiskImageFormat: string * The format of the export disk (`qcow2` \\| `raw`). * --OsuExport.OsuApiKey: ref OsuApiKey + * Information about the OOS API key. * Information about the OOS API key. * --OsuExport.OsuApiKey.ApiKeyId: string * The API key of the OOS account that enables you to access the @@ -7827,6 +8159,7 @@ struct osc_create_image_arg { * the VM * is created. * --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate + * Information about the BSU volume to create. * Information about the BSU volume to create. * --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool * If set to true, the volume is deleted when terminating the @@ -7929,6 +8262,13 @@ struct osc_create_image_arg { * (always the same as the Region of your account). */ char *source_region_name; + /* + * By default or if set to false, a virtual Trusted Platform Module + * (vTPM) is not mandatory on VMs created from this OMI. If true, VMs + * created from this OMI must have a vTPM enabled. + */ + int is_set_tpm_mandatory; + int tpm_mandatory; /* * **(required) When creating from a VM:** The ID of the VM from which * you want to create the OMI. @@ -7979,6 +8319,7 @@ struct osc_create_listener_rule_arg { int is_set_dry_run; int dry_run; /* + * Information about the load balancer. * Information about the load balancer. * --Listener.LoadBalancerName: string * The name of the load balancer to which the listener is attached. @@ -7990,6 +8331,7 @@ struct osc_create_listener_rule_arg { int is_set_listener; struct load_balancer_light listener; /* + * Information about the listener rule. * Information about the listener rule. * --ListenerRule.Action: string * The type of action for the rule (always `forward`). @@ -8699,10 +9041,12 @@ struct osc_create_snapshot_export_task_arg { int is_set_dry_run; int dry_run; /* + * Information about the OOS export task to create. * Information about the OOS export task to create. * --OsuExport.DiskImageFormat: string * The format of the export disk (`qcow2` \\| `raw`). * --OsuExport.OsuApiKey: ref OsuApiKey + * Information about the OOS API key. * Information about the OOS API key. * --OsuExport.OsuApiKey.ApiKeyId: string * The API key of the OOS account that enables you to access the @@ -9011,11 +9355,19 @@ struct osc_create_vms_arg { /* Required: ImageId */ /* + * The action to perform on the next boot of the VM. * The action to perform on the next boot of the VM. * --ActionsOnNextBoot.SecureBoot: string - * One action to perform on the next boot of the VM. For more + * One action to perform on the next boot of the VM. For more * information, - * see [About Secure + * see [About Secure + * + * Boot](https://docs.outscale.com/en/userguide/About-Secure-Boot.html#_s + * ecur + * e_boot_actions). + * One action to perform on the next boot of the VM (`enable` | + * `disable` | + * `setup-mode` | `none`). For more information, see [About Secure * * Boot](https://docs.outscale.com/en/userguide/About-Secure-Boot.html#_s * ecur @@ -9028,6 +9380,7 @@ struct osc_create_vms_arg { * One or more block device mappings. * Information about the block device mapping. * --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate + * Information about the BSU volume to create. * Information about the BSU volume to create. * --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool * If set to true, the volume is deleted when terminating the @@ -9080,6 +9433,7 @@ struct osc_create_vms_arg { int nb_block_device_mappings; struct block_device_mapping_vm_creation *block_device_mappings; /* + * The boot mode of the VM. * Information about the boot mode of the VM. */ char *boot_mode; @@ -9200,6 +9554,7 @@ struct osc_create_vms_arg { */ char *performance; /* + * Information about the placement of the VM. * Information about the placement of the VM. * --Placement.SubregionName: string * The name of the Subregion. If you specify this parameter, you @@ -9232,6 +9587,12 @@ struct osc_create_vms_arg { * specify this parameter, you must not specify the `Nics` parameter. */ char *subnet_id; + /* + * If true, a virtual Trusted Platform Module (vTPM) is enabled on the + * VM. If false, it is not. + */ + int is_set_tpm_enabled; + int tpm_enabled; /* * Data or script used to add a specific configuration to the VM. It * must be Base64-encoded and is limited to 500 kibibytes (KiB). For @@ -10687,6 +11048,7 @@ struct osc_read_access_keys_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.AccessKeyIds: array string * The IDs of the access keys. @@ -10754,6 +11116,7 @@ struct osc_read_api_access_rules_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.ApiAccessRuleIds: array string * One or more IDs of API access rules. @@ -10781,6 +11144,7 @@ struct osc_read_api_logs_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.QueryAccessKeys: array string * The access keys used for the logged calls. @@ -10829,6 +11193,7 @@ struct osc_read_api_logs_arg { int is_set_results_per_page; long long int results_per_page; /* + * The information to display in each returned log. * The information to display in each returned log. * --With.AccountId: bool * If true, the account ID is displayed. @@ -10870,6 +11235,33 @@ struct osc_read_api_logs_arg { struct with with; }; +struct osc_read_co2_emission_account_arg { + /* Required: FromMonth ToMonth + */ + /* + * The beginning of the time period, in ISO 8601 date format (for + * example, `2020-06-01`). This value must correspond to the first day + * of the month and is included in the time period. + */ + char *from_month; + /* + * If false, returns only the CO2 emission of the specific account that + * sends the request. If true, returns either the overall CO2 emission + * of your paying account and all linked accounts (if the account that + * sends this request is a paying account) or returns nothing (if the + * account that sends this request is a linked account). + */ + int is_set_overall; + int overall; + /* + * The end of the time period, in ISO 8601 date format (for example, + * `2020-06-14`). This value must correspond to the first day of the + * month and is excluded from the time period. It must be set to a later + * date than `FromMonth`. + */ + char *to_month; +}; + struct osc_read_cas_arg { /* Required: null */ @@ -10880,6 +11272,7 @@ struct osc_read_cas_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.CaFingerprints: array string * The fingerprints of the CAs. @@ -10914,6 +11307,7 @@ struct osc_read_catalogs_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.CurrentCatalogOnly: bool * By default or if set to true, only returns the current catalog. @@ -10946,6 +11340,7 @@ struct osc_read_client_gateways_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.BgpAsns: array integer * The Border Gateway Protocol (BGP) Autonomous System Numbers @@ -11057,6 +11452,7 @@ struct osc_read_dedicated_groups_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.CpuGenerations: array integer * The processor generation for the VMs in the dedicated group (for @@ -11095,6 +11491,7 @@ struct osc_read_dhcp_options_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.Default: bool * If true, lists all default DHCP options set. If false, lists all @@ -11148,6 +11545,7 @@ struct osc_read_direct_link_interfaces_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.DirectLinkIds: array string * The IDs of the DirectLinks. @@ -11180,6 +11578,7 @@ struct osc_read_direct_links_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.DirectLinkIds: array string * The IDs of the DirectLinks. @@ -11201,7 +11600,7 @@ struct osc_read_direct_links_arg { }; struct osc_read_entities_linked_to_policy_arg { - /* Required: null + /* Required: PolicyOrn */ /* * The type of entity linked to the policy you want to get information @@ -11250,6 +11649,7 @@ struct osc_read_flexible_gpus_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.DeleteOnVmDeletion: bool * Indicates whether the fGPU is deleted when terminating the VM. @@ -11269,6 +11669,17 @@ struct osc_read_flexible_gpus_arg { * `detaching`). * --Filters.SubregionNames: array string * The Subregions where the fGPUs are located. + * --Filters.Tags: array ref Tag + * One or more tags associated with the fGPUs. + * Information about the tag. + * --Filters.Tags.INDEX.Key: string + * The key of the tag, with a minimum of 1 character. + * --Filters.Tags.INDEX.ResourceId: string + * The ID of the resource. + * --Filters.Tags.INDEX.ResourceType: string + * The type of the resource. + * --Filters.Tags.INDEX.Value: string + * The value of the tag, between 0 and 255 characters. * --Filters.VmIds: array string * One or more IDs of VMs. */ @@ -11287,6 +11698,7 @@ struct osc_read_image_export_tasks_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.TaskIds: array string * The IDs of the export tasks. @@ -11317,6 +11729,7 @@ struct osc_read_images_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.AccountAliases: array string * The account aliases of the owners of the OMIs. @@ -11374,6 +11787,10 @@ struct osc_read_images_arg { * following format: * * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * --Filters.TpmMandatory: bool + * Whether a virtual Trusted Platform Module (vTPM) is mandatory for + * VMs + * created from this OMI (true) or not (false). * --Filters.VirtualizationTypes: array string * The virtualization types (always `hvm`). */ @@ -11403,6 +11820,7 @@ struct osc_read_internet_services_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.InternetServiceIds: array string * The IDs of the internet services. @@ -11451,6 +11869,7 @@ struct osc_read_keypairs_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.KeypairFingerprints: array string * The fingerprints of the keypairs. @@ -11499,6 +11918,7 @@ struct osc_read_linked_policies_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.PathPrefix: string * The path prefix of the policies. If not specified, it is set to a @@ -11535,6 +11955,7 @@ struct osc_read_listener_rules_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.ListenerRuleNames: array string * The names of the listener rules. @@ -11570,6 +11991,7 @@ struct osc_read_load_balancers_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.LoadBalancerNames: array string * The names of the load balancers. @@ -11611,6 +12033,7 @@ struct osc_read_managed_policies_linked_to_user_group_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.PathPrefix: string * The path prefix of the groups. If not specified, it is set to a @@ -11649,6 +12072,7 @@ struct osc_read_nat_services_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.ClientTokens: array string * The idempotency tokens provided when creating the NAT services. @@ -11699,6 +12123,7 @@ struct osc_read_net_access_point_services_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.ServiceIds: array string * The IDs of the services. @@ -11731,6 +12156,7 @@ struct osc_read_net_access_points_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.NetAccessPointIds: array string * The IDs of the Net access points. @@ -11780,6 +12206,7 @@ struct osc_read_net_peerings_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.AccepterNetAccountIds: array string * The account IDs of the owners of the peer Nets. @@ -11842,6 +12269,7 @@ struct osc_read_nets_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.DhcpOptionsSetIds: array string * The IDs of the DHCP options sets. @@ -11891,6 +12319,7 @@ struct osc_read_nics_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.Descriptions: array string * The descriptions of the NICs. @@ -11993,6 +12422,7 @@ struct osc_read_policies_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.OnlyLinked: bool * If set to true, lists only the policies attached to a user. @@ -12084,6 +12514,7 @@ struct osc_read_product_types_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.ProductTypeIds: array string * The IDs of the product types. @@ -12147,6 +12578,7 @@ struct osc_read_public_ips_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.LinkPublicIpIds: array string * The IDs representing the associations of public IPs with VMs or @@ -12203,6 +12635,7 @@ struct osc_read_quotas_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.Collections: array string * The group names of the quotas. @@ -12252,6 +12685,7 @@ struct osc_read_route_tables_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.LinkRouteTableIds: array string * The IDs of the route tables involved in the associations. @@ -12319,6 +12753,7 @@ struct osc_read_security_groups_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.Descriptions: array string * The descriptions of the security groups. @@ -12412,6 +12847,7 @@ struct osc_read_server_certificates_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.Paths: array string * The paths to the server certificates. @@ -12431,6 +12867,7 @@ struct osc_read_snapshot_export_tasks_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.TaskIds: array string * The IDs of the export tasks. @@ -12461,6 +12898,7 @@ struct osc_read_snapshots_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.AccountAliases: array string * The account aliases of the owners of the snapshots. @@ -12534,6 +12972,7 @@ struct osc_read_subnets_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.AvailableIpsCounts: array integer * The number of available IPs. @@ -12586,6 +13025,7 @@ struct osc_read_subregions_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.RegionNames: array string * The names of the Regions containing the Subregions. @@ -12620,6 +13060,7 @@ struct osc_read_tags_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.Keys: array string * The keys of the tags that are assigned to the resources. You can @@ -12632,15 +13073,13 @@ struct osc_read_tags_arg { * The IDs of the resources with which the tags are associated. * --Filters.ResourceTypes: array string * The resource type (`customer-gateway` \\| `dhcpoptions` \\| - * `image` \\| - * `instance` \\| `keypair` \\| `natgateway` \\| `network-interface` - * \\| - * `public-ip` \\| `route-table` \\| `security-group` \\| `snapshot` - * \\| - * `subnet` \\| `task` \\| `virtual-private-gateway` \\| `volume` - * \\| `vpc` - * \\| `vpc-endpoint` \\| `vpc-peering-connection`\\| - * `vpn-connection`). + * `flexible-gpu` \\| `image` \\| `instance` \\| `keypair` \\| + * `natgateway` + * \\| `network-interface` \\| `public-ip` \\| `route-table` \\| + * `security-group` \\| `snapshot` \\| `subnet` \\| `task` \\| + * `virtual-private-gateway` \\| `volume` \\| `vpc` \\| + * `vpc-endpoint` \\| + * `vpc-peering-connection`\\| `vpn-connection`). * --Filters.Values: array string * The values of the tags that are assigned to the resources. You * can use @@ -12786,6 +13225,7 @@ struct osc_read_user_groups_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.PathPrefix: string * The path prefix of the groups. If not specified, it is set to a @@ -12854,6 +13294,7 @@ struct osc_read_users_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.UserIds: array string * The IDs of the users. @@ -12884,6 +13325,7 @@ struct osc_read_virtual_gateways_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.ConnectionTypes: array string * The types of the virtual gateways (always `ipsec.1`). @@ -12935,6 +13377,7 @@ struct osc_read_vm_groups_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.Descriptions: array string * The descriptions of the VM groups. @@ -12976,6 +13419,7 @@ struct osc_read_vm_templates_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.CpuCores: array integer * The number of vCores. @@ -13021,6 +13465,7 @@ struct osc_read_vm_types_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.BsuOptimized: bool * This parameter is not available. It is present in our API for the @@ -13090,6 +13535,7 @@ struct osc_read_vms_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.Architectures: array string * The architectures of the VMs (`i386` \\| `x86_64`). @@ -13245,6 +13691,10 @@ struct osc_read_vms_arg { * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. * --Filters.Tenancies: array string * The tenancies of the VMs (`dedicated` \\| `default` \\| `host`). + * --Filters.TpmEnabled: bool + * Whether a virtual Trusted Platform Module (vTPM) is enabled + * (true) or + * disabled (false) on the VM. * --Filters.VmIds: array string * One or more IDs of VMs. * --Filters.VmSecurityGroupIds: array string @@ -13298,6 +13748,7 @@ struct osc_read_vms_state_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.MaintenanceEventCodes: array string * The code for the scheduled event (`system-reboot` \\| @@ -13332,6 +13783,37 @@ struct osc_read_vms_state_arg { long long int results_per_page; }; +struct osc_read_volume_update_tasks_arg { + /* Required: null + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * One or more filters. + * One or more filters. + * --Filters.TaskIds: array string + * The IDs of the volume update tasks. + */ + char *filters_str; + int is_set_filters; + struct filters_update_volume_task filters; + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; + /* + * 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; +}; + struct osc_read_volumes_arg { /* Required: null */ @@ -13342,6 +13824,7 @@ struct osc_read_volumes_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.ClientTokens: array string * The idempotency tokens provided when creating the volumes. @@ -13414,6 +13897,7 @@ struct osc_read_vpn_connections_arg { int is_set_dry_run; int dry_run; /* + * One or more filters. * One or more filters. * --Filters.BgpAsns: array integer * The Border Gateway Protocol (BGP) Autonomous System Numbers @@ -14121,9 +14605,12 @@ struct osc_update_image_arg { */ char *image_id; /* + * Information about the permissions for the resource.
\nSpecify + * either the `Additions` or the `Removals` parameter. * Information about the permissions for the resource.
\nSpecify * either the `Additions` or the `Removals` parameter. * --PermissionsToLaunch.Additions: ref PermissionsOnResource + * Permissions for the resource. * Permissions for the resource. * --PermissionsToLaunch.Additions.AccountIds: array string * One or more account IDs that the permission is associated @@ -14139,6 +14626,7 @@ struct osc_update_image_arg { * public. If false, * the resource is private. * --PermissionsToLaunch.Removals: ref PermissionsOnResource + * Permissions for the resource. * Permissions for the resource. * --PermissionsToLaunch.Removals.AccountIds: array string * One or more account IDs that the permission is associated @@ -14197,6 +14685,7 @@ struct osc_update_load_balancer_arg { /* Required: LoadBalancerName */ /* + * Information about access logs. * Information about access logs. * --AccessLog.IsEnabled: bool * If true, access logs are enabled for your load balancer. If @@ -14225,6 +14714,7 @@ struct osc_update_load_balancer_arg { int is_set_dry_run; int dry_run; /* + * Information about the health check configuration. * Information about the health check configuration. * --HealthCheck.CheckInterval: long long int * The number of seconds between two requests (between `5` and `600` @@ -14365,6 +14855,9 @@ struct osc_update_nic_arg { int is_set_dry_run; int dry_run; /* + * Information about the NIC attachment. If you are modifying the + * `DeleteOnVmDeletion` attribute, you must specify the ID of the NIC + * attachment. * Information about the NIC attachment. If you are modifying the * `DeleteOnVmDeletion` attribute, you must specify the ID of the NIC * attachment. @@ -14508,9 +15001,12 @@ struct osc_update_snapshot_arg { int is_set_dry_run; int dry_run; /* + * Information about the permissions for the resource.
\nSpecify + * either the `Additions` or the `Removals` parameter. * Information about the permissions for the resource.
\nSpecify * either the `Additions` or the `Removals` parameter. * --PermissionsToCreateVolume.Additions: ref PermissionsOnResource + * Permissions for the resource. * Permissions for the resource. * --PermissionsToCreateVolume.Additions.AccountIds: array string * One or more account IDs that the permission is associated @@ -14526,6 +15022,7 @@ struct osc_update_snapshot_arg { * public. If false, * the resource is private. * --PermissionsToCreateVolume.Removals: ref PermissionsOnResource + * Permissions for the resource. * Permissions for the resource. * --PermissionsToCreateVolume.Removals.AccountIds: array string * One or more account IDs that the permission is associated @@ -14668,11 +15165,19 @@ struct osc_update_vm_arg { /* Required: VmId */ /* + * The action to perform on the next boot of the VM. * The action to perform on the next boot of the VM. * --ActionsOnNextBoot.SecureBoot: string - * One action to perform on the next boot of the VM. For more + * One action to perform on the next boot of the VM. For more * information, - * see [About Secure + * see [About Secure + * + * Boot](https://docs.outscale.com/en/userguide/About-Secure-Boot.html#_s + * ecur + * e_boot_actions). + * One action to perform on the next boot of the VM (`enable` | + * `disable` | + * `setup-mode` | `none`). For more information, see [About Secure * * Boot](https://docs.outscale.com/en/userguide/About-Secure-Boot.html#_s * ecur @@ -14685,6 +15190,7 @@ struct osc_update_vm_arg { * One or more block device mappings of the VM. * Information about the block device mapping. * --BlockDeviceMappings.INDEX.Bsu: ref BsuToUpdateVm + * Information about the BSU volume. * Information about the BSU volume. * --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool * If set to true, the volume is deleted when terminating the @@ -14825,22 +15331,16 @@ struct osc_update_volume_arg { int is_set_dry_run; int dry_run; /* - * **Cold volume**: the new number of I/O operations per second (IOPS). - * This parameter can be specified only if you update an `io1` volume or - * if you change the type of the volume for an `io1`. This modification - * is instantaneous.
\n**Hot volume**: the new number of I/O - * operations per second (IOPS). This parameter can be specified only if - * you update an `io1` volume. This modification is not instantaneous. - *

\nThe maximum number of IOPS allowed for `io1` volumes is - * `13000` with a maximum performance ratio of 300 IOPS per gibibyte. + * The new number of I/O operations per second (IOPS). This parameter + * can be specified only if you update an `io1` volume or if you change + * the type of the volume for an `io1`. */ int is_set_iops; long long int iops; /* - * **Cold volume**: the new size of the volume, in gibibytes (GiB). This - * value must be equal to or greater than the current size of the - * volume. This modification is not instantaneous.
\n**Hot - * volume**: you cannot change the size of a hot volume. + * The new size of the volume, in gibibytes (GiB). This value must be + * equal to or greater than the current size of the volume. This + * modification is not instantaneous. */ int is_set_size; long long int size; @@ -14849,10 +15349,8 @@ struct osc_update_volume_arg { */ char *volume_id; /* - * **Cold volume**: the new type of the volume (`standard` \\| `io1` \\| - * `gp2`). This modification is instantaneous. If you update to an `io1` - * volume, you must also specify the `Iops` parameter.
\n**Hot - * volume**: you cannot change the type of a hot volume. + * The new type of the volume (`standard` \\| `io1` \\| `gp2`). If you + * update to an `io1` volume, you must also specify the `Iops` parameter. */ char *volume_type; }; @@ -14879,8 +15377,12 @@ struct osc_update_vpn_connection_arg { */ char *vpn_connection_id; /* + * Information about the VPN options. * Information about the VPN options. * --VpnOptions.Phase1Options: ref Phase1Options + * This parameter is not available. It is present in our API for the + * sake + * of historical compatibility with AWS. * This parameter is not available. It is present in our API for * the sake * of historical compatibility with AWS. @@ -14923,6 +15425,8 @@ struct osc_update_vpn_connection_arg { * the sake * of historical compatibility with AWS. * --VpnOptions.Phase2Options: ref Phase2Options + * Information about Phase 2 of the Internet Key Exchange (IKE) + * negotiation. * Information about Phase 2 of the Internet Key Exchange (IKE) * negotiation. * --VpnOptions.Phase2Options.Phase2DhGroupNumbers: array integer @@ -15170,6 +15674,7 @@ int osc_read_admin_password(struct osc_env *e, struct osc_str *out, struct osc_r int osc_read_api_access_policy(struct osc_env *e, struct osc_str *out, struct osc_read_api_access_policy_arg *args); int osc_read_api_access_rules(struct osc_env *e, struct osc_str *out, struct osc_read_api_access_rules_arg *args); int osc_read_api_logs(struct osc_env *e, struct osc_str *out, struct osc_read_api_logs_arg *args); +int osc_read_co2_emission_account(struct osc_env *e, struct osc_str *out, struct osc_read_co2_emission_account_arg *args); int osc_read_cas(struct osc_env *e, struct osc_str *out, struct osc_read_cas_arg *args); int osc_read_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_catalog_arg *args); int osc_read_catalogs(struct osc_env *e, struct osc_str *out, struct osc_read_catalogs_arg *args); @@ -15233,6 +15738,7 @@ int osc_read_vm_types(struct osc_env *e, struct osc_str *out, struct osc_read_vm int osc_read_vms_health(struct osc_env *e, struct osc_str *out, struct osc_read_vms_health_arg *args); int osc_read_vms(struct osc_env *e, struct osc_str *out, struct osc_read_vms_arg *args); int osc_read_vms_state(struct osc_env *e, struct osc_str *out, struct osc_read_vms_state_arg *args); +int osc_read_volume_update_tasks(struct osc_env *e, struct osc_str *out, struct osc_read_volume_update_tasks_arg *args); int osc_read_volumes(struct osc_env *e, struct osc_str *out, struct osc_read_volumes_arg *args); int osc_read_vpn_connections(struct osc_env *e, struct osc_str *out, struct osc_read_vpn_connections_arg *args); int osc_reboot_vms(struct osc_env *e, struct osc_str *out, struct osc_reboot_vms_arg *args); diff --git a/version b/version index d9df1bb..ac454c6 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.11.0 +0.12.0