diff --git a/aws-models/chatbot.json b/aws-models/chatbot.json index a1f088d5c74f..874c61f60e91 100644 --- a/aws-models/chatbot.json +++ b/aws-models/chatbot.json @@ -49,6 +49,16 @@ "smithy.api#documentation": "Preferences which apply for AWS Chatbot usage in the calling AWS account." } }, + "com.amazonaws.chatbot#AmazonResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1011 + }, + "smithy.api#pattern": "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$" + } + }, "com.amazonaws.chatbot#Arn": { "type": "string", "traits": { @@ -124,6 +134,12 @@ "traits": { "smithy.api#documentation": "Specifies the logging level for this configuration. This property affects the log entries pushed to Amazon CloudWatch Logs.Logging levels include ERROR, INFO, or NONE." } + }, + "Tags": { + "target": "com.amazonaws.chatbot#Tags", + "traits": { + "smithy.api#documentation": "A list of tags applied to the configuration." + } } }, "traits": { @@ -302,6 +318,12 @@ "traits": { "smithy.api#documentation": "Logging levels include ERROR, INFO, or NONE." } + }, + "Tags": { + "target": "com.amazonaws.chatbot#Tags", + "traits": { + "smithy.api#documentation": "A list of tags to apply to the configuration." + } } }, "traits": { @@ -463,6 +485,12 @@ "traits": { "smithy.api#documentation": "Enables use of a user role requirement in your chat configuration." } + }, + "Tags": { + "target": "com.amazonaws.chatbot#Tags", + "traits": { + "smithy.api#documentation": "A list of tags to apply to the configuration." + } } }, "traits": { @@ -569,6 +597,12 @@ "traits": { "smithy.api#documentation": "Enables use of a user role requirement in your chat configuration." } + }, + "Tags": { + "target": "com.amazonaws.chatbot#Tags", + "traits": { + "smithy.api#documentation": "A list of tags to apply to the configuration." + } } }, "traits": { @@ -1574,6 +1608,19 @@ "target": "com.amazonaws.chatbot#GuardrailPolicyArn" } }, + "com.amazonaws.chatbot#InternalServiceError": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.chatbot#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "Customer/consumer-facing internal service exception.\n https://w.amazon.com/index.php/AWS/API_Standards/Exceptions#InternalServiceError", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, "com.amazonaws.chatbot#InvalidParameterException": { "type": "structure", "members": { @@ -1824,6 +1871,63 @@ "smithy.api#output": {} } }, + "com.amazonaws.chatbot#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.chatbot#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.chatbot#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chatbot#InternalServiceError" + }, + { + "target": "com.amazonaws.chatbot#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.chatbot#ServiceUnavailableException" + } + ], + "traits": { + "smithy.api#documentation": "Retrieves the list of tags applied to a configuration.", + "smithy.api#http": { + "method": "POST", + "uri": "/list-tags-for-resource", + "code": 200 + } + } + }, + "com.amazonaws.chatbot#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.chatbot#AmazonResourceName", + "traits": { + "smithy.api#documentation": "The ARN of the configuration.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.chatbot#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "Tags": { + "target": "com.amazonaws.chatbot#TagList", + "traits": { + "smithy.api#documentation": "A list of tags applied to the configuration." + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.chatbot#ListTeamsChannelConfigurationsException": { "type": "structure", "members": { @@ -1915,6 +2019,19 @@ "smithy.api#httpError": 404 } }, + "com.amazonaws.chatbot#ServiceUnavailableException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.chatbot#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "We can’t process your request right now because of a server issue. Try again later.", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, "com.amazonaws.chatbot#SlackChannelConfiguration": { "type": "structure", "members": { @@ -1990,6 +2107,12 @@ "traits": { "smithy.api#documentation": "Enables use of a user role requirement in your chat configuration." } + }, + "Tags": { + "target": "com.amazonaws.chatbot#Tags", + "traits": { + "smithy.api#documentation": "A list of tags applied to the configuration." + } } }, "traits": { @@ -2135,6 +2258,136 @@ "com.amazonaws.chatbot#String": { "type": "string" }, + "com.amazonaws.chatbot#Tag": { + "type": "structure", + "members": { + "TagKey": { + "target": "com.amazonaws.chatbot#TagKey", + "traits": { + "smithy.api#documentation": "The tag key.", + "smithy.api#required": {} + } + }, + "TagValue": { + "target": "com.amazonaws.chatbot#TagValue", + "traits": { + "smithy.api#documentation": "The tag value.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A tag applied to the configuration." + } + }, + "com.amazonaws.chatbot#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.chatbot#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.chatbot#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.chatbot#TagList": { + "type": "list", + "member": { + "target": "com.amazonaws.chatbot#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.chatbot#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.chatbot#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.chatbot#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chatbot#InternalServiceError" + }, + { + "target": "com.amazonaws.chatbot#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.chatbot#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chatbot#TooManyTagsException" + } + ], + "traits": { + "smithy.api#documentation": "Applies the supplied tags to a configuration.", + "smithy.api#http": { + "method": "POST", + "uri": "/tag-resource", + "code": 200 + } + } + }, + "com.amazonaws.chatbot#TagResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.chatbot#AmazonResourceName", + "traits": { + "smithy.api#documentation": "The ARN of the configuration.", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.chatbot#TagList", + "traits": { + "smithy.api#documentation": "A list of tags to apply to the configuration.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.chatbot#TagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.chatbot#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, + "com.amazonaws.chatbot#Tags": { + "type": "list", + "member": { + "target": "com.amazonaws.chatbot#Tag" + } + }, "com.amazonaws.chatbot#TeamChannelConfigurationsList": { "type": "list", "member": { @@ -2231,6 +2484,12 @@ "traits": { "smithy.api#documentation": "Enables use of a user role requirement in your chat configuration." } + }, + "Tags": { + "target": "com.amazonaws.chatbot#Tags", + "traits": { + "smithy.api#documentation": "A list of tags applied to the configuration." + } } }, "traits": { @@ -2316,6 +2575,19 @@ "smithy.api#documentation": "Identifes a user level permission for a channel configuration." } }, + "com.amazonaws.chatbot#TooManyTagsException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.chatbot#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "The supplied list of tags contains too many tags.", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, "com.amazonaws.chatbot#UUID": { "type": "string", "traits": { @@ -2326,6 +2598,63 @@ "smithy.api#pattern": "^[0-9A-Fa-f]{8}(?:-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12}$" } }, + "com.amazonaws.chatbot#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.chatbot#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.chatbot#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chatbot#InternalServiceError" + }, + { + "target": "com.amazonaws.chatbot#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.chatbot#ServiceUnavailableException" + } + ], + "traits": { + "smithy.api#documentation": "Removes the supplied tags from a configuration", + "smithy.api#http": { + "method": "POST", + "uri": "/untag-resource", + "code": 200 + } + } + }, + "com.amazonaws.chatbot#UntagResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.chatbot#AmazonResourceName", + "traits": { + "smithy.api#documentation": "The ARN of the configuration.", + "smithy.api#required": {} + } + }, + "TagKeys": { + "target": "com.amazonaws.chatbot#TagKeyList", + "traits": { + "smithy.api#documentation": "A list of tag keys to remove from the configuration.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.chatbot#UntagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.chatbot#UpdateAccountPreferences": { "type": "operation", "input": { @@ -2797,6 +3126,15 @@ { "target": "com.amazonaws.chatbot#ListMicrosoftTeamsUserIdentities" }, + { + "target": "com.amazonaws.chatbot#ListTagsForResource" + }, + { + "target": "com.amazonaws.chatbot#TagResource" + }, + { + "target": "com.amazonaws.chatbot#UntagResource" + }, { "target": "com.amazonaws.chatbot#UpdateAccountPreferences" }, diff --git a/aws-models/cloudformation.json b/aws-models/cloudformation.json index 6ea959868ab2..a2160e7f7e4f 100644 --- a/aws-models/cloudformation.json +++ b/aws-models/cloudformation.json @@ -3417,6 +3417,12 @@ "traits": { "smithy.api#documentation": "

A unique identifier for this DeleteStack request. Specify this token if you plan to retry requests\n so that CloudFormation knows that you're not attempting to delete a stack with the same name. You might retry\n DeleteStack requests to ensure that CloudFormation successfully received them.

\n

All events initiated by a given stack operation are assigned the same client request token, which you can use to\n track operations. For example, if you execute a CreateStack operation with the token\n token1, then all the StackEvents generated by that operation will have\n ClientRequestToken set as token1.

\n

In the console, stack operations display the client request token on the Events tab. Stack operations that are\n initiated from the console use the token format Console-StackOperation-ID, which helps you\n easily identify the stack operation . For example, if you create a stack using the console, each stack event would be\n assigned the same token in the following format:\n Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002.

" } + }, + "DeletionMode": { + "target": "com.amazonaws.cloudformation#DeletionMode", + "traits": { + "smithy.api#documentation": "

Specifies the deletion mode for the stack. Possible values are:

\n " + } } }, "traits": { @@ -3579,6 +3585,23 @@ "smithy.api#output": {} } }, + "com.amazonaws.cloudformation#DeletionMode": { + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD" + } + }, + "FORCE_DELETE_STACK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FORCE_DELETE_STACK" + } + } + } + }, "com.amazonaws.cloudformation#DeletionTime": { "type": "timestamp" }, @@ -7934,7 +7957,7 @@ "Summaries": { "target": "com.amazonaws.cloudformation#StackInstanceResourceDriftsSummaries", "traits": { - "smithy.api#documentation": "

A list of StackInstanceResourceDriftSummary structures that contain information about the specified\n stack instances.

" + "smithy.api#documentation": "

A list of StackInstanceResourceDriftsSummary structures that contain information about the\n specified stack instances.

" } }, "NextToken": { @@ -11505,6 +11528,12 @@ "smithy.api#documentation": "

When set to true, newly created resources are deleted when the operation rolls back. This includes\n newly created resources marked with a deletion policy of Retain.

\n

Default: false\n

" } }, + "DeletionMode": { + "target": "com.amazonaws.cloudformation#DeletionMode", + "traits": { + "smithy.api#documentation": "

Specifies the deletion mode for the stack. Possible values are:

\n " + } + }, "DetailedStatus": { "target": "com.amazonaws.cloudformation#DetailedStatus", "traits": { @@ -13119,7 +13148,7 @@ "ConcurrencyMode": { "target": "com.amazonaws.cloudformation#ConcurrencyMode", "traits": { - "smithy.api#documentation": "

Specifies how the concurrency level behaves during the operation execution.

\n " + "smithy.api#documentation": "

Specifies how the concurrency level behaves during the operation execution.

\n " } } }, diff --git a/aws-models/kms.json b/aws-models/kms.json index e6e77c9ae7b3..be05f267eb31 100644 --- a/aws-models/kms.json +++ b/aws-models/kms.json @@ -64,6 +64,12 @@ "traits": { "smithy.api#enumValue": "RSA_AES_KEY_WRAP_SHA_256" } + }, + "SM2PKE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SM2PKE" + } } } }, @@ -3581,7 +3587,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the public key and an import token you need to import or reimport key material for\n a KMS key.

\n

By default, KMS keys are created with key material that KMS generates. This operation\n supports Importing key\n material, an advanced feature that lets you generate and import the cryptographic\n key material for a KMS key. For more information about importing key material into KMS, see\n Importing key\n material in the Key Management Service Developer Guide.

\n

Before calling GetParametersForImport, use the CreateKey\n operation with an Origin value of EXTERNAL to create a KMS key with\n no key material. You can import key material for a symmetric encryption KMS key, HMAC KMS key,\n asymmetric encryption KMS key, or asymmetric signing KMS key. You can also import key material\n into a multi-Region key of any supported type. However, you can't import key material into\n a KMS key in a custom key store. You can also use GetParametersForImport to get a\n public key and import token to reimport the original key\n material into a KMS key whose key material expired or was deleted.

\n

\n GetParametersForImport returns the items that you need to import your key\n material.

\n \n

The public key and its import token are permanently linked and must be used together. Each\n public key and import token set is valid for 24 hours. The expiration date and time appear in\n the ParametersValidTo field in the GetParametersForImport response.\n You cannot use an expired public key or import token in an ImportKeyMaterial\n request. If your key and token expire, send another GetParametersForImport\n request.

\n

\n GetParametersForImport requires the following information:

\n \n

You can use the same or a different public key spec and wrapping algorithm each time you\n import or reimport the same key material.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:GetParametersForImport (key policy)

\n

\n Related operations:\n

\n \n

\n Eventual consistency: The KMS API follows an eventual consistency model. \n For more information, see KMS eventual consistency.

" + "smithy.api#documentation": "

Returns the public key and an import token you need to import or reimport key material for\n a KMS key.

\n

By default, KMS keys are created with key material that KMS generates. This operation\n supports Importing key\n material, an advanced feature that lets you generate and import the cryptographic\n key material for a KMS key. For more information about importing key material into KMS, see\n Importing key\n material in the Key Management Service Developer Guide.

\n

Before calling GetParametersForImport, use the CreateKey\n operation with an Origin value of EXTERNAL to create a KMS key with\n no key material. You can import key material for a symmetric encryption KMS key, HMAC KMS key,\n asymmetric encryption KMS key, or asymmetric signing KMS key. You can also import key material\n into a multi-Region key of any supported type. However, you can't import key material into\n a KMS key in a custom key store. You can also use GetParametersForImport to get a\n public key and import token to reimport the original key\n material into a KMS key whose key material expired or was deleted.

\n

\n GetParametersForImport returns the items that you need to import your key\n material.

\n \n

The public key and its import token are permanently linked and must be used together. Each\n public key and import token set is valid for 24 hours. The expiration date and time appear in\n the ParametersValidTo field in the GetParametersForImport response.\n You cannot use an expired public key or import token in an ImportKeyMaterial\n request. If your key and token expire, send another GetParametersForImport\n request.

\n

\n GetParametersForImport requires the following information:

\n \n

You can use the same or a different public key spec and wrapping algorithm each time you\n import or reimport the same key material.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:GetParametersForImport (key policy)

\n

\n Related operations:\n

\n \n

\n Eventual consistency: The KMS API follows an eventual consistency model. \n For more information, see KMS eventual consistency.

" } }, "com.amazonaws.kms#GetParametersForImportRequest": { @@ -3597,14 +3603,14 @@ "WrappingAlgorithm": { "target": "com.amazonaws.kms#AlgorithmSpec", "traits": { - "smithy.api#documentation": "

The algorithm you will use with the RSA public key (PublicKey) in the\n response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

\n

For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you\n generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping\n algorithms, you encrypt your key material directly with the RSA public key from KMS.

\n

The wrapping algorithms that you can use depend on the type of key material that you are\n importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.

\n ", + "smithy.api#documentation": "

The algorithm you will use with the asymmetric public key (PublicKey) in the\n response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

\n

For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you\n generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping\n algorithms, you encrypt your key material directly with the RSA public key from KMS. \n For SM2PKE wrapping algorithms, you encrypt your key material directly with the SM2 public key \n from KMS.

\n

The wrapping algorithms that you can use depend on the type of key material that you are\n importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm, except \n in China Regions, where you must use the SM2PKE wrapping algorithm to import an RSA private key.

\n

The SM2PKE wrapping algorithm is available only in China Regions. The \n RSA_AES_KEY_WRAP_SHA_256 and RSA_AES_KEY_WRAP_SHA_1 \n wrapping algorithms are not supported in China Regions.

\n ", "smithy.api#required": {} } }, "WrappingKeySpec": { "target": "com.amazonaws.kms#WrappingKeySpec", "traits": { - "smithy.api#documentation": "

The type of RSA public key to return in the response. You will use this wrapping key with\n the specified wrapping algorithm to protect your key material during import.

\n

Use the longest RSA wrapping key that is practical.

\n

You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key.\n Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

", + "smithy.api#documentation": "

The type of public key to return in the response. You will use this wrapping key with\n the specified wrapping algorithm to protect your key material during import.

\n

Use the longest wrapping key that is practical.

\n

You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key.\n Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

\n

The SM2 wrapping key spec is available only in China Regions.

", "smithy.api#required": {} } } @@ -9166,6 +9172,12 @@ "traits": { "smithy.api#enumValue": "RSA_4096" } + }, + "SM2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SM2" + } } } }, diff --git a/aws-models/opensearch.json b/aws-models/opensearch.json index 078f76fc48a2..13ebaae8f558 100644 --- a/aws-models/opensearch.json +++ b/aws-models/opensearch.json @@ -3669,6 +3669,12 @@ "traits": { "smithy.api#documentation": "

A description of the data source.

" } + }, + "Status": { + "target": "com.amazonaws.opensearch#DataSourceStatus", + "traits": { + "smithy.api#documentation": "

The status of the data source.

" + } } }, "traits": { @@ -3691,6 +3697,23 @@ "smithy.api#pattern": "^[a-z][a-z0-9_]+$" } }, + "com.amazonaws.opensearch#DataSourceStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } + } + }, "com.amazonaws.opensearch#DataSourceType": { "type": "union", "members": { @@ -6210,7 +6233,7 @@ "DomainEndpointV2HostedZoneId": { "target": "com.amazonaws.opensearch#HostedZoneId", "traits": { - "smithy.api#documentation": "

The DualStack Hosted Zone Id for the domain.

" + "smithy.api#documentation": "

The dual stack hosted zone ID for the domain.

" } }, "Processing": { @@ -6856,6 +6879,12 @@ "traits": { "smithy.api#documentation": "

A description of the data source.

" } + }, + "Status": { + "target": "com.amazonaws.opensearch#DataSourceStatus", + "traits": { + "smithy.api#documentation": "

The status of the data source response.

" + } } }, "traits": { @@ -11915,6 +11944,12 @@ "traits": { "smithy.api#documentation": "

A new description of the data source.

" } + }, + "Status": { + "target": "com.amazonaws.opensearch#DataSourceStatus", + "traits": { + "smithy.api#documentation": "

The status of the data source update request.

" + } } }, "traits": { diff --git a/aws-models/sdk-endpoints.json b/aws-models/sdk-endpoints.json index 86747da444ee..3d0a57089df9 100644 --- a/aws-models/sdk-endpoints.json +++ b/aws-models/sdk-endpoints.json @@ -15800,6 +15800,31 @@ "hostname" : "s3-control-fips.ca-central-1.amazonaws.com", "signatureVersions" : [ "s3v4" ] }, + "ca-west-1" : { + "credentialScope" : { + "region" : "ca-west-1" + }, + "hostname" : "s3-control.ca-west-1.amazonaws.com", + "signatureVersions" : [ "s3v4" ], + "variants" : [ { + "hostname" : "s3-control-fips.ca-west-1.amazonaws.com", + "tags" : [ "fips" ] + }, { + "hostname" : "s3-control-fips.dualstack.ca-west-1.amazonaws.com", + "tags" : [ "dualstack", "fips" ] + }, { + "hostname" : "s3-control.dualstack.ca-west-1.amazonaws.com", + "tags" : [ "dualstack" ] + } ] + }, + "ca-west-1-fips" : { + "credentialScope" : { + "region" : "ca-west-1" + }, + "deprecated" : true, + "hostname" : "s3-control-fips.ca-west-1.amazonaws.com", + "signatureVersions" : [ "s3v4" ] + }, "eu-central-1" : { "credentialScope" : { "region" : "eu-central-1" diff --git a/aws-models/wafv2.json b/aws-models/wafv2.json index fcf56f5884cd..a1d41b158cd8 100644 --- a/aws-models/wafv2.json +++ b/aws-models/wafv2.json @@ -1901,7 +1901,7 @@ "SearchString": { "target": "com.amazonaws.wafv2#SearchString", "traits": { - "smithy.api#documentation": "

A string value that you want WAF to search for. WAF searches only in the part of\n web requests that you designate for inspection in FieldToMatch. The\n maximum length of the value is 200 bytes.

\n

Valid values depend on the component that you specify for inspection in\n FieldToMatch:

\n \n

If SearchString includes alphabetic characters A-Z and a-z, note that the\n value is case sensitive.

\n

\n If you're using the WAF API\n

\n

Specify a base64-encoded version of the value. The maximum length of the value before\n you base64-encode it is 200 bytes.

\n

For example, suppose the value of Type is HEADER and the value\n of Data is User-Agent. If you want to search the\n User-Agent header for the value BadBot, you base64-encode\n BadBot using MIME base64-encoding and include the resulting value,\n QmFkQm90, in the value of SearchString.

\n

\n If you're using the CLI or one of the Amazon Web Services SDKs\n

\n

The value that you want WAF to search for. The SDK automatically base64 encodes the\n value.

", + "smithy.api#documentation": "

A string value that you want WAF to search for. WAF searches only in the part of\n web requests that you designate for inspection in FieldToMatch. The\n maximum length of the value is 200 bytes.

\n

Valid values depend on the component that you specify for inspection in\n FieldToMatch:

\n \n

If SearchString includes alphabetic characters A-Z and a-z, note that the\n value is case sensitive.

\n

\n If you're using the WAF API\n

\n

Specify a base64-encoded version of the value. The maximum length of the value before\n you base64-encode it is 200 bytes.

\n

For example, suppose the value of Type is HEADER and the value\n of Data is User-Agent. If you want to search the\n User-Agent header for the value BadBot, you base64-encode\n BadBot using MIME base64-encoding and include the resulting value,\n QmFkQm90, in the value of SearchString.

\n

\n If you're using the CLI or one of the Amazon Web Services SDKs\n

\n

The value that you want WAF to search for. The SDK automatically base64 encodes the\n value.

", "smithy.api#required": {} } }, @@ -4739,6 +4739,18 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the web ACL from which you want to delete the LoggingConfiguration.

", "smithy.api#required": {} } + }, + "LogType": { + "target": "com.amazonaws.wafv2#LogType", + "traits": { + "smithy.api#documentation": "

Used to distinguish between various logging options. Currently, there is one option.

\n

Default: WAF_LOGS\n

" + } + }, + "LogScope": { + "target": "com.amazonaws.wafv2#LogScope", + "traits": { + "smithy.api#documentation": "

The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

\n

The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see \n Collecting data from Amazon Web Services services\n in the Amazon Security Lake user guide.

\n

Default: CUSTOMER\n

" + } } }, "traits": { @@ -5554,12 +5566,12 @@ "JA3Fingerprint": { "target": "com.amazonaws.wafv2#JA3Fingerprint", "traits": { - "smithy.api#documentation": "

Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each\n\t\t\t\t\t\trequest that has enough TLS Client Hello information for the calculation. Almost \n all web requests include this information.

\n \n

You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to \n EXACTLY.

\n
\n

You can obtain the JA3 fingerprint for client requests from the web ACL logs. \n\t\t\t\t\t\tIf WAF is able to calculate the fingerprint, it includes it in the logs. \n\t\t\t\t\t\tFor information about the logging fields, \nsee Log fields in the WAF Developer Guide.

\n

Provide the JA3 fingerprint string from the logs in your string match statement\n\t\t\t\t\t\t\tspecification, to match with any future requests that have the same TLS configuration.

" + "smithy.api#documentation": "

Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each\n\t\t\t\t\t\trequest that has enough TLS Client Hello information for the calculation. Almost \n all web requests include this information.

\n \n

You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to \n EXACTLY.

\n
\n

You can obtain the JA3 fingerprint for client requests from the web ACL logs. \n\t\t\t\t\t\tIf WAF is able to calculate the fingerprint, it includes it in the logs. \n\t\t\t\t\t\tFor information about the logging fields, \nsee Log fields in the WAF Developer Guide.

\n

Provide the JA3 fingerprint string from the logs in your string match statement\n\t\t\t\t\t\t\tspecification, to match with any future requests that have the same TLS configuration.

" } } }, "traits": { - "smithy.api#documentation": "

Specifies a web request component to be used in a rule match statement or in a logging configuration.

\n " + "smithy.api#documentation": "

Specifies a web request component to be used in a rule match statement or in a logging configuration.

\n " } }, "com.amazonaws.wafv2#FieldToMatchData": { @@ -6034,6 +6046,18 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the web ACL for which you want to get the LoggingConfiguration.

", "smithy.api#required": {} } + }, + "LogType": { + "target": "com.amazonaws.wafv2#LogType", + "traits": { + "smithy.api#documentation": "

Used to distinguish between various logging options. Currently, there is one option.

\n

Default: WAF_LOGS\n

" + } + }, + "LogScope": { + "target": "com.amazonaws.wafv2#LogScope", + "traits": { + "smithy.api#documentation": "

The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

\n

The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see \n Collecting data from Amazon Web Services services\n in the Amazon Security Lake user guide.

\n

Default: CUSTOMER\n

" + } } }, "traits": { @@ -7106,7 +7130,7 @@ } }, "traits": { - "smithy.api#documentation": "

Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each\n\t\t\t\t\t\trequest that has enough TLS Client Hello information for the calculation. Almost \n all web requests include this information.

\n \n

You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to \n EXACTLY.

\n
\n

You can obtain the JA3 fingerprint for client requests from the web ACL logs. \n\t\t\t\t\t\tIf WAF is able to calculate the fingerprint, it includes it in the logs. \n\t\t\t\t\t\tFor information about the logging fields, \nsee Log fields in the WAF Developer Guide.

\n

Provide the JA3 fingerprint string from the logs in your string match statement\n\t\t\t\t\t\t\tspecification, to match with any future requests that have the same TLS configuration.

" + "smithy.api#documentation": "

Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each\n\t\t\t\t\t\trequest that has enough TLS Client Hello information for the calculation. Almost \n all web requests include this information.

\n \n

You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to \n EXACTLY.

\n
\n

You can obtain the JA3 fingerprint for client requests from the web ACL logs. \n\t\t\t\t\t\tIf WAF is able to calculate the fingerprint, it includes it in the logs. \n\t\t\t\t\t\tFor information about the logging fields, \nsee Log fields in the WAF Developer Guide.

\n

Provide the JA3 fingerprint string from the logs in your string match statement\n\t\t\t\t\t\t\tspecification, to match with any future requests that have the same TLS configuration.

" } }, "com.amazonaws.wafv2#JsonBody": { @@ -7688,6 +7712,12 @@ "traits": { "smithy.api#documentation": "

The maximum number of objects that you want WAF to return for this request. If more \n objects are available, in the response, WAF provides a \n NextMarker value that you can use in a subsequent call to get the next batch of objects.

" } + }, + "LogScope": { + "target": "com.amazonaws.wafv2#LogScope", + "traits": { + "smithy.api#documentation": "

The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

\n

The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see \n Collecting data from Amazon Web Services services\n in the Amazon Security Lake user guide.

\n

Default: CUSTOMER\n

" + } } }, "traits": { @@ -8251,6 +8281,34 @@ } } }, + "com.amazonaws.wafv2#LogScope": { + "type": "enum", + "members": { + "CUSTOMER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CUSTOMER" + } + }, + "SECURITY_LAKE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SECURITY_LAKE" + } + } + } + }, + "com.amazonaws.wafv2#LogType": { + "type": "enum", + "members": { + "WAF_LOGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WAF_LOGS" + } + } + } + }, "com.amazonaws.wafv2#LoggingConfiguration": { "type": "structure", "members": { @@ -8271,7 +8329,7 @@ "RedactedFields": { "target": "com.amazonaws.wafv2#RedactedFields", "traits": { - "smithy.api#documentation": "

The parts of the request that you want to keep out of the logs.

\n

For example, if you\n redact the SingleHeader field, the HEADER field in the logs will\n be REDACTED for all rules that use the SingleHeader\n FieldToMatch setting.

\n

Redaction applies only to the component that's specified in the rule's FieldToMatch setting, so the SingleHeader redaction \n doesn't apply to rules that use the Headers\n FieldToMatch.

\n \n

You can specify only the following fields for redaction: UriPath,\n QueryString, SingleHeader, and Method.

\n
" + "smithy.api#documentation": "

The parts of the request that you want to keep out of the logs.

\n

For example, if you\n redact the SingleHeader field, the HEADER field in the logs will\n be REDACTED for all rules that use the SingleHeader\n FieldToMatch setting.

\n

Redaction applies only to the component that's specified in the rule's FieldToMatch setting, so the SingleHeader redaction \n doesn't apply to rules that use the Headers\n FieldToMatch.

\n \n

You can specify only the following fields for redaction: UriPath,\n QueryString, SingleHeader, and Method.

\n
\n \n

This setting has no impact on request sampling. With request sampling, \n the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.

\n
" } }, "ManagedByFirewallManager": { @@ -8286,6 +8344,18 @@ "traits": { "smithy.api#documentation": "

Filtering that specifies which web requests are kept in the logs and which are dropped.\n You can filter on the rule action and on the web request labels that were applied by\n matching rules during web ACL evaluation.

" } + }, + "LogType": { + "target": "com.amazonaws.wafv2#LogType", + "traits": { + "smithy.api#documentation": "

Used to distinguish between various logging options. Currently, there is one option.

\n

Default: WAF_LOGS\n

" + } + }, + "LogScope": { + "target": "com.amazonaws.wafv2#LogScope", + "traits": { + "smithy.api#documentation": "

The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

\n

The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see \n Collecting data from Amazon Web Services services\n in the Amazon Security Lake user guide.

\n

Default: CUSTOMER\n

" + } } }, "traits": { @@ -12533,7 +12603,7 @@ "target": "com.amazonaws.wafv2#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Indicates whether WAF should store a sampling of the web requests that\n match the rules. You can view the sampled requests through the WAF console.

", + "smithy.api#documentation": "

Indicates whether WAF should store a sampling of the web requests that\n match the rules. You can view the sampled requests through the WAF console.

\n \n

Request sampling doesn't provide a field redaction option, and any field redaction that you specify in your logging configuration doesn't affect sampling. \n The only way to exclude fields from request sampling is by disabling sampling in the web ACL visibility configuration.

