diff --git a/.latest-tag-aws-sdk-go b/.latest-tag-aws-sdk-go index 108666f7..0fd9ab85 100644 --- a/.latest-tag-aws-sdk-go +++ b/.latest-tag-aws-sdk-go @@ -1 +1 @@ -release-2024-11-08 +release-2024-11-11 diff --git a/src/aws_cloudfront.erl b/src/aws_cloudfront.erl index d57ad7a7..96a93054 100644 --- a/src/aws_cloudfront.erl +++ b/src/aws_cloudfront.erl @@ -9888,8 +9888,8 @@ list_key_value_stores(Client, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). -%% @doc Gets the list of CloudFront origin access controls in this Amazon Web -%% Services account. +%% @doc Gets the list of CloudFront origin access controls (OACs) in this +%% Amazon Web Services account. %% %% You can optionally specify the maximum number of items to receive in the %% response. If @@ -9900,6 +9900,11 @@ list_key_value_stores(Client, QueryMap, HeadersMap, Options0) %% request that specifies the `NextMarker' value from the current %% response as %% the `Marker' value in the next request. +%% +%% If you're not using origin access controls for your Amazon Web +%% Services account, the +%% `ListOriginAccessControls' operation doesn't return the +%% `Items' element in the response. -spec list_origin_access_controls(aws_client:aws_client()) -> {ok, list_origin_access_controls_result(), tuple()} | {error, any()} | @@ -10638,14 +10643,15 @@ update_continuous_deployment_policy(Client, Id, Input0, Options0) -> %% Note %% the following important requirements and restrictions: %% -%% You must rename the `ETag' field to `IfMatch', -%% leaving the value unchanged. (Set the value of `IfMatch' to -%% the value of `ETag', then remove the `ETag' -%% field.) +%% You must copy the `ETag' field value from the response. (You'll +%% use it for the `IfMatch' parameter in your request.) Then, remove the +%% `ETag' +%% field from the distribution configuration. %% %% You can't change the value of `CallerReference'. %% -%% Submit an `UpdateDistribution' request, providing the distribution +%% Submit an `UpdateDistribution' request, providing the updated +%% distribution %% configuration. The new configuration replaces the existing configuration. %% The %% values that you specify in an `UpdateDistribution' request are not diff --git a/src/aws_inspector2.erl b/src/aws_inspector2.erl index 2d934dbb..2bc32a5a 100644 --- a/src/aws_inspector2.erl +++ b/src/aws_inspector2.erl @@ -2245,6 +2245,7 @@ %% package_filter() :: #{ %% <<"architecture">> => string_filter(), %% <<"epoch">> => number_filter(), +%% <<"filePath">> => string_filter(), %% <<"name">> => string_filter(), %% <<"release">> => string_filter(), %% <<"sourceLambdaLayerArn">> => string_filter(), @@ -4236,7 +4237,7 @@ list_cis_scans(Client, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). -%% @doc Lists coverage details for you environment. +%% @doc Lists coverage details for your environment. -spec list_coverage(aws_client:aws_client(), list_coverage_request()) -> {ok, list_coverage_response(), tuple()} | {error, any()} | @@ -4746,7 +4747,7 @@ start_cis_session(Client, Input0, Options0) -> %% %% This API is used by the Amazon Inspector SSM plugin to communicate with %% the Amazon Inspector service. -%% The Amazon Inspector SSM plugin calls this API to start a CIS scan session +%% The Amazon Inspector SSM plugin calls this API to stop a CIS scan session %% for the scan ID supplied by the service. -spec stop_cis_session(aws_client:aws_client(), stop_cis_session_request()) -> {ok, stop_cis_session_response(), tuple()} | diff --git a/src/aws_opensearch.erl b/src/aws_opensearch.erl index d04a9646..d6cc31df 100644 --- a/src/aws_opensearch.erl +++ b/src/aws_opensearch.erl @@ -21,6 +21,8 @@ add_tags/3, associate_package/4, associate_package/5, + associate_packages/2, + associate_packages/3, authorize_vpc_endpoint_access/3, authorize_vpc_endpoint_access/4, cancel_domain_config_change/3, @@ -93,6 +95,8 @@ describe_vpc_endpoints/3, dissociate_package/4, dissociate_package/5, + dissociate_packages/2, + dissociate_packages/3, get_application/2, get_application/4, get_application/5, @@ -173,6 +177,8 @@ update_domain_config/4, update_package/2, update_package/3, + update_package_scope/2, + update_package_scope/3, update_scheduled_action/3, update_scheduled_action/4, update_vpc_endpoint/2, @@ -257,6 +263,15 @@ -type auto_tune_options_output() :: #{binary() => any()}. +%% Example: +%% update_package_scope_request() :: #{ +%% <<"Operation">> := list(any()), +%% <<"PackageID">> := string(), +%% <<"PackageUserList">> := list(string()()) +%% } +-type update_package_scope_request() :: #{binary() => any()}. + + %% Example: %% delete_domain_response() :: #{ %% <<"DomainStatus">> => domain_status() @@ -272,6 +287,13 @@ -type describe_domain_auto_tunes_response() :: #{binary() => any()}. +%% Example: +%% package_vending_options() :: #{ +%% <<"VendingEnabled">> => boolean() +%% } +-type package_vending_options() :: #{binary() => any()}. + + %% Example: %% list_vpc_endpoints_for_domain_response() :: #{ %% <<"NextToken">> => string(), @@ -313,6 +335,15 @@ -type compatible_versions_map() :: #{binary() => any()}. +%% Example: +%% update_package_scope_response() :: #{ +%% <<"Operation">> => list(any()), +%% <<"PackageID">> => string(), +%% <<"PackageUserList">> => list(string()()) +%% } +-type update_package_scope_response() :: #{binary() => any()}. + + %% Example: %% snapshot_options() :: #{ %% <<"AutomatedSnapshotStartHour">> => integer() @@ -327,6 +358,13 @@ -type auto_tune_details() :: #{binary() => any()}. +%% Example: +%% dissociate_packages_response() :: #{ +%% <<"DomainPackageDetailsList">> => list(domain_package_details()()) +%% } +-type dissociate_packages_response() :: #{binary() => any()}. + + %% Example: %% describe_outbound_connections_response() :: #{ %% <<"Connections">> => list(outbound_connection()()), @@ -344,6 +382,8 @@ %% Example: %% package_details() :: #{ +%% <<"AllowListedUserList">> => list(string()()), +%% <<"AvailablePackageConfiguration">> => package_configuration(), %% <<"AvailablePackageVersion">> => string(), %% <<"AvailablePluginProperties">> => plugin_properties(), %% <<"CreatedAt">> => non_neg_integer(), @@ -351,10 +391,13 @@ %% <<"ErrorDetails">> => error_details(), %% <<"LastUpdatedAt">> => non_neg_integer(), %% <<"PackageDescription">> => string(), +%% <<"PackageEncryptionOptions">> => package_encryption_options(), %% <<"PackageID">> => string(), %% <<"PackageName">> => string(), +%% <<"PackageOwner">> => string(), %% <<"PackageStatus">> => list(any()), -%% <<"PackageType">> => list(any()) +%% <<"PackageType">> => list(any()), +%% <<"PackageVendingOptions">> => package_vending_options() %% } -type package_details() :: #{binary() => any()}. @@ -387,10 +430,14 @@ %% Example: %% create_package_request() :: #{ +%% <<"EngineVersion">> => string(), +%% <<"PackageConfiguration">> => package_configuration(), %% <<"PackageDescription">> => string(), +%% <<"PackageEncryptionOptions">> => package_encryption_options(), %% <<"PackageName">> := string(), %% <<"PackageSource">> := package_source(), -%% <<"PackageType">> := list(any()) +%% <<"PackageType">> := list(any()), +%% <<"PackageVendingOptions">> => package_vending_options() %% } -type create_package_request() :: #{binary() => any()}. @@ -407,6 +454,16 @@ -type auto_tune_status() :: #{binary() => any()}. +%% Example: +%% package_configuration() :: #{ +%% <<"ConfigurationRequirement">> => list(any()), +%% <<"LicenseFilepath">> => string(), +%% <<"LicenseRequirement">> => list(any()), +%% <<"RequiresRestartForConfigurationUpdate">> => boolean() +%% } +-type package_configuration() :: #{binary() => any()}. + + %% Example: %% list_vpc_endpoints_request() :: #{ %% <<"NextToken">> => string() @@ -509,6 +566,13 @@ -type instance_type_details() :: #{binary() => any()}. +%% Example: +%% package_association_configuration() :: #{ +%% <<"KeyStoreAccessOption">> => key_store_access_option() +%% } +-type package_association_configuration() :: #{binary() => any()}. + + %% Example: %% describe_domains_request() :: #{ %% <<"DomainNames">> := list(string()()) @@ -685,6 +749,13 @@ -type update_data_source_response() :: #{binary() => any()}. +%% Example: +%% associate_packages_response() :: #{ +%% <<"DomainPackageDetailsList">> => list(domain_package_details()()) +%% } +-type associate_packages_response() :: #{binary() => any()}. + + %% Example: %% additional_limit() :: #{ %% <<"LimitName">> => string(), @@ -1414,7 +1485,9 @@ %% Example: %% update_package_request() :: #{ %% <<"CommitMessage">> => string(), +%% <<"PackageConfiguration">> => package_configuration(), %% <<"PackageDescription">> => string(), +%% <<"PackageEncryptionOptions">> => package_encryption_options(), %% <<"PackageID">> := string(), %% <<"PackageSource">> := package_source() %% } @@ -1442,9 +1515,13 @@ %% } -type plugin_properties() :: #{binary() => any()}. + %% Example: -%% associate_package_request() :: #{} --type associate_package_request() :: #{}. +%% associate_package_request() :: #{ +%% <<"AssociationConfiguration">> => package_association_configuration(), +%% <<"PrerequisitePackageIDList">> => list(string()()) +%% } +-type associate_package_request() :: #{binary() => any()}. %% Example: @@ -1761,6 +1838,14 @@ -type list_applications_request() :: #{binary() => any()}. +%% Example: +%% key_store_access_option() :: #{ +%% <<"KeyAccessRoleArn">> => string(), +%% <<"KeyStoreAccessEnabled">> => boolean() +%% } +-type key_store_access_option() :: #{binary() => any()}. + + %% Example: %% dissociate_package_response() :: #{ %% <<"DomainPackageDetails">> => domain_package_details() @@ -1798,6 +1883,15 @@ -type iam_identity_center_options_input() :: #{binary() => any()}. +%% Example: +%% package_details_for_association() :: #{ +%% <<"AssociationConfiguration">> => package_association_configuration(), +%% <<"PackageID">> => string(), +%% <<"PrerequisitePackageIDList">> => list(string()()) +%% } +-type package_details_for_association() :: #{binary() => any()}. + + %% Example: %% app_config() :: #{ %% <<"key">> => list(any()), @@ -1870,6 +1964,14 @@ -type node_option() :: #{binary() => any()}. +%% Example: +%% package_encryption_options() :: #{ +%% <<"EncryptionEnabled">> => boolean(), +%% <<"KmsKeyIdentifier">> => string() +%% } +-type package_encryption_options() :: #{binary() => any()}. + + %% Example: %% list_domains_for_package_request() :: #{ %% <<"MaxResults">> => integer(), @@ -2202,6 +2304,7 @@ %% Example: %% domain_package_details() :: #{ +%% <<"AssociationConfiguration">> => package_association_configuration(), %% <<"DomainName">> => string(), %% <<"DomainPackageStatus">> => list(any()), %% <<"ErrorDetails">> => error_details(), @@ -2210,6 +2313,7 @@ %% <<"PackageName">> => string(), %% <<"PackageType">> => list(any()), %% <<"PackageVersion">> => string(), +%% <<"PrerequisitePackageIDList">> => list(string()()), %% <<"ReferencePath">> => string() %% } -type domain_package_details() :: #{binary() => any()}. @@ -2255,6 +2359,7 @@ %% package_version_history() :: #{ %% <<"CommitMessage">> => string(), %% <<"CreatedAt">> => non_neg_integer(), +%% <<"PackageConfiguration">> => package_configuration(), %% <<"PackageVersion">> => string(), %% <<"PluginProperties">> => plugin_properties() %% } @@ -2292,6 +2397,14 @@ -type remove_tags_request() :: #{binary() => any()}. +%% Example: +%% associate_packages_request() :: #{ +%% <<"DomainName">> := string(), +%% <<"PackageList">> := list(package_details_for_association()()) +%% } +-type associate_packages_request() :: #{binary() => any()}. + + %% Example: %% list_domain_maintenances_response() :: #{ %% <<"DomainMaintenances">> => list(domain_maintenance_details()()), @@ -2506,6 +2619,14 @@ -type get_compatible_versions_response() :: #{binary() => any()}. +%% Example: +%% dissociate_packages_request() :: #{ +%% <<"DomainName">> := string(), +%% <<"PackageList">> := list(string()()) +%% } +-type dissociate_packages_request() :: #{binary() => any()}. + + %% Example: %% master_user_options() :: #{ %% <<"MasterUserARN">> => string(), @@ -2542,6 +2663,14 @@ resource_not_found_exception() | conflict_exception(). +-type associate_packages_errors() :: + base_exception() | + validation_exception() | + internal_exception() | + resource_not_found_exception() | + conflict_exception() | + disabled_operation_exception(). + -type authorize_vpc_endpoint_access_errors() :: limit_exceeded_exception() | base_exception() | @@ -2748,6 +2877,14 @@ resource_not_found_exception() | conflict_exception(). +-type dissociate_packages_errors() :: + base_exception() | + validation_exception() | + internal_exception() | + resource_not_found_exception() | + conflict_exception() | + disabled_operation_exception(). + -type get_application_errors() :: base_exception() | validation_exception() | @@ -2952,6 +3089,13 @@ internal_exception() | resource_not_found_exception(). +-type update_package_scope_errors() :: + base_exception() | + validation_exception() | + internal_exception() | + resource_not_found_exception() | + disabled_operation_exception(). + -type update_scheduled_action_errors() :: limit_exceeded_exception() | base_exception() | @@ -3139,6 +3283,41 @@ associate_package(Client, DomainName, PackageID, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Operation in the Amazon OpenSearch Service API for associating +%% multiple packages with a domain simultaneously. +-spec associate_packages(aws_client:aws_client(), associate_packages_request()) -> + {ok, associate_packages_response(), tuple()} | + {error, any()} | + {error, associate_packages_errors(), tuple()}. +associate_packages(Client, Input) -> + associate_packages(Client, Input, []). + +-spec associate_packages(aws_client:aws_client(), associate_packages_request(), proplists:proplist()) -> + {ok, associate_packages_response(), tuple()} | + {error, any()} | + {error, associate_packages_errors(), tuple()}. +associate_packages(Client, Input0, Options0) -> + Method = post, + Path = ["/2021-01-01/packages/associateMultiple"], + 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 Provides access to an Amazon OpenSearch Service domain through the %% use of an interface VPC %% endpoint. @@ -4361,6 +4540,40 @@ dissociate_package(Client, DomainName, PackageID, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Dissociates multiple packages from a domain simulatneously. +-spec dissociate_packages(aws_client:aws_client(), dissociate_packages_request()) -> + {ok, dissociate_packages_response(), tuple()} | + {error, any()} | + {error, dissociate_packages_errors(), tuple()}. +dissociate_packages(Client, Input) -> + dissociate_packages(Client, Input, []). + +-spec dissociate_packages(aws_client:aws_client(), dissociate_packages_request(), proplists:proplist()) -> + {ok, dissociate_packages_response(), tuple()} | + {error, any()} | + {error, dissociate_packages_errors(), tuple()}. +dissociate_packages(Client, Input0, Options0) -> + Method = post, + Path = ["/2021-01-01/packages/dissociateMultiple"], + 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 Check the configuration and status of an existing OpenSearch %% Application. -spec get_application(aws_client:aws_client(), binary() | list()) -> @@ -5605,6 +5818,42 @@ update_package(Client, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Updates the scope of a package. +%% +%% Scope of the package defines users who can view and associate a package. +-spec update_package_scope(aws_client:aws_client(), update_package_scope_request()) -> + {ok, update_package_scope_response(), tuple()} | + {error, any()} | + {error, update_package_scope_errors(), tuple()}. +update_package_scope(Client, Input) -> + update_package_scope(Client, Input, []). + +-spec update_package_scope(aws_client:aws_client(), update_package_scope_request(), proplists:proplist()) -> + {ok, update_package_scope_response(), tuple()} | + {error, any()} | + {error, update_package_scope_errors(), tuple()}. +update_package_scope(Client, Input0, Options0) -> + Method = post, + Path = ["/2021-01-01/packages/updateScope"], + 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 Reschedules a planned domain configuration change for a later time. %% %% This change can be a diff --git a/src/aws_outposts.erl b/src/aws_outposts.erl index 0b1d73c0..f652d476 100644 --- a/src/aws_outposts.erl +++ b/src/aws_outposts.erl @@ -46,18 +46,24 @@ get_outpost_instance_types/2, get_outpost_instance_types/4, get_outpost_instance_types/5, - get_outpost_supported_instance_types/3, + get_outpost_supported_instance_types/2, + get_outpost_supported_instance_types/4, get_outpost_supported_instance_types/5, - get_outpost_supported_instance_types/6, get_site/2, get_site/4, get_site/5, get_site_address/3, get_site_address/5, get_site_address/6, + list_asset_instances/2, + list_asset_instances/4, + list_asset_instances/5, list_assets/2, list_assets/4, list_assets/5, + list_blocking_instances_for_capacity_task/3, + list_blocking_instances_for_capacity_task/5, + list_blocking_instances_for_capacity_task/6, list_capacity_tasks/1, list_capacity_tasks/3, list_capacity_tasks/4, @@ -105,7 +111,7 @@ %% get_outpost_supported_instance_types_input() :: #{ %% <<"MaxResults">> => integer(), %% <<"NextToken">> => string(), -%% <<"OrderId">> := string() +%% <<"OrderId">> => string() %% } -type get_outpost_supported_instance_types_input() :: #{binary() => any()}. @@ -126,6 +132,15 @@ -type instance_type_item() :: #{binary() => any()}. +%% Example: +%% blocking_instance() :: #{ +%% <<"AccountId">> => string(), +%% <<"AwsServiceName">> => list(any()), +%% <<"InstanceId">> => string() +%% } +-type blocking_instance() :: #{binary() => any()}. + + %% Example: %% tag_resource_request() :: #{ %% <<"Tags">> := map() @@ -151,6 +166,18 @@ -type list_assets_input() :: #{binary() => any()}. +%% Example: +%% list_asset_instances_input() :: #{ +%% <<"AccountIdFilter">> => list(string()()), +%% <<"AssetIdFilter">> => list(string()()), +%% <<"AwsServiceFilter">> => list(list(any())()), +%% <<"InstanceTypeFilter">> => list(string()()), +%% <<"MaxResults">> => integer(), +%% <<"NextToken">> => string() +%% } +-type list_asset_instances_input() :: #{binary() => any()}. + + %% Example: %% asset_location() :: #{ %% <<"RackElevation">> => float() @@ -349,6 +376,14 @@ -type get_capacity_task_input() :: #{}. +%% Example: +%% list_asset_instances_output() :: #{ +%% <<"AssetInstances">> => list(asset_instance()()), +%% <<"NextToken">> => string() +%% } +-type list_asset_instances_output() :: #{binary() => any()}. + + %% Example: %% conflict_exception() :: #{ %% <<"Message">> => string(), @@ -357,6 +392,14 @@ %% } -type conflict_exception() :: #{binary() => any()}. + +%% Example: +%% asset_instance_type_capacity() :: #{ +%% <<"Count">> => integer(), +%% <<"InstanceType">> => string() +%% } +-type asset_instance_type_capacity() :: #{binary() => any()}. + %% Example: %% get_catalog_item_input() :: #{} -type get_catalog_item_input() :: #{}. @@ -422,6 +465,14 @@ -type list_sites_input() :: #{binary() => any()}. +%% Example: +%% list_blocking_instances_for_capacity_task_output() :: #{ +%% <<"BlockingInstances">> => list(blocking_instance()()), +%% <<"NextToken">> => string() +%% } +-type list_blocking_instances_for_capacity_task_output() :: #{binary() => any()}. + + %% Example: %% instance_type_capacity() :: #{ %% <<"Count">> => integer(), @@ -489,10 +540,12 @@ %% <<"CreationDate">> => non_neg_integer(), %% <<"DryRun">> => boolean(), %% <<"Failed">> => capacity_task_failure(), +%% <<"InstancesToExclude">> => instances_to_exclude(), %% <<"LastModifiedDate">> => non_neg_integer(), %% <<"OrderId">> => string(), %% <<"OutpostId">> => string(), -%% <<"RequestedInstancePools">> => list(instance_type_capacity()()) +%% <<"RequestedInstancePools">> => list(instance_type_capacity()()), +%% <<"TaskActionOnBlockingInstances">> => list(any()) %% } -type start_capacity_task_output() :: #{binary() => any()}. @@ -509,7 +562,9 @@ %% start_capacity_task_input() :: #{ %% <<"DryRun">> => boolean(), %% <<"InstancePools">> := list(instance_type_capacity()()), -%% <<"OrderId">> := string() +%% <<"InstancesToExclude">> => instances_to_exclude(), +%% <<"OrderId">> => string(), +%% <<"TaskActionOnBlockingInstances">> => list(any()) %% } -type start_capacity_task_input() :: #{binary() => any()}. @@ -545,6 +600,8 @@ %% compute_attributes() :: #{ %% <<"HostId">> => string(), %% <<"InstanceFamilies">> => list(string()()), +%% <<"InstanceTypeCapacities">> => list(asset_instance_type_capacity()()), +%% <<"MaxVcpus">> => integer(), %% <<"State">> => list(any()) %% } -type compute_attributes() :: #{binary() => any()}. @@ -593,6 +650,15 @@ %% } -type access_denied_exception() :: #{binary() => any()}. + +%% Example: +%% instances_to_exclude() :: #{ +%% <<"AccountIds">> => list(string()()), +%% <<"Instances">> => list(string()()), +%% <<"Services">> => list(list(any())()) +%% } +-type instances_to_exclude() :: #{binary() => any()}. + %% Example: %% delete_site_input() :: #{} -type delete_site_input() :: #{}. @@ -661,6 +727,14 @@ -type list_capacity_tasks_input() :: #{binary() => any()}. +%% Example: +%% list_blocking_instances_for_capacity_task_input() :: #{ +%% <<"MaxResults">> => integer(), +%% <<"NextToken">> => string() +%% } +-type list_blocking_instances_for_capacity_task_input() :: #{binary() => any()}. + + %% Example: %% create_outpost_output() :: #{ %% <<"Outpost">> => outpost() @@ -782,6 +856,17 @@ -type list_catalog_items_output() :: #{binary() => any()}. +%% Example: +%% asset_instance() :: #{ +%% <<"AccountId">> => string(), +%% <<"AssetId">> => string(), +%% <<"AwsServiceName">> => list(any()), +%% <<"InstanceId">> => string(), +%% <<"InstanceType">> => string() +%% } +-type asset_instance() :: #{binary() => any()}. + + %% Example: %% update_site_rack_physical_properties_output() :: #{ %% <<"Site">> => site() @@ -823,10 +908,12 @@ %% <<"CreationDate">> => non_neg_integer(), %% <<"DryRun">> => boolean(), %% <<"Failed">> => capacity_task_failure(), +%% <<"InstancesToExclude">> => instances_to_exclude(), %% <<"LastModifiedDate">> => non_neg_integer(), %% <<"OrderId">> => string(), %% <<"OutpostId">> => string(), -%% <<"RequestedInstancePools">> => list(instance_type_capacity()()) +%% <<"RequestedInstancePools">> => list(instance_type_capacity()()), +%% <<"TaskActionOnBlockingInstances">> => list(any()) %% } -type get_capacity_task_output() :: #{binary() => any()}. @@ -946,12 +1033,24 @@ internal_server_exception() | not_found_exception(). +-type list_asset_instances_errors() :: + validation_exception() | + access_denied_exception() | + internal_server_exception() | + not_found_exception(). + -type list_assets_errors() :: validation_exception() | access_denied_exception() | internal_server_exception() | not_found_exception(). +-type list_blocking_instances_for_capacity_task_errors() :: + validation_exception() | + access_denied_exception() | + internal_server_exception() | + not_found_exception(). + -type list_capacity_tasks_errors() :: validation_exception() | access_denied_exception() | @@ -1521,34 +1620,33 @@ get_outpost_instance_types(Client, OutpostId, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). -%% @doc Gets the instance types that an -%% Outpost can support in `InstanceTypeCapacity'. +%% @doc Gets the instance types that an Outpost can support in +%% `InstanceTypeCapacity'. %% -%% This will generally include instance types that -%% are not currently configured and therefore cannot be launched with the -%% current Outpost -%% capacity configuration. --spec get_outpost_supported_instance_types(aws_client:aws_client(), binary() | list(), binary() | list()) -> +%% This will generally include instance types that are not currently +%% configured and therefore +%% cannot be launched with the current Outpost capacity configuration. +-spec get_outpost_supported_instance_types(aws_client:aws_client(), binary() | list()) -> {ok, get_outpost_supported_instance_types_output(), tuple()} | {error, any()} | {error, get_outpost_supported_instance_types_errors(), tuple()}. -get_outpost_supported_instance_types(Client, OutpostIdentifier, OrderId) +get_outpost_supported_instance_types(Client, OutpostIdentifier) when is_map(Client) -> - get_outpost_supported_instance_types(Client, OutpostIdentifier, OrderId, #{}, #{}). + get_outpost_supported_instance_types(Client, OutpostIdentifier, #{}, #{}). --spec get_outpost_supported_instance_types(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> +-spec get_outpost_supported_instance_types(aws_client:aws_client(), binary() | list(), map(), map()) -> {ok, get_outpost_supported_instance_types_output(), tuple()} | {error, any()} | {error, get_outpost_supported_instance_types_errors(), tuple()}. -get_outpost_supported_instance_types(Client, OutpostIdentifier, OrderId, QueryMap, HeadersMap) +get_outpost_supported_instance_types(Client, OutpostIdentifier, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> - get_outpost_supported_instance_types(Client, OutpostIdentifier, OrderId, QueryMap, HeadersMap, []). + get_outpost_supported_instance_types(Client, OutpostIdentifier, QueryMap, HeadersMap, []). --spec get_outpost_supported_instance_types(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> +-spec get_outpost_supported_instance_types(aws_client:aws_client(), binary() | list(), map(), map(), proplists:proplist()) -> {ok, get_outpost_supported_instance_types_output(), tuple()} | {error, any()} | {error, get_outpost_supported_instance_types_errors(), tuple()}. -get_outpost_supported_instance_types(Client, OutpostIdentifier, OrderId, QueryMap, HeadersMap, Options0) +get_outpost_supported_instance_types(Client, OutpostIdentifier, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/outposts/", aws_util:encode_uri(OutpostIdentifier), "/supportedInstanceTypes"], SuccessStatusCode = 200, @@ -1564,7 +1662,7 @@ get_outpost_supported_instance_types(Client, OutpostIdentifier, OrderId, QueryMa [ {<<"MaxResults">>, maps:get(<<"MaxResults">>, QueryMap, undefined)}, {<<"NextToken">>, maps:get(<<"NextToken">>, QueryMap, undefined)}, - {<<"OrderId">>, OrderId} + {<<"OrderId">>, maps:get(<<"OrderId">>, QueryMap, undefined)} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], @@ -1648,6 +1746,55 @@ get_site_address(Client, SiteId, AddressType, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc A list of Amazon EC2 instances, belonging to all accounts, running on +%% the specified Outpost. +%% +%% Does not include Amazon EBS or Amazon S3 instances. +-spec list_asset_instances(aws_client:aws_client(), binary() | list()) -> + {ok, list_asset_instances_output(), tuple()} | + {error, any()} | + {error, list_asset_instances_errors(), tuple()}. +list_asset_instances(Client, OutpostIdentifier) + when is_map(Client) -> + list_asset_instances(Client, OutpostIdentifier, #{}, #{}). + +-spec list_asset_instances(aws_client:aws_client(), binary() | list(), map(), map()) -> + {ok, list_asset_instances_output(), tuple()} | + {error, any()} | + {error, list_asset_instances_errors(), tuple()}. +list_asset_instances(Client, OutpostIdentifier, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_asset_instances(Client, OutpostIdentifier, QueryMap, HeadersMap, []). + +-spec list_asset_instances(aws_client:aws_client(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, list_asset_instances_output(), tuple()} | + {error, any()} | + {error, list_asset_instances_errors(), tuple()}. +list_asset_instances(Client, OutpostIdentifier, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/outposts/", aws_util:encode_uri(OutpostIdentifier), "/assetInstances"], + 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} + | Options2], + + Headers = [], + + Query0_ = + [ + {<<"AccountIdFilter">>, maps:get(<<"AccountIdFilter">>, QueryMap, undefined)}, + {<<"AssetIdFilter">>, maps:get(<<"AssetIdFilter">>, QueryMap, undefined)}, + {<<"AwsServiceFilter">>, maps:get(<<"AwsServiceFilter">>, QueryMap, undefined)}, + {<<"InstanceTypeFilter">>, maps:get(<<"InstanceTypeFilter">>, QueryMap, undefined)}, + {<<"MaxResults">>, maps:get(<<"MaxResults">>, QueryMap, undefined)}, + {<<"NextToken">>, maps:get(<<"NextToken">>, QueryMap, undefined)} + ], + Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + %% @doc Lists the hardware assets for the specified Outpost. %% %% Use filters to return specific results. If you specify multiple filters, @@ -1698,6 +1845,53 @@ list_assets(Client, OutpostIdentifier, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc A list of Amazon EC2 instances running on the Outpost and belonging +%% to the account that +%% initiated the capacity task. +%% +%% Use this list to specify the instances you cannot stop to free up +%% capacity to run the capacity task. +-spec list_blocking_instances_for_capacity_task(aws_client:aws_client(), binary() | list(), binary() | list()) -> + {ok, list_blocking_instances_for_capacity_task_output(), tuple()} | + {error, any()} | + {error, list_blocking_instances_for_capacity_task_errors(), tuple()}. +list_blocking_instances_for_capacity_task(Client, CapacityTaskId, OutpostIdentifier) + when is_map(Client) -> + list_blocking_instances_for_capacity_task(Client, CapacityTaskId, OutpostIdentifier, #{}, #{}). + +-spec list_blocking_instances_for_capacity_task(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> + {ok, list_blocking_instances_for_capacity_task_output(), tuple()} | + {error, any()} | + {error, list_blocking_instances_for_capacity_task_errors(), tuple()}. +list_blocking_instances_for_capacity_task(Client, CapacityTaskId, OutpostIdentifier, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_blocking_instances_for_capacity_task(Client, CapacityTaskId, OutpostIdentifier, QueryMap, HeadersMap, []). + +-spec list_blocking_instances_for_capacity_task(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, list_blocking_instances_for_capacity_task_output(), tuple()} | + {error, any()} | + {error, list_blocking_instances_for_capacity_task_errors(), tuple()}. +list_blocking_instances_for_capacity_task(Client, CapacityTaskId, OutpostIdentifier, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/outposts/", aws_util:encode_uri(OutpostIdentifier), "/capacity/", aws_util:encode_uri(CapacityTaskId), "/blockingInstances"], + 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} + | Options2], + + Headers = [], + + Query0_ = + [ + {<<"MaxResults">>, maps:get(<<"MaxResults">>, QueryMap, undefined)}, + {<<"NextToken">>, maps:get(<<"NextToken">>, QueryMap, undefined)} + ], + Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + %% @doc Lists the capacity tasks for your Amazon Web Services account. %% %% Use filters to return specific results. If you specify multiple filters, @@ -1986,7 +2180,7 @@ list_tags_for_resource(Client, ResourceArn, QueryMap, HeadersMap, Options0) %% @doc Starts the specified capacity task. %% -%% You can have one active capacity task for an order. +%% You can have one active capacity task per order or Outpost. -spec start_capacity_task(aws_client:aws_client(), binary() | list(), start_capacity_task_input()) -> {ok, start_capacity_task_output(), tuple()} | {error, any()} |