From 5bc1177ce4d3afee291b52a70d4408daf5428a1b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 8 Jan 2025 02:02:37 +0000 Subject: [PATCH] Update services based on release-2025-01-07 of AWS Go SDK Reference: https://github.com/aws/aws-sdk-go-v2/releases/tag/release-2025-01-07 --- .latest-tag-aws-sdk-go | 2 +- src/aws_cloudhsm_v2.erl | 7 ++-- src/aws_dynamodb.erl | 17 ++++++---- src/aws_imagebuilder.erl | 71 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 9 deletions(-) diff --git a/.latest-tag-aws-sdk-go b/.latest-tag-aws-sdk-go index a3e09ffd..b339df06 100644 --- a/.latest-tag-aws-sdk-go +++ b/.latest-tag-aws-sdk-go @@ -1 +1 @@ -release-2025-01-06 +release-2025-01-07 diff --git a/src/aws_cloudhsm_v2.erl b/src/aws_cloudhsm_v2.erl index 0fad5034..a2a68782 100644 --- a/src/aws_cloudhsm_v2.erl +++ b/src/aws_cloudhsm_v2.erl @@ -209,6 +209,7 @@ %% <<"ClusterId">> => string(), %% <<"CreateTimestamp">> => non_neg_integer(), %% <<"HsmType">> => string(), +%% <<"HsmTypeRollbackExpiration">> => non_neg_integer(), %% <<"Hsms">> => list(hsm()()), %% <<"Mode">> => list(any()), %% <<"NetworkType">> => list(any()), @@ -259,8 +260,9 @@ %% Example: %% modify_cluster_request() :: #{ -%% <<"BackupRetentionPolicy">> := backup_retention_policy(), -%% <<"ClusterId">> := string() +%% <<"BackupRetentionPolicy">> => backup_retention_policy(), +%% <<"ClusterId">> := string(), +%% <<"HsmType">> => string() %% } -type modify_cluster_request() :: #{binary() => any()}. @@ -323,6 +325,7 @@ %% <<"EniIp">> => string(), %% <<"EniIpV6">> => string(), %% <<"HsmId">> => string(), +%% <<"HsmType">> => string(), %% <<"State">> => list(any()), %% <<"StateMessage">> => string(), %% <<"SubnetId">> => string() diff --git a/src/aws_dynamodb.erl b/src/aws_dynamodb.erl index 046e2e50..a0542749 100644 --- a/src/aws_dynamodb.erl +++ b/src/aws_dynamodb.erl @@ -300,7 +300,8 @@ %% point_in_time_recovery_description() :: #{ %% <<"EarliestRestorableDateTime">> => non_neg_integer(), %% <<"LatestRestorableDateTime">> => non_neg_integer(), -%% <<"PointInTimeRecoveryStatus">> => list(any()) +%% <<"PointInTimeRecoveryStatus">> => list(any()), +%% <<"RecoveryPeriodInDays">> => integer() %% } -type point_in_time_recovery_description() :: #{binary() => any()}. @@ -1269,7 +1270,8 @@ %% Example: %% point_in_time_recovery_specification() :: #{ -%% <<"PointInTimeRecoveryEnabled">> => boolean() +%% <<"PointInTimeRecoveryEnabled">> => boolean(), +%% <<"RecoveryPeriodInDays">> => integer() %% } -type point_in_time_recovery_specification() :: #{binary() => any()}. @@ -3227,7 +3229,8 @@ describe_backup(Client, Input, Options) %% %% `LatestRestorableDateTime' is typically 5 minutes before the current %% time. -%% You can restore your table to any point in time during the last 35 days. +%% You can restore your table to any point in time in the last 35 days. You +%% can set the recovery period to any value between 1 and 35 days. %% %% You can call `DescribeContinuousBackups' at a maximum rate of 10 times %% per @@ -4205,8 +4208,9 @@ restore_table_from_backup(Client, Input, Options) %% @doc Restores the specified table to the specified point in time within %% `EarliestRestorableDateTime' and `LatestRestorableDateTime'. %% -%% You can restore your table to any point in time during the last 35 days. -%% Any number of +%% You can restore your table to any point in time in the last 35 days. You +%% can set the recovery period to any value between 1 and 35 days. Any number +%% of %% users can execute up to 50 concurrent restores (any type of restore) in a %% given account. %% @@ -4581,7 +4585,8 @@ untag_resource(Client, Input, Options) %% %% `LatestRestorableDateTime' is typically 5 minutes before the current %% time. -%% You can restore your table to any point in time during the last 35 days. +%% You can restore your table to any point in time in the last 35 days. You +%% can set the recovery period to any value between 1 and 35 days. -spec update_continuous_backups(aws_client:aws_client(), update_continuous_backups_input()) -> {ok, update_continuous_backups_output(), tuple()} | {error, any()} | diff --git a/src/aws_imagebuilder.erl b/src/aws_imagebuilder.erl index 7baafd90..1dbe78a2 100644 --- a/src/aws_imagebuilder.erl +++ b/src/aws_imagebuilder.erl @@ -101,6 +101,8 @@ get_workflow_step_execution/5, import_component/2, import_component/3, + import_disk_image/2, + import_disk_image/3, import_vm_image/2, import_vm_image/3, list_component_build_versions/2, @@ -1271,6 +1273,14 @@ -type invalid_request_exception() :: #{binary() => any()}. +%% Example: +%% import_disk_image_response() :: #{ +%% <<"clientToken">> => string(), +%% <<"imageBuildVersionArn">> => string() +%% } +-type import_disk_image_response() :: #{binary() => any()}. + + %% Example: %% create_image_request() :: #{ %% <<"clientToken">> := string(), @@ -2518,6 +2528,22 @@ -type workflow_configuration() :: #{binary() => any()}. +%% Example: +%% import_disk_image_request() :: #{ +%% <<"clientToken">> := string(), +%% <<"description">> => string(), +%% <<"executionRole">> => string(), +%% <<"infrastructureConfigurationArn">> := string(), +%% <<"name">> := string(), +%% <<"osVersion">> := string(), +%% <<"platform">> := string(), +%% <<"semanticVersion">> := string(), +%% <<"tags">> => map(), +%% <<"uri">> := string() +%% } +-type import_disk_image_request() :: #{binary() => any()}. + + %% Example: %% workflow_state() :: #{ %% <<"reason">> => string(), @@ -3138,6 +3164,11 @@ resource_in_use_exception() | invalid_version_number_exception(). +-type import_disk_image_errors() :: + service_unavailable_exception() | + service_exception() | + client_exception(). + -type import_vm_image_errors() :: service_unavailable_exception() | service_exception() | @@ -4955,6 +4986,46 @@ import_component(Client, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Import a Windows operating system image from a verified Microsoft ISO +%% disk +%% file. +%% +%% The following disk images are supported: +%% +%% Windows 11 Enterprise +-spec import_disk_image(aws_client:aws_client(), import_disk_image_request()) -> + {ok, import_disk_image_response(), tuple()} | + {error, any()} | + {error, import_disk_image_errors(), tuple()}. +import_disk_image(Client, Input) -> + import_disk_image(Client, Input, []). + +-spec import_disk_image(aws_client:aws_client(), import_disk_image_request(), proplists:proplist()) -> + {ok, import_disk_image_response(), tuple()} | + {error, any()} | + {error, import_disk_image_errors(), tuple()}. +import_disk_image(Client, Input0, Options0) -> + Method = put, + Path = ["/ImportDiskImage"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc When you export your virtual machine (VM) from its virtualization %% environment, that %% process creates a set of one or more disk container files that act as