\n
", "smithy.api#required": {} } }, diff --git a/sdk/chatbot/src/client.rs b/sdk/chatbot/src/client.rs index dcc798cff82d..438cf238d527 100644 --- a/sdk/chatbot/src/client.rs +++ b/sdk/chatbot/src/client.rs @@ -201,6 +201,12 @@ mod list_microsoft_teams_configured_teams; mod list_microsoft_teams_user_identities; +mod list_tags_for_resource; + +mod tag_resource; + +mod untag_resource; + mod update_account_preferences; mod update_chime_webhook_configuration; diff --git a/sdk/chatbot/src/client/create_chime_webhook_configuration.rs b/sdk/chatbot/src/client/create_chime_webhook_configuration.rs index b0198e9caf71..072ea9c91c14 100644 --- a/sdk/chatbot/src/client/create_chime_webhook_configuration.rs +++ b/sdk/chatbot/src/client/create_chime_webhook_configuration.rs @@ -9,6 +9,7 @@ impl super::Client { /// - [`iam_role_arn(impl Into)`](crate::operation::create_chime_webhook_configuration::builders::CreateChimeWebhookConfigurationFluentBuilder::iam_role_arn) / [`set_iam_role_arn(Option)`](crate::operation::create_chime_webhook_configuration::builders::CreateChimeWebhookConfigurationFluentBuilder::set_iam_role_arn):
required: **true**
This is a user-defined role that AWS Chatbot will assume. This is not the service-linked role. For more information, see IAM Policies for AWS Chatbot.
/// - [`configuration_name(impl Into)`](crate::operation::create_chime_webhook_configuration::builders::CreateChimeWebhookConfigurationFluentBuilder::configuration_name) / [`set_configuration_name(Option)`](crate::operation::create_chime_webhook_configuration::builders::CreateChimeWebhookConfigurationFluentBuilder::set_configuration_name):
required: **true**
The name of the configuration.
/// - [`logging_level(impl Into)`](crate::operation::create_chime_webhook_configuration::builders::CreateChimeWebhookConfigurationFluentBuilder::logging_level) / [`set_logging_level(Option)`](crate::operation::create_chime_webhook_configuration::builders::CreateChimeWebhookConfigurationFluentBuilder::set_logging_level):
required: **false**
Logging levels include ERROR, INFO, or NONE.
+ /// - [`tags(Tag)`](crate::operation::create_chime_webhook_configuration::builders::CreateChimeWebhookConfigurationFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_chime_webhook_configuration::builders::CreateChimeWebhookConfigurationFluentBuilder::set_tags):
required: **false**
A list of tags to apply to the configuration.
/// - On success, responds with [`CreateChimeWebhookConfigurationOutput`](crate::operation::create_chime_webhook_configuration::CreateChimeWebhookConfigurationOutput) with field(s): /// - [`webhook_configuration(Option)`](crate::operation::create_chime_webhook_configuration::CreateChimeWebhookConfigurationOutput::webhook_configuration): Chime webhook configuration. /// - On failure, responds with [`SdkError`](crate::operation::create_chime_webhook_configuration::CreateChimeWebhookConfigurationError) diff --git a/sdk/chatbot/src/client/create_microsoft_teams_channel_configuration.rs b/sdk/chatbot/src/client/create_microsoft_teams_channel_configuration.rs index c254bd820535..ae27cc711589 100644 --- a/sdk/chatbot/src/client/create_microsoft_teams_channel_configuration.rs +++ b/sdk/chatbot/src/client/create_microsoft_teams_channel_configuration.rs @@ -14,6 +14,7 @@ impl super::Client { /// - [`logging_level(impl Into)`](crate::operation::create_microsoft_teams_channel_configuration::builders::CreateMicrosoftTeamsChannelConfigurationFluentBuilder::logging_level) / [`set_logging_level(Option)`](crate::operation::create_microsoft_teams_channel_configuration::builders::CreateMicrosoftTeamsChannelConfigurationFluentBuilder::set_logging_level):
required: **false**
Logging levels include ERROR, INFO, or NONE.
/// - [`guardrail_policy_arns(impl Into)`](crate::operation::create_microsoft_teams_channel_configuration::builders::CreateMicrosoftTeamsChannelConfigurationFluentBuilder::guardrail_policy_arns) / [`set_guardrail_policy_arns(Option>)`](crate::operation::create_microsoft_teams_channel_configuration::builders::CreateMicrosoftTeamsChannelConfigurationFluentBuilder::set_guardrail_policy_arns):
required: **false**
The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed 'AdministratorAccess' policy is applied by default if this is not set.
/// - [`user_authorization_required(bool)`](crate::operation::create_microsoft_teams_channel_configuration::builders::CreateMicrosoftTeamsChannelConfigurationFluentBuilder::user_authorization_required) / [`set_user_authorization_required(Option)`](crate::operation::create_microsoft_teams_channel_configuration::builders::CreateMicrosoftTeamsChannelConfigurationFluentBuilder::set_user_authorization_required):
required: **false**
Enables use of a user role requirement in your chat configuration.
+ /// - [`tags(Tag)`](crate::operation::create_microsoft_teams_channel_configuration::builders::CreateMicrosoftTeamsChannelConfigurationFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_microsoft_teams_channel_configuration::builders::CreateMicrosoftTeamsChannelConfigurationFluentBuilder::set_tags):
required: **false**
A list of tags to apply to the configuration.
/// - On success, responds with [`CreateMicrosoftTeamsChannelConfigurationOutput`](crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationOutput) with field(s): /// - [`channel_configuration(Option)`](crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationOutput::channel_configuration): The configuration for a Microsoft Teams channel configured with AWS Chatbot. /// - On failure, responds with [`SdkError`](crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationError) diff --git a/sdk/chatbot/src/client/create_slack_channel_configuration.rs b/sdk/chatbot/src/client/create_slack_channel_configuration.rs index 56d43f600932..30de76410e1f 100644 --- a/sdk/chatbot/src/client/create_slack_channel_configuration.rs +++ b/sdk/chatbot/src/client/create_slack_channel_configuration.rs @@ -12,6 +12,7 @@ impl super::Client { /// - [`logging_level(impl Into)`](crate::operation::create_slack_channel_configuration::builders::CreateSlackChannelConfigurationFluentBuilder::logging_level) / [`set_logging_level(Option)`](crate::operation::create_slack_channel_configuration::builders::CreateSlackChannelConfigurationFluentBuilder::set_logging_level):
required: **false**
Logging levels include ERROR, INFO, or NONE.
/// - [`guardrail_policy_arns(impl Into)`](crate::operation::create_slack_channel_configuration::builders::CreateSlackChannelConfigurationFluentBuilder::guardrail_policy_arns) / [`set_guardrail_policy_arns(Option>)`](crate::operation::create_slack_channel_configuration::builders::CreateSlackChannelConfigurationFluentBuilder::set_guardrail_policy_arns):
required: **false**
The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed 'AdministratorAccess' policy is applied by default if this is not set.
/// - [`user_authorization_required(bool)`](crate::operation::create_slack_channel_configuration::builders::CreateSlackChannelConfigurationFluentBuilder::user_authorization_required) / [`set_user_authorization_required(Option)`](crate::operation::create_slack_channel_configuration::builders::CreateSlackChannelConfigurationFluentBuilder::set_user_authorization_required):
required: **false**
Enables use of a user role requirement in your chat configuration.
+ /// - [`tags(Tag)`](crate::operation::create_slack_channel_configuration::builders::CreateSlackChannelConfigurationFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_slack_channel_configuration::builders::CreateSlackChannelConfigurationFluentBuilder::set_tags):
required: **false**
A list of tags to apply to the configuration.
/// - On success, responds with [`CreateSlackChannelConfigurationOutput`](crate::operation::create_slack_channel_configuration::CreateSlackChannelConfigurationOutput) with field(s): /// - [`channel_configuration(Option)`](crate::operation::create_slack_channel_configuration::CreateSlackChannelConfigurationOutput::channel_configuration): The configuration for a Slack channel configured with AWS Chatbot. /// - On failure, responds with [`SdkError`](crate::operation::create_slack_channel_configuration::CreateSlackChannelConfigurationError) diff --git a/sdk/chatbot/src/client/list_tags_for_resource.rs b/sdk/chatbot/src/client/list_tags_for_resource.rs new file mode 100644 index 000000000000..2f97bceffa37 --- /dev/null +++ b/sdk/chatbot/src/client/list_tags_for_resource.rs @@ -0,0 +1,13 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`ListTagsForResource`](crate::operation::list_tags_for_resource::builders::ListTagsForResourceFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`resource_arn(impl Into)`](crate::operation::list_tags_for_resource::builders::ListTagsForResourceFluentBuilder::resource_arn) / [`set_resource_arn(Option)`](crate::operation::list_tags_for_resource::builders::ListTagsForResourceFluentBuilder::set_resource_arn):
required: **true**
The ARN of the configuration.
+ /// - On success, responds with [`ListTagsForResourceOutput`](crate::operation::list_tags_for_resource::ListTagsForResourceOutput) with field(s): + /// - [`tags(Option>)`](crate::operation::list_tags_for_resource::ListTagsForResourceOutput::tags): A list of tags applied to the configuration. + /// - On failure, responds with [`SdkError`](crate::operation::list_tags_for_resource::ListTagsForResourceError) + pub fn list_tags_for_resource(&self) -> crate::operation::list_tags_for_resource::builders::ListTagsForResourceFluentBuilder { + crate::operation::list_tags_for_resource::builders::ListTagsForResourceFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/chatbot/src/client/tag_resource.rs b/sdk/chatbot/src/client/tag_resource.rs new file mode 100644 index 000000000000..6823d12acded --- /dev/null +++ b/sdk/chatbot/src/client/tag_resource.rs @@ -0,0 +1,13 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`TagResource`](crate::operation::tag_resource::builders::TagResourceFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`resource_arn(impl Into)`](crate::operation::tag_resource::builders::TagResourceFluentBuilder::resource_arn) / [`set_resource_arn(Option)`](crate::operation::tag_resource::builders::TagResourceFluentBuilder::set_resource_arn):
required: **true**
The ARN of the configuration.
+ /// - [`tags(Tag)`](crate::operation::tag_resource::builders::TagResourceFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::tag_resource::builders::TagResourceFluentBuilder::set_tags):
required: **true**
A list of tags to apply to the configuration.
+ /// - On success, responds with [`TagResourceOutput`](crate::operation::tag_resource::TagResourceOutput) + /// - On failure, responds with [`SdkError`](crate::operation::tag_resource::TagResourceError) + pub fn tag_resource(&self) -> crate::operation::tag_resource::builders::TagResourceFluentBuilder { + crate::operation::tag_resource::builders::TagResourceFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/chatbot/src/client/untag_resource.rs b/sdk/chatbot/src/client/untag_resource.rs new file mode 100644 index 000000000000..fb461a45088c --- /dev/null +++ b/sdk/chatbot/src/client/untag_resource.rs @@ -0,0 +1,13 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`UntagResource`](crate::operation::untag_resource::builders::UntagResourceFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`resource_arn(impl Into)`](crate::operation::untag_resource::builders::UntagResourceFluentBuilder::resource_arn) / [`set_resource_arn(Option)`](crate::operation::untag_resource::builders::UntagResourceFluentBuilder::set_resource_arn):
required: **true**
The ARN of the configuration.
+ /// - [`tag_keys(impl Into)`](crate::operation::untag_resource::builders::UntagResourceFluentBuilder::tag_keys) / [`set_tag_keys(Option>)`](crate::operation::untag_resource::builders::UntagResourceFluentBuilder::set_tag_keys):
required: **true**
A list of tag keys to remove from the configuration.
+ /// - On success, responds with [`UntagResourceOutput`](crate::operation::untag_resource::UntagResourceOutput) + /// - On failure, responds with [`SdkError`](crate::operation::untag_resource::UntagResourceError) + pub fn untag_resource(&self) -> crate::operation::untag_resource::builders::UntagResourceFluentBuilder { + crate::operation::untag_resource::builders::UntagResourceFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/chatbot/src/error_meta.rs b/sdk/chatbot/src/error_meta.rs index c5eac9be1240..1a899f52d24f 100644 --- a/sdk/chatbot/src/error_meta.rs +++ b/sdk/chatbot/src/error_meta.rs @@ -37,6 +37,8 @@ pub enum Error { GetAccountPreferencesException(crate::types::error::GetAccountPreferencesException), /// We can’t process your request right now because of a server issue. Try again later. GetTeamsChannelConfigurationException(crate::types::error::GetTeamsChannelConfigurationException), + /// Customer/consumer-facing internal service exception. https://w.amazon.com/index.php/AWS/API_Standards/Exceptions#InternalServiceError + InternalServiceError(crate::types::error::InternalServiceError), /// Your request input doesn't meet the constraints that AWS Chatbot requires. InvalidParameterException(crate::types::error::InvalidParameterException), /// Your request input doesn't meet the constraints that AWS Chatbot requires. @@ -52,6 +54,10 @@ pub enum Error { /// We were not able to find the resource for your request. ResourceNotFoundException(crate::types::error::ResourceNotFoundException), /// We can’t process your request right now because of a server issue. Try again later. + ServiceUnavailableException(crate::types::error::ServiceUnavailableException), + /// The supplied list of tags contains too many tags. + TooManyTagsException(crate::types::error::TooManyTagsException), + /// We can’t process your request right now because of a server issue. Try again later. UpdateAccountPreferencesException(crate::types::error::UpdateAccountPreferencesException), /// We can’t process your request right now because of a server issue. Try again later. UpdateChimeWebhookConfigurationException(crate::types::error::UpdateChimeWebhookConfigurationException), @@ -88,6 +94,7 @@ impl ::std::fmt::Display for Error { Error::DescribeSlackWorkspacesException(inner) => inner.fmt(f), Error::GetAccountPreferencesException(inner) => inner.fmt(f), Error::GetTeamsChannelConfigurationException(inner) => inner.fmt(f), + Error::InternalServiceError(inner) => inner.fmt(f), Error::InvalidParameterException(inner) => inner.fmt(f), Error::InvalidRequestException(inner) => inner.fmt(f), Error::LimitExceededException(inner) => inner.fmt(f), @@ -95,6 +102,8 @@ impl ::std::fmt::Display for Error { Error::ListMicrosoftTeamsUserIdentitiesException(inner) => inner.fmt(f), Error::ListTeamsChannelConfigurationsException(inner) => inner.fmt(f), Error::ResourceNotFoundException(inner) => inner.fmt(f), + Error::ServiceUnavailableException(inner) => inner.fmt(f), + Error::TooManyTagsException(inner) => inner.fmt(f), Error::UpdateAccountPreferencesException(inner) => inner.fmt(f), Error::UpdateChimeWebhookConfigurationException(inner) => inner.fmt(f), Error::UpdateSlackChannelConfigurationException(inner) => inner.fmt(f), @@ -137,6 +146,7 @@ impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error { Self::DescribeSlackWorkspacesException(inner) => inner.meta(), Self::GetAccountPreferencesException(inner) => inner.meta(), Self::GetTeamsChannelConfigurationException(inner) => inner.meta(), + Self::InternalServiceError(inner) => inner.meta(), Self::InvalidParameterException(inner) => inner.meta(), Self::InvalidRequestException(inner) => inner.meta(), Self::LimitExceededException(inner) => inner.meta(), @@ -144,6 +154,8 @@ impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error { Self::ListMicrosoftTeamsUserIdentitiesException(inner) => inner.meta(), Self::ListTeamsChannelConfigurationsException(inner) => inner.meta(), Self::ResourceNotFoundException(inner) => inner.meta(), + Self::ServiceUnavailableException(inner) => inner.meta(), + Self::TooManyTagsException(inner) => inner.meta(), Self::UpdateAccountPreferencesException(inner) => inner.meta(), Self::UpdateChimeWebhookConfigurationException(inner) => inner.meta(), Self::UpdateSlackChannelConfigurationException(inner) => inner.meta(), @@ -858,6 +870,83 @@ impl From From<::aws_smithy_runtime_api::client::result::SdkError> for Error +where + R: Send + Sync + std::fmt::Debug + 'static, +{ + fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { + match err { + ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), + _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { + meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), + source: err.into(), + }), + } + } +} +impl From for Error { + fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self { + match err { + crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServiceError(inner) => Error::InternalServiceError(inner), + crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => { + Error::ResourceNotFoundException(inner) + } + crate::operation::list_tags_for_resource::ListTagsForResourceError::ServiceUnavailableException(inner) => { + Error::ServiceUnavailableException(inner) + } + crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner), + } + } +} +impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error +where + R: Send + Sync + std::fmt::Debug + 'static, +{ + fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { + match err { + ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), + _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { + meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), + source: err.into(), + }), + } + } +} +impl From for Error { + fn from(err: crate::operation::tag_resource::TagResourceError) -> Self { + match err { + crate::operation::tag_resource::TagResourceError::InternalServiceError(inner) => Error::InternalServiceError(inner), + crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), + crate::operation::tag_resource::TagResourceError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner), + crate::operation::tag_resource::TagResourceError::TooManyTagsException(inner) => Error::TooManyTagsException(inner), + crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner), + } + } +} +impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error +where + R: Send + Sync + std::fmt::Debug + 'static, +{ + fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { + match err { + ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), + _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { + meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), + source: err.into(), + }), + } + } +} +impl From for Error { + fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self { + match err { + crate::operation::untag_resource::UntagResourceError::InternalServiceError(inner) => Error::InternalServiceError(inner), + crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), + crate::operation::untag_resource::UntagResourceError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner), + crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner), + } + } +} impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error where @@ -1035,6 +1124,7 @@ impl ::std::error::Error for Error { Error::DescribeSlackWorkspacesException(inner) => inner.source(), Error::GetAccountPreferencesException(inner) => inner.source(), Error::GetTeamsChannelConfigurationException(inner) => inner.source(), + Error::InternalServiceError(inner) => inner.source(), Error::InvalidParameterException(inner) => inner.source(), Error::InvalidRequestException(inner) => inner.source(), Error::LimitExceededException(inner) => inner.source(), @@ -1042,6 +1132,8 @@ impl ::std::error::Error for Error { Error::ListMicrosoftTeamsUserIdentitiesException(inner) => inner.source(), Error::ListTeamsChannelConfigurationsException(inner) => inner.source(), Error::ResourceNotFoundException(inner) => inner.source(), + Error::ServiceUnavailableException(inner) => inner.source(), + Error::TooManyTagsException(inner) => inner.source(), Error::UpdateAccountPreferencesException(inner) => inner.source(), Error::UpdateChimeWebhookConfigurationException(inner) => inner.source(), Error::UpdateSlackChannelConfigurationException(inner) => inner.source(), @@ -1070,6 +1162,7 @@ impl ::aws_types::request_id::RequestId for Error { Self::DescribeSlackWorkspacesException(e) => e.request_id(), Self::GetAccountPreferencesException(e) => e.request_id(), Self::GetTeamsChannelConfigurationException(e) => e.request_id(), + Self::InternalServiceError(e) => e.request_id(), Self::InvalidParameterException(e) => e.request_id(), Self::InvalidRequestException(e) => e.request_id(), Self::LimitExceededException(e) => e.request_id(), @@ -1077,6 +1170,8 @@ impl ::aws_types::request_id::RequestId for Error { Self::ListMicrosoftTeamsUserIdentitiesException(e) => e.request_id(), Self::ListTeamsChannelConfigurationsException(e) => e.request_id(), Self::ResourceNotFoundException(e) => e.request_id(), + Self::ServiceUnavailableException(e) => e.request_id(), + Self::TooManyTagsException(e) => e.request_id(), Self::UpdateAccountPreferencesException(e) => e.request_id(), Self::UpdateChimeWebhookConfigurationException(e) => e.request_id(), Self::UpdateSlackChannelConfigurationException(e) => e.request_id(), diff --git a/sdk/chatbot/src/operation.rs b/sdk/chatbot/src/operation.rs index e7d44857af0a..e7cfdd71ecce 100644 --- a/sdk/chatbot/src/operation.rs +++ b/sdk/chatbot/src/operation.rs @@ -58,6 +58,15 @@ pub mod list_microsoft_teams_configured_teams; /// Types for the `ListMicrosoftTeamsUserIdentities` operation. pub mod list_microsoft_teams_user_identities; +/// Types for the `ListTagsForResource` operation. +pub mod list_tags_for_resource; + +/// Types for the `TagResource` operation. +pub mod tag_resource; + +/// Types for the `UntagResource` operation. +pub mod untag_resource; + /// Types for the `UpdateAccountPreferences` operation. pub mod update_account_preferences; diff --git a/sdk/chatbot/src/operation/create_chime_webhook_configuration/_create_chime_webhook_configuration_input.rs b/sdk/chatbot/src/operation/create_chime_webhook_configuration/_create_chime_webhook_configuration_input.rs index 72437e2cd97a..eb109e37e360 100644 --- a/sdk/chatbot/src/operation/create_chime_webhook_configuration/_create_chime_webhook_configuration_input.rs +++ b/sdk/chatbot/src/operation/create_chime_webhook_configuration/_create_chime_webhook_configuration_input.rs @@ -15,6 +15,8 @@ pub struct CreateChimeWebhookConfigurationInput { pub configuration_name: ::std::option::Option<::std::string::String>, /// Logging levels include ERROR, INFO, or NONE. pub logging_level: ::std::option::Option<::std::string::String>, + /// A list of tags to apply to the configuration. + pub tags: ::std::option::Option<::std::vec::Vec>, } impl CreateChimeWebhookConfigurationInput { /// Description of the webhook. Recommend using the convention `RoomName/WebhookName`. See Chime setup tutorial for more details: https://docs.aws.amazon.com/chatbot/latest/adminguide/chime-setup.html. @@ -43,6 +45,12 @@ impl CreateChimeWebhookConfigurationInput { pub fn logging_level(&self) -> ::std::option::Option<&str> { self.logging_level.as_deref() } + /// A list of tags to apply to the configuration. + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`. + pub fn tags(&self) -> &[crate::types::Tag] { + self.tags.as_deref().unwrap_or_default() + } } impl CreateChimeWebhookConfigurationInput { /// Creates a new builder-style object to manufacture [`CreateChimeWebhookConfigurationInput`](crate::operation::create_chime_webhook_configuration::CreateChimeWebhookConfigurationInput). @@ -61,6 +69,7 @@ pub struct CreateChimeWebhookConfigurationInputBuilder { pub(crate) iam_role_arn: ::std::option::Option<::std::string::String>, pub(crate) configuration_name: ::std::option::Option<::std::string::String>, pub(crate) logging_level: ::std::option::Option<::std::string::String>, + pub(crate) tags: ::std::option::Option<::std::vec::Vec>, } impl CreateChimeWebhookConfigurationInputBuilder { /// Description of the webhook. Recommend using the convention `RoomName/WebhookName`. See Chime setup tutorial for more details: https://docs.aws.amazon.com/chatbot/latest/adminguide/chime-setup.html. @@ -157,6 +166,26 @@ impl CreateChimeWebhookConfigurationInputBuilder { pub fn get_logging_level(&self) -> &::std::option::Option<::std::string::String> { &self.logging_level } + /// Appends an item to `tags`. + /// + /// To override the contents of this collection use [`set_tags`](Self::set_tags). + /// + /// A list of tags to apply to the configuration. + pub fn tags(mut self, input: crate::types::Tag) -> Self { + let mut v = self.tags.unwrap_or_default(); + v.push(input); + self.tags = ::std::option::Option::Some(v); + self + } + /// A list of tags to apply to the configuration. + pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.tags = input; + self + } + /// A list of tags to apply to the configuration. + pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.tags + } /// Consumes the builder and constructs a [`CreateChimeWebhookConfigurationInput`](crate::operation::create_chime_webhook_configuration::CreateChimeWebhookConfigurationInput). pub fn build( self, @@ -172,6 +201,7 @@ impl CreateChimeWebhookConfigurationInputBuilder { iam_role_arn: self.iam_role_arn, configuration_name: self.configuration_name, logging_level: self.logging_level, + tags: self.tags, }, ) } diff --git a/sdk/chatbot/src/operation/create_chime_webhook_configuration/builders.rs b/sdk/chatbot/src/operation/create_chime_webhook_configuration/builders.rs index 20f348cd5513..7428814ee8ee 100644 --- a/sdk/chatbot/src/operation/create_chime_webhook_configuration/builders.rs +++ b/sdk/chatbot/src/operation/create_chime_webhook_configuration/builders.rs @@ -197,4 +197,23 @@ impl CreateChimeWebhookConfigurationFluentBuilder { pub fn get_logging_level(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_logging_level() } + /// + /// Appends an item to `Tags`. + /// + /// To override the contents of this collection use [`set_tags`](Self::set_tags). + /// + /// A list of tags to apply to the configuration. + pub fn tags(mut self, input: crate::types::Tag) -> Self { + self.inner = self.inner.tags(input); + self + } + /// A list of tags to apply to the configuration. + pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_tags(input); + self + } + /// A list of tags to apply to the configuration. + pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_tags() + } } diff --git a/sdk/chatbot/src/operation/create_microsoft_teams_channel_configuration/_create_microsoft_teams_channel_configuration_input.rs b/sdk/chatbot/src/operation/create_microsoft_teams_channel_configuration/_create_microsoft_teams_channel_configuration_input.rs index 03f7521f76aa..9bbf70ff85c9 100644 --- a/sdk/chatbot/src/operation/create_microsoft_teams_channel_configuration/_create_microsoft_teams_channel_configuration_input.rs +++ b/sdk/chatbot/src/operation/create_microsoft_teams_channel_configuration/_create_microsoft_teams_channel_configuration_input.rs @@ -25,6 +25,8 @@ pub struct CreateMicrosoftTeamsChannelConfigurationInput { pub guardrail_policy_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>, /// Enables use of a user role requirement in your chat configuration. pub user_authorization_required: ::std::option::Option, + /// A list of tags to apply to the configuration. + pub tags: ::std::option::Option<::std::vec::Vec>, } impl CreateMicrosoftTeamsChannelConfigurationInput { /// The ID of the Microsoft Teams channel. @@ -75,6 +77,12 @@ impl CreateMicrosoftTeamsChannelConfigurationInput { pub fn user_authorization_required(&self) -> ::std::option::Option { self.user_authorization_required } + /// A list of tags to apply to the configuration. + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`. + pub fn tags(&self) -> &[crate::types::Tag] { + self.tags.as_deref().unwrap_or_default() + } } impl CreateMicrosoftTeamsChannelConfigurationInput { /// Creates a new builder-style object to manufacture [`CreateMicrosoftTeamsChannelConfigurationInput`](crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationInput). @@ -99,6 +107,7 @@ pub struct CreateMicrosoftTeamsChannelConfigurationInputBuilder { pub(crate) logging_level: ::std::option::Option<::std::string::String>, pub(crate) guardrail_policy_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>, pub(crate) user_authorization_required: ::std::option::Option, + pub(crate) tags: ::std::option::Option<::std::vec::Vec>, } impl CreateMicrosoftTeamsChannelConfigurationInputBuilder { /// The ID of the Microsoft Teams channel. @@ -272,6 +281,26 @@ impl CreateMicrosoftTeamsChannelConfigurationInputBuilder { pub fn get_user_authorization_required(&self) -> &::std::option::Option { &self.user_authorization_required } + /// Appends an item to `tags`. + /// + /// To override the contents of this collection use [`set_tags`](Self::set_tags). + /// + /// A list of tags to apply to the configuration. + pub fn tags(mut self, input: crate::types::Tag) -> Self { + let mut v = self.tags.unwrap_or_default(); + v.push(input); + self.tags = ::std::option::Option::Some(v); + self + } + /// A list of tags to apply to the configuration. + pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.tags = input; + self + } + /// A list of tags to apply to the configuration. + pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.tags + } /// Consumes the builder and constructs a [`CreateMicrosoftTeamsChannelConfigurationInput`](crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationInput). pub fn build( self, @@ -292,6 +321,7 @@ impl CreateMicrosoftTeamsChannelConfigurationInputBuilder { logging_level: self.logging_level, guardrail_policy_arns: self.guardrail_policy_arns, user_authorization_required: self.user_authorization_required, + tags: self.tags, }, ) } diff --git a/sdk/chatbot/src/operation/create_microsoft_teams_channel_configuration/builders.rs b/sdk/chatbot/src/operation/create_microsoft_teams_channel_configuration/builders.rs index 7a9bd114ae6a..a01ba3137bdd 100644 --- a/sdk/chatbot/src/operation/create_microsoft_teams_channel_configuration/builders.rs +++ b/sdk/chatbot/src/operation/create_microsoft_teams_channel_configuration/builders.rs @@ -276,4 +276,23 @@ impl CreateMicrosoftTeamsChannelConfigurationFluentBuilder { pub fn get_user_authorization_required(&self) -> &::std::option::Option { self.inner.get_user_authorization_required() } + /// + /// Appends an item to `Tags`. + /// + /// To override the contents of this collection use [`set_tags`](Self::set_tags). + /// + /// A list of tags to apply to the configuration. + pub fn tags(mut self, input: crate::types::Tag) -> Self { + self.inner = self.inner.tags(input); + self + } + /// A list of tags to apply to the configuration. + pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_tags(input); + self + } + /// A list of tags to apply to the configuration. + pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_tags() + } } diff --git a/sdk/chatbot/src/operation/create_slack_channel_configuration/_create_slack_channel_configuration_input.rs b/sdk/chatbot/src/operation/create_slack_channel_configuration/_create_slack_channel_configuration_input.rs index 61747f11a72e..552deeafd2cf 100644 --- a/sdk/chatbot/src/operation/create_slack_channel_configuration/_create_slack_channel_configuration_input.rs +++ b/sdk/chatbot/src/operation/create_slack_channel_configuration/_create_slack_channel_configuration_input.rs @@ -21,6 +21,8 @@ pub struct CreateSlackChannelConfigurationInput { pub guardrail_policy_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>, /// Enables use of a user role requirement in your chat configuration. pub user_authorization_required: ::std::option::Option, + /// A list of tags to apply to the configuration. + pub tags: ::std::option::Option<::std::vec::Vec>, } impl CreateSlackChannelConfigurationInput { /// The ID of the Slack workspace authorized with AWS Chatbot. @@ -63,6 +65,12 @@ impl CreateSlackChannelConfigurationInput { pub fn user_authorization_required(&self) -> ::std::option::Option { self.user_authorization_required } + /// A list of tags to apply to the configuration. + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`. + pub fn tags(&self) -> &[crate::types::Tag] { + self.tags.as_deref().unwrap_or_default() + } } impl CreateSlackChannelConfigurationInput { /// Creates a new builder-style object to manufacture [`CreateSlackChannelConfigurationInput`](crate::operation::create_slack_channel_configuration::CreateSlackChannelConfigurationInput). @@ -84,6 +92,7 @@ pub struct CreateSlackChannelConfigurationInputBuilder { pub(crate) logging_level: ::std::option::Option<::std::string::String>, pub(crate) guardrail_policy_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>, pub(crate) user_authorization_required: ::std::option::Option, + pub(crate) tags: ::std::option::Option<::std::vec::Vec>, } impl CreateSlackChannelConfigurationInputBuilder { /// The ID of the Slack workspace authorized with AWS Chatbot. @@ -228,6 +237,26 @@ impl CreateSlackChannelConfigurationInputBuilder { pub fn get_user_authorization_required(&self) -> &::std::option::Option { &self.user_authorization_required } + /// Appends an item to `tags`. + /// + /// To override the contents of this collection use [`set_tags`](Self::set_tags). + /// + /// A list of tags to apply to the configuration. + pub fn tags(mut self, input: crate::types::Tag) -> Self { + let mut v = self.tags.unwrap_or_default(); + v.push(input); + self.tags = ::std::option::Option::Some(v); + self + } + /// A list of tags to apply to the configuration. + pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.tags = input; + self + } + /// A list of tags to apply to the configuration. + pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.tags + } /// Consumes the builder and constructs a [`CreateSlackChannelConfigurationInput`](crate::operation::create_slack_channel_configuration::CreateSlackChannelConfigurationInput). pub fn build( self, @@ -246,6 +275,7 @@ impl CreateSlackChannelConfigurationInputBuilder { logging_level: self.logging_level, guardrail_policy_arns: self.guardrail_policy_arns, user_authorization_required: self.user_authorization_required, + tags: self.tags, }, ) } diff --git a/sdk/chatbot/src/operation/create_slack_channel_configuration/builders.rs b/sdk/chatbot/src/operation/create_slack_channel_configuration/builders.rs index 92b2b8b9be70..fb840f29ae14 100644 --- a/sdk/chatbot/src/operation/create_slack_channel_configuration/builders.rs +++ b/sdk/chatbot/src/operation/create_slack_channel_configuration/builders.rs @@ -244,4 +244,23 @@ impl CreateSlackChannelConfigurationFluentBuilder { pub fn get_user_authorization_required(&self) -> &::std::option::Option { self.inner.get_user_authorization_required() } + /// + /// Appends an item to `Tags`. + /// + /// To override the contents of this collection use [`set_tags`](Self::set_tags). + /// + /// A list of tags to apply to the configuration. + pub fn tags(mut self, input: crate::types::Tag) -> Self { + self.inner = self.inner.tags(input); + self + } + /// A list of tags to apply to the configuration. + pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_tags(input); + self + } + /// A list of tags to apply to the configuration. + pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_tags() + } } diff --git a/sdk/chatbot/src/operation/list_tags_for_resource.rs b/sdk/chatbot/src/operation/list_tags_for_resource.rs new file mode 100644 index 000000000000..f274a104df13 --- /dev/null +++ b/sdk/chatbot/src/operation/list_tags_for_resource.rs @@ -0,0 +1,372 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `ListTagsForResource`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ListTagsForResource; +impl ListTagsForResource { + /// Creates a new `ListTagsForResource` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::list_tags_for_resource::ListTagsForResourceInput, + ) -> ::std::result::Result< + crate::operation::list_tags_for_resource::ListTagsForResourceOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::list_tags_for_resource::ListTagsForResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >| { + err.map_service_error(|err| { + err.downcast::() + .expect("correct error type") + }) + }; + let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) + .await + .map_err(map_err)?; + let output = context.finalize().map_err(map_err)?; + ::std::result::Result::Ok( + output + .downcast::() + .expect("correct output type"), + ) + } + + pub(crate) async fn orchestrate_with_stop_point( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::list_tags_for_resource::ListTagsForResourceInput, + stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, + ) -> ::std::result::Result< + ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, + ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); + ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("chatbot", "ListTagsForResource", input, runtime_plugins, stop_point).await + } + + pub(crate) fn operation_runtime_plugins( + client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + client_config: &crate::config::Config, + config_override: ::std::option::Option, + ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { + let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); + runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ + ::aws_runtime::auth::sigv4::SCHEME_ID, + ])); + if let ::std::option::Option::Some(config_override) = config_override { + for plugin in config_override.runtime_plugins.iter().cloned() { + runtime_plugins = runtime_plugins.with_operation_plugin(plugin); + } + runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( + config_override, + client_config.config.clone(), + &client_config.runtime_components, + )); + } + runtime_plugins + } +} +impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ListTagsForResource { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ListTagsForResource"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + ListTagsForResourceRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + ListTagsForResourceResponseDeserializer, + )); + + cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( + ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), + )); + + cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( + "ListTagsForResource", + "chatbot", + )); + let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); + signing_options.double_uri_encode = true; + signing_options.content_sha256_header = false; + signing_options.normalize_uri_path = true; + signing_options.payload_override = None; + + cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { + signing_options, + ..::std::default::Default::default() + }); + + ::std::option::Option::Some(cfg.freeze()) + } + + fn runtime_components( + &self, + _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, + ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { + #[allow(unused_mut)] + let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ListTagsForResource") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(ListTagsForResourceEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::list_tags_for_resource::ListTagsForResourceError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::list_tags_for_resource::ListTagsForResourceError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::list_tags_for_resource::ListTagsForResourceError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct ListTagsForResourceResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListTagsForResourceResponseDeserializer { + fn deserialize_nonstreaming( + &self, + response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { + let (success, status) = (response.status().is_success(), response.status().as_u16()); + let headers = response.headers(); + let body = response.body().bytes().expect("body loaded"); + #[allow(unused_mut)] + let mut force_error = false; + ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); + let parse_result = if !success && status != 200 || force_error { + crate::protocol_serde::shape_list_tags_for_resource::de_list_tags_for_resource_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_list_tags_for_resource::de_list_tags_for_resource_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct ListTagsForResourceRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListTagsForResourceRequestSerializer { + #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] + fn serialize_input( + &self, + input: ::aws_smithy_runtime_api::client::interceptors::context::Input, + _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { + let input = input + .downcast::() + .expect("correct type"); + let _header_serialization_settings = _cfg + .load::() + .cloned() + .unwrap_or_default(); + let mut request_builder = { + fn uri_base( + _input: &crate::operation::list_tags_for_resource::ListTagsForResourceInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/list-tags-for-resource").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::list_tags_for_resource::ListTagsForResourceInput, + builder: ::http::request::Builder, + ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { + let mut uri = ::std::string::String::new(); + uri_base(input, &mut uri)?; + ::std::result::Result::Ok(builder.method("POST").uri(uri)) + } + let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; + builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_tags_for_resource::ser_list_tags_for_resource_input( + &input, + )?); + if let Some(content_length) = body.content_length() { + let content_length = content_length.to_string(); + request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); + } + ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) + } +} +#[derive(Debug)] +struct ListTagsForResourceEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListTagsForResourceEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "ListTagsForResourceEndpointParamsInterceptor" + } + + fn read_before_execution( + &self, + context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< + '_, + ::aws_smithy_runtime_api::client::interceptors::context::Input, + ::aws_smithy_runtime_api::client::interceptors::context::Output, + ::aws_smithy_runtime_api::client::interceptors::context::Error, + >, + cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { + let _input = context + .input() + .downcast_ref::() + .ok_or("failed to downcast to ListTagsForResourceInput")?; + + let params = crate::config::endpoint::Params::builder() + .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) + .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) + .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) + .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) + .build() + .map_err(|err| { + ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) + })?; + cfg.interceptor_state() + .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); + ::std::result::Result::Ok(()) + } +} + +/// Error type for the `ListTagsForResourceError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum ListTagsForResourceError { + /// Customer/consumer-facing internal service exception. https://w.amazon.com/index.php/AWS/API_Standards/Exceptions#InternalServiceError + InternalServiceError(crate::types::error::InternalServiceError), + /// We were not able to find the resource for your request. + ResourceNotFoundException(crate::types::error::ResourceNotFoundException), + /// We can’t process your request right now because of a server issue. Try again later. + ServiceUnavailableException(crate::types::error::ServiceUnavailableException), + /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). + #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ + variable wildcard pattern and check `.code()`: + \ +    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` + \ + See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ListTagsForResourceError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl ListTagsForResourceError { + /// Creates the `ListTagsForResourceError::Unhandled` variant from any error type. + pub fn unhandled( + err: impl ::std::convert::Into<::std::boxed::Box>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.into(), + meta: ::std::default::Default::default(), + }) + } + + /// Creates the `ListTagsForResourceError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). + pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.clone().into(), + meta: err, + }) + } + /// + /// Returns error metadata, which includes the error code, message, + /// request ID, and potentially additional information. + /// + pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::InternalServiceError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `ListTagsForResourceError::InternalServiceError`. + pub fn is_internal_service_error(&self) -> bool { + matches!(self, Self::InternalServiceError(_)) + } + /// Returns `true` if the error kind is `ListTagsForResourceError::ResourceNotFoundException`. + pub fn is_resource_not_found_exception(&self) -> bool { + matches!(self, Self::ResourceNotFoundException(_)) + } + /// Returns `true` if the error kind is `ListTagsForResourceError::ServiceUnavailableException`. + pub fn is_service_unavailable_exception(&self) -> bool { + matches!(self, Self::ServiceUnavailableException(_)) + } +} +impl ::std::error::Error for ListTagsForResourceError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::InternalServiceError(_inner) => ::std::option::Option::Some(_inner), + Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), + Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for ListTagsForResourceError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::InternalServiceError(_inner) => _inner.fmt(f), + Self::ResourceNotFoundException(_inner) => _inner.fmt(f), + Self::ServiceUnavailableException(_inner) => _inner.fmt(f), + Self::Unhandled(_inner) => { + if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { + write!(f, "unhandled error ({code})") + } else { + f.write_str("unhandled error") + } + } + } + } +} +impl ::aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError { + fn code(&self) -> ::std::option::Option<&str> { + ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) + } + fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { + ::std::option::Option::None + } +} +impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ListTagsForResourceError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::InternalServiceError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ListTagsForResourceError { + fn create_unhandled_error( + source: ::std::boxed::Box, + meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source, + meta: meta.unwrap_or_default(), + }) + } +} +impl ::aws_types::request_id::RequestId for crate::operation::list_tags_for_resource::ListTagsForResourceError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::list_tags_for_resource::_list_tags_for_resource_output::ListTagsForResourceOutput; + +pub use crate::operation::list_tags_for_resource::_list_tags_for_resource_input::ListTagsForResourceInput; + +mod _list_tags_for_resource_input; + +mod _list_tags_for_resource_output; + +/// Builders +pub mod builders; diff --git a/sdk/chatbot/src/operation/list_tags_for_resource/_list_tags_for_resource_input.rs b/sdk/chatbot/src/operation/list_tags_for_resource/_list_tags_for_resource_input.rs new file mode 100644 index 000000000000..cf6e0cb99727 --- /dev/null +++ b/sdk/chatbot/src/operation/list_tags_for_resource/_list_tags_for_resource_input.rs @@ -0,0 +1,53 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ListTagsForResourceInput { + /// The ARN of the configuration. + pub resource_arn: ::std::option::Option<::std::string::String>, +} +impl ListTagsForResourceInput { + /// The ARN of the configuration. + pub fn resource_arn(&self) -> ::std::option::Option<&str> { + self.resource_arn.as_deref() + } +} +impl ListTagsForResourceInput { + /// Creates a new builder-style object to manufacture [`ListTagsForResourceInput`](crate::operation::list_tags_for_resource::ListTagsForResourceInput). + pub fn builder() -> crate::operation::list_tags_for_resource::builders::ListTagsForResourceInputBuilder { + crate::operation::list_tags_for_resource::builders::ListTagsForResourceInputBuilder::default() + } +} + +/// A builder for [`ListTagsForResourceInput`](crate::operation::list_tags_for_resource::ListTagsForResourceInput). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct ListTagsForResourceInputBuilder { + pub(crate) resource_arn: ::std::option::Option<::std::string::String>, +} +impl ListTagsForResourceInputBuilder { + /// The ARN of the configuration. + /// This field is required. + pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.resource_arn = ::std::option::Option::Some(input.into()); + self + } + /// The ARN of the configuration. + pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.resource_arn = input; + self + } + /// The ARN of the configuration. + pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.resource_arn + } + /// Consumes the builder and constructs a [`ListTagsForResourceInput`](crate::operation::list_tags_for_resource::ListTagsForResourceInput). + pub fn build( + self, + ) -> ::std::result::Result + { + ::std::result::Result::Ok(crate::operation::list_tags_for_resource::ListTagsForResourceInput { + resource_arn: self.resource_arn, + }) + } +} diff --git a/sdk/chatbot/src/operation/list_tags_for_resource/_list_tags_for_resource_output.rs b/sdk/chatbot/src/operation/list_tags_for_resource/_list_tags_for_resource_output.rs new file mode 100644 index 000000000000..8c9a5abd86b2 --- /dev/null +++ b/sdk/chatbot/src/operation/list_tags_for_resource/_list_tags_for_resource_output.rs @@ -0,0 +1,74 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ListTagsForResourceOutput { + /// A list of tags applied to the configuration. + pub tags: ::std::option::Option<::std::vec::Vec>, + _request_id: Option, +} +impl ListTagsForResourceOutput { + /// A list of tags applied to the configuration. + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`. + pub fn tags(&self) -> &[crate::types::Tag] { + self.tags.as_deref().unwrap_or_default() + } +} +impl ::aws_types::request_id::RequestId for ListTagsForResourceOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl ListTagsForResourceOutput { + /// Creates a new builder-style object to manufacture [`ListTagsForResourceOutput`](crate::operation::list_tags_for_resource::ListTagsForResourceOutput). + pub fn builder() -> crate::operation::list_tags_for_resource::builders::ListTagsForResourceOutputBuilder { + crate::operation::list_tags_for_resource::builders::ListTagsForResourceOutputBuilder::default() + } +} + +/// A builder for [`ListTagsForResourceOutput`](crate::operation::list_tags_for_resource::ListTagsForResourceOutput). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct ListTagsForResourceOutputBuilder { + pub(crate) tags: ::std::option::Option<::std::vec::Vec>, + _request_id: Option, +} +impl ListTagsForResourceOutputBuilder { + /// Appends an item to `tags`. + /// + /// To override the contents of this collection use [`set_tags`](Self::set_tags). + /// + /// A list of tags applied to the configuration. + pub fn tags(mut self, input: crate::types::Tag) -> Self { + let mut v = self.tags.unwrap_or_default(); + v.push(input); + self.tags = ::std::option::Option::Some(v); + self + } + /// A list of tags applied to the configuration. + pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.tags = input; + self + } + /// A list of tags applied to the configuration. + pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.tags + } + pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { + self._request_id = Some(request_id.into()); + self + } + + pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { + self._request_id = request_id; + self + } + /// Consumes the builder and constructs a [`ListTagsForResourceOutput`](crate::operation::list_tags_for_resource::ListTagsForResourceOutput). + pub fn build(self) -> crate::operation::list_tags_for_resource::ListTagsForResourceOutput { + crate::operation::list_tags_for_resource::ListTagsForResourceOutput { + tags: self.tags, + _request_id: self._request_id, + } + } +} diff --git a/sdk/chatbot/src/operation/list_tags_for_resource/builders.rs b/sdk/chatbot/src/operation/list_tags_for_resource/builders.rs new file mode 100644 index 000000000000..bdb0faad948e --- /dev/null +++ b/sdk/chatbot/src/operation/list_tags_for_resource/builders.rs @@ -0,0 +1,125 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::list_tags_for_resource::_list_tags_for_resource_output::ListTagsForResourceOutputBuilder; + +pub use crate::operation::list_tags_for_resource::_list_tags_for_resource_input::ListTagsForResourceInputBuilder; + +impl crate::operation::list_tags_for_resource::builders::ListTagsForResourceInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::list_tags_for_resource::ListTagsForResourceOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::list_tags_for_resource::ListTagsForResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.list_tags_for_resource(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `ListTagsForResource`. +/// +/// Retrieves the list of tags applied to a configuration. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ListTagsForResourceFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::list_tags_for_resource::builders::ListTagsForResourceInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::list_tags_for_resource::ListTagsForResourceOutput, + crate::operation::list_tags_for_resource::ListTagsForResourceError, + > for ListTagsForResourceFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::list_tags_for_resource::ListTagsForResourceOutput, + crate::operation::list_tags_for_resource::ListTagsForResourceError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl ListTagsForResourceFluentBuilder { + /// Creates a new `ListTagsForResourceFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the ListTagsForResource as a reference. + pub fn as_input(&self) -> &crate::operation::list_tags_for_resource::builders::ListTagsForResourceInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + /// + /// If an error occurs, an `SdkError` will be returned with additional details that + /// can be matched against. + /// + /// By default, any retryable failures will be retried twice. Retry behavior + /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be + /// set when configuring the client. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::operation::list_tags_for_resource::ListTagsForResourceOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::list_tags_for_resource::ListTagsForResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = self + .inner + .build() + .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; + let runtime_plugins = crate::operation::list_tags_for_resource::ListTagsForResource::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::list_tags_for_resource::ListTagsForResource::orchestrate(&runtime_plugins, input).await + } + + /// Consumes this builder, creating a customizable operation that can be modified before being sent. + pub fn customize( + self, + ) -> crate::client::customize::CustomizableOperation< + crate::operation::list_tags_for_resource::ListTagsForResourceOutput, + crate::operation::list_tags_for_resource::ListTagsForResourceError, + Self, + > { + crate::client::customize::CustomizableOperation::new(self) + } + pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into) -> Self { + self.set_config_override(::std::option::Option::Some(config_override.into())); + self + } + + pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option) -> &mut Self { + self.config_override = config_override; + self + } + /// The ARN of the configuration. + pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.resource_arn(input.into()); + self + } + /// The ARN of the configuration. + pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_resource_arn(input); + self + } + /// The ARN of the configuration. + pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_resource_arn() + } +} diff --git a/sdk/chatbot/src/operation/tag_resource.rs b/sdk/chatbot/src/operation/tag_resource.rs new file mode 100644 index 000000000000..e9ae8b9eb6fe --- /dev/null +++ b/sdk/chatbot/src/operation/tag_resource.rs @@ -0,0 +1,377 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `TagResource`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct TagResource; +impl TagResource { + /// Creates a new `TagResource` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::tag_resource::TagResourceInput, + ) -> ::std::result::Result< + crate::operation::tag_resource::TagResourceOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::tag_resource::TagResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >| { + err.map_service_error(|err| { + err.downcast::() + .expect("correct error type") + }) + }; + let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) + .await + .map_err(map_err)?; + let output = context.finalize().map_err(map_err)?; + ::std::result::Result::Ok( + output + .downcast::() + .expect("correct output type"), + ) + } + + pub(crate) async fn orchestrate_with_stop_point( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::tag_resource::TagResourceInput, + stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, + ) -> ::std::result::Result< + ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, + ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); + ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("chatbot", "TagResource", input, runtime_plugins, stop_point).await + } + + pub(crate) fn operation_runtime_plugins( + client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + client_config: &crate::config::Config, + config_override: ::std::option::Option, + ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { + let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); + runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ + ::aws_runtime::auth::sigv4::SCHEME_ID, + ])); + if let ::std::option::Option::Some(config_override) = config_override { + for plugin in config_override.runtime_plugins.iter().cloned() { + runtime_plugins = runtime_plugins.with_operation_plugin(plugin); + } + runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( + config_override, + client_config.config.clone(), + &client_config.runtime_components, + )); + } + runtime_plugins + } +} +impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for TagResource { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("TagResource"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + TagResourceRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + TagResourceResponseDeserializer, + )); + + cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( + ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), + )); + + cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("TagResource", "chatbot")); + let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); + signing_options.double_uri_encode = true; + signing_options.content_sha256_header = false; + signing_options.normalize_uri_path = true; + signing_options.payload_override = None; + + cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { + signing_options, + ..::std::default::Default::default() + }); + + ::std::option::Option::Some(cfg.freeze()) + } + + fn runtime_components( + &self, + _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, + ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { + #[allow(unused_mut)] + let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("TagResource") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(TagResourceEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::tag_resource::TagResourceError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::tag_resource::TagResourceError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::tag_resource::TagResourceError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct TagResourceResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TagResourceResponseDeserializer { + fn deserialize_nonstreaming( + &self, + response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { + let (success, status) = (response.status().is_success(), response.status().as_u16()); + let headers = response.headers(); + let body = response.body().bytes().expect("body loaded"); + #[allow(unused_mut)] + let mut force_error = false; + ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); + let parse_result = if !success && status != 200 || force_error { + crate::protocol_serde::shape_tag_resource::de_tag_resource_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_tag_resource::de_tag_resource_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct TagResourceRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for TagResourceRequestSerializer { + #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] + fn serialize_input( + &self, + input: ::aws_smithy_runtime_api::client::interceptors::context::Input, + _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { + let input = input + .downcast::() + .expect("correct type"); + let _header_serialization_settings = _cfg + .load::() + .cloned() + .unwrap_or_default(); + let mut request_builder = { + fn uri_base( + _input: &crate::operation::tag_resource::TagResourceInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/tag-resource").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::tag_resource::TagResourceInput, + builder: ::http::request::Builder, + ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { + let mut uri = ::std::string::String::new(); + uri_base(input, &mut uri)?; + ::std::result::Result::Ok(builder.method("POST").uri(uri)) + } + let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; + builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_tag_resource::ser_tag_resource_input(&input)?); + if let Some(content_length) = body.content_length() { + let content_length = content_length.to_string(); + request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); + } + ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) + } +} +#[derive(Debug)] +struct TagResourceEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for TagResourceEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "TagResourceEndpointParamsInterceptor" + } + + fn read_before_execution( + &self, + context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< + '_, + ::aws_smithy_runtime_api::client::interceptors::context::Input, + ::aws_smithy_runtime_api::client::interceptors::context::Output, + ::aws_smithy_runtime_api::client::interceptors::context::Error, + >, + cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { + let _input = context + .input() + .downcast_ref::() + .ok_or("failed to downcast to TagResourceInput")?; + + let params = crate::config::endpoint::Params::builder() + .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) + .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) + .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) + .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) + .build() + .map_err(|err| { + ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) + })?; + cfg.interceptor_state() + .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); + ::std::result::Result::Ok(()) + } +} + +/// Error type for the `TagResourceError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum TagResourceError { + /// Customer/consumer-facing internal service exception. https://w.amazon.com/index.php/AWS/API_Standards/Exceptions#InternalServiceError + InternalServiceError(crate::types::error::InternalServiceError), + /// We were not able to find the resource for your request. + ResourceNotFoundException(crate::types::error::ResourceNotFoundException), + /// We can’t process your request right now because of a server issue. Try again later. + ServiceUnavailableException(crate::types::error::ServiceUnavailableException), + /// The supplied list of tags contains too many tags. + TooManyTagsException(crate::types::error::TooManyTagsException), + /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). + #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ + variable wildcard pattern and check `.code()`: + \ +    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` + \ + See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-TagResourceError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl TagResourceError { + /// Creates the `TagResourceError::Unhandled` variant from any error type. + pub fn unhandled( + err: impl ::std::convert::Into<::std::boxed::Box>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.into(), + meta: ::std::default::Default::default(), + }) + } + + /// Creates the `TagResourceError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). + pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.clone().into(), + meta: err, + }) + } + /// + /// Returns error metadata, which includes the error code, message, + /// request ID, and potentially additional information. + /// + pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::InternalServiceError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::TooManyTagsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `TagResourceError::InternalServiceError`. + pub fn is_internal_service_error(&self) -> bool { + matches!(self, Self::InternalServiceError(_)) + } + /// Returns `true` if the error kind is `TagResourceError::ResourceNotFoundException`. + pub fn is_resource_not_found_exception(&self) -> bool { + matches!(self, Self::ResourceNotFoundException(_)) + } + /// Returns `true` if the error kind is `TagResourceError::ServiceUnavailableException`. + pub fn is_service_unavailable_exception(&self) -> bool { + matches!(self, Self::ServiceUnavailableException(_)) + } + /// Returns `true` if the error kind is `TagResourceError::TooManyTagsException`. + pub fn is_too_many_tags_exception(&self) -> bool { + matches!(self, Self::TooManyTagsException(_)) + } +} +impl ::std::error::Error for TagResourceError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::InternalServiceError(_inner) => ::std::option::Option::Some(_inner), + Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), + Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner), + Self::TooManyTagsException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for TagResourceError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::InternalServiceError(_inner) => _inner.fmt(f), + Self::ResourceNotFoundException(_inner) => _inner.fmt(f), + Self::ServiceUnavailableException(_inner) => _inner.fmt(f), + Self::TooManyTagsException(_inner) => _inner.fmt(f), + Self::Unhandled(_inner) => { + if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { + write!(f, "unhandled error ({code})") + } else { + f.write_str("unhandled error") + } + } + } + } +} +impl ::aws_smithy_types::retry::ProvideErrorKind for TagResourceError { + fn code(&self) -> ::std::option::Option<&str> { + ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) + } + fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { + ::std::option::Option::None + } +} +impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TagResourceError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::InternalServiceError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::TooManyTagsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for TagResourceError { + fn create_unhandled_error( + source: ::std::boxed::Box, + meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source, + meta: meta.unwrap_or_default(), + }) + } +} +impl ::aws_types::request_id::RequestId for crate::operation::tag_resource::TagResourceError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::tag_resource::_tag_resource_output::TagResourceOutput; + +pub use crate::operation::tag_resource::_tag_resource_input::TagResourceInput; + +mod _tag_resource_input; + +mod _tag_resource_output; + +/// Builders +pub mod builders; diff --git a/sdk/chatbot/src/operation/tag_resource/_tag_resource_input.rs b/sdk/chatbot/src/operation/tag_resource/_tag_resource_input.rs new file mode 100644 index 000000000000..fbb7827bf715 --- /dev/null +++ b/sdk/chatbot/src/operation/tag_resource/_tag_resource_input.rs @@ -0,0 +1,80 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct TagResourceInput { + /// The ARN of the configuration. + pub resource_arn: ::std::option::Option<::std::string::String>, + /// A list of tags to apply to the configuration. + pub tags: ::std::option::Option<::std::vec::Vec>, +} +impl TagResourceInput { + /// The ARN of the configuration. + pub fn resource_arn(&self) -> ::std::option::Option<&str> { + self.resource_arn.as_deref() + } + /// A list of tags to apply to the configuration. + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`. + pub fn tags(&self) -> &[crate::types::Tag] { + self.tags.as_deref().unwrap_or_default() + } +} +impl TagResourceInput { + /// Creates a new builder-style object to manufacture [`TagResourceInput`](crate::operation::tag_resource::TagResourceInput). + pub fn builder() -> crate::operation::tag_resource::builders::TagResourceInputBuilder { + crate::operation::tag_resource::builders::TagResourceInputBuilder::default() + } +} + +/// A builder for [`TagResourceInput`](crate::operation::tag_resource::TagResourceInput). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct TagResourceInputBuilder { + pub(crate) resource_arn: ::std::option::Option<::std::string::String>, + pub(crate) tags: ::std::option::Option<::std::vec::Vec>, +} +impl TagResourceInputBuilder { + /// The ARN of the configuration. + /// This field is required. + pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.resource_arn = ::std::option::Option::Some(input.into()); + self + } + /// The ARN of the configuration. + pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.resource_arn = input; + self + } + /// The ARN of the configuration. + pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.resource_arn + } + /// Appends an item to `tags`. + /// + /// To override the contents of this collection use [`set_tags`](Self::set_tags). + /// + /// A list of tags to apply to the configuration. + pub fn tags(mut self, input: crate::types::Tag) -> Self { + let mut v = self.tags.unwrap_or_default(); + v.push(input); + self.tags = ::std::option::Option::Some(v); + self + } + /// A list of tags to apply to the configuration. + pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.tags = input; + self + } + /// A list of tags to apply to the configuration. + pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.tags + } + /// Consumes the builder and constructs a [`TagResourceInput`](crate::operation::tag_resource::TagResourceInput). + pub fn build(self) -> ::std::result::Result { + ::std::result::Result::Ok(crate::operation::tag_resource::TagResourceInput { + resource_arn: self.resource_arn, + tags: self.tags, + }) + } +} diff --git a/sdk/chatbot/src/operation/tag_resource/_tag_resource_output.rs b/sdk/chatbot/src/operation/tag_resource/_tag_resource_output.rs new file mode 100644 index 000000000000..4d1a44833a38 --- /dev/null +++ b/sdk/chatbot/src/operation/tag_resource/_tag_resource_output.rs @@ -0,0 +1,42 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct TagResourceOutput { + _request_id: Option, +} +impl ::aws_types::request_id::RequestId for TagResourceOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl TagResourceOutput { + /// Creates a new builder-style object to manufacture [`TagResourceOutput`](crate::operation::tag_resource::TagResourceOutput). + pub fn builder() -> crate::operation::tag_resource::builders::TagResourceOutputBuilder { + crate::operation::tag_resource::builders::TagResourceOutputBuilder::default() + } +} + +/// A builder for [`TagResourceOutput`](crate::operation::tag_resource::TagResourceOutput). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct TagResourceOutputBuilder { + _request_id: Option, +} +impl TagResourceOutputBuilder { + pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { + self._request_id = Some(request_id.into()); + self + } + + pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { + self._request_id = request_id; + self + } + /// Consumes the builder and constructs a [`TagResourceOutput`](crate::operation::tag_resource::TagResourceOutput). + pub fn build(self) -> crate::operation::tag_resource::TagResourceOutput { + crate::operation::tag_resource::TagResourceOutput { + _request_id: self._request_id, + } + } +} diff --git a/sdk/chatbot/src/operation/tag_resource/builders.rs b/sdk/chatbot/src/operation/tag_resource/builders.rs new file mode 100644 index 000000000000..81799c51f495 --- /dev/null +++ b/sdk/chatbot/src/operation/tag_resource/builders.rs @@ -0,0 +1,144 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::tag_resource::_tag_resource_output::TagResourceOutputBuilder; + +pub use crate::operation::tag_resource::_tag_resource_input::TagResourceInputBuilder; + +impl crate::operation::tag_resource::builders::TagResourceInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::tag_resource::TagResourceOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::tag_resource::TagResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.tag_resource(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `TagResource`. +/// +/// Applies the supplied tags to a configuration. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct TagResourceFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::tag_resource::builders::TagResourceInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::tag_resource::TagResourceOutput, + crate::operation::tag_resource::TagResourceError, + > for TagResourceFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::tag_resource::TagResourceOutput, + crate::operation::tag_resource::TagResourceError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl TagResourceFluentBuilder { + /// Creates a new `TagResourceFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the TagResource as a reference. + pub fn as_input(&self) -> &crate::operation::tag_resource::builders::TagResourceInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + /// + /// If an error occurs, an `SdkError` will be returned with additional details that + /// can be matched against. + /// + /// By default, any retryable failures will be retried twice. Retry behavior + /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be + /// set when configuring the client. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::operation::tag_resource::TagResourceOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::tag_resource::TagResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = self + .inner + .build() + .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; + let runtime_plugins = crate::operation::tag_resource::TagResource::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::tag_resource::TagResource::orchestrate(&runtime_plugins, input).await + } + + /// Consumes this builder, creating a customizable operation that can be modified before being sent. + pub fn customize( + self, + ) -> crate::client::customize::CustomizableOperation< + crate::operation::tag_resource::TagResourceOutput, + crate::operation::tag_resource::TagResourceError, + Self, + > { + crate::client::customize::CustomizableOperation::new(self) + } + pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into) -> Self { + self.set_config_override(::std::option::Option::Some(config_override.into())); + self + } + + pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option) -> &mut Self { + self.config_override = config_override; + self + } + /// The ARN of the configuration. + pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.resource_arn(input.into()); + self + } + /// The ARN of the configuration. + pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_resource_arn(input); + self + } + /// The ARN of the configuration. + pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_resource_arn() + } + /// + /// Appends an item to `Tags`. + /// + /// To override the contents of this collection use [`set_tags`](Self::set_tags). + /// + /// A list of tags to apply to the configuration. + pub fn tags(mut self, input: crate::types::Tag) -> Self { + self.inner = self.inner.tags(input); + self + } + /// A list of tags to apply to the configuration. + pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_tags(input); + self + } + /// A list of tags to apply to the configuration. + pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_tags() + } +} diff --git a/sdk/chatbot/src/operation/untag_resource.rs b/sdk/chatbot/src/operation/untag_resource.rs new file mode 100644 index 000000000000..95e1c9405628 --- /dev/null +++ b/sdk/chatbot/src/operation/untag_resource.rs @@ -0,0 +1,367 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `UntagResource`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UntagResource; +impl UntagResource { + /// Creates a new `UntagResource` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::untag_resource::UntagResourceInput, + ) -> ::std::result::Result< + crate::operation::untag_resource::UntagResourceOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::untag_resource::UntagResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >| { + err.map_service_error(|err| { + err.downcast::() + .expect("correct error type") + }) + }; + let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) + .await + .map_err(map_err)?; + let output = context.finalize().map_err(map_err)?; + ::std::result::Result::Ok( + output + .downcast::() + .expect("correct output type"), + ) + } + + pub(crate) async fn orchestrate_with_stop_point( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::untag_resource::UntagResourceInput, + stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, + ) -> ::std::result::Result< + ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, + ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); + ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("chatbot", "UntagResource", input, runtime_plugins, stop_point).await + } + + pub(crate) fn operation_runtime_plugins( + client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + client_config: &crate::config::Config, + config_override: ::std::option::Option, + ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { + let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); + runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ + ::aws_runtime::auth::sigv4::SCHEME_ID, + ])); + if let ::std::option::Option::Some(config_override) = config_override { + for plugin in config_override.runtime_plugins.iter().cloned() { + runtime_plugins = runtime_plugins.with_operation_plugin(plugin); + } + runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( + config_override, + client_config.config.clone(), + &client_config.runtime_components, + )); + } + runtime_plugins + } +} +impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UntagResource { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UntagResource"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + UntagResourceRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + UntagResourceResponseDeserializer, + )); + + cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( + ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), + )); + + cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("UntagResource", "chatbot")); + let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); + signing_options.double_uri_encode = true; + signing_options.content_sha256_header = false; + signing_options.normalize_uri_path = true; + signing_options.payload_override = None; + + cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { + signing_options, + ..::std::default::Default::default() + }); + + ::std::option::Option::Some(cfg.freeze()) + } + + fn runtime_components( + &self, + _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, + ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { + #[allow(unused_mut)] + let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UntagResource") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(UntagResourceEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::untag_resource::UntagResourceError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::untag_resource::UntagResourceError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::untag_resource::UntagResourceError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct UntagResourceResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UntagResourceResponseDeserializer { + fn deserialize_nonstreaming( + &self, + response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { + let (success, status) = (response.status().is_success(), response.status().as_u16()); + let headers = response.headers(); + let body = response.body().bytes().expect("body loaded"); + #[allow(unused_mut)] + let mut force_error = false; + ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); + let parse_result = if !success && status != 200 || force_error { + crate::protocol_serde::shape_untag_resource::de_untag_resource_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_untag_resource::de_untag_resource_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct UntagResourceRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UntagResourceRequestSerializer { + #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] + fn serialize_input( + &self, + input: ::aws_smithy_runtime_api::client::interceptors::context::Input, + _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { + let input = input + .downcast::() + .expect("correct type"); + let _header_serialization_settings = _cfg + .load::() + .cloned() + .unwrap_or_default(); + let mut request_builder = { + fn uri_base( + _input: &crate::operation::untag_resource::UntagResourceInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/untag-resource").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::untag_resource::UntagResourceInput, + builder: ::http::request::Builder, + ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { + let mut uri = ::std::string::String::new(); + uri_base(input, &mut uri)?; + ::std::result::Result::Ok(builder.method("POST").uri(uri)) + } + let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; + builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_untag_resource::ser_untag_resource_input(&input)?); + if let Some(content_length) = body.content_length() { + let content_length = content_length.to_string(); + request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); + } + ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) + } +} +#[derive(Debug)] +struct UntagResourceEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UntagResourceEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "UntagResourceEndpointParamsInterceptor" + } + + fn read_before_execution( + &self, + context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< + '_, + ::aws_smithy_runtime_api::client::interceptors::context::Input, + ::aws_smithy_runtime_api::client::interceptors::context::Output, + ::aws_smithy_runtime_api::client::interceptors::context::Error, + >, + cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { + let _input = context + .input() + .downcast_ref::() + .ok_or("failed to downcast to UntagResourceInput")?; + + let params = crate::config::endpoint::Params::builder() + .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) + .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) + .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) + .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) + .build() + .map_err(|err| { + ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) + })?; + cfg.interceptor_state() + .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); + ::std::result::Result::Ok(()) + } +} + +/// Error type for the `UntagResourceError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum UntagResourceError { + /// Customer/consumer-facing internal service exception. https://w.amazon.com/index.php/AWS/API_Standards/Exceptions#InternalServiceError + InternalServiceError(crate::types::error::InternalServiceError), + /// We were not able to find the resource for your request. + ResourceNotFoundException(crate::types::error::ResourceNotFoundException), + /// We can’t process your request right now because of a server issue. Try again later. + ServiceUnavailableException(crate::types::error::ServiceUnavailableException), + /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). + #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ + variable wildcard pattern and check `.code()`: + \ +    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` + \ + See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UntagResourceError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl UntagResourceError { + /// Creates the `UntagResourceError::Unhandled` variant from any error type. + pub fn unhandled( + err: impl ::std::convert::Into<::std::boxed::Box>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.into(), + meta: ::std::default::Default::default(), + }) + } + + /// Creates the `UntagResourceError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). + pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.clone().into(), + meta: err, + }) + } + /// + /// Returns error metadata, which includes the error code, message, + /// request ID, and potentially additional information. + /// + pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::InternalServiceError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `UntagResourceError::InternalServiceError`. + pub fn is_internal_service_error(&self) -> bool { + matches!(self, Self::InternalServiceError(_)) + } + /// Returns `true` if the error kind is `UntagResourceError::ResourceNotFoundException`. + pub fn is_resource_not_found_exception(&self) -> bool { + matches!(self, Self::ResourceNotFoundException(_)) + } + /// Returns `true` if the error kind is `UntagResourceError::ServiceUnavailableException`. + pub fn is_service_unavailable_exception(&self) -> bool { + matches!(self, Self::ServiceUnavailableException(_)) + } +} +impl ::std::error::Error for UntagResourceError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::InternalServiceError(_inner) => ::std::option::Option::Some(_inner), + Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), + Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for UntagResourceError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::InternalServiceError(_inner) => _inner.fmt(f), + Self::ResourceNotFoundException(_inner) => _inner.fmt(f), + Self::ServiceUnavailableException(_inner) => _inner.fmt(f), + Self::Unhandled(_inner) => { + if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { + write!(f, "unhandled error ({code})") + } else { + f.write_str("unhandled error") + } + } + } + } +} +impl ::aws_smithy_types::retry::ProvideErrorKind for UntagResourceError { + fn code(&self) -> ::std::option::Option<&str> { + ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) + } + fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { + ::std::option::Option::None + } +} +impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UntagResourceError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::InternalServiceError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UntagResourceError { + fn create_unhandled_error( + source: ::std::boxed::Box, + meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source, + meta: meta.unwrap_or_default(), + }) + } +} +impl ::aws_types::request_id::RequestId for crate::operation::untag_resource::UntagResourceError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::untag_resource::_untag_resource_output::UntagResourceOutput; + +pub use crate::operation::untag_resource::_untag_resource_input::UntagResourceInput; + +mod _untag_resource_input; + +mod _untag_resource_output; + +/// Builders +pub mod builders; diff --git a/sdk/chatbot/src/operation/untag_resource/_untag_resource_input.rs b/sdk/chatbot/src/operation/untag_resource/_untag_resource_input.rs new file mode 100644 index 000000000000..dfbea1ddd10d --- /dev/null +++ b/sdk/chatbot/src/operation/untag_resource/_untag_resource_input.rs @@ -0,0 +1,82 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct UntagResourceInput { + /// The ARN of the configuration. + pub resource_arn: ::std::option::Option<::std::string::String>, + /// A list of tag keys to remove from the configuration. + pub tag_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl UntagResourceInput { + /// The ARN of the configuration. + pub fn resource_arn(&self) -> ::std::option::Option<&str> { + self.resource_arn.as_deref() + } + /// A list of tag keys to remove from the configuration. + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_keys.is_none()`. + pub fn tag_keys(&self) -> &[::std::string::String] { + self.tag_keys.as_deref().unwrap_or_default() + } +} +impl UntagResourceInput { + /// Creates a new builder-style object to manufacture [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput). + pub fn builder() -> crate::operation::untag_resource::builders::UntagResourceInputBuilder { + crate::operation::untag_resource::builders::UntagResourceInputBuilder::default() + } +} + +/// A builder for [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct UntagResourceInputBuilder { + pub(crate) resource_arn: ::std::option::Option<::std::string::String>, + pub(crate) tag_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl UntagResourceInputBuilder { + /// The ARN of the configuration. + /// This field is required. + pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.resource_arn = ::std::option::Option::Some(input.into()); + self + } + /// The ARN of the configuration. + pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.resource_arn = input; + self + } + /// The ARN of the configuration. + pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.resource_arn + } + /// Appends an item to `tag_keys`. + /// + /// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys). + /// + /// A list of tag keys to remove from the configuration. + pub fn tag_keys(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + let mut v = self.tag_keys.unwrap_or_default(); + v.push(input.into()); + self.tag_keys = ::std::option::Option::Some(v); + self + } + /// A list of tag keys to remove from the configuration. + pub fn set_tag_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.tag_keys = input; + self + } + /// A list of tag keys to remove from the configuration. + pub fn get_tag_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.tag_keys + } + /// Consumes the builder and constructs a [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput). + pub fn build( + self, + ) -> ::std::result::Result { + ::std::result::Result::Ok(crate::operation::untag_resource::UntagResourceInput { + resource_arn: self.resource_arn, + tag_keys: self.tag_keys, + }) + } +} diff --git a/sdk/chatbot/src/operation/untag_resource/_untag_resource_output.rs b/sdk/chatbot/src/operation/untag_resource/_untag_resource_output.rs new file mode 100644 index 000000000000..7e84cedc1f44 --- /dev/null +++ b/sdk/chatbot/src/operation/untag_resource/_untag_resource_output.rs @@ -0,0 +1,42 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct UntagResourceOutput { + _request_id: Option, +} +impl ::aws_types::request_id::RequestId for UntagResourceOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl UntagResourceOutput { + /// Creates a new builder-style object to manufacture [`UntagResourceOutput`](crate::operation::untag_resource::UntagResourceOutput). + pub fn builder() -> crate::operation::untag_resource::builders::UntagResourceOutputBuilder { + crate::operation::untag_resource::builders::UntagResourceOutputBuilder::default() + } +} + +/// A builder for [`UntagResourceOutput`](crate::operation::untag_resource::UntagResourceOutput). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct UntagResourceOutputBuilder { + _request_id: Option, +} +impl UntagResourceOutputBuilder { + pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { + self._request_id = Some(request_id.into()); + self + } + + pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { + self._request_id = request_id; + self + } + /// Consumes the builder and constructs a [`UntagResourceOutput`](crate::operation::untag_resource::UntagResourceOutput). + pub fn build(self) -> crate::operation::untag_resource::UntagResourceOutput { + crate::operation::untag_resource::UntagResourceOutput { + _request_id: self._request_id, + } + } +} diff --git a/sdk/chatbot/src/operation/untag_resource/builders.rs b/sdk/chatbot/src/operation/untag_resource/builders.rs new file mode 100644 index 000000000000..45aa94b2babb --- /dev/null +++ b/sdk/chatbot/src/operation/untag_resource/builders.rs @@ -0,0 +1,144 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::untag_resource::_untag_resource_output::UntagResourceOutputBuilder; + +pub use crate::operation::untag_resource::_untag_resource_input::UntagResourceInputBuilder; + +impl crate::operation::untag_resource::builders::UntagResourceInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::untag_resource::UntagResourceOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::untag_resource::UntagResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.untag_resource(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `UntagResource`. +/// +/// Removes the supplied tags from a configuration +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct UntagResourceFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::untag_resource::builders::UntagResourceInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::untag_resource::UntagResourceOutput, + crate::operation::untag_resource::UntagResourceError, + > for UntagResourceFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::untag_resource::UntagResourceOutput, + crate::operation::untag_resource::UntagResourceError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl UntagResourceFluentBuilder { + /// Creates a new `UntagResourceFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the UntagResource as a reference. + pub fn as_input(&self) -> &crate::operation::untag_resource::builders::UntagResourceInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + /// + /// If an error occurs, an `SdkError` will be returned with additional details that + /// can be matched against. + /// + /// By default, any retryable failures will be retried twice. Retry behavior + /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be + /// set when configuring the client. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::operation::untag_resource::UntagResourceOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::untag_resource::UntagResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = self + .inner + .build() + .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; + let runtime_plugins = crate::operation::untag_resource::UntagResource::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::untag_resource::UntagResource::orchestrate(&runtime_plugins, input).await + } + + /// Consumes this builder, creating a customizable operation that can be modified before being sent. + pub fn customize( + self, + ) -> crate::client::customize::CustomizableOperation< + crate::operation::untag_resource::UntagResourceOutput, + crate::operation::untag_resource::UntagResourceError, + Self, + > { + crate::client::customize::CustomizableOperation::new(self) + } + pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into) -> Self { + self.set_config_override(::std::option::Option::Some(config_override.into())); + self + } + + pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option) -> &mut Self { + self.config_override = config_override; + self + } + /// The ARN of the configuration. + pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.resource_arn(input.into()); + self + } + /// The ARN of the configuration. + pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_resource_arn(input); + self + } + /// The ARN of the configuration. + pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_resource_arn() + } + /// + /// Appends an item to `TagKeys`. + /// + /// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys). + /// + /// A list of tag keys to remove from the configuration. + pub fn tag_keys(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.tag_keys(input.into()); + self + } + /// A list of tag keys to remove from the configuration. + pub fn set_tag_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_tag_keys(input); + self + } + /// A list of tag keys to remove from the configuration. + pub fn get_tag_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_tag_keys() + } +} diff --git a/sdk/chatbot/src/protocol_serde.rs b/sdk/chatbot/src/protocol_serde.rs index 80f2d9ecdeaa..db1c8f0cbc0c 100644 --- a/sdk/chatbot/src/protocol_serde.rs +++ b/sdk/chatbot/src/protocol_serde.rs @@ -61,6 +61,12 @@ pub(crate) mod shape_list_microsoft_teams_configured_teams; pub(crate) mod shape_list_microsoft_teams_user_identities; +pub(crate) mod shape_list_tags_for_resource; + +pub(crate) mod shape_tag_resource; + +pub(crate) mod shape_untag_resource; + pub(crate) mod shape_update_account_preferences; pub(crate) mod shape_update_chime_webhook_configuration; @@ -141,6 +147,8 @@ pub(crate) mod shape_get_microsoft_teams_channel_configuration_input; pub(crate) mod shape_get_teams_channel_configuration_exception; +pub(crate) mod shape_internal_service_error; + pub(crate) mod shape_invalid_parameter_exception; pub(crate) mod shape_invalid_request_exception; @@ -157,10 +165,20 @@ pub(crate) mod shape_list_microsoft_teams_user_identities_exception; pub(crate) mod shape_list_microsoft_teams_user_identities_input; +pub(crate) mod shape_list_tags_for_resource_input; + pub(crate) mod shape_list_teams_channel_configurations_exception; pub(crate) mod shape_resource_not_found_exception; +pub(crate) mod shape_service_unavailable_exception; + +pub(crate) mod shape_tag_resource_input; + +pub(crate) mod shape_too_many_tags_exception; + +pub(crate) mod shape_untag_resource_input; + pub(crate) mod shape_update_account_preferences_exception; pub(crate) mod shape_update_account_preferences_input; @@ -193,6 +211,10 @@ pub(crate) mod shape_slack_user_identities_list; pub(crate) mod shape_slack_workspaces_list; +pub(crate) mod shape_tag; + +pub(crate) mod shape_tag_list; + pub(crate) mod shape_team_channel_configurations_list; pub(crate) mod shape_teams_channel_configuration; @@ -209,4 +231,6 @@ pub(crate) mod shape_slack_workspace; pub(crate) mod shape_sns_topic_arn_list; +pub(crate) mod shape_tags; + pub(crate) mod shape_teams_user_identity; diff --git a/sdk/chatbot/src/protocol_serde/shape_chime_webhook_configuration.rs b/sdk/chatbot/src/protocol_serde/shape_chime_webhook_configuration.rs index 47cd9e200079..456bf8d0b8f8 100644 --- a/sdk/chatbot/src/protocol_serde/shape_chime_webhook_configuration.rs +++ b/sdk/chatbot/src/protocol_serde/shape_chime_webhook_configuration.rs @@ -52,6 +52,9 @@ where .transpose()?, ); } + "Tags" => { + builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens)?); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/chatbot/src/protocol_serde/shape_create_chime_webhook_configuration_input.rs b/sdk/chatbot/src/protocol_serde/shape_create_chime_webhook_configuration_input.rs index 5f1fefd05719..7d19af8a3901 100644 --- a/sdk/chatbot/src/protocol_serde/shape_create_chime_webhook_configuration_input.rs +++ b/sdk/chatbot/src/protocol_serde/shape_create_chime_webhook_configuration_input.rs @@ -21,11 +21,23 @@ pub fn ser_create_chime_webhook_configuration_input_input( } array_5.finish(); } - if let Some(var_7) = &input.webhook_description { - object.key("WebhookDescription").string(var_7.as_str()); + if let Some(var_7) = &input.tags { + let mut array_8 = object.key("Tags").start_array(); + for item_9 in var_7 { + { + #[allow(unused_mut)] + let mut object_10 = array_8.value().start_object(); + crate::protocol_serde::shape_tag::ser_tag(&mut object_10, item_9)?; + object_10.finish(); + } + } + array_8.finish(); + } + if let Some(var_11) = &input.webhook_description { + object.key("WebhookDescription").string(var_11.as_str()); } - if let Some(var_8) = &input.webhook_url { - object.key("WebhookUrl").string(var_8.as_str()); + if let Some(var_12) = &input.webhook_url { + object.key("WebhookUrl").string(var_12.as_str()); } Ok(()) } diff --git a/sdk/chatbot/src/protocol_serde/shape_create_microsoft_teams_channel_configuration_input.rs b/sdk/chatbot/src/protocol_serde/shape_create_microsoft_teams_channel_configuration_input.rs index de718db10bba..fdd62b3367ff 100644 --- a/sdk/chatbot/src/protocol_serde/shape_create_microsoft_teams_channel_configuration_input.rs +++ b/sdk/chatbot/src/protocol_serde/shape_create_microsoft_teams_channel_configuration_input.rs @@ -36,17 +36,29 @@ pub fn ser_create_microsoft_teams_channel_configuration_input_input( } array_10.finish(); } - if let Some(var_12) = &input.team_id { - object.key("TeamId").string(var_12.as_str()); + if let Some(var_12) = &input.tags { + let mut array_13 = object.key("Tags").start_array(); + for item_14 in var_12 { + { + #[allow(unused_mut)] + let mut object_15 = array_13.value().start_object(); + crate::protocol_serde::shape_tag::ser_tag(&mut object_15, item_14)?; + object_15.finish(); + } + } + array_13.finish(); + } + if let Some(var_16) = &input.team_id { + object.key("TeamId").string(var_16.as_str()); } - if let Some(var_13) = &input.team_name { - object.key("TeamName").string(var_13.as_str()); + if let Some(var_17) = &input.team_name { + object.key("TeamName").string(var_17.as_str()); } - if let Some(var_14) = &input.tenant_id { - object.key("TenantId").string(var_14.as_str()); + if let Some(var_18) = &input.tenant_id { + object.key("TenantId").string(var_18.as_str()); } - if let Some(var_15) = &input.user_authorization_required { - object.key("UserAuthorizationRequired").boolean(*var_15); + if let Some(var_19) = &input.user_authorization_required { + object.key("UserAuthorizationRequired").boolean(*var_19); } Ok(()) } diff --git a/sdk/chatbot/src/protocol_serde/shape_create_slack_channel_configuration_input.rs b/sdk/chatbot/src/protocol_serde/shape_create_slack_channel_configuration_input.rs index 325188ff9764..95bee5c5e4bb 100644 --- a/sdk/chatbot/src/protocol_serde/shape_create_slack_channel_configuration_input.rs +++ b/sdk/chatbot/src/protocol_serde/shape_create_slack_channel_configuration_input.rs @@ -39,8 +39,20 @@ pub fn ser_create_slack_channel_configuration_input_input( } array_11.finish(); } - if let Some(var_13) = &input.user_authorization_required { - object.key("UserAuthorizationRequired").boolean(*var_13); + if let Some(var_13) = &input.tags { + let mut array_14 = object.key("Tags").start_array(); + for item_15 in var_13 { + { + #[allow(unused_mut)] + let mut object_16 = array_14.value().start_object(); + crate::protocol_serde::shape_tag::ser_tag(&mut object_16, item_15)?; + object_16.finish(); + } + } + array_14.finish(); + } + if let Some(var_17) = &input.user_authorization_required { + object.key("UserAuthorizationRequired").boolean(*var_17); } Ok(()) } diff --git a/sdk/chatbot/src/protocol_serde/shape_internal_service_error.rs b/sdk/chatbot/src/protocol_serde/shape_internal_service_error.rs new file mode 100644 index 000000000000..0664364a9c88 --- /dev/null +++ b/sdk/chatbot/src/protocol_serde/shape_internal_service_error.rs @@ -0,0 +1,36 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_internal_service_error_json_err( + value: &[u8], + mut builder: crate::types::error::builders::InternalServiceErrorBuilder, +) -> Result { + let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); + let tokens = &mut tokens_owned; + ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "Message" => { + builder = builder.set_message( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + if tokens.next().is_some() { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "found more JSON tokens after completing parsing", + )); + } + Ok(builder) +} diff --git a/sdk/chatbot/src/protocol_serde/shape_list_tags_for_resource.rs b/sdk/chatbot/src/protocol_serde/shape_list_tags_for_resource.rs new file mode 100644 index 000000000000..ebe59a7172cf --- /dev/null +++ b/sdk/chatbot/src/protocol_serde/shape_list_tags_for_resource.rs @@ -0,0 +1,135 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_list_tags_for_resource_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::list_tags_for_resource::ListTagsForResourceOutput, + crate::operation::list_tags_for_resource::ListTagsForResourceError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?; + generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); + let generic = generic_builder.build(); + let error_code = match generic.code() { + Some(code) => code, + None => return Err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled(generic)), + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "InternalServiceError" => crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServiceError({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalServiceErrorBuilder::default(); + output = crate::protocol_serde::shape_internal_service_error::de_internal_service_error_json_err(_response_body, output) + .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "ResourceNotFoundException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); + output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) + .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "ServiceUnavailableException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::ServiceUnavailableException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default(); + output = + crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output) + .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::list_tags_for_resource::ListTagsForResourceError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_list_tags_for_resource_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::list_tags_for_resource::ListTagsForResourceOutput, + crate::operation::list_tags_for_resource::ListTagsForResourceError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::list_tags_for_resource::builders::ListTagsForResourceOutputBuilder::default(); + output = crate::protocol_serde::shape_list_tags_for_resource::de_list_tags_for_resource(_response_body, output) + .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?; + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_list_tags_for_resource_input( + input: &crate::operation::list_tags_for_resource::ListTagsForResourceInput, +) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { + let mut out = String::new(); + let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); + crate::protocol_serde::shape_list_tags_for_resource_input::ser_list_tags_for_resource_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} + +pub(crate) fn de_list_tags_for_resource( + value: &[u8], + mut builder: crate::operation::list_tags_for_resource::builders::ListTagsForResourceOutputBuilder, +) -> Result< + crate::operation::list_tags_for_resource::builders::ListTagsForResourceOutputBuilder, + ::aws_smithy_json::deserialize::error::DeserializeError, +> { + let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); + let tokens = &mut tokens_owned; + ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "Tags" => { + builder = builder.set_tags(crate::protocol_serde::shape_tag_list::de_tag_list(tokens)?); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + if tokens.next().is_some() { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "found more JSON tokens after completing parsing", + )); + } + Ok(builder) +} diff --git a/sdk/chatbot/src/protocol_serde/shape_list_tags_for_resource_input.rs b/sdk/chatbot/src/protocol_serde/shape_list_tags_for_resource_input.rs new file mode 100644 index 000000000000..fc79a5265eab --- /dev/null +++ b/sdk/chatbot/src/protocol_serde/shape_list_tags_for_resource_input.rs @@ -0,0 +1,10 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_list_tags_for_resource_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::list_tags_for_resource::ListTagsForResourceInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.resource_arn { + object.key("ResourceARN").string(var_1.as_str()); + } + Ok(()) +} diff --git a/sdk/chatbot/src/protocol_serde/shape_service_unavailable_exception.rs b/sdk/chatbot/src/protocol_serde/shape_service_unavailable_exception.rs new file mode 100644 index 000000000000..174eded6864d --- /dev/null +++ b/sdk/chatbot/src/protocol_serde/shape_service_unavailable_exception.rs @@ -0,0 +1,36 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_service_unavailable_exception_json_err( + value: &[u8], + mut builder: crate::types::error::builders::ServiceUnavailableExceptionBuilder, +) -> Result { + let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); + let tokens = &mut tokens_owned; + ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "message" => { + builder = builder.set_message( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + if tokens.next().is_some() { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "found more JSON tokens after completing parsing", + )); + } + Ok(builder) +} diff --git a/sdk/chatbot/src/protocol_serde/shape_slack_channel_configuration.rs b/sdk/chatbot/src/protocol_serde/shape_slack_channel_configuration.rs index 0ab4115ae4cf..1042b5349015 100644 --- a/sdk/chatbot/src/protocol_serde/shape_slack_channel_configuration.rs +++ b/sdk/chatbot/src/protocol_serde/shape_slack_channel_configuration.rs @@ -82,6 +82,9 @@ where builder = builder.set_user_authorization_required(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?); } + "Tags" => { + builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens)?); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/chatbot/src/protocol_serde/shape_tag.rs b/sdk/chatbot/src/protocol_serde/shape_tag.rs new file mode 100644 index 000000000000..6175eb9a71d7 --- /dev/null +++ b/sdk/chatbot/src/protocol_serde/shape_tag.rs @@ -0,0 +1,62 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_tag( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::Tag, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + { + object.key("TagKey").string(input.tag_key.as_str()); + } + { + object.key("TagValue").string(input.tag_value.as_str()); + } + Ok(()) +} + +pub(crate) fn de_tag<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::TagBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "TagKey" => { + builder = builder.set_tag_key( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "TagValue" => { + builder = builder.set_tag_value( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(crate::serde_util::tag_correct_errors(builder).build().map_err(|err| { + ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err) + })?)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/chatbot/src/protocol_serde/shape_tag_list.rs b/sdk/chatbot/src/protocol_serde/shape_tag_list.rs new file mode 100644 index 000000000000..6c4cac6e5c32 --- /dev/null +++ b/sdk/chatbot/src/protocol_serde/shape_tag_list.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_tag_list<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_tag::de_tag(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/chatbot/src/protocol_serde/shape_tag_resource.rs b/sdk/chatbot/src/protocol_serde/shape_tag_resource.rs new file mode 100644 index 000000000000..42cf785301d3 --- /dev/null +++ b/sdk/chatbot/src/protocol_serde/shape_tag_resource.rs @@ -0,0 +1,107 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_tag_resource_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?; + generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); + let generic = generic_builder.build(); + let error_code = match generic.code() { + Some(code) => code, + None => return Err(crate::operation::tag_resource::TagResourceError::unhandled(generic)), + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "InternalServiceError" => crate::operation::tag_resource::TagResourceError::InternalServiceError({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalServiceErrorBuilder::default(); + output = crate::protocol_serde::shape_internal_service_error::de_internal_service_error_json_err(_response_body, output) + .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "ResourceNotFoundException" => crate::operation::tag_resource::TagResourceError::ResourceNotFoundException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); + output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) + .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "ServiceUnavailableException" => crate::operation::tag_resource::TagResourceError::ServiceUnavailableException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default(); + output = + crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output) + .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "TooManyTagsException" => crate::operation::tag_resource::TagResourceError::TooManyTagsException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::TooManyTagsExceptionBuilder::default(); + output = crate::protocol_serde::shape_too_many_tags_exception::de_too_many_tags_exception_json_err(_response_body, output) + .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::tag_resource::TagResourceError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_tag_resource_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::tag_resource::builders::TagResourceOutputBuilder::default(); + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_tag_resource_input( + input: &crate::operation::tag_resource::TagResourceInput, +) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { + let mut out = String::new(); + let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); + crate::protocol_serde::shape_tag_resource_input::ser_tag_resource_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} diff --git a/sdk/chatbot/src/protocol_serde/shape_tag_resource_input.rs b/sdk/chatbot/src/protocol_serde/shape_tag_resource_input.rs new file mode 100644 index 000000000000..3cab6c64f18f --- /dev/null +++ b/sdk/chatbot/src/protocol_serde/shape_tag_resource_input.rs @@ -0,0 +1,22 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_tag_resource_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::tag_resource::TagResourceInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.resource_arn { + object.key("ResourceARN").string(var_1.as_str()); + } + if let Some(var_2) = &input.tags { + let mut array_3 = object.key("Tags").start_array(); + for item_4 in var_2 { + { + #[allow(unused_mut)] + let mut object_5 = array_3.value().start_object(); + crate::protocol_serde::shape_tag::ser_tag(&mut object_5, item_4)?; + object_5.finish(); + } + } + array_3.finish(); + } + Ok(()) +} diff --git a/sdk/chatbot/src/protocol_serde/shape_tags.rs b/sdk/chatbot/src/protocol_serde/shape_tags.rs new file mode 100644 index 000000000000..644c96b194ca --- /dev/null +++ b/sdk/chatbot/src/protocol_serde/shape_tags.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_tags<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_tag::de_tag(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/chatbot/src/protocol_serde/shape_teams_channel_configuration.rs b/sdk/chatbot/src/protocol_serde/shape_teams_channel_configuration.rs index c95b46b877e4..22ccddfcc26c 100644 --- a/sdk/chatbot/src/protocol_serde/shape_teams_channel_configuration.rs +++ b/sdk/chatbot/src/protocol_serde/shape_teams_channel_configuration.rs @@ -89,6 +89,9 @@ where builder = builder.set_user_authorization_required(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?); } + "Tags" => { + builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens)?); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/chatbot/src/protocol_serde/shape_too_many_tags_exception.rs b/sdk/chatbot/src/protocol_serde/shape_too_many_tags_exception.rs new file mode 100644 index 000000000000..47f1f5a62ca1 --- /dev/null +++ b/sdk/chatbot/src/protocol_serde/shape_too_many_tags_exception.rs @@ -0,0 +1,36 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_too_many_tags_exception_json_err( + value: &[u8], + mut builder: crate::types::error::builders::TooManyTagsExceptionBuilder, +) -> Result { + let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); + let tokens = &mut tokens_owned; + ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "message" => { + builder = builder.set_message( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + if tokens.next().is_some() { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "found more JSON tokens after completing parsing", + )); + } + Ok(builder) +} diff --git a/sdk/chatbot/src/protocol_serde/shape_untag_resource.rs b/sdk/chatbot/src/protocol_serde/shape_untag_resource.rs new file mode 100644 index 000000000000..e18812aa3747 --- /dev/null +++ b/sdk/chatbot/src/protocol_serde/shape_untag_resource.rs @@ -0,0 +1,92 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_untag_resource_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::untag_resource::UntagResourceError::unhandled)?; + generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); + let generic = generic_builder.build(); + let error_code = match generic.code() { + Some(code) => code, + None => return Err(crate::operation::untag_resource::UntagResourceError::unhandled(generic)), + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "InternalServiceError" => crate::operation::untag_resource::UntagResourceError::InternalServiceError({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalServiceErrorBuilder::default(); + output = crate::protocol_serde::shape_internal_service_error::de_internal_service_error_json_err(_response_body, output) + .map_err(crate::operation::untag_resource::UntagResourceError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "ResourceNotFoundException" => crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); + output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) + .map_err(crate::operation::untag_resource::UntagResourceError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "ServiceUnavailableException" => crate::operation::untag_resource::UntagResourceError::ServiceUnavailableException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default(); + output = + crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output) + .map_err(crate::operation::untag_resource::UntagResourceError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::untag_resource::UntagResourceError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_untag_resource_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::untag_resource::builders::UntagResourceOutputBuilder::default(); + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_untag_resource_input( + input: &crate::operation::untag_resource::UntagResourceInput, +) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { + let mut out = String::new(); + let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); + crate::protocol_serde::shape_untag_resource_input::ser_untag_resource_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} diff --git a/sdk/chatbot/src/protocol_serde/shape_untag_resource_input.rs b/sdk/chatbot/src/protocol_serde/shape_untag_resource_input.rs new file mode 100644 index 000000000000..05d5d028103f --- /dev/null +++ b/sdk/chatbot/src/protocol_serde/shape_untag_resource_input.rs @@ -0,0 +1,19 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_untag_resource_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::untag_resource::UntagResourceInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.resource_arn { + object.key("ResourceARN").string(var_1.as_str()); + } + if let Some(var_2) = &input.tag_keys { + let mut array_3 = object.key("TagKeys").start_array(); + for item_4 in var_2 { + { + array_3.value().string(item_4.as_str()); + } + } + array_3.finish(); + } + Ok(()) +} diff --git a/sdk/chatbot/src/serde_util.rs b/sdk/chatbot/src/serde_util.rs index a4913b74fcad..e8737d40e126 100644 --- a/sdk/chatbot/src/serde_util.rs +++ b/sdk/chatbot/src/serde_util.rs @@ -110,6 +110,16 @@ pub(crate) fn slack_workspace_correct_errors( builder } +pub(crate) fn tag_correct_errors(mut builder: crate::types::builders::TagBuilder) -> crate::types::builders::TagBuilder { + if builder.tag_key.is_none() { + builder.tag_key = Some(Default::default()) + } + if builder.tag_value.is_none() { + builder.tag_value = Some(Default::default()) + } + builder +} + pub(crate) fn teams_user_identity_correct_errors( mut builder: crate::types::builders::TeamsUserIdentityBuilder, ) -> crate::types::builders::TeamsUserIdentityBuilder { diff --git a/sdk/chatbot/src/types.rs b/sdk/chatbot/src/types.rs index 1d48f3305793..87bfd5955dd8 100644 --- a/sdk/chatbot/src/types.rs +++ b/sdk/chatbot/src/types.rs @@ -1,6 +1,8 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. pub use crate::types::_slack_channel_configuration::SlackChannelConfiguration; +pub use crate::types::_tag::Tag; + pub use crate::types::_teams_channel_configuration::TeamsChannelConfiguration; pub use crate::types::_chime_webhook_configuration::ChimeWebhookConfiguration; @@ -27,6 +29,8 @@ mod _slack_user_identity; mod _slack_workspace; +mod _tag; + mod _teams_channel_configuration; mod _teams_user_identity; diff --git a/sdk/chatbot/src/types/_chime_webhook_configuration.rs b/sdk/chatbot/src/types/_chime_webhook_configuration.rs index f0c04026c946..b5481ac195eb 100644 --- a/sdk/chatbot/src/types/_chime_webhook_configuration.rs +++ b/sdk/chatbot/src/types/_chime_webhook_configuration.rs @@ -16,6 +16,8 @@ pub struct ChimeWebhookConfiguration { pub configuration_name: ::std::option::Option<::std::string::String>, /// Specifies the logging level for this configuration. This property affects the log entries pushed to Amazon CloudWatch Logs.Logging levels include ERROR, INFO, or NONE. pub logging_level: ::std::option::Option<::std::string::String>, + /// A list of tags applied to the configuration. + pub tags: ::std::option::Option<::std::vec::Vec>, } impl ChimeWebhookConfiguration { /// Description of the webhook. Recommend using the convention `RoomName/WebhookName`. See Chime setup tutorial for more details: https://docs.aws.amazon.com/chatbot/latest/adminguide/chime-setup.html. @@ -46,6 +48,12 @@ impl ChimeWebhookConfiguration { pub fn logging_level(&self) -> ::std::option::Option<&str> { self.logging_level.as_deref() } + /// A list of tags applied to the configuration. + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`. + pub fn tags(&self) -> &[crate::types::Tag] { + self.tags.as_deref().unwrap_or_default() + } } impl ChimeWebhookConfiguration { /// Creates a new builder-style object to manufacture [`ChimeWebhookConfiguration`](crate::types::ChimeWebhookConfiguration). @@ -64,6 +72,7 @@ pub struct ChimeWebhookConfigurationBuilder { pub(crate) sns_topic_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>, pub(crate) configuration_name: ::std::option::Option<::std::string::String>, pub(crate) logging_level: ::std::option::Option<::std::string::String>, + pub(crate) tags: ::std::option::Option<::std::vec::Vec>, } impl ChimeWebhookConfigurationBuilder { /// Description of the webhook. Recommend using the convention `RoomName/WebhookName`. See Chime setup tutorial for more details: https://docs.aws.amazon.com/chatbot/latest/adminguide/chime-setup.html. @@ -159,6 +168,26 @@ impl ChimeWebhookConfigurationBuilder { pub fn get_logging_level(&self) -> &::std::option::Option<::std::string::String> { &self.logging_level } + /// Appends an item to `tags`. + /// + /// To override the contents of this collection use [`set_tags`](Self::set_tags). + /// + /// A list of tags applied to the configuration. + pub fn tags(mut self, input: crate::types::Tag) -> Self { + let mut v = self.tags.unwrap_or_default(); + v.push(input); + self.tags = ::std::option::Option::Some(v); + self + } + /// A list of tags applied to the configuration. + pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.tags = input; + self + } + /// A list of tags applied to the configuration. + pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.tags + } /// Consumes the builder and constructs a [`ChimeWebhookConfiguration`](crate::types::ChimeWebhookConfiguration). /// This method will fail if any of the following fields are not set: /// - [`webhook_description`](crate::types::builders::ChimeWebhookConfigurationBuilder::webhook_description) @@ -193,6 +222,7 @@ impl ChimeWebhookConfigurationBuilder { })?, configuration_name: self.configuration_name, logging_level: self.logging_level, + tags: self.tags, }) } } diff --git a/sdk/chatbot/src/types/_slack_channel_configuration.rs b/sdk/chatbot/src/types/_slack_channel_configuration.rs index 28668cf514cd..3688f7f2ccc2 100644 --- a/sdk/chatbot/src/types/_slack_channel_configuration.rs +++ b/sdk/chatbot/src/types/_slack_channel_configuration.rs @@ -26,6 +26,8 @@ pub struct SlackChannelConfiguration { pub guardrail_policy_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>, /// Enables use of a user role requirement in your chat configuration. pub user_authorization_required: ::std::option::Option, + /// A list of tags applied to the configuration. + pub tags: ::std::option::Option<::std::vec::Vec>, } impl SlackChannelConfiguration { /// Name of the Slack Workspace. @@ -81,6 +83,12 @@ impl SlackChannelConfiguration { pub fn user_authorization_required(&self) -> ::std::option::Option { self.user_authorization_required } + /// A list of tags applied to the configuration. + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`. + pub fn tags(&self) -> &[crate::types::Tag] { + self.tags.as_deref().unwrap_or_default() + } } impl SlackChannelConfiguration { /// Creates a new builder-style object to manufacture [`SlackChannelConfiguration`](crate::types::SlackChannelConfiguration). @@ -104,6 +112,7 @@ pub struct SlackChannelConfigurationBuilder { pub(crate) logging_level: ::std::option::Option<::std::string::String>, pub(crate) guardrail_policy_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>, pub(crate) user_authorization_required: ::std::option::Option, + pub(crate) tags: ::std::option::Option<::std::vec::Vec>, } impl SlackChannelConfigurationBuilder { /// Name of the Slack Workspace. @@ -278,6 +287,26 @@ impl SlackChannelConfigurationBuilder { pub fn get_user_authorization_required(&self) -> &::std::option::Option { &self.user_authorization_required } + /// Appends an item to `tags`. + /// + /// To override the contents of this collection use [`set_tags`](Self::set_tags). + /// + /// A list of tags applied to the configuration. + pub fn tags(mut self, input: crate::types::Tag) -> Self { + let mut v = self.tags.unwrap_or_default(); + v.push(input); + self.tags = ::std::option::Option::Some(v); + self + } + /// A list of tags applied to the configuration. + pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.tags = input; + self + } + /// A list of tags applied to the configuration. + pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.tags + } /// Consumes the builder and constructs a [`SlackChannelConfiguration`](crate::types::SlackChannelConfiguration). /// This method will fail if any of the following fields are not set: /// - [`slack_team_name`](crate::types::builders::SlackChannelConfigurationBuilder::slack_team_name) @@ -335,6 +364,7 @@ impl SlackChannelConfigurationBuilder { logging_level: self.logging_level, guardrail_policy_arns: self.guardrail_policy_arns, user_authorization_required: self.user_authorization_required, + tags: self.tags, }) } } diff --git a/sdk/chatbot/src/types/_tag.rs b/sdk/chatbot/src/types/_tag.rs new file mode 100644 index 000000000000..ee4512bf02f0 --- /dev/null +++ b/sdk/chatbot/src/types/_tag.rs @@ -0,0 +1,89 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// A tag applied to the configuration. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct Tag { + /// The tag key. + pub tag_key: ::std::string::String, + /// The tag value. + pub tag_value: ::std::string::String, +} +impl Tag { + /// The tag key. + pub fn tag_key(&self) -> &str { + use std::ops::Deref; + self.tag_key.deref() + } + /// The tag value. + pub fn tag_value(&self) -> &str { + use std::ops::Deref; + self.tag_value.deref() + } +} +impl Tag { + /// Creates a new builder-style object to manufacture [`Tag`](crate::types::Tag). + pub fn builder() -> crate::types::builders::TagBuilder { + crate::types::builders::TagBuilder::default() + } +} + +/// A builder for [`Tag`](crate::types::Tag). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct TagBuilder { + pub(crate) tag_key: ::std::option::Option<::std::string::String>, + pub(crate) tag_value: ::std::option::Option<::std::string::String>, +} +impl TagBuilder { + /// The tag key. + /// This field is required. + pub fn tag_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.tag_key = ::std::option::Option::Some(input.into()); + self + } + /// The tag key. + pub fn set_tag_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.tag_key = input; + self + } + /// The tag key. + pub fn get_tag_key(&self) -> &::std::option::Option<::std::string::String> { + &self.tag_key + } + /// The tag value. + /// This field is required. + pub fn tag_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.tag_value = ::std::option::Option::Some(input.into()); + self + } + /// The tag value. + pub fn set_tag_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.tag_value = input; + self + } + /// The tag value. + pub fn get_tag_value(&self) -> &::std::option::Option<::std::string::String> { + &self.tag_value + } + /// Consumes the builder and constructs a [`Tag`](crate::types::Tag). + /// This method will fail if any of the following fields are not set: + /// - [`tag_key`](crate::types::builders::TagBuilder::tag_key) + /// - [`tag_value`](crate::types::builders::TagBuilder::tag_value) + pub fn build(self) -> ::std::result::Result { + ::std::result::Result::Ok(crate::types::Tag { + tag_key: self.tag_key.ok_or_else(|| { + ::aws_smithy_types::error::operation::BuildError::missing_field( + "tag_key", + "tag_key was not specified but it is required when building Tag", + ) + })?, + tag_value: self.tag_value.ok_or_else(|| { + ::aws_smithy_types::error::operation::BuildError::missing_field( + "tag_value", + "tag_value was not specified but it is required when building Tag", + ) + })?, + }) + } +} diff --git a/sdk/chatbot/src/types/_teams_channel_configuration.rs b/sdk/chatbot/src/types/_teams_channel_configuration.rs index c188dc974760..b86a99e8b875 100644 --- a/sdk/chatbot/src/types/_teams_channel_configuration.rs +++ b/sdk/chatbot/src/types/_teams_channel_configuration.rs @@ -28,6 +28,8 @@ pub struct TeamsChannelConfiguration { pub guardrail_policy_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>, /// Enables use of a user role requirement in your chat configuration. pub user_authorization_required: ::std::option::Option, + /// A list of tags applied to the configuration. + pub tags: ::std::option::Option<::std::vec::Vec>, } impl TeamsChannelConfiguration { /// The ID of the Microsoft Teams channel. @@ -86,6 +88,12 @@ impl TeamsChannelConfiguration { pub fn user_authorization_required(&self) -> ::std::option::Option { self.user_authorization_required } + /// A list of tags applied to the configuration. + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`. + pub fn tags(&self) -> &[crate::types::Tag] { + self.tags.as_deref().unwrap_or_default() + } } impl TeamsChannelConfiguration { /// Creates a new builder-style object to manufacture [`TeamsChannelConfiguration`](crate::types::TeamsChannelConfiguration). @@ -110,6 +118,7 @@ pub struct TeamsChannelConfigurationBuilder { pub(crate) logging_level: ::std::option::Option<::std::string::String>, pub(crate) guardrail_policy_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>, pub(crate) user_authorization_required: ::std::option::Option, + pub(crate) tags: ::std::option::Option<::std::vec::Vec>, } impl TeamsChannelConfigurationBuilder { /// The ID of the Microsoft Teams channel. @@ -297,6 +306,26 @@ impl TeamsChannelConfigurationBuilder { pub fn get_user_authorization_required(&self) -> &::std::option::Option { &self.user_authorization_required } + /// Appends an item to `tags`. + /// + /// To override the contents of this collection use [`set_tags`](Self::set_tags). + /// + /// A list of tags applied to the configuration. + pub fn tags(mut self, input: crate::types::Tag) -> Self { + let mut v = self.tags.unwrap_or_default(); + v.push(input); + self.tags = ::std::option::Option::Some(v); + self + } + /// A list of tags applied to the configuration. + pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.tags = input; + self + } + /// A list of tags applied to the configuration. + pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.tags + } /// Consumes the builder and constructs a [`TeamsChannelConfiguration`](crate::types::TeamsChannelConfiguration). /// This method will fail if any of the following fields are not set: /// - [`channel_id`](crate::types::builders::TeamsChannelConfigurationBuilder::channel_id) @@ -349,6 +378,7 @@ impl TeamsChannelConfigurationBuilder { logging_level: self.logging_level, guardrail_policy_arns: self.guardrail_policy_arns, user_authorization_required: self.user_authorization_required, + tags: self.tags, }) } } diff --git a/sdk/chatbot/src/types/builders.rs b/sdk/chatbot/src/types/builders.rs index d5e9dd45fa8f..ea6465ccb1b0 100644 --- a/sdk/chatbot/src/types/builders.rs +++ b/sdk/chatbot/src/types/builders.rs @@ -1,6 +1,8 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. pub use crate::types::_slack_channel_configuration::SlackChannelConfigurationBuilder; +pub use crate::types::_tag::TagBuilder; + pub use crate::types::_teams_channel_configuration::TeamsChannelConfigurationBuilder; pub use crate::types::_chime_webhook_configuration::ChimeWebhookConfigurationBuilder; diff --git a/sdk/chatbot/src/types/error.rs b/sdk/chatbot/src/types/error.rs index 295e321b9e47..bbf7fcee4681 100644 --- a/sdk/chatbot/src/types/error.rs +++ b/sdk/chatbot/src/types/error.rs @@ -13,6 +13,12 @@ pub use crate::types::error::_update_chime_webhook_configuration_exception::Upda pub use crate::types::error::_update_account_preferences_exception::UpdateAccountPreferencesException; +pub use crate::types::error::_service_unavailable_exception::ServiceUnavailableException; + +pub use crate::types::error::_internal_service_error::InternalServiceError; + +pub use crate::types::error::_too_many_tags_exception::TooManyTagsException; + pub use crate::types::error::_list_microsoft_teams_user_identities_exception::ListMicrosoftTeamsUserIdentitiesException; pub use crate::types::error::_list_microsoft_teams_configured_teams_exception::ListMicrosoftTeamsConfiguredTeamsException; @@ -89,6 +95,8 @@ mod _get_account_preferences_exception; mod _get_teams_channel_configuration_exception; +mod _internal_service_error; + mod _invalid_parameter_exception; mod _invalid_request_exception; @@ -103,6 +111,10 @@ mod _list_teams_channel_configurations_exception; mod _resource_not_found_exception; +mod _service_unavailable_exception; + +mod _too_many_tags_exception; + mod _update_account_preferences_exception; mod _update_chime_webhook_configuration_exception; diff --git a/sdk/chatbot/src/types/error/_internal_service_error.rs b/sdk/chatbot/src/types/error/_internal_service_error.rs new file mode 100644 index 000000000000..f3c1c6c3669d --- /dev/null +++ b/sdk/chatbot/src/types/error/_internal_service_error.rs @@ -0,0 +1,87 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// Customer/consumer-facing internal service exception. https://w.amazon.com/index.php/AWS/API_Standards/Exceptions#InternalServiceError +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct InternalServiceError { + #[allow(missing_docs)] // documentation missing in model + pub message: ::std::option::Option<::std::string::String>, + pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata, +} +impl InternalServiceError { + /// Returns the error message. + pub fn message(&self) -> ::std::option::Option<&str> { + self.message.as_deref() + } +} +impl ::std::fmt::Display for InternalServiceError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + ::std::write!(f, "InternalServiceError")?; + if let ::std::option::Option::Some(inner_1) = &self.message { + { + ::std::write!(f, ": {}", inner_1)?; + } + } + Ok(()) + } +} +impl ::std::error::Error for InternalServiceError {} +impl ::aws_types::request_id::RequestId for crate::types::error::InternalServiceError { + fn request_id(&self) -> Option<&str> { + use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; + self.meta().request_id() + } +} +impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InternalServiceError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + &self.meta + } +} +impl InternalServiceError { + /// Creates a new builder-style object to manufacture [`InternalServiceError`](crate::types::error::InternalServiceError). + pub fn builder() -> crate::types::error::builders::InternalServiceErrorBuilder { + crate::types::error::builders::InternalServiceErrorBuilder::default() + } +} + +/// A builder for [`InternalServiceError`](crate::types::error::InternalServiceError). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct InternalServiceErrorBuilder { + pub(crate) message: ::std::option::Option<::std::string::String>, + meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>, +} +impl InternalServiceErrorBuilder { + #[allow(missing_docs)] // documentation missing in model + pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.message = ::std::option::Option::Some(input.into()); + self + } + #[allow(missing_docs)] // documentation missing in model + pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.message = input; + self + } + #[allow(missing_docs)] // documentation missing in model + pub fn get_message(&self) -> &::std::option::Option<::std::string::String> { + &self.message + } + /// Sets error metadata + pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self { + self.meta = Some(meta); + self + } + + /// Sets error metadata + pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self { + self.meta = meta; + self + } + /// Consumes the builder and constructs a [`InternalServiceError`](crate::types::error::InternalServiceError). + pub fn build(self) -> crate::types::error::InternalServiceError { + crate::types::error::InternalServiceError { + message: self.message, + meta: self.meta.unwrap_or_default(), + } + } +} diff --git a/sdk/chatbot/src/types/error/_service_unavailable_exception.rs b/sdk/chatbot/src/types/error/_service_unavailable_exception.rs new file mode 100644 index 000000000000..19d6e9ea92c4 --- /dev/null +++ b/sdk/chatbot/src/types/error/_service_unavailable_exception.rs @@ -0,0 +1,87 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// We can’t process your request right now because of a server issue. Try again later. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ServiceUnavailableException { + #[allow(missing_docs)] // documentation missing in model + pub message: ::std::option::Option<::std::string::String>, + pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata, +} +impl ServiceUnavailableException { + /// Returns the error message. + pub fn message(&self) -> ::std::option::Option<&str> { + self.message.as_deref() + } +} +impl ::std::fmt::Display for ServiceUnavailableException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + ::std::write!(f, "ServiceUnavailableException")?; + if let ::std::option::Option::Some(inner_1) = &self.message { + { + ::std::write!(f, ": {}", inner_1)?; + } + } + Ok(()) + } +} +impl ::std::error::Error for ServiceUnavailableException {} +impl ::aws_types::request_id::RequestId for crate::types::error::ServiceUnavailableException { + fn request_id(&self) -> Option<&str> { + use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; + self.meta().request_id() + } +} +impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ServiceUnavailableException { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + &self.meta + } +} +impl ServiceUnavailableException { + /// Creates a new builder-style object to manufacture [`ServiceUnavailableException`](crate::types::error::ServiceUnavailableException). + pub fn builder() -> crate::types::error::builders::ServiceUnavailableExceptionBuilder { + crate::types::error::builders::ServiceUnavailableExceptionBuilder::default() + } +} + +/// A builder for [`ServiceUnavailableException`](crate::types::error::ServiceUnavailableException). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct ServiceUnavailableExceptionBuilder { + pub(crate) message: ::std::option::Option<::std::string::String>, + meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>, +} +impl ServiceUnavailableExceptionBuilder { + #[allow(missing_docs)] // documentation missing in model + pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.message = ::std::option::Option::Some(input.into()); + self + } + #[allow(missing_docs)] // documentation missing in model + pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.message = input; + self + } + #[allow(missing_docs)] // documentation missing in model + pub fn get_message(&self) -> &::std::option::Option<::std::string::String> { + &self.message + } + /// Sets error metadata + pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self { + self.meta = Some(meta); + self + } + + /// Sets error metadata + pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self { + self.meta = meta; + self + } + /// Consumes the builder and constructs a [`ServiceUnavailableException`](crate::types::error::ServiceUnavailableException). + pub fn build(self) -> crate::types::error::ServiceUnavailableException { + crate::types::error::ServiceUnavailableException { + message: self.message, + meta: self.meta.unwrap_or_default(), + } + } +} diff --git a/sdk/chatbot/src/types/error/_too_many_tags_exception.rs b/sdk/chatbot/src/types/error/_too_many_tags_exception.rs new file mode 100644 index 000000000000..53a3827700eb --- /dev/null +++ b/sdk/chatbot/src/types/error/_too_many_tags_exception.rs @@ -0,0 +1,87 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// The supplied list of tags contains too many tags. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct TooManyTagsException { + #[allow(missing_docs)] // documentation missing in model + pub message: ::std::option::Option<::std::string::String>, + pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata, +} +impl TooManyTagsException { + /// Returns the error message. + pub fn message(&self) -> ::std::option::Option<&str> { + self.message.as_deref() + } +} +impl ::std::fmt::Display for TooManyTagsException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + ::std::write!(f, "TooManyTagsException")?; + if let ::std::option::Option::Some(inner_1) = &self.message { + { + ::std::write!(f, ": {}", inner_1)?; + } + } + Ok(()) + } +} +impl ::std::error::Error for TooManyTagsException {} +impl ::aws_types::request_id::RequestId for crate::types::error::TooManyTagsException { + fn request_id(&self) -> Option<&str> { + use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; + self.meta().request_id() + } +} +impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TooManyTagsException { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + &self.meta + } +} +impl TooManyTagsException { + /// Creates a new builder-style object to manufacture [`TooManyTagsException`](crate::types::error::TooManyTagsException). + pub fn builder() -> crate::types::error::builders::TooManyTagsExceptionBuilder { + crate::types::error::builders::TooManyTagsExceptionBuilder::default() + } +} + +/// A builder for [`TooManyTagsException`](crate::types::error::TooManyTagsException). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct TooManyTagsExceptionBuilder { + pub(crate) message: ::std::option::Option<::std::string::String>, + meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>, +} +impl TooManyTagsExceptionBuilder { + #[allow(missing_docs)] // documentation missing in model + pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.message = ::std::option::Option::Some(input.into()); + self + } + #[allow(missing_docs)] // documentation missing in model + pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.message = input; + self + } + #[allow(missing_docs)] // documentation missing in model + pub fn get_message(&self) -> &::std::option::Option<::std::string::String> { + &self.message + } + /// Sets error metadata + pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self { + self.meta = Some(meta); + self + } + + /// Sets error metadata + pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self { + self.meta = meta; + self + } + /// Consumes the builder and constructs a [`TooManyTagsException`](crate::types::error::TooManyTagsException). + pub fn build(self) -> crate::types::error::TooManyTagsException { + crate::types::error::TooManyTagsException { + message: self.message, + meta: self.meta.unwrap_or_default(), + } + } +} diff --git a/sdk/chatbot/src/types/error/builders.rs b/sdk/chatbot/src/types/error/builders.rs index b50ce83c94be..d767161ef2f7 100644 --- a/sdk/chatbot/src/types/error/builders.rs +++ b/sdk/chatbot/src/types/error/builders.rs @@ -13,6 +13,12 @@ pub use crate::types::error::_update_chime_webhook_configuration_exception::Upda pub use crate::types::error::_update_account_preferences_exception::UpdateAccountPreferencesExceptionBuilder; +pub use crate::types::error::_service_unavailable_exception::ServiceUnavailableExceptionBuilder; + +pub use crate::types::error::_internal_service_error::InternalServiceErrorBuilder; + +pub use crate::types::error::_too_many_tags_exception::TooManyTagsExceptionBuilder; + pub use crate::types::error::_list_microsoft_teams_user_identities_exception::ListMicrosoftTeamsUserIdentitiesExceptionBuilder; pub use crate::types::error::_list_microsoft_teams_configured_teams_exception::ListMicrosoftTeamsConfiguredTeamsExceptionBuilder; diff --git a/sdk/cloudformation/src/client/delete_stack.rs b/sdk/cloudformation/src/client/delete_stack.rs index b8d8fd7e451d..e005c465c748 100644 --- a/sdk/cloudformation/src/client/delete_stack.rs +++ b/sdk/cloudformation/src/client/delete_stack.rs @@ -7,6 +7,7 @@ impl super::Client { /// - [`retain_resources(impl Into)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::retain_resources) / [`set_retain_resources(Option>)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::set_retain_resources):
required: **false**

For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the resources you want to retain. During deletion, CloudFormation deletes the stack but doesn't delete the retained resources.

Retaining resources is useful when you can't delete a resource, such as a non-empty S3 bucket, but you want to delete the stack.


/// - [`role_arn(impl Into)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::role_arn) / [`set_role_arn(Option)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::set_role_arn):
required: **false**

The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that CloudFormation assumes to delete the stack. CloudFormation uses the role's credentials to make calls on your behalf.

If you don't specify a value, CloudFormation uses the role that was previously associated with the stack. If no role is available, CloudFormation uses a temporary session that's generated from your user credentials.


/// - [`client_request_token(impl Into)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::client_request_token) / [`set_client_request_token(Option)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::set_client_request_token):
required: **false**

A unique identifier for this DeleteStack request. Specify this token if you plan to retry requests so that CloudFormation knows that you're not attempting to delete a stack with the same name. You might retry DeleteStack requests to ensure that CloudFormation successfully received them.

All events initiated by a given stack operation are assigned the same client request token, which you can use to track operations. For example, if you execute a CreateStack operation with the token token1, then all the StackEvents generated by that operation will have ClientRequestToken set as token1.

In the console, stack operations display the client request token on the Events tab. Stack operations that are initiated from the console use the token format Console-StackOperation-ID, which helps you easily identify the stack operation . For example, if you create a stack using the console, each stack event would be assigned the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002.


+ /// - [`deletion_mode(DeletionMode)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::deletion_mode) / [`set_deletion_mode(Option)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::set_deletion_mode):
required: **false**

Specifies the deletion mode for the stack. Possible values are:

  • STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.


/// - On success, responds with [`DeleteStackOutput`](crate::operation::delete_stack::DeleteStackOutput) /// - On failure, responds with [`SdkError`](crate::operation::delete_stack::DeleteStackError) pub fn delete_stack(&self) -> crate::operation::delete_stack::builders::DeleteStackFluentBuilder { diff --git a/sdk/cloudformation/src/client/list_stack_instance_resource_drifts.rs b/sdk/cloudformation/src/client/list_stack_instance_resource_drifts.rs index d5ddd5156047..92c56c2609a9 100644 --- a/sdk/cloudformation/src/client/list_stack_instance_resource_drifts.rs +++ b/sdk/cloudformation/src/client/list_stack_instance_resource_drifts.rs @@ -12,7 +12,7 @@ impl super::Client { /// - [`operation_id(impl Into)`](crate::operation::list_stack_instance_resource_drifts::builders::ListStackInstanceResourceDriftsFluentBuilder::operation_id) / [`set_operation_id(Option)`](crate::operation::list_stack_instance_resource_drifts::builders::ListStackInstanceResourceDriftsFluentBuilder::set_operation_id):
required: **true**

The unique ID of the drift operation.


/// - [`call_as(CallAs)`](crate::operation::list_stack_instance_resource_drifts::builders::ListStackInstanceResourceDriftsFluentBuilder::call_as) / [`set_call_as(Option)`](crate::operation::list_stack_instance_resource_drifts::builders::ListStackInstanceResourceDriftsFluentBuilder::set_call_as):
required: **false**

[Service-managed permissions] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.

By default, SELF is specified. Use SELF for stack sets with self-managed permissions.

  • If you are signed in to the management account, specify SELF.

  • If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.

    Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.


/// - On success, responds with [`ListStackInstanceResourceDriftsOutput`](crate::operation::list_stack_instance_resource_drifts::ListStackInstanceResourceDriftsOutput) with field(s): - /// - [`summaries(Option>)`](crate::operation::list_stack_instance_resource_drifts::ListStackInstanceResourceDriftsOutput::summaries):

A list of StackInstanceResourceDriftSummary structures that contain information about the specified stack instances.

+ /// - [`summaries(Option>)`](crate::operation::list_stack_instance_resource_drifts::ListStackInstanceResourceDriftsOutput::summaries):

A list of StackInstanceResourceDriftsSummary structures that contain information about the specified stack instances.

/// - [`next_token(Option)`](crate::operation::list_stack_instance_resource_drifts::ListStackInstanceResourceDriftsOutput::next_token):

If the previous paginated request didn't return all of the remaining results, the response object's NextToken parameter value is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null.

/// - On failure, responds with [`SdkError`](crate::operation::list_stack_instance_resource_drifts::ListStackInstanceResourceDriftsError) pub fn list_stack_instance_resource_drifts( diff --git a/sdk/cloudformation/src/operation/delete_stack/_delete_stack_input.rs b/sdk/cloudformation/src/operation/delete_stack/_delete_stack_input.rs index be2a7bf029dc..7cf360977bce 100644 --- a/sdk/cloudformation/src/operation/delete_stack/_delete_stack_input.rs +++ b/sdk/cloudformation/src/operation/delete_stack/_delete_stack_input.rs @@ -16,6 +16,14 @@ pub struct DeleteStackInput { ///

All events initiated by a given stack operation are assigned the same client request token, which you can use to track operations. For example, if you execute a CreateStack operation with the token token1, then all the StackEvents generated by that operation will have ClientRequestToken set as token1.

///

In the console, stack operations display the client request token on the Events tab. Stack operations that are initiated from the console use the token format Console-StackOperation-ID, which helps you easily identify the stack operation . For example, if you create a stack using the console, each stack event would be assigned the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002.

pub client_request_token: ::std::option::Option<::std::string::String>, + ///

Specifies the deletion mode for the stack. Possible values are:

+ ///
    + ///
  • + ///

    STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • + ///
  • + ///

    FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.

  • + ///
+ pub deletion_mode: ::std::option::Option, } impl DeleteStackInput { ///

The name or the unique stack ID that's associated with the stack.

@@ -40,6 +48,16 @@ impl DeleteStackInput { pub fn client_request_token(&self) -> ::std::option::Option<&str> { self.client_request_token.as_deref() } + ///

Specifies the deletion mode for the stack. Possible values are:

+ ///
    + ///
  • + ///

    STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • + ///
  • + ///

    FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.

  • + ///
+ pub fn deletion_mode(&self) -> ::std::option::Option<&crate::types::DeletionMode> { + self.deletion_mode.as_ref() + } } impl DeleteStackInput { /// Creates a new builder-style object to manufacture [`DeleteStackInput`](crate::operation::delete_stack::DeleteStackInput). @@ -56,6 +74,7 @@ pub struct DeleteStackInputBuilder { pub(crate) retain_resources: ::std::option::Option<::std::vec::Vec<::std::string::String>>, pub(crate) role_arn: ::std::option::Option<::std::string::String>, pub(crate) client_request_token: ::std::option::Option<::std::string::String>, + pub(crate) deletion_mode: ::std::option::Option, } impl DeleteStackInputBuilder { ///

The name or the unique stack ID that's associated with the stack.

@@ -133,6 +152,38 @@ impl DeleteStackInputBuilder { pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> { &self.client_request_token } + ///

Specifies the deletion mode for the stack. Possible values are:

+ ///
    + ///
  • + ///

    STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • + ///
  • + ///

    FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.

  • + ///
+ pub fn deletion_mode(mut self, input: crate::types::DeletionMode) -> Self { + self.deletion_mode = ::std::option::Option::Some(input); + self + } + ///

Specifies the deletion mode for the stack. Possible values are:

+ ///
    + ///
  • + ///

    STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • + ///
  • + ///

    FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.

  • + ///
+ pub fn set_deletion_mode(mut self, input: ::std::option::Option) -> Self { + self.deletion_mode = input; + self + } + ///

Specifies the deletion mode for the stack. Possible values are:

+ ///
    + ///
  • + ///

    STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • + ///
  • + ///

    FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.

  • + ///
+ pub fn get_deletion_mode(&self) -> &::std::option::Option { + &self.deletion_mode + } /// Consumes the builder and constructs a [`DeleteStackInput`](crate::operation::delete_stack::DeleteStackInput). pub fn build(self) -> ::std::result::Result { ::std::result::Result::Ok(crate::operation::delete_stack::DeleteStackInput { @@ -140,6 +191,7 @@ impl DeleteStackInputBuilder { retain_resources: self.retain_resources, role_arn: self.role_arn, client_request_token: self.client_request_token, + deletion_mode: self.deletion_mode, }) } } diff --git a/sdk/cloudformation/src/operation/delete_stack/builders.rs b/sdk/cloudformation/src/operation/delete_stack/builders.rs index e9c9598023e7..5596f9d1c560 100644 --- a/sdk/cloudformation/src/operation/delete_stack/builders.rs +++ b/sdk/cloudformation/src/operation/delete_stack/builders.rs @@ -181,4 +181,36 @@ impl DeleteStackFluentBuilder { pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_client_request_token() } + ///

Specifies the deletion mode for the stack. Possible values are:

+ ///
    + ///
  • + ///

    STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • + ///
  • + ///

    FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.

  • + ///
+ pub fn deletion_mode(mut self, input: crate::types::DeletionMode) -> Self { + self.inner = self.inner.deletion_mode(input); + self + } + ///

Specifies the deletion mode for the stack. Possible values are:

+ ///
    + ///
  • + ///

    STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • + ///
  • + ///

    FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.

  • + ///
+ pub fn set_deletion_mode(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_deletion_mode(input); + self + } + ///

Specifies the deletion mode for the stack. Possible values are:

+ ///
    + ///
  • + ///

    STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • + ///
  • + ///

    FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.

  • + ///
+ pub fn get_deletion_mode(&self) -> &::std::option::Option { + self.inner.get_deletion_mode() + } } diff --git a/sdk/cloudformation/src/operation/list_stack_instance_resource_drifts/_list_stack_instance_resource_drifts_output.rs b/sdk/cloudformation/src/operation/list_stack_instance_resource_drifts/_list_stack_instance_resource_drifts_output.rs index 3d11b0d156bd..84e90521c20a 100644 --- a/sdk/cloudformation/src/operation/list_stack_instance_resource_drifts/_list_stack_instance_resource_drifts_output.rs +++ b/sdk/cloudformation/src/operation/list_stack_instance_resource_drifts/_list_stack_instance_resource_drifts_output.rs @@ -3,14 +3,14 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct ListStackInstanceResourceDriftsOutput { - ///

A list of StackInstanceResourceDriftSummary structures that contain information about the specified stack instances.

+ ///

A list of StackInstanceResourceDriftsSummary structures that contain information about the specified stack instances.

pub summaries: ::std::option::Option<::std::vec::Vec>, ///

If the previous paginated request didn't return all of the remaining results, the response object's NextToken parameter value is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null.

pub next_token: ::std::option::Option<::std::string::String>, _request_id: Option, } impl ListStackInstanceResourceDriftsOutput { - ///

A list of StackInstanceResourceDriftSummary structures that contain information about the specified stack instances.

+ ///

A list of StackInstanceResourceDriftsSummary structures that contain information about the specified stack instances.

/// /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.summaries.is_none()`. pub fn summaries(&self) -> &[crate::types::StackInstanceResourceDriftsSummary] { @@ -46,19 +46,19 @@ impl ListStackInstanceResourceDriftsOutputBuilder { /// /// To override the contents of this collection use [`set_summaries`](Self::set_summaries). /// - ///

A list of StackInstanceResourceDriftSummary structures that contain information about the specified stack instances.

+ ///

A list of StackInstanceResourceDriftsSummary structures that contain information about the specified stack instances.

pub fn summaries(mut self, input: crate::types::StackInstanceResourceDriftsSummary) -> Self { let mut v = self.summaries.unwrap_or_default(); v.push(input); self.summaries = ::std::option::Option::Some(v); self } - ///

A list of StackInstanceResourceDriftSummary structures that contain information about the specified stack instances.

+ ///

A list of StackInstanceResourceDriftsSummary structures that contain information about the specified stack instances.

pub fn set_summaries(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { self.summaries = input; self } - ///

A list of StackInstanceResourceDriftSummary structures that contain information about the specified stack instances.

+ ///

A list of StackInstanceResourceDriftsSummary structures that contain information about the specified stack instances.

pub fn get_summaries(&self) -> &::std::option::Option<::std::vec::Vec> { &self.summaries } diff --git a/sdk/cloudformation/src/protocol_serde/shape_delete_stack_input.rs b/sdk/cloudformation/src/protocol_serde/shape_delete_stack_input.rs index 62149befef42..a48b02bfdcee 100644 --- a/sdk/cloudformation/src/protocol_serde/shape_delete_stack_input.rs +++ b/sdk/cloudformation/src/protocol_serde/shape_delete_stack_input.rs @@ -31,6 +31,11 @@ pub fn ser_delete_stack_input_input_input( if let Some(var_11) = &input.client_request_token { scope_10.string(var_11); } + #[allow(unused_mut)] + let mut scope_12 = writer.prefix("DeletionMode"); + if let Some(var_13) = &input.deletion_mode { + scope_12.string(var_13.as_str()); + } writer.finish(); Ok(::aws_smithy_types::body::SdkBody::from(out)) } diff --git a/sdk/cloudformation/src/protocol_serde/shape_stack.rs b/sdk/cloudformation/src/protocol_serde/shape_stack.rs index b3ed4719207d..94962ff76c22 100644 --- a/sdk/cloudformation/src/protocol_serde/shape_stack.rs +++ b/sdk/cloudformation/src/protocol_serde/shape_stack.rs @@ -295,8 +295,22 @@ pub fn de_stack(decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder) -> Result builder = builder.set_retain_except_on_create(var_23); } , - s if s.matches("DetailedStatus") /* DetailedStatus com.amazonaws.cloudformation#Stack$DetailedStatus */ => { + s if s.matches("DeletionMode") /* DeletionMode com.amazonaws.cloudformation#Stack$DeletionMode */ => { let var_24 = + Some( + Result::::Ok( + crate::types::DeletionMode::from( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + ) + ) + ? + ) + ; + builder = builder.set_deletion_mode(var_24); + } + , + s if s.matches("DetailedStatus") /* DetailedStatus com.amazonaws.cloudformation#Stack$DetailedStatus */ => { + let var_25 = Some( Result::::Ok( crate::types::DetailedStatus::from( @@ -306,7 +320,7 @@ pub fn de_stack(decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder) -> Result ? ) ; - builder = builder.set_detailed_status(var_24); + builder = builder.set_detailed_status(var_25); } , _ => {} diff --git a/sdk/cloudformation/src/types.rs b/sdk/cloudformation/src/types.rs index 65b76b5e20b0..450a0fc2132b 100644 --- a/sdk/cloudformation/src/types.rs +++ b/sdk/cloudformation/src/types.rs @@ -185,6 +185,8 @@ pub use crate::types::_stack::Stack; pub use crate::types::_detailed_status::DetailedStatus; +pub use crate::types::_deletion_mode::DeletionMode; + pub use crate::types::_stack_drift_information::StackDriftInformation; pub use crate::types::_output::Output; @@ -321,6 +323,8 @@ mod _change_type; mod _concurrency_mode; +mod _deletion_mode; + mod _deployment_targets; mod _deprecated_status; diff --git a/sdk/cloudformation/src/types/_deletion_mode.rs b/sdk/cloudformation/src/types/_deletion_mode.rs new file mode 100644 index 000000000000..9738a8698f36 --- /dev/null +++ b/sdk/cloudformation/src/types/_deletion_mode.rs @@ -0,0 +1,107 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `DeletionMode`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let deletionmode = unimplemented!(); +/// match deletionmode { +/// DeletionMode::ForceDeleteStack => { /* ... */ }, +/// DeletionMode::Standard => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `deletionmode` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `DeletionMode::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `DeletionMode::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `DeletionMode::NewFeature` is defined. +/// Specifically, when `deletionmode` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `DeletionMode::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum DeletionMode { + #[allow(missing_docs)] // documentation missing in model + ForceDeleteStack, + #[allow(missing_docs)] // documentation missing in model + Standard, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for DeletionMode { + fn from(s: &str) -> Self { + match s { + "FORCE_DELETE_STACK" => DeletionMode::ForceDeleteStack, + "STANDARD" => DeletionMode::Standard, + other => DeletionMode::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for DeletionMode { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(DeletionMode::from(s)) + } +} +impl DeletionMode { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + DeletionMode::ForceDeleteStack => "FORCE_DELETE_STACK", + DeletionMode::Standard => "STANDARD", + DeletionMode::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &["FORCE_DELETE_STACK", "STANDARD"] + } +} +impl ::std::convert::AsRef for DeletionMode { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl DeletionMode { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for DeletionMode { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + DeletionMode::ForceDeleteStack => write!(f, "FORCE_DELETE_STACK"), + DeletionMode::Standard => write!(f, "STANDARD"), + DeletionMode::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/cloudformation/src/types/_stack.rs b/sdk/cloudformation/src/types/_stack.rs index 98b73db23877..58375b656ff8 100644 --- a/sdk/cloudformation/src/types/_stack.rs +++ b/sdk/cloudformation/src/types/_stack.rs @@ -60,6 +60,14 @@ pub struct Stack { ///

When set to true, newly created resources are deleted when the operation rolls back. This includes newly created resources marked with a deletion policy of Retain.

///

Default: false

pub retain_except_on_create: ::std::option::Option, + ///

Specifies the deletion mode for the stack. Possible values are:

+ ///
    + ///
  • + ///

    STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • + ///
  • + ///

    FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.

  • + ///
+ pub deletion_mode: ::std::option::Option, ///

The detailed status of the resource or stack. If CONFIGURATION_COMPLETE is present, the resource or resource configuration phase has completed and the stabilization of the resources is in progress. The stack sets CONFIGURATION_COMPLETE when all of the resources in the stack have reached that event. For more information, see CloudFormation stack deployment in the CloudFormation User Guide.

pub detailed_status: ::std::option::Option, } @@ -176,6 +184,16 @@ impl Stack { pub fn retain_except_on_create(&self) -> ::std::option::Option { self.retain_except_on_create } + ///

Specifies the deletion mode for the stack. Possible values are:

+ ///
    + ///
  • + ///

    STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • + ///
  • + ///

    FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.

  • + ///
+ pub fn deletion_mode(&self) -> ::std::option::Option<&crate::types::DeletionMode> { + self.deletion_mode.as_ref() + } ///

The detailed status of the resource or stack. If CONFIGURATION_COMPLETE is present, the resource or resource configuration phase has completed and the stabilization of the resources is in progress. The stack sets CONFIGURATION_COMPLETE when all of the resources in the stack have reached that event. For more information, see CloudFormation stack deployment in the CloudFormation User Guide.

pub fn detailed_status(&self) -> ::std::option::Option<&crate::types::DetailedStatus> { self.detailed_status.as_ref() @@ -215,6 +233,7 @@ pub struct StackBuilder { pub(crate) root_id: ::std::option::Option<::std::string::String>, pub(crate) drift_information: ::std::option::Option, pub(crate) retain_except_on_create: ::std::option::Option, + pub(crate) deletion_mode: ::std::option::Option, pub(crate) detailed_status: ::std::option::Option, } impl StackBuilder { @@ -603,6 +622,38 @@ impl StackBuilder { pub fn get_retain_except_on_create(&self) -> &::std::option::Option { &self.retain_except_on_create } + ///

Specifies the deletion mode for the stack. Possible values are:

+ ///
    + ///
  • + ///

    STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • + ///
  • + ///

    FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.

  • + ///
+ pub fn deletion_mode(mut self, input: crate::types::DeletionMode) -> Self { + self.deletion_mode = ::std::option::Option::Some(input); + self + } + ///

Specifies the deletion mode for the stack. Possible values are:

+ ///
    + ///
  • + ///

    STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • + ///
  • + ///

    FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.

  • + ///
+ pub fn set_deletion_mode(mut self, input: ::std::option::Option) -> Self { + self.deletion_mode = input; + self + } + ///

Specifies the deletion mode for the stack. Possible values are:

+ ///
    + ///
  • + ///

    STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter.

  • + ///
  • + ///

    FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure.

  • + ///
+ pub fn get_deletion_mode(&self) -> &::std::option::Option { + &self.deletion_mode + } ///

The detailed status of the resource or stack. If CONFIGURATION_COMPLETE is present, the resource or resource configuration phase has completed and the stabilization of the resources is in progress. The stack sets CONFIGURATION_COMPLETE when all of the resources in the stack have reached that event. For more information, see CloudFormation stack deployment in the CloudFormation User Guide.

pub fn detailed_status(mut self, input: crate::types::DetailedStatus) -> Self { self.detailed_status = ::std::option::Option::Some(input); @@ -643,6 +694,7 @@ impl StackBuilder { root_id: self.root_id, drift_information: self.drift_information, retain_except_on_create: self.retain_except_on_create, + deletion_mode: self.deletion_mode, detailed_status: self.detailed_status, } } diff --git a/sdk/cloudformation/src/types/_stack_set_operation_preferences.rs b/sdk/cloudformation/src/types/_stack_set_operation_preferences.rs index cd6ce6e57256..a57378ffb388 100644 --- a/sdk/cloudformation/src/types/_stack_set_operation_preferences.rs +++ b/sdk/cloudformation/src/types/_stack_set_operation_preferences.rs @@ -34,7 +34,7 @@ pub struct StackSetOperationPreferences { ///

Specifies how the concurrency level behaves during the operation execution.

///
    ///
  • - ///

    STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value of FailureToleranceCount +1. The initial actual concurrency is set to the lower of either the value of the MaxConcurrentCount, or the value of MaxConcurrentCount +1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior.

    + ///

    STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value of FailureToleranceCount +1. The initial actual concurrency is set to the lower of either the value of the MaxConcurrentCount, or the value of FailureToleranceCount +1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior.

    ///

    If failure tolerance or Maximum concurrent accounts are set to percentages, the behavior is similar.

  • ///
  • ///

    SOFT_FAILURE_TOLERANCE: This option decouples FailureToleranceCount from the actual concurrency. This allows stack set operations to run at the concurrency level set by the MaxConcurrentCount value, or MaxConcurrentPercentage, regardless of the number of failures.

  • @@ -85,7 +85,7 @@ impl StackSetOperationPreferences { ///

    Specifies how the concurrency level behaves during the operation execution.

    ///
      ///
    • - ///

      STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value of FailureToleranceCount +1. The initial actual concurrency is set to the lower of either the value of the MaxConcurrentCount, or the value of MaxConcurrentCount +1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior.

      + ///

      STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value of FailureToleranceCount +1. The initial actual concurrency is set to the lower of either the value of the MaxConcurrentCount, or the value of FailureToleranceCount +1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior.

      ///

      If failure tolerance or Maximum concurrent accounts are set to percentages, the behavior is similar.

    • ///
    • ///

      SOFT_FAILURE_TOLERANCE: This option decouples FailureToleranceCount from the actual concurrency. This allows stack set operations to run at the concurrency level set by the MaxConcurrentCount value, or MaxConcurrentPercentage, regardless of the number of failures.

    • @@ -249,7 +249,7 @@ impl StackSetOperationPreferencesBuilder { ///

      Specifies how the concurrency level behaves during the operation execution.

      ///
        ///
      • - ///

        STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value of FailureToleranceCount +1. The initial actual concurrency is set to the lower of either the value of the MaxConcurrentCount, or the value of MaxConcurrentCount +1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior.

        + ///

        STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value of FailureToleranceCount +1. The initial actual concurrency is set to the lower of either the value of the MaxConcurrentCount, or the value of FailureToleranceCount +1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior.

        ///

        If failure tolerance or Maximum concurrent accounts are set to percentages, the behavior is similar.

      • ///
      • ///

        SOFT_FAILURE_TOLERANCE: This option decouples FailureToleranceCount from the actual concurrency. This allows stack set operations to run at the concurrency level set by the MaxConcurrentCount value, or MaxConcurrentPercentage, regardless of the number of failures.

      • @@ -261,7 +261,7 @@ impl StackSetOperationPreferencesBuilder { ///

        Specifies how the concurrency level behaves during the operation execution.

        ///
          ///
        • - ///

          STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value of FailureToleranceCount +1. The initial actual concurrency is set to the lower of either the value of the MaxConcurrentCount, or the value of MaxConcurrentCount +1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior.

          + ///

          STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value of FailureToleranceCount +1. The initial actual concurrency is set to the lower of either the value of the MaxConcurrentCount, or the value of FailureToleranceCount +1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior.

          ///

          If failure tolerance or Maximum concurrent accounts are set to percentages, the behavior is similar.

        • ///
        • ///

          SOFT_FAILURE_TOLERANCE: This option decouples FailureToleranceCount from the actual concurrency. This allows stack set operations to run at the concurrency level set by the MaxConcurrentCount value, or MaxConcurrentPercentage, regardless of the number of failures.

        • @@ -273,7 +273,7 @@ impl StackSetOperationPreferencesBuilder { ///

          Specifies how the concurrency level behaves during the operation execution.

          ///
            ///
          • - ///

            STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value of FailureToleranceCount +1. The initial actual concurrency is set to the lower of either the value of the MaxConcurrentCount, or the value of MaxConcurrentCount +1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior.

            + ///

            STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value of FailureToleranceCount +1. The initial actual concurrency is set to the lower of either the value of the MaxConcurrentCount, or the value of FailureToleranceCount +1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior.

            ///

            If failure tolerance or Maximum concurrent accounts are set to percentages, the behavior is similar.

          • ///
          • ///

            SOFT_FAILURE_TOLERANCE: This option decouples FailureToleranceCount from the actual concurrency. This allows stack set operations to run at the concurrency level set by the MaxConcurrentCount value, or MaxConcurrentPercentage, regardless of the number of failures.

          • diff --git a/sdk/kms/src/client/get_parameters_for_import.rs b/sdk/kms/src/client/get_parameters_for_import.rs index b0c1a42c586d..43cf3ec2daeb 100644 --- a/sdk/kms/src/client/get_parameters_for_import.rs +++ b/sdk/kms/src/client/get_parameters_for_import.rs @@ -4,8 +4,8 @@ impl super::Client { /// /// - The fluent builder is configurable: /// - [`key_id(impl Into)`](crate::operation::get_parameters_for_import::builders::GetParametersForImportFluentBuilder::key_id) / [`set_key_id(Option)`](crate::operation::get_parameters_for_import::builders::GetParametersForImportFluentBuilder::set_key_id):
            required: **true**

            The identifier of the KMS key that will be associated with the imported key material. The Origin of the KMS key must be EXTERNAL.

            All KMS key types are supported, including multi-Region keys. However, you cannot import key material into a KMS key in a custom key store.

            Specify the key ID or key ARN of the KMS key.

            For example:

            • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

            • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

            To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.


            - /// - [`wrapping_algorithm(AlgorithmSpec)`](crate::operation::get_parameters_for_import::builders::GetParametersForImportFluentBuilder::wrapping_algorithm) / [`set_wrapping_algorithm(Option)`](crate::operation::get_parameters_for_import::builders::GetParametersForImportFluentBuilder::set_wrapping_algorithm):
            required: **true**

            The algorithm you will use with the RSA public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

            For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.

            The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.

            • RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.

            • RSA_AES_KEY_WRAP_SHA_1 — Supported for wrapping RSA and ECC key material.

            • RSAES_OAEP_SHA_256 — Supported for all types of key material, except RSA key material (private key).

              You cannot use the RSAES_OAEP_SHA_256 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

            • RSAES_OAEP_SHA_1 — Supported for all types of key material, except RSA key material (private key).

              You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

            • RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.


            - /// - [`wrapping_key_spec(WrappingKeySpec)`](crate::operation::get_parameters_for_import::builders::GetParametersForImportFluentBuilder::wrapping_key_spec) / [`set_wrapping_key_spec(Option)`](crate::operation::get_parameters_for_import::builders::GetParametersForImportFluentBuilder::set_wrapping_key_spec):
            required: **true**

            The type of RSA public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

            Use the longest RSA wrapping key that is practical.

            You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.


            + /// - [`wrapping_algorithm(AlgorithmSpec)`](crate::operation::get_parameters_for_import::builders::GetParametersForImportFluentBuilder::wrapping_algorithm) / [`set_wrapping_algorithm(Option)`](crate::operation::get_parameters_for_import::builders::GetParametersForImportFluentBuilder::set_wrapping_algorithm):
            required: **true**

            The algorithm you will use with the asymmetric public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

            For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS. For SM2PKE wrapping algorithms, you encrypt your key material directly with the SM2 public key from KMS.

            The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm, except in China Regions, where you must use the SM2PKE wrapping algorithm to import an RSA private key.

            The SM2PKE wrapping algorithm is available only in China Regions. The RSA_AES_KEY_WRAP_SHA_256 and RSA_AES_KEY_WRAP_SHA_1 wrapping algorithms are not supported in China Regions.

            • RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.

            • RSA_AES_KEY_WRAP_SHA_1 — Supported for wrapping RSA and ECC key material.

            • RSAES_OAEP_SHA_256 — Supported for all types of key material, except RSA key material (private key).

              You cannot use the RSAES_OAEP_SHA_256 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

            • RSAES_OAEP_SHA_1 — Supported for all types of key material, except RSA key material (private key).

              You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

            • RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.

            • SM2PKE (China Regions only) — supported for wrapping RSA, ECC, and SM2 key material.


            + /// - [`wrapping_key_spec(WrappingKeySpec)`](crate::operation::get_parameters_for_import::builders::GetParametersForImportFluentBuilder::wrapping_key_spec) / [`set_wrapping_key_spec(Option)`](crate::operation::get_parameters_for_import::builders::GetParametersForImportFluentBuilder::set_wrapping_key_spec):
            required: **true**

            The type of public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

            Use the longest wrapping key that is practical.

            You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

            The SM2 wrapping key spec is available only in China Regions.


            /// - On success, responds with [`GetParametersForImportOutput`](crate::operation::get_parameters_for_import::GetParametersForImportOutput) with field(s): /// - [`key_id(Option)`](crate::operation::get_parameters_for_import::GetParametersForImportOutput::key_id):

            The Amazon Resource Name (key ARN) of the KMS key to use in a subsequent ImportKeyMaterial request. This is the same KMS key specified in the GetParametersForImport request.

            /// - [`import_token(Option)`](crate::operation::get_parameters_for_import::GetParametersForImportOutput::import_token):

            The import token to send in a subsequent ImportKeyMaterial request.

            diff --git a/sdk/kms/src/operation/get_parameters_for_import/_get_parameters_for_import_input.rs b/sdk/kms/src/operation/get_parameters_for_import/_get_parameters_for_import_input.rs index 6c9afe363b2b..60fc902e91db 100644 --- a/sdk/kms/src/operation/get_parameters_for_import/_get_parameters_for_import_input.rs +++ b/sdk/kms/src/operation/get_parameters_for_import/_get_parameters_for_import_input.rs @@ -15,9 +15,10 @@ pub struct GetParametersForImportInput { ///
          ///

          To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

          pub key_id: ::std::option::Option<::std::string::String>, - ///

          The algorithm you will use with the RSA public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

          - ///

          For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.

          - ///

          The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.

          + ///

          The algorithm you will use with the asymmetric public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

          + ///

          For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS. For SM2PKE wrapping algorithms, you encrypt your key material directly with the SM2 public key from KMS.

          + ///

          The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm, except in China Regions, where you must use the SM2PKE wrapping algorithm to import an RSA private key.

          + ///

          The SM2PKE wrapping algorithm is available only in China Regions. The RSA_AES_KEY_WRAP_SHA_256 and RSA_AES_KEY_WRAP_SHA_1 wrapping algorithms are not supported in China Regions.

          ///
            ///
          • ///

            RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.

          • @@ -31,11 +32,14 @@ pub struct GetParametersForImportInput { ///

            You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

            ///
          • ///

            RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.

          • + ///
          • + ///

            SM2PKE (China Regions only) — supported for wrapping RSA, ECC, and SM2 key material.

          • ///
          pub wrapping_algorithm: ::std::option::Option, - ///

          The type of RSA public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

          - ///

          Use the longest RSA wrapping key that is practical.

          + ///

          The type of public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

          + ///

          Use the longest wrapping key that is practical.

          ///

          You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

          + ///

          The SM2 wrapping key spec is available only in China Regions.

          pub wrapping_key_spec: ::std::option::Option, } impl GetParametersForImportInput { @@ -53,9 +57,10 @@ impl GetParametersForImportInput { pub fn key_id(&self) -> ::std::option::Option<&str> { self.key_id.as_deref() } - ///

          The algorithm you will use with the RSA public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

          - ///

          For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.

          - ///

          The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.

          + ///

          The algorithm you will use with the asymmetric public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

          + ///

          For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS. For SM2PKE wrapping algorithms, you encrypt your key material directly with the SM2 public key from KMS.

          + ///

          The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm, except in China Regions, where you must use the SM2PKE wrapping algorithm to import an RSA private key.

          + ///

          The SM2PKE wrapping algorithm is available only in China Regions. The RSA_AES_KEY_WRAP_SHA_256 and RSA_AES_KEY_WRAP_SHA_1 wrapping algorithms are not supported in China Regions.

          ///
            ///
          • ///

            RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.

          • @@ -69,13 +74,16 @@ impl GetParametersForImportInput { ///

            You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

            ///
          • ///

            RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.

          • + ///
          • + ///

            SM2PKE (China Regions only) — supported for wrapping RSA, ECC, and SM2 key material.

          • ///
          pub fn wrapping_algorithm(&self) -> ::std::option::Option<&crate::types::AlgorithmSpec> { self.wrapping_algorithm.as_ref() } - ///

          The type of RSA public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

          - ///

          Use the longest RSA wrapping key that is practical.

          + ///

          The type of public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

          + ///

          Use the longest wrapping key that is practical.

          ///

          You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

          + ///

          The SM2 wrapping key spec is available only in China Regions.

          pub fn wrapping_key_spec(&self) -> ::std::option::Option<&crate::types::WrappingKeySpec> { self.wrapping_key_spec.as_ref() } @@ -141,9 +149,10 @@ impl GetParametersForImportInputBuilder { pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> { &self.key_id } - ///

          The algorithm you will use with the RSA public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

          - ///

          For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.

          - ///

          The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.

          + ///

          The algorithm you will use with the asymmetric public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

          + ///

          For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS. For SM2PKE wrapping algorithms, you encrypt your key material directly with the SM2 public key from KMS.

          + ///

          The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm, except in China Regions, where you must use the SM2PKE wrapping algorithm to import an RSA private key.

          + ///

          The SM2PKE wrapping algorithm is available only in China Regions. The RSA_AES_KEY_WRAP_SHA_256 and RSA_AES_KEY_WRAP_SHA_1 wrapping algorithms are not supported in China Regions.

          ///
            ///
          • ///

            RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.

          • @@ -157,15 +166,18 @@ impl GetParametersForImportInputBuilder { ///

            You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

            ///
          • ///

            RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.

          • + ///
          • + ///

            SM2PKE (China Regions only) — supported for wrapping RSA, ECC, and SM2 key material.

          • ///
          /// This field is required. pub fn wrapping_algorithm(mut self, input: crate::types::AlgorithmSpec) -> Self { self.wrapping_algorithm = ::std::option::Option::Some(input); self } - ///

          The algorithm you will use with the RSA public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

          - ///

          For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.

          - ///

          The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.

          + ///

          The algorithm you will use with the asymmetric public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

          + ///

          For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS. For SM2PKE wrapping algorithms, you encrypt your key material directly with the SM2 public key from KMS.

          + ///

          The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm, except in China Regions, where you must use the SM2PKE wrapping algorithm to import an RSA private key.

          + ///

          The SM2PKE wrapping algorithm is available only in China Regions. The RSA_AES_KEY_WRAP_SHA_256 and RSA_AES_KEY_WRAP_SHA_1 wrapping algorithms are not supported in China Regions.

          ///
            ///
          • ///

            RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.

          • @@ -179,14 +191,17 @@ impl GetParametersForImportInputBuilder { ///

            You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

            ///
          • ///

            RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.

          • + ///
          • + ///

            SM2PKE (China Regions only) — supported for wrapping RSA, ECC, and SM2 key material.

          • ///
          pub fn set_wrapping_algorithm(mut self, input: ::std::option::Option) -> Self { self.wrapping_algorithm = input; self } - ///

          The algorithm you will use with the RSA public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

          - ///

          For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.

          - ///

          The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.

          + ///

          The algorithm you will use with the asymmetric public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

          + ///

          For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS. For SM2PKE wrapping algorithms, you encrypt your key material directly with the SM2 public key from KMS.

          + ///

          The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm, except in China Regions, where you must use the SM2PKE wrapping algorithm to import an RSA private key.

          + ///

          The SM2PKE wrapping algorithm is available only in China Regions. The RSA_AES_KEY_WRAP_SHA_256 and RSA_AES_KEY_WRAP_SHA_1 wrapping algorithms are not supported in China Regions.

          ///
            ///
          • ///

            RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.

          • @@ -200,28 +215,33 @@ impl GetParametersForImportInputBuilder { ///

            You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

            ///
          • ///

            RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.

          • + ///
          • + ///

            SM2PKE (China Regions only) — supported for wrapping RSA, ECC, and SM2 key material.

          • ///
          pub fn get_wrapping_algorithm(&self) -> &::std::option::Option { &self.wrapping_algorithm } - ///

          The type of RSA public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

          - ///

          Use the longest RSA wrapping key that is practical.

          + ///

          The type of public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

          + ///

          Use the longest wrapping key that is practical.

          ///

          You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

          + ///

          The SM2 wrapping key spec is available only in China Regions.

          /// This field is required. pub fn wrapping_key_spec(mut self, input: crate::types::WrappingKeySpec) -> Self { self.wrapping_key_spec = ::std::option::Option::Some(input); self } - ///

          The type of RSA public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

          - ///

          Use the longest RSA wrapping key that is practical.

          + ///

          The type of public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

          + ///

          Use the longest wrapping key that is practical.

          ///

          You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

          + ///

          The SM2 wrapping key spec is available only in China Regions.

          pub fn set_wrapping_key_spec(mut self, input: ::std::option::Option) -> Self { self.wrapping_key_spec = input; self } - ///

          The type of RSA public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

          - ///

          Use the longest RSA wrapping key that is practical.

          + ///

          The type of public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

          + ///

          Use the longest wrapping key that is practical.

          ///

          You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

          + ///

          The SM2 wrapping key spec is available only in China Regions.

          pub fn get_wrapping_key_spec(&self) -> &::std::option::Option { &self.wrapping_key_spec } diff --git a/sdk/kms/src/operation/get_parameters_for_import/builders.rs b/sdk/kms/src/operation/get_parameters_for_import/builders.rs index d9b2d58e920c..284f2522e7d4 100644 --- a/sdk/kms/src/operation/get_parameters_for_import/builders.rs +++ b/sdk/kms/src/operation/get_parameters_for_import/builders.rs @@ -28,7 +28,7 @@ impl crate::operation::get_parameters_for_import::builders::GetParametersForImpo ///

          GetParametersForImport returns the items that you need to import your key material.

          ///
            ///
          • -///

            The public key (or "wrapping key") of an RSA key pair that KMS generates.

            +///

            The public key (or "wrapping key") of an asymmetric key pair that KMS generates.

            ///

            You will use this public key to encrypt ("wrap") your key material while it's in transit to KMS.

          • ///
          • ///

            A import token that ensures that KMS can decrypt your key material and associate it with the correct KMS key.

          • @@ -184,9 +184,10 @@ impl GetParametersForImportFluentBuilder { pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_key_id() } - ///

            The algorithm you will use with the RSA public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

            - ///

            For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.

            - ///

            The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.

            + ///

            The algorithm you will use with the asymmetric public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

            + ///

            For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS. For SM2PKE wrapping algorithms, you encrypt your key material directly with the SM2 public key from KMS.

            + ///

            The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm, except in China Regions, where you must use the SM2PKE wrapping algorithm to import an RSA private key.

            + ///

            The SM2PKE wrapping algorithm is available only in China Regions. The RSA_AES_KEY_WRAP_SHA_256 and RSA_AES_KEY_WRAP_SHA_1 wrapping algorithms are not supported in China Regions.

            ///
              ///
            • ///

              RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.

            • @@ -200,14 +201,17 @@ impl GetParametersForImportFluentBuilder { ///

              You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

              ///
            • ///

              RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.

            • + ///
            • + ///

              SM2PKE (China Regions only) — supported for wrapping RSA, ECC, and SM2 key material.

            • ///
            pub fn wrapping_algorithm(mut self, input: crate::types::AlgorithmSpec) -> Self { self.inner = self.inner.wrapping_algorithm(input); self } - ///

            The algorithm you will use with the RSA public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

            - ///

            For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.

            - ///

            The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.

            + ///

            The algorithm you will use with the asymmetric public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

            + ///

            For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS. For SM2PKE wrapping algorithms, you encrypt your key material directly with the SM2 public key from KMS.

            + ///

            The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm, except in China Regions, where you must use the SM2PKE wrapping algorithm to import an RSA private key.

            + ///

            The SM2PKE wrapping algorithm is available only in China Regions. The RSA_AES_KEY_WRAP_SHA_256 and RSA_AES_KEY_WRAP_SHA_1 wrapping algorithms are not supported in China Regions.

            ///
              ///
            • ///

              RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.

            • @@ -221,14 +225,17 @@ impl GetParametersForImportFluentBuilder { ///

              You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

              ///
            • ///

              RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.

            • + ///
            • + ///

              SM2PKE (China Regions only) — supported for wrapping RSA, ECC, and SM2 key material.

            • ///
            pub fn set_wrapping_algorithm(mut self, input: ::std::option::Option) -> Self { self.inner = self.inner.set_wrapping_algorithm(input); self } - ///

            The algorithm you will use with the RSA public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

            - ///

            For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.

            - ///

            The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.

            + ///

            The algorithm you will use with the asymmetric public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

            + ///

            For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS. For SM2PKE wrapping algorithms, you encrypt your key material directly with the SM2 public key from KMS.

            + ///

            The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm, except in China Regions, where you must use the SM2PKE wrapping algorithm to import an RSA private key.

            + ///

            The SM2PKE wrapping algorithm is available only in China Regions. The RSA_AES_KEY_WRAP_SHA_256 and RSA_AES_KEY_WRAP_SHA_1 wrapping algorithms are not supported in China Regions.

            ///
              ///
            • ///

              RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.

            • @@ -242,27 +249,32 @@ impl GetParametersForImportFluentBuilder { ///

              You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

              ///
            • ///

              RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.

            • + ///
            • + ///

              SM2PKE (China Regions only) — supported for wrapping RSA, ECC, and SM2 key material.

            • ///
            pub fn get_wrapping_algorithm(&self) -> &::std::option::Option { self.inner.get_wrapping_algorithm() } - ///

            The type of RSA public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

            - ///

            Use the longest RSA wrapping key that is practical.

            + ///

            The type of public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

            + ///

            Use the longest wrapping key that is practical.

            ///

            You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

            + ///

            The SM2 wrapping key spec is available only in China Regions.

            pub fn wrapping_key_spec(mut self, input: crate::types::WrappingKeySpec) -> Self { self.inner = self.inner.wrapping_key_spec(input); self } - ///

            The type of RSA public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

            - ///

            Use the longest RSA wrapping key that is practical.

            + ///

            The type of public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

            + ///

            Use the longest wrapping key that is practical.

            ///

            You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

            + ///

            The SM2 wrapping key spec is available only in China Regions.

            pub fn set_wrapping_key_spec(mut self, input: ::std::option::Option) -> Self { self.inner = self.inner.set_wrapping_key_spec(input); self } - ///

            The type of RSA public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

            - ///

            Use the longest RSA wrapping key that is practical.

            + ///

            The type of public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

            + ///

            Use the longest wrapping key that is practical.

            ///

            You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

            + ///

            The SM2 wrapping key spec is available only in China Regions.

            pub fn get_wrapping_key_spec(&self) -> &::std::option::Option { self.inner.get_wrapping_key_spec() } diff --git a/sdk/kms/src/types/_algorithm_spec.rs b/sdk/kms/src/types/_algorithm_spec.rs index 0e0bac560296..3d01d100eaa4 100644 --- a/sdk/kms/src/types/_algorithm_spec.rs +++ b/sdk/kms/src/types/_algorithm_spec.rs @@ -17,6 +17,7 @@ /// AlgorithmSpec::RsaesPkcs1V15 => { /* ... */ }, /// AlgorithmSpec::RsaAesKeyWrapSha1 => { /* ... */ }, /// AlgorithmSpec::RsaAesKeyWrapSha256 => { /* ... */ }, +/// AlgorithmSpec::Sm2Pke => { /* ... */ }, /// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, /// _ => { /* ... */ }, /// } @@ -54,6 +55,8 @@ pub enum AlgorithmSpec { RsaAesKeyWrapSha1, #[allow(missing_docs)] // documentation missing in model RsaAesKeyWrapSha256, + #[allow(missing_docs)] // documentation missing in model + Sm2Pke, /// `Unknown` contains new variants that have been added since this code was generated. #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), @@ -66,6 +69,7 @@ impl ::std::convert::From<&str> for AlgorithmSpec { "RSAES_PKCS1_V1_5" => AlgorithmSpec::RsaesPkcs1V15, "RSA_AES_KEY_WRAP_SHA_1" => AlgorithmSpec::RsaAesKeyWrapSha1, "RSA_AES_KEY_WRAP_SHA_256" => AlgorithmSpec::RsaAesKeyWrapSha256, + "SM2PKE" => AlgorithmSpec::Sm2Pke, other => AlgorithmSpec::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), } } @@ -86,6 +90,7 @@ impl AlgorithmSpec { AlgorithmSpec::RsaesPkcs1V15 => "RSAES_PKCS1_V1_5", AlgorithmSpec::RsaAesKeyWrapSha1 => "RSA_AES_KEY_WRAP_SHA_1", AlgorithmSpec::RsaAesKeyWrapSha256 => "RSA_AES_KEY_WRAP_SHA_256", + AlgorithmSpec::Sm2Pke => "SM2PKE", AlgorithmSpec::Unknown(value) => value.as_str(), } } @@ -97,6 +102,7 @@ impl AlgorithmSpec { "RSAES_PKCS1_V1_5", "RSA_AES_KEY_WRAP_SHA_1", "RSA_AES_KEY_WRAP_SHA_256", + "SM2PKE", ] } } @@ -125,6 +131,7 @@ impl ::std::fmt::Display for AlgorithmSpec { AlgorithmSpec::RsaesPkcs1V15 => write!(f, "RSAES_PKCS1_V1_5"), AlgorithmSpec::RsaAesKeyWrapSha1 => write!(f, "RSA_AES_KEY_WRAP_SHA_1"), AlgorithmSpec::RsaAesKeyWrapSha256 => write!(f, "RSA_AES_KEY_WRAP_SHA_256"), + AlgorithmSpec::Sm2Pke => write!(f, "SM2PKE"), AlgorithmSpec::Unknown(value) => write!(f, "{}", value), } } diff --git a/sdk/kms/src/types/_wrapping_key_spec.rs b/sdk/kms/src/types/_wrapping_key_spec.rs index d2eb3df3c3f8..6428a3b85167 100644 --- a/sdk/kms/src/types/_wrapping_key_spec.rs +++ b/sdk/kms/src/types/_wrapping_key_spec.rs @@ -15,6 +15,7 @@ /// WrappingKeySpec::Rsa2048 => { /* ... */ }, /// WrappingKeySpec::Rsa3072 => { /* ... */ }, /// WrappingKeySpec::Rsa4096 => { /* ... */ }, +/// WrappingKeySpec::Sm2 => { /* ... */ }, /// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, /// _ => { /* ... */ }, /// } @@ -48,6 +49,8 @@ pub enum WrappingKeySpec { Rsa3072, #[allow(missing_docs)] // documentation missing in model Rsa4096, + #[allow(missing_docs)] // documentation missing in model + Sm2, /// `Unknown` contains new variants that have been added since this code was generated. #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), @@ -58,6 +61,7 @@ impl ::std::convert::From<&str> for WrappingKeySpec { "RSA_2048" => WrappingKeySpec::Rsa2048, "RSA_3072" => WrappingKeySpec::Rsa3072, "RSA_4096" => WrappingKeySpec::Rsa4096, + "SM2" => WrappingKeySpec::Sm2, other => WrappingKeySpec::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), } } @@ -76,12 +80,13 @@ impl WrappingKeySpec { WrappingKeySpec::Rsa2048 => "RSA_2048", WrappingKeySpec::Rsa3072 => "RSA_3072", WrappingKeySpec::Rsa4096 => "RSA_4096", + WrappingKeySpec::Sm2 => "SM2", WrappingKeySpec::Unknown(value) => value.as_str(), } } /// Returns all the `&str` representations of the enum members. pub const fn values() -> &'static [&'static str] { - &["RSA_2048", "RSA_3072", "RSA_4096"] + &["RSA_2048", "RSA_3072", "RSA_4096", "SM2"] } } impl ::std::convert::AsRef for WrappingKeySpec { @@ -107,6 +112,7 @@ impl ::std::fmt::Display for WrappingKeySpec { WrappingKeySpec::Rsa2048 => write!(f, "RSA_2048"), WrappingKeySpec::Rsa3072 => write!(f, "RSA_3072"), WrappingKeySpec::Rsa4096 => write!(f, "RSA_4096"), + WrappingKeySpec::Sm2 => write!(f, "SM2"), WrappingKeySpec::Unknown(value) => write!(f, "{}", value), } } diff --git a/sdk/opensearch/src/client/get_data_source.rs b/sdk/opensearch/src/client/get_data_source.rs index 1e268c83bdf9..836a98b5809b 100644 --- a/sdk/opensearch/src/client/get_data_source.rs +++ b/sdk/opensearch/src/client/get_data_source.rs @@ -9,6 +9,7 @@ impl super::Client { /// - [`data_source_type(Option)`](crate::operation::get_data_source::GetDataSourceOutput::data_source_type):

            The type of data source.

            /// - [`name(Option)`](crate::operation::get_data_source::GetDataSourceOutput::name):

            The name of the data source.

            /// - [`description(Option)`](crate::operation::get_data_source::GetDataSourceOutput::description):

            A description of the data source.

            + /// - [`status(Option)`](crate::operation::get_data_source::GetDataSourceOutput::status):

            The status of the data source response.

            /// - On failure, responds with [`SdkError`](crate::operation::get_data_source::GetDataSourceError) pub fn get_data_source(&self) -> crate::operation::get_data_source::builders::GetDataSourceFluentBuilder { crate::operation::get_data_source::builders::GetDataSourceFluentBuilder::new(self.handle.clone()) diff --git a/sdk/opensearch/src/client/update_data_source.rs b/sdk/opensearch/src/client/update_data_source.rs index e870ca711202..8b3662c49142 100644 --- a/sdk/opensearch/src/client/update_data_source.rs +++ b/sdk/opensearch/src/client/update_data_source.rs @@ -7,6 +7,7 @@ impl super::Client { /// - [`name(impl Into)`](crate::operation::update_data_source::builders::UpdateDataSourceFluentBuilder::name) / [`set_name(Option)`](crate::operation::update_data_source::builders::UpdateDataSourceFluentBuilder::set_name):
            required: **true**

            The name of the data source to modify.


            /// - [`data_source_type(DataSourceType)`](crate::operation::update_data_source::builders::UpdateDataSourceFluentBuilder::data_source_type) / [`set_data_source_type(Option)`](crate::operation::update_data_source::builders::UpdateDataSourceFluentBuilder::set_data_source_type):
            required: **true**

            The type of data source.


            /// - [`description(impl Into)`](crate::operation::update_data_source::builders::UpdateDataSourceFluentBuilder::description) / [`set_description(Option)`](crate::operation::update_data_source::builders::UpdateDataSourceFluentBuilder::set_description):
            required: **false**

            A new description of the data source.


            + /// - [`status(DataSourceStatus)`](crate::operation::update_data_source::builders::UpdateDataSourceFluentBuilder::status) / [`set_status(Option)`](crate::operation::update_data_source::builders::UpdateDataSourceFluentBuilder::set_status):
            required: **false**

            The status of the data source update request.


            /// - On success, responds with [`UpdateDataSourceOutput`](crate::operation::update_data_source::UpdateDataSourceOutput) with field(s): /// - [`message(Option)`](crate::operation::update_data_source::UpdateDataSourceOutput::message):

            A message associated with the updated data source.

            /// - On failure, responds with [`SdkError`](crate::operation::update_data_source::UpdateDataSourceError) diff --git a/sdk/opensearch/src/operation/get_data_source/_get_data_source_output.rs b/sdk/opensearch/src/operation/get_data_source/_get_data_source_output.rs index ef9ab551dd79..23ca9014a483 100644 --- a/sdk/opensearch/src/operation/get_data_source/_get_data_source_output.rs +++ b/sdk/opensearch/src/operation/get_data_source/_get_data_source_output.rs @@ -10,6 +10,8 @@ pub struct GetDataSourceOutput { pub name: ::std::option::Option<::std::string::String>, ///

            A description of the data source.

            pub description: ::std::option::Option<::std::string::String>, + ///

            The status of the data source response.

            + pub status: ::std::option::Option, _request_id: Option, } impl GetDataSourceOutput { @@ -25,6 +27,10 @@ impl GetDataSourceOutput { pub fn description(&self) -> ::std::option::Option<&str> { self.description.as_deref() } + ///

            The status of the data source response.

            + pub fn status(&self) -> ::std::option::Option<&crate::types::DataSourceStatus> { + self.status.as_ref() + } } impl ::aws_types::request_id::RequestId for GetDataSourceOutput { fn request_id(&self) -> Option<&str> { @@ -45,6 +51,7 @@ pub struct GetDataSourceOutputBuilder { pub(crate) data_source_type: ::std::option::Option, pub(crate) name: ::std::option::Option<::std::string::String>, pub(crate) description: ::std::option::Option<::std::string::String>, + pub(crate) status: ::std::option::Option, _request_id: Option, } impl GetDataSourceOutputBuilder { @@ -90,6 +97,20 @@ impl GetDataSourceOutputBuilder { pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { &self.description } + ///

            The status of the data source response.

            + pub fn status(mut self, input: crate::types::DataSourceStatus) -> Self { + self.status = ::std::option::Option::Some(input); + self + } + ///

            The status of the data source response.

            + pub fn set_status(mut self, input: ::std::option::Option) -> Self { + self.status = input; + self + } + ///

            The status of the data source response.

            + pub fn get_status(&self) -> &::std::option::Option { + &self.status + } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -105,6 +126,7 @@ impl GetDataSourceOutputBuilder { data_source_type: self.data_source_type, name: self.name, description: self.description, + status: self.status, _request_id: self._request_id, } } diff --git a/sdk/opensearch/src/operation/update_data_source/_update_data_source_input.rs b/sdk/opensearch/src/operation/update_data_source/_update_data_source_input.rs index 38f14a4a7ce4..77235de63bd3 100644 --- a/sdk/opensearch/src/operation/update_data_source/_update_data_source_input.rs +++ b/sdk/opensearch/src/operation/update_data_source/_update_data_source_input.rs @@ -12,6 +12,8 @@ pub struct UpdateDataSourceInput { pub data_source_type: ::std::option::Option, ///

            A new description of the data source.

            pub description: ::std::option::Option<::std::string::String>, + ///

            The status of the data source update request.

            + pub status: ::std::option::Option, } impl UpdateDataSourceInput { ///

            The name of the domain.

            @@ -30,6 +32,10 @@ impl UpdateDataSourceInput { pub fn description(&self) -> ::std::option::Option<&str> { self.description.as_deref() } + ///

            The status of the data source update request.

            + pub fn status(&self) -> ::std::option::Option<&crate::types::DataSourceStatus> { + self.status.as_ref() + } } impl UpdateDataSourceInput { /// Creates a new builder-style object to manufacture [`UpdateDataSourceInput`](crate::operation::update_data_source::UpdateDataSourceInput). @@ -46,6 +52,7 @@ pub struct UpdateDataSourceInputBuilder { pub(crate) name: ::std::option::Option<::std::string::String>, pub(crate) data_source_type: ::std::option::Option, pub(crate) description: ::std::option::Option<::std::string::String>, + pub(crate) status: ::std::option::Option, } impl UpdateDataSourceInputBuilder { ///

            The name of the domain.

            @@ -107,6 +114,20 @@ impl UpdateDataSourceInputBuilder { pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { &self.description } + ///

            The status of the data source update request.

            + pub fn status(mut self, input: crate::types::DataSourceStatus) -> Self { + self.status = ::std::option::Option::Some(input); + self + } + ///

            The status of the data source update request.

            + pub fn set_status(mut self, input: ::std::option::Option) -> Self { + self.status = input; + self + } + ///

            The status of the data source update request.

            + pub fn get_status(&self) -> &::std::option::Option { + &self.status + } /// Consumes the builder and constructs a [`UpdateDataSourceInput`](crate::operation::update_data_source::UpdateDataSourceInput). pub fn build( self, @@ -116,6 +137,7 @@ impl UpdateDataSourceInputBuilder { name: self.name, data_source_type: self.data_source_type, description: self.description, + status: self.status, }) } } diff --git a/sdk/opensearch/src/operation/update_data_source/builders.rs b/sdk/opensearch/src/operation/update_data_source/builders.rs index b30425c0e47d..3aad9c2f8512 100644 --- a/sdk/opensearch/src/operation/update_data_source/builders.rs +++ b/sdk/opensearch/src/operation/update_data_source/builders.rs @@ -164,4 +164,18 @@ impl UpdateDataSourceFluentBuilder { pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_description() } + ///

            The status of the data source update request.

            + pub fn status(mut self, input: crate::types::DataSourceStatus) -> Self { + self.inner = self.inner.status(input); + self + } + ///

            The status of the data source update request.

            + pub fn set_status(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_status(input); + self + } + ///

            The status of the data source update request.

            + pub fn get_status(&self) -> &::std::option::Option { + self.inner.get_status() + } } diff --git a/sdk/opensearch/src/protocol_serde/shape_data_source_details.rs b/sdk/opensearch/src/protocol_serde/shape_data_source_details.rs index 9713293c9818..5595d3212002 100644 --- a/sdk/opensearch/src/protocol_serde/shape_data_source_details.rs +++ b/sdk/opensearch/src/protocol_serde/shape_data_source_details.rs @@ -31,6 +31,13 @@ where .transpose()?, ); } + "Status" => { + builder = builder.set_status( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::DataSourceStatus::from(u.as_ref()))) + .transpose()?, + ); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/opensearch/src/protocol_serde/shape_get_data_source.rs b/sdk/opensearch/src/protocol_serde/shape_get_data_source.rs index ccb71d0a7cda..1f6ebec918b0 100644 --- a/sdk/opensearch/src/protocol_serde/shape_get_data_source.rs +++ b/sdk/opensearch/src/protocol_serde/shape_get_data_source.rs @@ -155,6 +155,13 @@ pub(crate) fn de_get_data_source( .transpose()?, ); } + "Status" => { + builder = builder.set_status( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::DataSourceStatus::from(u.as_ref()))) + .transpose()?, + ); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/opensearch/src/protocol_serde/shape_update_data_source_input.rs b/sdk/opensearch/src/protocol_serde/shape_update_data_source_input.rs index 51228cb28f0f..c76bf713b72b 100644 --- a/sdk/opensearch/src/protocol_serde/shape_update_data_source_input.rs +++ b/sdk/opensearch/src/protocol_serde/shape_update_data_source_input.rs @@ -12,5 +12,8 @@ pub fn ser_update_data_source_input_input( if let Some(var_3) = &input.description { object.key("Description").string(var_3.as_str()); } + if let Some(var_4) = &input.status { + object.key("Status").string(var_4.as_str()); + } Ok(()) } diff --git a/sdk/opensearch/src/types.rs b/sdk/opensearch/src/types.rs index 8dfc679e4b00..7682a3e3e3cf 100644 --- a/sdk/opensearch/src/types.rs +++ b/sdk/opensearch/src/types.rs @@ -157,6 +157,8 @@ pub use crate::types::_saml_options_input::SamlOptionsInput; pub use crate::types::_master_user_options::MasterUserOptions; +pub use crate::types::_data_source_status::DataSourceStatus; + pub use crate::types::_data_source_type::DataSourceType; pub use crate::types::_s3_glue_data_catalog::S3GlueDataCatalog; @@ -379,6 +381,8 @@ mod _cross_cluster_search_connection_properties; mod _data_source_details; +mod _data_source_status; + mod _data_source_type; mod _deployment_status; diff --git a/sdk/opensearch/src/types/_data_source_details.rs b/sdk/opensearch/src/types/_data_source_details.rs index 094266a86708..ef3fed42c339 100644 --- a/sdk/opensearch/src/types/_data_source_details.rs +++ b/sdk/opensearch/src/types/_data_source_details.rs @@ -10,6 +10,8 @@ pub struct DataSourceDetails { pub name: ::std::option::Option<::std::string::String>, ///

            A description of the data source.

            pub description: ::std::option::Option<::std::string::String>, + ///

            The status of the data source.

            + pub status: ::std::option::Option, } impl DataSourceDetails { ///

            The type of data source.

            @@ -24,6 +26,10 @@ impl DataSourceDetails { pub fn description(&self) -> ::std::option::Option<&str> { self.description.as_deref() } + ///

            The status of the data source.

            + pub fn status(&self) -> ::std::option::Option<&crate::types::DataSourceStatus> { + self.status.as_ref() + } } impl DataSourceDetails { /// Creates a new builder-style object to manufacture [`DataSourceDetails`](crate::types::DataSourceDetails). @@ -39,6 +45,7 @@ pub struct DataSourceDetailsBuilder { pub(crate) data_source_type: ::std::option::Option, pub(crate) name: ::std::option::Option<::std::string::String>, pub(crate) description: ::std::option::Option<::std::string::String>, + pub(crate) status: ::std::option::Option, } impl DataSourceDetailsBuilder { ///

            The type of data source.

            @@ -83,12 +90,27 @@ impl DataSourceDetailsBuilder { pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { &self.description } + ///

            The status of the data source.

            + pub fn status(mut self, input: crate::types::DataSourceStatus) -> Self { + self.status = ::std::option::Option::Some(input); + self + } + ///

            The status of the data source.

            + pub fn set_status(mut self, input: ::std::option::Option) -> Self { + self.status = input; + self + } + ///

            The status of the data source.

            + pub fn get_status(&self) -> &::std::option::Option { + &self.status + } /// Consumes the builder and constructs a [`DataSourceDetails`](crate::types::DataSourceDetails). pub fn build(self) -> crate::types::DataSourceDetails { crate::types::DataSourceDetails { data_source_type: self.data_source_type, name: self.name, description: self.description, + status: self.status, } } } diff --git a/sdk/opensearch/src/types/_data_source_status.rs b/sdk/opensearch/src/types/_data_source_status.rs new file mode 100644 index 000000000000..d820edd59a60 --- /dev/null +++ b/sdk/opensearch/src/types/_data_source_status.rs @@ -0,0 +1,107 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `DataSourceStatus`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let datasourcestatus = unimplemented!(); +/// match datasourcestatus { +/// DataSourceStatus::Active => { /* ... */ }, +/// DataSourceStatus::Disabled => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `datasourcestatus` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `DataSourceStatus::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `DataSourceStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `DataSourceStatus::NewFeature` is defined. +/// Specifically, when `datasourcestatus` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `DataSourceStatus::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum DataSourceStatus { + #[allow(missing_docs)] // documentation missing in model + Active, + #[allow(missing_docs)] // documentation missing in model + Disabled, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for DataSourceStatus { + fn from(s: &str) -> Self { + match s { + "ACTIVE" => DataSourceStatus::Active, + "DISABLED" => DataSourceStatus::Disabled, + other => DataSourceStatus::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for DataSourceStatus { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(DataSourceStatus::from(s)) + } +} +impl DataSourceStatus { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + DataSourceStatus::Active => "ACTIVE", + DataSourceStatus::Disabled => "DISABLED", + DataSourceStatus::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &["ACTIVE", "DISABLED"] + } +} +impl ::std::convert::AsRef for DataSourceStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl DataSourceStatus { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for DataSourceStatus { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + DataSourceStatus::Active => write!(f, "ACTIVE"), + DataSourceStatus::Disabled => write!(f, "DISABLED"), + DataSourceStatus::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/opensearch/src/types/_domain_status.rs b/sdk/opensearch/src/types/_domain_status.rs index 444d4185672a..89adc216ccaf 100644 --- a/sdk/opensearch/src/types/_domain_status.rs +++ b/sdk/opensearch/src/types/_domain_status.rs @@ -26,7 +26,7 @@ pub struct DomainStatus { ///

            Dual stack IP addresses - 'vpcv2':'vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.aos.us-east-1.on.aws'

            ///
          pub endpoints: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, - ///

          The DualStack Hosted Zone Id for the domain.

          + ///

          The dual stack hosted zone ID for the domain.

          pub domain_endpoint_v2_hosted_zone_id: ::std::option::Option<::std::string::String>, ///

          The status of the domain configuration. True if OpenSearch Service is processing configuration changes. False if the configuration is active.

          pub processing: ::std::option::Option, @@ -117,7 +117,7 @@ impl DomainStatus { pub fn endpoints(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> { self.endpoints.as_ref() } - ///

          The DualStack Hosted Zone Id for the domain.

          + ///

          The dual stack hosted zone ID for the domain.

          pub fn domain_endpoint_v2_hosted_zone_id(&self) -> ::std::option::Option<&str> { self.domain_endpoint_v2_hosted_zone_id.as_deref() } @@ -402,17 +402,17 @@ impl DomainStatusBuilder { pub fn get_endpoints(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { &self.endpoints } - ///

          The DualStack Hosted Zone Id for the domain.

          + ///

          The dual stack hosted zone ID for the domain.

          pub fn domain_endpoint_v2_hosted_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.domain_endpoint_v2_hosted_zone_id = ::std::option::Option::Some(input.into()); self } - ///

          The DualStack Hosted Zone Id for the domain.

          + ///

          The dual stack hosted zone ID for the domain.

          pub fn set_domain_endpoint_v2_hosted_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.domain_endpoint_v2_hosted_zone_id = input; self } - ///

          The DualStack Hosted Zone Id for the domain.

          + ///

          The dual stack hosted zone ID for the domain.

          pub fn get_domain_endpoint_v2_hosted_zone_id(&self) -> &::std::option::Option<::std::string::String> { &self.domain_endpoint_v2_hosted_zone_id } diff --git a/sdk/wafv2/src/client/delete_logging_configuration.rs b/sdk/wafv2/src/client/delete_logging_configuration.rs index faea921b2115..38237094d010 100644 --- a/sdk/wafv2/src/client/delete_logging_configuration.rs +++ b/sdk/wafv2/src/client/delete_logging_configuration.rs @@ -4,6 +4,8 @@ impl super::Client { /// /// - The fluent builder is configurable: /// - [`resource_arn(impl Into)`](crate::operation::delete_logging_configuration::builders::DeleteLoggingConfigurationFluentBuilder::resource_arn) / [`set_resource_arn(Option)`](crate::operation::delete_logging_configuration::builders::DeleteLoggingConfigurationFluentBuilder::set_resource_arn):
          required: **true**

          The Amazon Resource Name (ARN) of the web ACL from which you want to delete the LoggingConfiguration.


          + /// - [`log_type(LogType)`](crate::operation::delete_logging_configuration::builders::DeleteLoggingConfigurationFluentBuilder::log_type) / [`set_log_type(Option)`](crate::operation::delete_logging_configuration::builders::DeleteLoggingConfigurationFluentBuilder::set_log_type):
          required: **false**

          Used to distinguish between various logging options. Currently, there is one option.

          Default: WAF_LOGS


          + /// - [`log_scope(LogScope)`](crate::operation::delete_logging_configuration::builders::DeleteLoggingConfigurationFluentBuilder::log_scope) / [`set_log_scope(Option)`](crate::operation::delete_logging_configuration::builders::DeleteLoggingConfigurationFluentBuilder::set_log_scope):
          required: **false**

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          Default: CUSTOMER


          /// - On success, responds with [`DeleteLoggingConfigurationOutput`](crate::operation::delete_logging_configuration::DeleteLoggingConfigurationOutput) /// - On failure, responds with [`SdkError`](crate::operation::delete_logging_configuration::DeleteLoggingConfigurationError) pub fn delete_logging_configuration(&self) -> crate::operation::delete_logging_configuration::builders::DeleteLoggingConfigurationFluentBuilder { diff --git a/sdk/wafv2/src/client/get_logging_configuration.rs b/sdk/wafv2/src/client/get_logging_configuration.rs index 2d5346259c58..78345501746d 100644 --- a/sdk/wafv2/src/client/get_logging_configuration.rs +++ b/sdk/wafv2/src/client/get_logging_configuration.rs @@ -4,6 +4,8 @@ impl super::Client { /// /// - The fluent builder is configurable: /// - [`resource_arn(impl Into)`](crate::operation::get_logging_configuration::builders::GetLoggingConfigurationFluentBuilder::resource_arn) / [`set_resource_arn(Option)`](crate::operation::get_logging_configuration::builders::GetLoggingConfigurationFluentBuilder::set_resource_arn):
          required: **true**

          The Amazon Resource Name (ARN) of the web ACL for which you want to get the LoggingConfiguration.


          + /// - [`log_type(LogType)`](crate::operation::get_logging_configuration::builders::GetLoggingConfigurationFluentBuilder::log_type) / [`set_log_type(Option)`](crate::operation::get_logging_configuration::builders::GetLoggingConfigurationFluentBuilder::set_log_type):
          required: **false**

          Used to distinguish between various logging options. Currently, there is one option.

          Default: WAF_LOGS


          + /// - [`log_scope(LogScope)`](crate::operation::get_logging_configuration::builders::GetLoggingConfigurationFluentBuilder::log_scope) / [`set_log_scope(Option)`](crate::operation::get_logging_configuration::builders::GetLoggingConfigurationFluentBuilder::set_log_scope):
          required: **false**

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          Default: CUSTOMER


          /// - On success, responds with [`GetLoggingConfigurationOutput`](crate::operation::get_logging_configuration::GetLoggingConfigurationOutput) with field(s): /// - [`logging_configuration(Option)`](crate::operation::get_logging_configuration::GetLoggingConfigurationOutput::logging_configuration):

          The LoggingConfiguration for the specified web ACL.

          /// - On failure, responds with [`SdkError`](crate::operation::get_logging_configuration::GetLoggingConfigurationError) diff --git a/sdk/wafv2/src/client/list_logging_configurations.rs b/sdk/wafv2/src/client/list_logging_configurations.rs index 20a908b459c7..65dd062b6a65 100644 --- a/sdk/wafv2/src/client/list_logging_configurations.rs +++ b/sdk/wafv2/src/client/list_logging_configurations.rs @@ -6,6 +6,7 @@ impl super::Client { /// - [`scope(Scope)`](crate::operation::list_logging_configurations::builders::ListLoggingConfigurationsFluentBuilder::scope) / [`set_scope(Option)`](crate::operation::list_logging_configurations::builders::ListLoggingConfigurationsFluentBuilder::set_scope):
          required: **true**

          Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

          To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

          • CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.

          • API and SDKs - For all calls, use the Region endpoint us-east-1.


          /// - [`next_marker(impl Into)`](crate::operation::list_logging_configurations::builders::ListLoggingConfigurationsFluentBuilder::next_marker) / [`set_next_marker(Option)`](crate::operation::list_logging_configurations::builders::ListLoggingConfigurationsFluentBuilder::set_next_marker):
          required: **false**

          When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.


          /// - [`limit(i32)`](crate::operation::list_logging_configurations::builders::ListLoggingConfigurationsFluentBuilder::limit) / [`set_limit(Option)`](crate::operation::list_logging_configurations::builders::ListLoggingConfigurationsFluentBuilder::set_limit):
          required: **false**

          The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a NextMarker value that you can use in a subsequent call to get the next batch of objects.


          + /// - [`log_scope(LogScope)`](crate::operation::list_logging_configurations::builders::ListLoggingConfigurationsFluentBuilder::log_scope) / [`set_log_scope(Option)`](crate::operation::list_logging_configurations::builders::ListLoggingConfigurationsFluentBuilder::set_log_scope):
          required: **false**

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          Default: CUSTOMER


          /// - On success, responds with [`ListLoggingConfigurationsOutput`](crate::operation::list_logging_configurations::ListLoggingConfigurationsOutput) with field(s): /// - [`logging_configurations(Option>)`](crate::operation::list_logging_configurations::ListLoggingConfigurationsOutput::logging_configurations):

          Array of logging configurations. If you specified a Limit in your request, this might not be the full list.

          /// - [`next_marker(Option)`](crate::operation::list_logging_configurations::ListLoggingConfigurationsOutput::next_marker):

          When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

          diff --git a/sdk/wafv2/src/operation/delete_logging_configuration/_delete_logging_configuration_input.rs b/sdk/wafv2/src/operation/delete_logging_configuration/_delete_logging_configuration_input.rs index 74bb08865268..26b58b3da272 100644 --- a/sdk/wafv2/src/operation/delete_logging_configuration/_delete_logging_configuration_input.rs +++ b/sdk/wafv2/src/operation/delete_logging_configuration/_delete_logging_configuration_input.rs @@ -5,12 +5,30 @@ pub struct DeleteLoggingConfigurationInput { ///

          The Amazon Resource Name (ARN) of the web ACL from which you want to delete the LoggingConfiguration.

          pub resource_arn: ::std::option::Option<::std::string::String>, + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub log_type: ::std::option::Option, + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub log_scope: ::std::option::Option, } impl DeleteLoggingConfigurationInput { ///

          The Amazon Resource Name (ARN) of the web ACL from which you want to delete the LoggingConfiguration.

          pub fn resource_arn(&self) -> ::std::option::Option<&str> { self.resource_arn.as_deref() } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn log_type(&self) -> ::std::option::Option<&crate::types::LogType> { + self.log_type.as_ref() + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn log_scope(&self) -> ::std::option::Option<&crate::types::LogScope> { + self.log_scope.as_ref() + } } impl DeleteLoggingConfigurationInput { /// Creates a new builder-style object to manufacture [`DeleteLoggingConfigurationInput`](crate::operation::delete_logging_configuration::DeleteLoggingConfigurationInput). @@ -24,6 +42,8 @@ impl DeleteLoggingConfigurationInput { #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] pub struct DeleteLoggingConfigurationInputBuilder { pub(crate) resource_arn: ::std::option::Option<::std::string::String>, + pub(crate) log_type: ::std::option::Option, + pub(crate) log_scope: ::std::option::Option, } impl DeleteLoggingConfigurationInputBuilder { ///

          The Amazon Resource Name (ARN) of the web ACL from which you want to delete the LoggingConfiguration.

          @@ -41,6 +61,43 @@ impl DeleteLoggingConfigurationInputBuilder { pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> { &self.resource_arn } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn log_type(mut self, input: crate::types::LogType) -> Self { + self.log_type = ::std::option::Option::Some(input); + self + } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn set_log_type(mut self, input: ::std::option::Option) -> Self { + self.log_type = input; + self + } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn get_log_type(&self) -> &::std::option::Option { + &self.log_type + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn log_scope(mut self, input: crate::types::LogScope) -> Self { + self.log_scope = ::std::option::Option::Some(input); + self + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn set_log_scope(mut self, input: ::std::option::Option) -> Self { + self.log_scope = input; + self + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn get_log_scope(&self) -> &::std::option::Option { + &self.log_scope + } /// Consumes the builder and constructs a [`DeleteLoggingConfigurationInput`](crate::operation::delete_logging_configuration::DeleteLoggingConfigurationInput). pub fn build( self, @@ -50,6 +107,8 @@ impl DeleteLoggingConfigurationInputBuilder { > { ::std::result::Result::Ok(crate::operation::delete_logging_configuration::DeleteLoggingConfigurationInput { resource_arn: self.resource_arn, + log_type: self.log_type, + log_scope: self.log_scope, }) } } diff --git a/sdk/wafv2/src/operation/delete_logging_configuration/builders.rs b/sdk/wafv2/src/operation/delete_logging_configuration/builders.rs index 1c40aa48bf25..da53006ad3ed 100644 --- a/sdk/wafv2/src/operation/delete_logging_configuration/builders.rs +++ b/sdk/wafv2/src/operation/delete_logging_configuration/builders.rs @@ -122,4 +122,41 @@ impl DeleteLoggingConfigurationFluentBuilder { pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_resource_arn() } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn log_type(mut self, input: crate::types::LogType) -> Self { + self.inner = self.inner.log_type(input); + self + } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn set_log_type(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_log_type(input); + self + } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn get_log_type(&self) -> &::std::option::Option { + self.inner.get_log_type() + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn log_scope(mut self, input: crate::types::LogScope) -> Self { + self.inner = self.inner.log_scope(input); + self + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn set_log_scope(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_log_scope(input); + self + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn get_log_scope(&self) -> &::std::option::Option { + self.inner.get_log_scope() + } } diff --git a/sdk/wafv2/src/operation/get_logging_configuration/_get_logging_configuration_input.rs b/sdk/wafv2/src/operation/get_logging_configuration/_get_logging_configuration_input.rs index bf5004595568..9a6e51102a9f 100644 --- a/sdk/wafv2/src/operation/get_logging_configuration/_get_logging_configuration_input.rs +++ b/sdk/wafv2/src/operation/get_logging_configuration/_get_logging_configuration_input.rs @@ -5,12 +5,30 @@ pub struct GetLoggingConfigurationInput { ///

          The Amazon Resource Name (ARN) of the web ACL for which you want to get the LoggingConfiguration.

          pub resource_arn: ::std::option::Option<::std::string::String>, + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub log_type: ::std::option::Option, + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub log_scope: ::std::option::Option, } impl GetLoggingConfigurationInput { ///

          The Amazon Resource Name (ARN) of the web ACL for which you want to get the LoggingConfiguration.

          pub fn resource_arn(&self) -> ::std::option::Option<&str> { self.resource_arn.as_deref() } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn log_type(&self) -> ::std::option::Option<&crate::types::LogType> { + self.log_type.as_ref() + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn log_scope(&self) -> ::std::option::Option<&crate::types::LogScope> { + self.log_scope.as_ref() + } } impl GetLoggingConfigurationInput { /// Creates a new builder-style object to manufacture [`GetLoggingConfigurationInput`](crate::operation::get_logging_configuration::GetLoggingConfigurationInput). @@ -24,6 +42,8 @@ impl GetLoggingConfigurationInput { #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] pub struct GetLoggingConfigurationInputBuilder { pub(crate) resource_arn: ::std::option::Option<::std::string::String>, + pub(crate) log_type: ::std::option::Option, + pub(crate) log_scope: ::std::option::Option, } impl GetLoggingConfigurationInputBuilder { ///

          The Amazon Resource Name (ARN) of the web ACL for which you want to get the LoggingConfiguration.

          @@ -41,6 +61,43 @@ impl GetLoggingConfigurationInputBuilder { pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> { &self.resource_arn } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn log_type(mut self, input: crate::types::LogType) -> Self { + self.log_type = ::std::option::Option::Some(input); + self + } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn set_log_type(mut self, input: ::std::option::Option) -> Self { + self.log_type = input; + self + } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn get_log_type(&self) -> &::std::option::Option { + &self.log_type + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn log_scope(mut self, input: crate::types::LogScope) -> Self { + self.log_scope = ::std::option::Option::Some(input); + self + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn set_log_scope(mut self, input: ::std::option::Option) -> Self { + self.log_scope = input; + self + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn get_log_scope(&self) -> &::std::option::Option { + &self.log_scope + } /// Consumes the builder and constructs a [`GetLoggingConfigurationInput`](crate::operation::get_logging_configuration::GetLoggingConfigurationInput). pub fn build( self, @@ -50,6 +107,8 @@ impl GetLoggingConfigurationInputBuilder { > { ::std::result::Result::Ok(crate::operation::get_logging_configuration::GetLoggingConfigurationInput { resource_arn: self.resource_arn, + log_type: self.log_type, + log_scope: self.log_scope, }) } } diff --git a/sdk/wafv2/src/operation/get_logging_configuration/builders.rs b/sdk/wafv2/src/operation/get_logging_configuration/builders.rs index 62fea3262fab..82deae82e7e3 100644 --- a/sdk/wafv2/src/operation/get_logging_configuration/builders.rs +++ b/sdk/wafv2/src/operation/get_logging_configuration/builders.rs @@ -122,4 +122,41 @@ impl GetLoggingConfigurationFluentBuilder { pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_resource_arn() } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn log_type(mut self, input: crate::types::LogType) -> Self { + self.inner = self.inner.log_type(input); + self + } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn set_log_type(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_log_type(input); + self + } + ///

          Used to distinguish between various logging options. Currently, there is one option.

          + ///

          Default: WAF_LOGS

          + pub fn get_log_type(&self) -> &::std::option::Option { + self.inner.get_log_type() + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn log_scope(mut self, input: crate::types::LogScope) -> Self { + self.inner = self.inner.log_scope(input); + self + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn set_log_scope(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_log_scope(input); + self + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn get_log_scope(&self) -> &::std::option::Option { + self.inner.get_log_scope() + } } diff --git a/sdk/wafv2/src/operation/list_logging_configurations/_list_logging_configurations_input.rs b/sdk/wafv2/src/operation/list_logging_configurations/_list_logging_configurations_input.rs index d974149a7fdb..6a2d268214ff 100644 --- a/sdk/wafv2/src/operation/list_logging_configurations/_list_logging_configurations_input.rs +++ b/sdk/wafv2/src/operation/list_logging_configurations/_list_logging_configurations_input.rs @@ -16,6 +16,10 @@ pub struct ListLoggingConfigurationsInput { pub next_marker: ::std::option::Option<::std::string::String>, ///

          The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a NextMarker value that you can use in a subsequent call to get the next batch of objects.

          pub limit: ::std::option::Option, + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub log_scope: ::std::option::Option, } impl ListLoggingConfigurationsInput { ///

          Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

          @@ -37,6 +41,12 @@ impl ListLoggingConfigurationsInput { pub fn limit(&self) -> ::std::option::Option { self.limit } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn log_scope(&self) -> ::std::option::Option<&crate::types::LogScope> { + self.log_scope.as_ref() + } } impl ListLoggingConfigurationsInput { /// Creates a new builder-style object to manufacture [`ListLoggingConfigurationsInput`](crate::operation::list_logging_configurations::ListLoggingConfigurationsInput). @@ -52,6 +62,7 @@ pub struct ListLoggingConfigurationsInputBuilder { pub(crate) scope: ::std::option::Option, pub(crate) next_marker: ::std::option::Option<::std::string::String>, pub(crate) limit: ::std::option::Option, + pub(crate) log_scope: ::std::option::Option, } impl ListLoggingConfigurationsInputBuilder { ///

          Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

          @@ -118,6 +129,26 @@ impl ListLoggingConfigurationsInputBuilder { pub fn get_limit(&self) -> &::std::option::Option { &self.limit } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn log_scope(mut self, input: crate::types::LogScope) -> Self { + self.log_scope = ::std::option::Option::Some(input); + self + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn set_log_scope(mut self, input: ::std::option::Option) -> Self { + self.log_scope = input; + self + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn get_log_scope(&self) -> &::std::option::Option { + &self.log_scope + } /// Consumes the builder and constructs a [`ListLoggingConfigurationsInput`](crate::operation::list_logging_configurations::ListLoggingConfigurationsInput). pub fn build( self, @@ -129,6 +160,7 @@ impl ListLoggingConfigurationsInputBuilder { scope: self.scope, next_marker: self.next_marker, limit: self.limit, + log_scope: self.log_scope, }) } } diff --git a/sdk/wafv2/src/operation/list_logging_configurations/builders.rs b/sdk/wafv2/src/operation/list_logging_configurations/builders.rs index 2522fd1fdc26..d5369a4e3bd2 100644 --- a/sdk/wafv2/src/operation/list_logging_configurations/builders.rs +++ b/sdk/wafv2/src/operation/list_logging_configurations/builders.rs @@ -171,4 +171,24 @@ impl ListLoggingConfigurationsFluentBuilder { pub fn get_limit(&self) -> &::std::option::Option { self.inner.get_limit() } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn log_scope(mut self, input: crate::types::LogScope) -> Self { + self.inner = self.inner.log_scope(input); + self + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn set_log_scope(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_log_scope(input); + self + } + ///

          The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

          + ///

          The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

          + ///

          Default: CUSTOMER

          + pub fn get_log_scope(&self) -> &::std::option::Option { + self.inner.get_log_scope() + } } diff --git a/sdk/wafv2/src/protocol_serde/shape_delete_logging_configuration_input.rs b/sdk/wafv2/src/protocol_serde/shape_delete_logging_configuration_input.rs index 4a3689c771fd..69eb5fcfe2ff 100644 --- a/sdk/wafv2/src/protocol_serde/shape_delete_logging_configuration_input.rs +++ b/sdk/wafv2/src/protocol_serde/shape_delete_logging_configuration_input.rs @@ -6,5 +6,11 @@ pub fn ser_delete_logging_configuration_input_input( if let Some(var_1) = &input.resource_arn { object.key("ResourceArn").string(var_1.as_str()); } + if let Some(var_2) = &input.log_type { + object.key("LogType").string(var_2.as_str()); + } + if let Some(var_3) = &input.log_scope { + object.key("LogScope").string(var_3.as_str()); + } Ok(()) } diff --git a/sdk/wafv2/src/protocol_serde/shape_get_logging_configuration_input.rs b/sdk/wafv2/src/protocol_serde/shape_get_logging_configuration_input.rs index f10f07b84520..34faa552f00d 100644 --- a/sdk/wafv2/src/protocol_serde/shape_get_logging_configuration_input.rs +++ b/sdk/wafv2/src/protocol_serde/shape_get_logging_configuration_input.rs @@ -6,5 +6,11 @@ pub fn ser_get_logging_configuration_input_input( if let Some(var_1) = &input.resource_arn { object.key("ResourceArn").string(var_1.as_str()); } + if let Some(var_2) = &input.log_type { + object.key("LogType").string(var_2.as_str()); + } + if let Some(var_3) = &input.log_scope { + object.key("LogScope").string(var_3.as_str()); + } Ok(()) } diff --git a/sdk/wafv2/src/protocol_serde/shape_list_logging_configurations_input.rs b/sdk/wafv2/src/protocol_serde/shape_list_logging_configurations_input.rs index 99d3c076d6c4..70ecc9a2feb7 100644 --- a/sdk/wafv2/src/protocol_serde/shape_list_logging_configurations_input.rs +++ b/sdk/wafv2/src/protocol_serde/shape_list_logging_configurations_input.rs @@ -15,5 +15,8 @@ pub fn ser_list_logging_configurations_input_input( ::aws_smithy_types::Number::NegInt((*var_3).into()), ); } + if let Some(var_4) = &input.log_scope { + object.key("LogScope").string(var_4.as_str()); + } Ok(()) } diff --git a/sdk/wafv2/src/protocol_serde/shape_logging_configuration.rs b/sdk/wafv2/src/protocol_serde/shape_logging_configuration.rs index e1915a723ef4..33c8341d7746 100644 --- a/sdk/wafv2/src/protocol_serde/shape_logging_configuration.rs +++ b/sdk/wafv2/src/protocol_serde/shape_logging_configuration.rs @@ -36,6 +36,20 @@ where "LoggingFilter" => { builder = builder.set_logging_filter(crate::protocol_serde::shape_logging_filter::de_logging_filter(tokens)?); } + "LogType" => { + builder = builder.set_log_type( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::LogType::from(u.as_ref()))) + .transpose()?, + ); + } + "LogScope" => { + builder = builder.set_log_scope( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::LogScope::from(u.as_ref()))) + .transpose()?, + ); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { @@ -93,5 +107,11 @@ pub fn ser_logging_configuration( crate::protocol_serde::shape_logging_filter::ser_logging_filter(&mut object_8, var_7)?; object_8.finish(); } + if let Some(var_9) = &input.log_type { + object.key("LogType").string(var_9.as_str()); + } + if let Some(var_10) = &input.log_scope { + object.key("LogScope").string(var_10.as_str()); + } Ok(()) } diff --git a/sdk/wafv2/src/types.rs b/sdk/wafv2/src/types.rs index 53a33c44b07b..f11099954e32 100644 --- a/sdk/wafv2/src/types.rs +++ b/sdk/wafv2/src/types.rs @@ -217,6 +217,10 @@ pub use crate::types::_version_to_publish::VersionToPublish; pub use crate::types::_logging_configuration::LoggingConfiguration; +pub use crate::types::_log_scope::LogScope; + +pub use crate::types::_log_type::LogType; + pub use crate::types::_logging_filter::LoggingFilter; pub use crate::types::_filter_behavior::FilterBehavior; @@ -435,6 +439,10 @@ mod _label_name_condition; mod _label_summary; +mod _log_scope; + +mod _log_type; + mod _logging_configuration; mod _logging_filter; diff --git a/sdk/wafv2/src/types/_byte_match_statement.rs b/sdk/wafv2/src/types/_byte_match_statement.rs index 6792efa87654..b2b6a5489387 100644 --- a/sdk/wafv2/src/types/_byte_match_statement.rs +++ b/sdk/wafv2/src/types/_byte_match_statement.rs @@ -12,7 +12,7 @@ pub struct ByteMatchStatement { ///
        • ///

          UriPath: The value that you want WAF to search for in the URI path, for example, /images/daily-ad.jpg.

        • ///
        • - ///

          JA3Fingerprint: Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

          + ///

          JA3Fingerprint: Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

          ///

          You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.

        • ///
        • ///

          HeaderOrder: The list of header names to match for. WAF creates a string that contains the ordered list of header names, from the headers in the web request, and then matches against that string.

        • @@ -56,7 +56,7 @@ impl ByteMatchStatement { ///
        • ///

          UriPath: The value that you want WAF to search for in the URI path, for example, /images/daily-ad.jpg.

        • ///
        • - ///

          JA3Fingerprint: Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

          + ///

          JA3Fingerprint: Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

          ///

          You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.

        • ///
        • ///

          HeaderOrder: The list of header names to match for. WAF creates a string that contains the ordered list of header names, from the headers in the web request, and then matches against that string.

        • @@ -125,7 +125,7 @@ impl ByteMatchStatementBuilder { ///
        • ///

          UriPath: The value that you want WAF to search for in the URI path, for example, /images/daily-ad.jpg.

        • ///
        • - ///

          JA3Fingerprint: Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

          + ///

          JA3Fingerprint: Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

          ///

          You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.

        • ///
        • ///

          HeaderOrder: The list of header names to match for. WAF creates a string that contains the ordered list of header names, from the headers in the web request, and then matches against that string.

        • @@ -149,7 +149,7 @@ impl ByteMatchStatementBuilder { ///
        • ///

          UriPath: The value that you want WAF to search for in the URI path, for example, /images/daily-ad.jpg.

        • ///
        • - ///

          JA3Fingerprint: Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

          + ///

          JA3Fingerprint: Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

          ///

          You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.

        • ///
        • ///

          HeaderOrder: The list of header names to match for. WAF creates a string that contains the ordered list of header names, from the headers in the web request, and then matches against that string.

        • @@ -172,7 +172,7 @@ impl ByteMatchStatementBuilder { ///
        • ///

          UriPath: The value that you want WAF to search for in the URI path, for example, /images/daily-ad.jpg.

        • ///
        • - ///

          JA3Fingerprint: Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

          + ///

          JA3Fingerprint: Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

          ///

          You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.

        • ///
        • ///

          HeaderOrder: The list of header names to match for. WAF creates a string that contains the ordered list of header names, from the headers in the web request, and then matches against that string.

        • diff --git a/sdk/wafv2/src/types/_field_to_match.rs b/sdk/wafv2/src/types/_field_to_match.rs index c842d016577d..f5354bd4fefa 100644 --- a/sdk/wafv2/src/types/_field_to_match.rs +++ b/sdk/wafv2/src/types/_field_to_match.rs @@ -15,6 +15,8 @@ ///

          Even though all FieldToMatch settings are available, the only valid settings for field redaction are UriPath, QueryString, SingleHeader, and Method.

          ///
        • ///

          In this documentation, the descriptions of the individual fields talk about specifying the web request component to inspect, but for field redaction, you are specifying the component type to redact from the logs.

        • +///
        • +///

          If you have request sampling enabled, the redacted fields configuration for logging has no impact on sampling. The only way to exclude fields from request sampling is by disabling sampling in the web ACL visibility configuration.

        • ///
        ///
      #[non_exhaustive] @@ -63,7 +65,7 @@ pub struct FieldToMatch { pub cookies: ::std::option::Option, ///

      Inspect a string containing the list of the request's header names, ordered as they appear in the web request that WAF receives for inspection. WAF generates the string and then uses that as the field to match component in its inspection. WAF separates the header names in the string using colons and no added spaces, for example host:user-agent:accept:authorization:referer.

      pub header_order: ::std::option::Option, - ///

      Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

      + ///

      Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

      ///

      You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

      ///
      ///

      You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.

      @@ -136,7 +138,7 @@ impl FieldToMatch { pub fn header_order(&self) -> ::std::option::Option<&crate::types::HeaderOrder> { self.header_order.as_ref() } - ///

      Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

      + ///

      Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

      ///

      You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

      ///
      ///

      You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.

      @@ -387,7 +389,7 @@ impl FieldToMatchBuilder { pub fn get_header_order(&self) -> &::std::option::Option { &self.header_order } - ///

      Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

      + ///

      Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

      ///

      You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

      ///
      ///

      You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.

      @@ -396,7 +398,7 @@ impl FieldToMatchBuilder { self.ja3_fingerprint = ::std::option::Option::Some(input); self } - ///

      Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

      + ///

      Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

      ///

      You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

      ///
      ///

      You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.

      @@ -405,7 +407,7 @@ impl FieldToMatchBuilder { self.ja3_fingerprint = input; self } - ///

      Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

      + ///

      Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

      ///

      You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

      ///
      ///

      You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.

      diff --git a/sdk/wafv2/src/types/_ja3_fingerprint.rs b/sdk/wafv2/src/types/_ja3_fingerprint.rs index ee64a3ba4c27..a5e66f13dd1e 100644 --- a/sdk/wafv2/src/types/_ja3_fingerprint.rs +++ b/sdk/wafv2/src/types/_ja3_fingerprint.rs @@ -1,6 +1,6 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -///

      Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

      +///

      Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

      ///

      You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

      ///
      ///

      You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.

      diff --git a/sdk/wafv2/src/types/_log_scope.rs b/sdk/wafv2/src/types/_log_scope.rs new file mode 100644 index 000000000000..a87db3baadf8 --- /dev/null +++ b/sdk/wafv2/src/types/_log_scope.rs @@ -0,0 +1,107 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `LogScope`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let logscope = unimplemented!(); +/// match logscope { +/// LogScope::Customer => { /* ... */ }, +/// LogScope::SecurityLake => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `logscope` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `LogScope::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `LogScope::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `LogScope::NewFeature` is defined. +/// Specifically, when `logscope` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `LogScope::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum LogScope { + #[allow(missing_docs)] // documentation missing in model + Customer, + #[allow(missing_docs)] // documentation missing in model + SecurityLake, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for LogScope { + fn from(s: &str) -> Self { + match s { + "CUSTOMER" => LogScope::Customer, + "SECURITY_LAKE" => LogScope::SecurityLake, + other => LogScope::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for LogScope { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(LogScope::from(s)) + } +} +impl LogScope { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + LogScope::Customer => "CUSTOMER", + LogScope::SecurityLake => "SECURITY_LAKE", + LogScope::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &["CUSTOMER", "SECURITY_LAKE"] + } +} +impl ::std::convert::AsRef for LogScope { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl LogScope { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for LogScope { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + LogScope::Customer => write!(f, "CUSTOMER"), + LogScope::SecurityLake => write!(f, "SECURITY_LAKE"), + LogScope::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/wafv2/src/types/_log_type.rs b/sdk/wafv2/src/types/_log_type.rs new file mode 100644 index 000000000000..ffa4d2145e77 --- /dev/null +++ b/sdk/wafv2/src/types/_log_type.rs @@ -0,0 +1,101 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `LogType`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let logtype = unimplemented!(); +/// match logtype { +/// LogType::WafLogs => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `logtype` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `LogType::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `LogType::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `LogType::NewFeature` is defined. +/// Specifically, when `logtype` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `LogType::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum LogType { + #[allow(missing_docs)] // documentation missing in model + WafLogs, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for LogType { + fn from(s: &str) -> Self { + match s { + "WAF_LOGS" => LogType::WafLogs, + other => LogType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for LogType { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(LogType::from(s)) + } +} +impl LogType { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + LogType::WafLogs => "WAF_LOGS", + LogType::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &["WAF_LOGS"] + } +} +impl ::std::convert::AsRef for LogType { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl LogType { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for LogType { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + LogType::WafLogs => write!(f, "WAF_LOGS"), + LogType::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/wafv2/src/types/_logging_configuration.rs b/sdk/wafv2/src/types/_logging_configuration.rs index 4a71f36816d3..b97a12990fb2 100644 --- a/sdk/wafv2/src/types/_logging_configuration.rs +++ b/sdk/wafv2/src/types/_logging_configuration.rs @@ -27,12 +27,21 @@ pub struct LoggingConfiguration { ///

      For example, if you redact the SingleHeader field, the HEADER field in the logs will be REDACTED for all rules that use the SingleHeader FieldToMatch setting.

      ///

      Redaction applies only to the component that's specified in the rule's FieldToMatch setting, so the SingleHeader redaction doesn't apply to rules that use the Headers FieldToMatch.

      ///

      You can specify only the following fields for redaction: UriPath, QueryString, SingleHeader, and Method.

      + ///
      + ///

      This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.

      ///
      pub redacted_fields: ::std::option::Option<::std::vec::Vec>, ///

      Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy configuration. If true, only Firewall Manager can modify or delete the configuration.

      pub managed_by_firewall_manager: bool, ///

      Filtering that specifies which web requests are kept in the logs and which are dropped. You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.

      pub logging_filter: ::std::option::Option, + ///

      Used to distinguish between various logging options. Currently, there is one option.

      + ///

      Default: WAF_LOGS

      + pub log_type: ::std::option::Option, + ///

      The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

      + ///

      The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

      + ///

      Default: CUSTOMER

      + pub log_scope: ::std::option::Option, } impl LoggingConfiguration { ///

      The Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs.

      @@ -51,6 +60,8 @@ impl LoggingConfiguration { ///

      For example, if you redact the SingleHeader field, the HEADER field in the logs will be REDACTED for all rules that use the SingleHeader FieldToMatch setting.

      ///

      Redaction applies only to the component that's specified in the rule's FieldToMatch setting, so the SingleHeader redaction doesn't apply to rules that use the Headers FieldToMatch.

      ///

      You can specify only the following fields for redaction: UriPath, QueryString, SingleHeader, and Method.

      + ///
      + ///

      This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.

      ///
      /// /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.redacted_fields.is_none()`. @@ -65,6 +76,17 @@ impl LoggingConfiguration { pub fn logging_filter(&self) -> ::std::option::Option<&crate::types::LoggingFilter> { self.logging_filter.as_ref() } + ///

      Used to distinguish between various logging options. Currently, there is one option.

      + ///

      Default: WAF_LOGS

      + pub fn log_type(&self) -> ::std::option::Option<&crate::types::LogType> { + self.log_type.as_ref() + } + ///

      The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

      + ///

      The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

      + ///

      Default: CUSTOMER

      + pub fn log_scope(&self) -> ::std::option::Option<&crate::types::LogScope> { + self.log_scope.as_ref() + } } impl LoggingConfiguration { /// Creates a new builder-style object to manufacture [`LoggingConfiguration`](crate::types::LoggingConfiguration). @@ -82,6 +104,8 @@ pub struct LoggingConfigurationBuilder { pub(crate) redacted_fields: ::std::option::Option<::std::vec::Vec>, pub(crate) managed_by_firewall_manager: ::std::option::Option, pub(crate) logging_filter: ::std::option::Option, + pub(crate) log_type: ::std::option::Option, + pub(crate) log_scope: ::std::option::Option, } impl LoggingConfigurationBuilder { ///

      The Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs.

      @@ -133,6 +157,8 @@ impl LoggingConfigurationBuilder { ///

      For example, if you redact the SingleHeader field, the HEADER field in the logs will be REDACTED for all rules that use the SingleHeader FieldToMatch setting.

      ///

      Redaction applies only to the component that's specified in the rule's FieldToMatch setting, so the SingleHeader redaction doesn't apply to rules that use the Headers FieldToMatch.

      ///

      You can specify only the following fields for redaction: UriPath, QueryString, SingleHeader, and Method.

      + ///
      + ///

      This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.

      ///
      pub fn redacted_fields(mut self, input: crate::types::FieldToMatch) -> Self { let mut v = self.redacted_fields.unwrap_or_default(); @@ -144,6 +170,8 @@ impl LoggingConfigurationBuilder { ///

      For example, if you redact the SingleHeader field, the HEADER field in the logs will be REDACTED for all rules that use the SingleHeader FieldToMatch setting.

      ///

      Redaction applies only to the component that's specified in the rule's FieldToMatch setting, so the SingleHeader redaction doesn't apply to rules that use the Headers FieldToMatch.

      ///

      You can specify only the following fields for redaction: UriPath, QueryString, SingleHeader, and Method.

      + ///
      + ///

      This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.

      ///
      pub fn set_redacted_fields(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { self.redacted_fields = input; @@ -153,6 +181,8 @@ impl LoggingConfigurationBuilder { ///

      For example, if you redact the SingleHeader field, the HEADER field in the logs will be REDACTED for all rules that use the SingleHeader FieldToMatch setting.

      ///

      Redaction applies only to the component that's specified in the rule's FieldToMatch setting, so the SingleHeader redaction doesn't apply to rules that use the Headers FieldToMatch.

      ///

      You can specify only the following fields for redaction: UriPath, QueryString, SingleHeader, and Method.

      + ///
      + ///

      This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.

      ///
      pub fn get_redacted_fields(&self) -> &::std::option::Option<::std::vec::Vec> { &self.redacted_fields @@ -185,6 +215,43 @@ impl LoggingConfigurationBuilder { pub fn get_logging_filter(&self) -> &::std::option::Option { &self.logging_filter } + ///

      Used to distinguish between various logging options. Currently, there is one option.

      + ///

      Default: WAF_LOGS

      + pub fn log_type(mut self, input: crate::types::LogType) -> Self { + self.log_type = ::std::option::Option::Some(input); + self + } + ///

      Used to distinguish between various logging options. Currently, there is one option.

      + ///

      Default: WAF_LOGS

      + pub fn set_log_type(mut self, input: ::std::option::Option) -> Self { + self.log_type = input; + self + } + ///

      Used to distinguish between various logging options. Currently, there is one option.

      + ///

      Default: WAF_LOGS

      + pub fn get_log_type(&self) -> &::std::option::Option { + &self.log_type + } + ///

      The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

      + ///

      The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

      + ///

      Default: CUSTOMER

      + pub fn log_scope(mut self, input: crate::types::LogScope) -> Self { + self.log_scope = ::std::option::Option::Some(input); + self + } + ///

      The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

      + ///

      The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

      + ///

      Default: CUSTOMER

      + pub fn set_log_scope(mut self, input: ::std::option::Option) -> Self { + self.log_scope = input; + self + } + ///

      The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

      + ///

      The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

      + ///

      Default: CUSTOMER

      + pub fn get_log_scope(&self) -> &::std::option::Option { + &self.log_scope + } /// Consumes the builder and constructs a [`LoggingConfiguration`](crate::types::LoggingConfiguration). /// This method will fail if any of the following fields are not set: /// - [`resource_arn`](crate::types::builders::LoggingConfigurationBuilder::resource_arn) @@ -206,6 +273,8 @@ impl LoggingConfigurationBuilder { redacted_fields: self.redacted_fields, managed_by_firewall_manager: self.managed_by_firewall_manager.unwrap_or_default(), logging_filter: self.logging_filter, + log_type: self.log_type, + log_scope: self.log_scope, }) } } diff --git a/sdk/wafv2/src/types/_visibility_config.rs b/sdk/wafv2/src/types/_visibility_config.rs index 9d59f28def19..2997ebd81db9 100644 --- a/sdk/wafv2/src/types/_visibility_config.rs +++ b/sdk/wafv2/src/types/_visibility_config.rs @@ -4,7 +4,9 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct VisibilityConfig { - ///

      Indicates whether WAF should store a sampling of the web requests that match the rules. You can view the sampled requests through the WAF console.

      + ///

      Indicates whether WAF should store a sampling of the web requests that match the rules. You can view the sampled requests through the WAF console.

      + ///

      Request sampling doesn't provide a field redaction option, and any field redaction that you specify in your logging configuration doesn't affect sampling. The only way to exclude fields from request sampling is by disabling sampling in the web ACL visibility configuration.

      + ///
      pub sampled_requests_enabled: bool, ///

      Indicates whether the associated resource sends metrics to Amazon CloudWatch. For the list of available metrics, see WAF Metrics in the WAF Developer Guide.

      ///

      For web ACLs, the metrics are for web requests that have the web ACL default action applied. WAF applies the default action to web requests that pass the inspection of all rules in the web ACL without being either allowed or blocked. For more information, see The web ACL default action in the WAF Developer Guide.

      @@ -13,7 +15,9 @@ pub struct VisibilityConfig { pub metric_name: ::std::string::String, } impl VisibilityConfig { - ///

      Indicates whether WAF should store a sampling of the web requests that match the rules. You can view the sampled requests through the WAF console.

      + ///

      Indicates whether WAF should store a sampling of the web requests that match the rules. You can view the sampled requests through the WAF console.

      + ///

      Request sampling doesn't provide a field redaction option, and any field redaction that you specify in your logging configuration doesn't affect sampling. The only way to exclude fields from request sampling is by disabling sampling in the web ACL visibility configuration.

      + ///
      pub fn sampled_requests_enabled(&self) -> bool { self.sampled_requests_enabled } @@ -44,18 +48,24 @@ pub struct VisibilityConfigBuilder { pub(crate) metric_name: ::std::option::Option<::std::string::String>, } impl VisibilityConfigBuilder { - ///

      Indicates whether WAF should store a sampling of the web requests that match the rules. You can view the sampled requests through the WAF console.

      + ///

      Indicates whether WAF should store a sampling of the web requests that match the rules. You can view the sampled requests through the WAF console.

      + ///

      Request sampling doesn't provide a field redaction option, and any field redaction that you specify in your logging configuration doesn't affect sampling. The only way to exclude fields from request sampling is by disabling sampling in the web ACL visibility configuration.

      + ///
      /// This field is required. pub fn sampled_requests_enabled(mut self, input: bool) -> Self { self.sampled_requests_enabled = ::std::option::Option::Some(input); self } - ///

      Indicates whether WAF should store a sampling of the web requests that match the rules. You can view the sampled requests through the WAF console.

      + ///

      Indicates whether WAF should store a sampling of the web requests that match the rules. You can view the sampled requests through the WAF console.

      + ///

      Request sampling doesn't provide a field redaction option, and any field redaction that you specify in your logging configuration doesn't affect sampling. The only way to exclude fields from request sampling is by disabling sampling in the web ACL visibility configuration.

      + ///
      pub fn set_sampled_requests_enabled(mut self, input: ::std::option::Option) -> Self { self.sampled_requests_enabled = input; self } - ///

      Indicates whether WAF should store a sampling of the web requests that match the rules. You can view the sampled requests through the WAF console.

      + ///

      Indicates whether WAF should store a sampling of the web requests that match the rules. You can view the sampled requests through the WAF console.

      + ///

      Request sampling doesn't provide a field redaction option, and any field redaction that you specify in your logging configuration doesn't affect sampling. The only way to exclude fields from request sampling is by disabling sampling in the web ACL visibility configuration.

      + ///
      pub fn get_sampled_requests_enabled(&self) -> &::std::option::Option { &self.sampled_requests_enabled } diff --git a/versions.toml b/versions.toml index 788faa1a9b64..dcf7e981d525 100644 --- a/versions.toml +++ b/versions.toml @@ -305,8 +305,8 @@ model_hash = 'c6768877255d396250501ec482da0c6a2d27e5ac7f4b6abe807d58ef805bfb90' [crates.aws-sdk-chatbot] category = 'AwsSdk' version = '1.13.0' -source_hash = '0473359259e5066c707ad0a5df55f64f7301dc765fe2fbf444b126fe3f46b484' -model_hash = 'e3ac7913992ab9a390168fb5ceffafab75c1f0acb6668556c4200e1a28258081' +source_hash = '0e6087c1066b5761e6e8608ea3b9e08e5c6de0ddd676c89410eb02661edf38d1' +model_hash = '41691d3ff237630a74f9d4a595c831518aeec4e3a7feb55a9c3fb770747b77d7' [crates.aws-sdk-chime] category = 'AwsSdk' @@ -377,8 +377,8 @@ model_hash = '3efd089f35a2a1b2bb697823c0e3438b63bb82f419d7aa21c622d872d14eef8f' [crates.aws-sdk-cloudformation] category = 'AwsSdk' version = '1.31.0' -source_hash = '86bdb3f711c6e181c16155962b1f14d6f24f94382d6624fe85d66aab1b59d1da' -model_hash = '4779dfcfb212ae49f983e04bbfa6d36893e0d6c9fc2263d023f65a268d5c2468' +source_hash = 'cbcc534a8369814036b8f75f65a17459bd7940107f9a7a325ec78df4619b5c65' +model_hash = '628fe1797e3d2cd6dd2ea62efaa6d8c39a96533290610506c79172c2e43eb9fb' [crates.aws-sdk-cloudfront] category = 'AwsSdk' @@ -1247,8 +1247,8 @@ model_hash = 'e0280cb2e8d6dc367391712cb856c061a0c6189fe3dd84bb23ed3bd1c090dac0' [crates.aws-sdk-kms] category = 'AwsSdk' version = '1.27.0' -source_hash = '2d05f1756c7118dddeb1528e8d656340345ba740011980ab898aaceabffb6e6f' -model_hash = 'c1a6416f409e55efdd03662b5b98075d4ef568557433f8066c71ee381c0c6f80' +source_hash = 'f1645e3b7266232ed3ad935f85cb7405bbe8b7ce9f334c61f7b6100e607caf9c' +model_hash = 'b286939c978df297442a94bdaf073a9462854f32fde8f439f745a196adda17fa' [crates.aws-sdk-lakeformation] category = 'AwsSdk' @@ -1595,8 +1595,8 @@ model_hash = 'e62399a574db22dc01d9c93117a0bf1ee4f2a0f5ca066bab916bc847d0e6423a' [crates.aws-sdk-opensearch] category = 'AwsSdk' version = '1.31.0' -source_hash = '6b325361297b6ea8c37c5f1659f3d8fff7e38315d84e7225c94d21cb9c3e23bd' -model_hash = '30486da83ec1aec2824908f3a5294496c71616e30d33ae0f27125023de3fcf90' +source_hash = 'ae9b54cb55f61a4f0be408ad617064a604b379a70c5fbd9438e66df83b2e2bc8' +model_hash = '68f024fb9fc82ab16f91bbf0f2e1a24979afb0c9703814f3e9bac29edd4146cb' [crates.aws-sdk-opensearchserverless] category = 'AwsSdk' @@ -2273,8 +2273,8 @@ model_hash = '56869f15eb4277a7d7b350709d0fcee7899789b9f751f95c5e7e94fb94087038' [crates.aws-sdk-wafv2] category = 'AwsSdk' version = '1.30.0' -source_hash = '8960cacd7a0bdedd9f93cd74b550205bb3a83210071460c2ba4d5290156dbbb9' -model_hash = 'a40d292c00cf7f999949c5948fb443f10b8ca7c933a6f3e9fb0ab7da38bda279' +source_hash = '261fed448ced110052938a7723492f4b39cc1e23b07f681e8e35c042ec0dfb98' +model_hash = '1b88b04750fae0e6e0fa7b93adb3d0521e67da372bf45ed9788ca8b6d5bba63d' [crates.aws-sdk-wellarchitected] category = 'AwsSdk'