diff --git a/Cargo.toml b/Cargo.toml index 37d005bcb631..bb5a6fe2097c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,9 +2,9 @@ resolver = "2" exclude = [ "examples/lambda", - "examples/cross_service", "examples/examples", "examples/webassembly", + "examples/cross_service", "examples/test-utils", "tests/no-default-features", "tests/webassembly" diff --git a/aws-models/amplify.json b/aws-models/amplify.json index 45ba331ec0ab..61be8fba947b 100644 --- a/aws-models/amplify.json +++ b/aws-models/amplify.json @@ -1100,14 +1100,14 @@ "createTime": { "target": "com.amazonaws.amplify#CreateTime", "traits": { - "smithy.api#documentation": "

Creates a date and time for the Amplify app.

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

A timestamp of when Amplify created the application.

", "smithy.api#required": {} } }, "updateTime": { "target": "com.amazonaws.amplify#UpdateTime", "traits": { - "smithy.api#documentation": "

Updates the date and time for the Amplify app.

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

A timestamp of when Amplify updated the application.

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

The cache configuration for the Amplify app. If you don't specify the\n cache configuration type, Amplify uses the default\n AMPLIFY_MANAGED setting.

" } + }, + "webhookCreateTime": { + "target": "com.amazonaws.amplify#webhookCreateTime", + "traits": { + "smithy.api#documentation": "

A timestamp of when Amplify created the webhook in your Git repository.

" + } + }, + "wafConfiguration": { + "target": "com.amazonaws.amplify#WafConfiguration", + "traits": { + "smithy.api#documentation": "

Describes the Firewall configuration for the Amplify app. Firewall support enables you to protect your hosted applications with a direct integration\n with WAF.

" + } } }, "traits": { @@ -1587,14 +1599,14 @@ "createTime": { "target": "com.amazonaws.amplify#CreateTime", "traits": { - "smithy.api#documentation": "

The creation date and time for a branch that is part of an Amplify app.

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

A timestamp of when Amplify created the branch.

", "smithy.api#required": {} } }, "updateTime": { "target": "com.amazonaws.amplify#UpdateTime", "traits": { - "smithy.api#documentation": "

The last updated date and time for a branch that is part of an Amplify app.

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

A timestamp for the last updated time for a branch.

", "smithy.api#required": {} } }, @@ -4169,6 +4181,12 @@ "com.amazonaws.amplify#JobStatus": { "type": "enum", "members": { + "CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATED" + } + }, "PENDING": { "target": "smithy.api#Unit", "traits": { @@ -4253,7 +4271,7 @@ "commitTime": { "target": "com.amazonaws.amplify#CommitTime", "traits": { - "smithy.api#documentation": "

The commit date and time for the job.

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

The commit date and time for the job.

", "smithy.api#required": {} } }, @@ -6686,6 +6704,77 @@ "com.amazonaws.amplify#Verified": { "type": "boolean" }, + "com.amazonaws.amplify#WafConfiguration": { + "type": "structure", + "members": { + "webAclArn": { + "target": "com.amazonaws.amplify#WebAclArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the web ACL associated with an Amplify app.

" + } + }, + "wafStatus": { + "target": "com.amazonaws.amplify#WafStatus", + "traits": { + "smithy.api#documentation": "

The status of the process to associate or disassociate a web ACL to an Amplify app.

" + } + }, + "statusReason": { + "target": "com.amazonaws.amplify#StatusReason", + "traits": { + "smithy.api#documentation": "

The reason for the current status of the Firewall configuration.

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

Describes the Firewall configuration for a hosted Amplify application.\n Firewall support enables you to protect your web applications with a direct integration\n with WAF. For more information about using WAF protections for an Amplify application, see\n Firewall support for hosted sites in the Amplify\n User Guide.

" + } + }, + "com.amazonaws.amplify#WafStatus": { + "type": "enum", + "members": { + "ASSOCIATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSOCIATING" + } + }, + "ASSOCIATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSOCIATION_FAILED" + } + }, + "ASSOCIATION_SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSOCIATION_SUCCESS" + } + }, + "DISASSOCIATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISASSOCIATING" + } + }, + "DISASSOCIATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISASSOCIATION_FAILED" + } + } + } + }, + "com.amazonaws.amplify#WebAclArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 512 + }, + "smithy.api#pattern": "^arn:aws:wafv2:" + } + }, "com.amazonaws.amplify#Webhook": { "type": "structure", "members": { @@ -6727,14 +6816,14 @@ "createTime": { "target": "com.amazonaws.amplify#CreateTime", "traits": { - "smithy.api#documentation": "

The create date and time for a webhook.

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

A timestamp of when Amplify created the webhook in your Git repository.

", "smithy.api#required": {} } }, "updateTime": { "target": "com.amazonaws.amplify#UpdateTime", "traits": { - "smithy.api#documentation": "

Updates the date and time for a webhook.

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

A timestamp of when Amplify updated the webhook in your Git repository.

", "smithy.api#required": {} } } @@ -6776,6 +6865,9 @@ "member": { "target": "com.amazonaws.amplify#Webhook" } + }, + "com.amazonaws.amplify#webhookCreateTime": { + "type": "timestamp" } } } diff --git a/aws-models/budgets.json b/aws-models/budgets.json index 0fea2c0505ab..abf52523d086 100644 --- a/aws-models/budgets.json +++ b/aws-models/budgets.json @@ -340,6 +340,108 @@ }, "type": "endpoint" }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-iso" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://budgets.c2s.ic.gov", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "budgets", + "signingRegion": "us-iso-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-iso-b" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://budgets.global.sc2s.sgov.gov", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "budgets", + "signingRegion": "us-isob-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, { "conditions": [ { @@ -864,6 +966,28 @@ "UseDualStack": false } }, + { + "documentation": "For region aws-iso-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "budgets", + "signingRegion": "us-iso-east-1" + } + ] + }, + "url": "https://budgets.c2s.ic.gov" + } + }, + "params": { + "Region": "aws-iso-global", + "UseFIPS": false, + "UseDualStack": false + } + }, { "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { @@ -903,7 +1027,16 @@ "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://budgets.us-iso-east-1.c2s.ic.gov" + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "budgets", + "signingRegion": "us-iso-east-1" + } + ] + }, + "url": "https://budgets.c2s.ic.gov" } }, "params": { @@ -912,6 +1045,28 @@ "UseDualStack": false } }, + { + "documentation": "For region aws-iso-b-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "budgets", + "signingRegion": "us-isob-east-1" + } + ] + }, + "url": "https://budgets.global.sc2s.sgov.gov" + } + }, + "params": { + "Region": "aws-iso-b-global", + "UseFIPS": false, + "UseDualStack": false + } + }, { "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", "expect": { @@ -951,7 +1106,16 @@ "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://budgets.us-isob-east-1.sc2s.sgov.gov" + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "budgets", + "signingRegion": "us-isob-east-1" + } + ] + }, + "url": "https://budgets.global.sc2s.sgov.gov" } }, "params": { diff --git a/aws-models/connect.json b/aws-models/connect.json index b7d3ffc65e44..2c95f39ef6da 100644 --- a/aws-models/connect.json +++ b/aws-models/connect.json @@ -1630,6 +1630,9 @@ { "target": "com.amazonaws.connect#UpdateInstanceStorageConfig" }, + { + "target": "com.amazonaws.connect#UpdateParticipantAuthentication" + }, { "target": "com.amazonaws.connect#UpdateParticipantRoleConfig" }, @@ -4224,6 +4227,28 @@ "smithy.api#default": 0 } }, + "com.amazonaws.connect#AuthenticationError": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^[\\x20-\\x21\\x23-\\x5B\\x5D-\\x7E]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.connect#AuthenticationErrorDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^[\\x20-\\x21\\x23-\\x5B\\x5D-\\x7E]*$", + "smithy.api#sensitive": {} + } + }, "com.amazonaws.connect#AuthenticationProfile": { "type": "structure", "members": { @@ -4383,6 +4408,16 @@ "target": "com.amazonaws.connect#AuthenticationProfileSummary" } }, + "com.amazonaws.connect#AuthorizationCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#sensitive": {} + } + }, "com.amazonaws.connect#AutoAccept": { "type": "boolean", "traits": { @@ -5656,6 +5691,12 @@ "smithy.api#documentation": "

Information about Amazon Connect Wisdom.

" } }, + "CustomerId": { + "target": "com.amazonaws.connect#CustomerId", + "traits": { + "smithy.api#documentation": "

The customer's identification number. For example, the CustomerId may be a\n customer number from your CRM. You can create a Lambda function to pull the unique customer ID of\n the caller from your CRM system. If you enable Amazon Connect Voice ID capability, this\n attribute is populated with the CustomerSpeakerId of the caller.

" + } + }, "CustomerEndpoint": { "target": "com.amazonaws.connect#EndpointInfo", "traits": { @@ -8640,7 +8681,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates registration for a device token and a chat contact to receive real-time push\n notifications. For more information about push notifications, see Set up push\n notifications in Amazon Connect for mobile chat in the Amazon Connect\n Administrator Guide.

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

Creates registration for a device token and a chat contact to receive real-time push\n notifications. For more information about push notifications, see Set up push\n notifications in Amazon Connect for mobile chat in the Amazon Connect\n Administrator Guide.

", "smithy.api#http": { "method": "PUT", "uri": "/push-notification/{InstanceId}/registrations", @@ -10489,6 +10530,25 @@ "smithy.api#documentation": "

Information about the Customer on the contact.

" } }, + "com.amazonaws.connect#CustomerId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 128 + } + } + }, + "com.amazonaws.connect#CustomerIdNonEmpty": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#sensitive": {} + } + }, "com.amazonaws.connect#CustomerProfileAttributesSerialized": { "type": "string" }, @@ -10594,7 +10654,7 @@ "ComparisonType": { "target": "com.amazonaws.connect#DateComparisonType", "traits": { - "smithy.api#documentation": "

An object to specify the hours of operation override date condition\n comparisonType.

" + "smithy.api#documentation": "

An object to specify the hours of operation override date condition\n comparisonType.

" } } }, @@ -20957,6 +21017,12 @@ "traits": { "smithy.api#enumValue": "ENHANCED_CHAT_MONITORING" } + }, + "MULTI_PARTY_CHAT_CONFERENCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MULTI_PARTY_CHAT_CONFERENCE" + } } } }, @@ -21439,6 +21505,12 @@ "traits": { "smithy.api#enumValue": "CALL_TRANSFER_CONNECTOR" } + }, + "COGNITO_USER_POOL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COGNITO_USER_POOL" + } } } }, @@ -22331,7 +22403,7 @@ } ], "traits": { - "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

For the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently associated with the instance. Use this API to returns both Amazon Lex V1 and V2 bots.

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

This API is in preview release for Amazon Connect and is subject to change.

\n

For the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently associated with the instance. Use this API to return both Amazon Lex V1 and V2 bots.

", "smithy.api#http": { "method": "GET", "uri": "/instance/{InstanceId}/bots", @@ -36923,6 +36995,12 @@ "traits": { "smithy.api#documentation": "

A set of system defined key-value pairs stored on individual contact segments using an\n attribute map. The attributes are standard Amazon Connect attributes. They can be accessed in\n flows.

\n

Attribute keys can include only alphanumeric, -, and _.

\n

This field can be used to show channel subtype, such as connect:Guide.

\n \n

The types application/vnd.amazonaws.connect.message.interactive and\n application/vnd.amazonaws.connect.message.interactive.response must be present in\n the SupportedMessagingContentTypes field of this API in order to set\n SegmentAttributes as { \"connect:Subtype\": {\"valueString\" : \"connect:Guide\"\n }}.

\n
" } + }, + "CustomerId": { + "target": "com.amazonaws.connect#CustomerIdNonEmpty", + "traits": { + "smithy.api#documentation": "

The customer's identification number. For example, the CustomerId may be a\n customer number from your CRM.

" + } } }, "traits": { @@ -41814,6 +41892,90 @@ "smithy.api#input": {} } }, + "com.amazonaws.connect#UpdateParticipantAuthentication": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#UpdateParticipantAuthenticationRequest" + }, + "output": { + "target": "com.amazonaws.connect#UpdateParticipantAuthenticationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#ConflictException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Instructs Amazon Connect to resume the authentication process. The subsequent actions\n depend on the request body contents:

\n \n \n

The API returns a success response to acknowledge the request. However, the interaction and\n exchange of identity information occur asynchronously after the response is returned.

\n
", + "smithy.api#http": { + "method": "POST", + "uri": "/contact/update-participant-authentication", + "code": 200 + } + } + }, + "com.amazonaws.connect#UpdateParticipantAuthenticationRequest": { + "type": "structure", + "members": { + "State": { + "target": "com.amazonaws.connect#ParticipantToken", + "traits": { + "smithy.api#documentation": "

The state query parameter that was provided by Cognito in the\n redirectUri. This will also match the state parameter provided in the\n AuthenticationUrl from the GetAuthenticationUrl\n response.

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

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

", + "smithy.api#required": {} + } + }, + "Code": { + "target": "com.amazonaws.connect#AuthorizationCode", + "traits": { + "smithy.api#documentation": "

The code query parameter provided by Cognito in the\n redirectUri.

" + } + }, + "Error": { + "target": "com.amazonaws.connect#AuthenticationError", + "traits": { + "smithy.api#documentation": "

The error query parameter provided by Cognito in the\n redirectUri.

" + } + }, + "ErrorDescription": { + "target": "com.amazonaws.connect#AuthenticationErrorDescription", + "traits": { + "smithy.api#documentation": "

The error_description parameter provided by Cognito in the\n redirectUri.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.connect#UpdateParticipantAuthenticationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.connect#UpdateParticipantRoleConfig": { "type": "operation", "input": { @@ -45890,7 +46052,7 @@ "IvrRecordingTrack": { "target": "com.amazonaws.connect#IvrRecordingTrack", "traits": { - "smithy.api#documentation": "

Identifies which IVR track is being recorded.

" + "smithy.api#documentation": "

Identifies which IVR track is being recorded.

\n

One and only one of the track configurations should be presented in the request.

" } } }, diff --git a/aws-models/connectparticipant.json b/aws-models/connectparticipant.json index 2992b78527b5..809c6b5ce862 100644 --- a/aws-models/connectparticipant.json +++ b/aws-models/connectparticipant.json @@ -52,6 +52,9 @@ "type": "service", "version": "2018-09-07", "operations": [ + { + "target": "com.amazonaws.connectparticipant#CancelParticipantAuthentication" + }, { "target": "com.amazonaws.connectparticipant#CompleteAttachmentUpload" }, @@ -67,6 +70,9 @@ { "target": "com.amazonaws.connectparticipant#GetAttachment" }, + { + "target": "com.amazonaws.connectparticipant#GetAuthenticationUrl" + }, { "target": "com.amazonaws.connectparticipant#GetTranscript" }, @@ -92,7 +98,7 @@ "name": "execute-api" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

Amazon Connect is an easy-to-use omnichannel cloud contact center service that\n enables companies of any size to deliver superior customer service at a lower cost.\n Amazon Connect communications capabilities make it easy for companies to deliver\n personalized interactions across communication channels, including chat.

\n

Use the Amazon Connect Participant Service to manage participants (for example,\n agents, customers, and managers listening in), and to send messages and events within a\n chat contact. The APIs in the service enable the following: sending chat messages,\n attachment sharing, managing a participant's connection state and message events, and\n retrieving chat transcripts.

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

Amazon Connect is an easy-to-use omnichannel cloud contact center service that\n enables companies of any size to deliver superior customer service at a lower cost.\n Amazon Connect communications capabilities make it easy for companies to deliver\n personalized interactions across communication channels, including chat.

\n

Use the Amazon Connect Participant Service to manage participants (for example,\n agents, customers, and managers listening in), and to send messages and events within a\n chat contact. The APIs in the service enable the following: sending chat messages,\n attachment sharing, managing a participant's connection state and message events, and\n retrieving chat transcripts.

", "smithy.api#title": "Amazon Connect Participant Service", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -875,9 +881,79 @@ "target": "com.amazonaws.connectparticipant#AttachmentItem" } }, + "com.amazonaws.connectparticipant#AuthenticationUrl": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2083 + } + } + }, "com.amazonaws.connectparticipant#Bool": { "type": "boolean" }, + "com.amazonaws.connectparticipant#CancelParticipantAuthentication": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectparticipant#CancelParticipantAuthenticationRequest" + }, + "output": { + "target": "com.amazonaws.connectparticipant#CancelParticipantAuthenticationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connectparticipant#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectparticipant#InternalServerException" + }, + { + "target": "com.amazonaws.connectparticipant#ThrottlingException" + }, + { + "target": "com.amazonaws.connectparticipant#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Cancels the authentication session. The opted out branch of the Authenticate Customer\n flow block will be taken.

\n \n

The current supported channel is chat. This API is not supported for Apple\n Messages for Business, WhatsApp, or SMS chats.

\n
", + "smithy.api#http": { + "method": "POST", + "uri": "/participant/cancel-authentication", + "code": 200 + } + } + }, + "com.amazonaws.connectparticipant#CancelParticipantAuthenticationRequest": { + "type": "structure", + "members": { + "SessionId": { + "target": "com.amazonaws.connectparticipant#SessionId", + "traits": { + "smithy.api#documentation": "

The sessionId provided in the authenticationInitiated\n event.

", + "smithy.api#required": {} + } + }, + "ConnectionToken": { + "target": "com.amazonaws.connectparticipant#ParticipantToken", + "traits": { + "smithy.api#documentation": "

The authentication token associated with the participant's connection.

", + "smithy.api#httpHeader": "X-Amz-Bearer", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.connectparticipant#CancelParticipantAuthenticationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.connectparticipant#ChatContent": { "type": "string", "traits": { @@ -1020,7 +1096,7 @@ } ], "traits": { - "smithy.api#documentation": "

Allows you to confirm that the attachment has been uploaded using the pre-signed URL\n provided in StartAttachmentUpload API. A conflict exception is thrown when an attachment\n with that identifier is already being uploaded.

\n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

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

Allows you to confirm that the attachment has been uploaded using the pre-signed URL\n provided in StartAttachmentUpload API. A conflict exception is thrown when an attachment\n with that identifier is already being uploaded.

\n

For security recommendations, see Amazon Connect Chat security best practices.

\n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

", "smithy.api#http": { "method": "POST", "uri": "/participant/complete-attachment-upload", @@ -1077,7 +1153,7 @@ } }, "traits": { - "smithy.api#documentation": "

The requested operation conflicts with the current state of a service\n resource associated with the request.

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

The requested operation conflicts with the current state of a service resource\n associated with the request.

", "smithy.api#error": "client", "smithy.api#httpError": 409 } @@ -1171,7 +1247,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates the participant's connection.

\n \n

\n ParticipantToken is used for invoking this API instead of\n ConnectionToken.

\n
\n

The participant token is valid for the lifetime of the participant – until they are\n part of a contact.

\n

The response URL for WEBSOCKET Type has a connect expiry timeout of 100s.\n Clients must manually connect to the returned websocket URL and subscribe to the desired\n topic.

\n

For chat, you need to publish the following on the established websocket\n connection:

\n

\n {\"topic\":\"aws/subscribe\",\"content\":{\"topics\":[\"aws/chat\"]}}\n

\n

Upon websocket URL expiry, as specified in the response ConnectionExpiry parameter,\n clients need to call this API again to obtain a new websocket URL and perform the same\n steps as before.

\n

\n Message streaming support: This API can also be used\n together with the StartContactStreaming API to create a participant connection for chat\n contacts that are not using a websocket. For more information about message streaming,\n Enable real-time chat\n message streaming in the Amazon Connect Administrator\n Guide.

\n

\n Feature specifications: For information about feature\n specifications, such as the allowed number of open websocket connections per\n participant, see Feature specifications in the Amazon Connect Administrator\n Guide.

\n \n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

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

Creates the participant's connection.

\n

For security recommendations, see Amazon Connect Chat security best practices.

\n \n

\n ParticipantToken is used for invoking this API instead of\n ConnectionToken.

\n
\n

The participant token is valid for the lifetime of the participant – until they are\n part of a contact.

\n

The response URL for WEBSOCKET Type has a connect expiry timeout of 100s.\n Clients must manually connect to the returned websocket URL and subscribe to the desired\n topic.

\n

For chat, you need to publish the following on the established websocket\n connection:

\n

\n {\"topic\":\"aws/subscribe\",\"content\":{\"topics\":[\"aws/chat\"]}}\n

\n

Upon websocket URL expiry, as specified in the response ConnectionExpiry parameter,\n clients need to call this API again to obtain a new websocket URL and perform the same\n steps as before.

\n

\n Message streaming support: This API can also be used\n together with the StartContactStreaming API to create a participant connection for chat\n contacts that are not using a websocket. For more information about message streaming,\n Enable real-time chat\n message streaming in the Amazon Connect Administrator\n Guide.

\n

\n Feature specifications: For information about feature\n specifications, such as the allowed number of open websocket connections per\n participant, see Feature specifications in the Amazon Connect Administrator\n Guide.

\n \n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

\n
", "smithy.api#http": { "method": "POST", "uri": "/participant/connection", @@ -1253,7 +1329,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the view for the specified view token.

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

Retrieves the view for the specified view token.

\n

For security recommendations, see Amazon Connect Chat security best practices.

", "smithy.api#http": { "method": "GET", "uri": "/participant/views/{ViewToken}", @@ -1322,7 +1398,7 @@ } ], "traits": { - "smithy.api#documentation": "

Disconnects a participant.

\n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

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

Disconnects a participant.

\n

For security recommendations, see Amazon Connect Chat security best practices.

\n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

", "smithy.api#http": { "method": "POST", "uri": "/participant/disconnect", @@ -1392,7 +1468,7 @@ } ], "traits": { - "smithy.api#documentation": "

Provides a pre-signed URL for download of a completed attachment. This is an\n asynchronous API for use with active contacts.

\n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

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

Provides a pre-signed URL for download of a completed attachment. This is an\n asynchronous API for use with active contacts.

\n

For security recommendations, see Amazon Connect Chat security best practices.

\n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

", "smithy.api#http": { "method": "POST", "uri": "/participant/attachment", @@ -1417,6 +1493,12 @@ "smithy.api#httpHeader": "X-Amz-Bearer", "smithy.api#required": {} } + }, + "UrlExpiryInSeconds": { + "target": "com.amazonaws.connectparticipant#URLExpiryInSeconds", + "traits": { + "smithy.api#documentation": "

The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format:\n yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

" + } } }, "traits": { @@ -1437,6 +1519,89 @@ "traits": { "smithy.api#documentation": "

The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

" } + }, + "AttachmentSizeInBytes": { + "target": "com.amazonaws.connectparticipant#AttachmentSizeInBytes", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The size of the attachment in bytes.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.connectparticipant#GetAuthenticationUrl": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectparticipant#GetAuthenticationUrlRequest" + }, + "output": { + "target": "com.amazonaws.connectparticipant#GetAuthenticationUrlResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connectparticipant#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectparticipant#InternalServerException" + }, + { + "target": "com.amazonaws.connectparticipant#ThrottlingException" + }, + { + "target": "com.amazonaws.connectparticipant#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the AuthenticationUrl for the current authentication session for the\n AuthenticateCustomer flow block.

\n

For security recommendations, see Amazon Connect Chat security best practices.

\n \n \n ", + "smithy.api#http": { + "method": "POST", + "uri": "/participant/authentication-url", + "code": 200 + } + } + }, + "com.amazonaws.connectparticipant#GetAuthenticationUrlRequest": { + "type": "structure", + "members": { + "SessionId": { + "target": "com.amazonaws.connectparticipant#SessionId", + "traits": { + "smithy.api#documentation": "

The sessionId provided in the authenticationInitiated event.

", + "smithy.api#required": {} + } + }, + "RedirectUri": { + "target": "com.amazonaws.connectparticipant#RedirectURI", + "traits": { + "smithy.api#documentation": "

The URL where the customer will be redirected after Amazon Cognito authorizes the\n user.

", + "smithy.api#required": {} + } + }, + "ConnectionToken": { + "target": "com.amazonaws.connectparticipant#ParticipantToken", + "traits": { + "smithy.api#documentation": "

The authentication token associated with the participant's connection.

", + "smithy.api#httpHeader": "X-Amz-Bearer", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.connectparticipant#GetAuthenticationUrlResponse": { + "type": "structure", + "members": { + "AuthenticationUrl": { + "target": "com.amazonaws.connectparticipant#AuthenticationUrl", + "traits": { + "smithy.api#documentation": "

The URL where the customer will sign in to the identity provider. This URL contains\n the authorize endpoint for the Cognito UserPool used in the authentication.

" + } } }, "traits": { @@ -1466,7 +1631,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves a transcript of the session, including details about any attachments. For\n information about accessing past chat contact transcripts for a persistent chat, see\n Enable persistent chat.

\n

If you have a process that consumes events in the transcript of an chat that has ended, note that chat\n transcripts contain the following event content types if the event has occurred\n during the chat session:

\n \n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

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

Retrieves a transcript of the session, including details about any attachments. For\n information about accessing past chat contact transcripts for a persistent chat, see\n Enable persistent chat.

\n

For security recommendations, see Amazon Connect Chat security best practices.

\n

If you have a process that consumes events in the transcript of an chat that has\n ended, note that chat transcripts contain the following event content types if the event\n has occurred during the chat session:

\n \n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

", "smithy.api#http": { "method": "POST", "uri": "/participant/transcript", @@ -1839,6 +2004,15 @@ "target": "com.amazonaws.connectparticipant#Receipt" } }, + "com.amazonaws.connectparticipant#RedirectURI": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, "com.amazonaws.connectparticipant#ResourceId": { "type": "string" }, @@ -1963,7 +2137,7 @@ } ], "traits": { - "smithy.api#documentation": "\n

The application/vnd.amazonaws.connect.event.connection.acknowledged\n ContentType will no longer be supported starting December 31, 2024. This event has\n been migrated to the CreateParticipantConnection API using the\n ConnectParticipant field.

\n
\n

Sends an event. Message receipts are not supported when there are more than two active\n participants in the chat. Using the SendEvent API for message receipts when a supervisor\n is barged-in will result in a conflict exception.

\n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

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

The application/vnd.amazonaws.connect.event.connection.acknowledged\n ContentType will no longer be supported starting December 31, 2024. This event has\n been migrated to the CreateParticipantConnection API using the\n ConnectParticipant field.

\n
\n

Sends an event. Message receipts are not supported when there are more than two active\n participants in the chat. Using the SendEvent API for message receipts when a supervisor\n is barged-in will result in a conflict exception.

\n

For security recommendations, see Amazon Connect Chat security best practices.

\n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

", "smithy.api#http": { "method": "POST", "uri": "/participant/event", @@ -2050,7 +2224,7 @@ } ], "traits": { - "smithy.api#documentation": "

Sends a message.

\n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

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

Sends a message.

\n

For security recommendations, see Amazon Connect Chat security best practices.

\n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

", "smithy.api#http": { "method": "POST", "uri": "/participant/message", @@ -2131,6 +2305,15 @@ "smithy.api#httpError": 402 } }, + "com.amazonaws.connectparticipant#SessionId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + } + } + }, "com.amazonaws.connectparticipant#SortKey": { "type": "enum", "members": { @@ -2174,7 +2357,7 @@ } ], "traits": { - "smithy.api#documentation": "

Provides a pre-signed Amazon S3 URL in response for uploading the file directly to\n S3.

\n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

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

Provides a pre-signed Amazon S3 URL in response for uploading the file directly to\n S3.

\n

For security recommendations, see Amazon Connect Chat security best practices.

\n \n

\n ConnectionToken is used for invoking this API instead of\n ParticipantToken.

\n
\n

The Amazon Connect Participant Service APIs do not use Signature Version 4\n authentication.

", "smithy.api#http": { "method": "POST", "uri": "/participant/start-attachment-upload", @@ -2240,7 +2423,7 @@ "UploadMetadata": { "target": "com.amazonaws.connectparticipant#UploadMetadata", "traits": { - "smithy.api#documentation": "

Fields to be used while uploading the attachment.

" + "smithy.api#documentation": "

The headers to be provided while uploading the file to the URL.

" } } }, @@ -2297,6 +2480,15 @@ "target": "com.amazonaws.connectparticipant#Item" } }, + "com.amazonaws.connectparticipant#URLExpiryInSeconds": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 5, + "max": 300 + } + } + }, "com.amazonaws.connectparticipant#UploadMetadata": { "type": "structure", "members": { diff --git a/aws-models/datasync.json b/aws-models/datasync.json index 4f914e333728..a789c1262839 100644 --- a/aws-models/datasync.json +++ b/aws-models/datasync.json @@ -626,7 +626,7 @@ "Subdirectory": { "target": "com.amazonaws.datasync#EfsSubdirectory", "traits": { - "smithy.api#documentation": "

Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location)\n on your file system.

\n

By default, DataSync uses the root directory (or access point if you provide one by using\n AccessPointArn). You can also include subdirectories using forward slashes (for\n example, /path/to/folder).

" + "smithy.api#documentation": "

Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

\n

By default, DataSync uses the root directory (or access point if you provide one by using\n AccessPointArn). You can also include subdirectories using forward slashes (for\n example, /path/to/folder).

" } }, "EfsFilesystemArn": { @@ -714,27 +714,27 @@ "FsxFilesystemArn": { "target": "com.amazonaws.datasync#FsxFilesystemArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the FSx for Lustre file system.

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

Specifies the Amazon Resource Name (ARN) of the FSx for Lustre file system.

", "smithy.api#required": {} } }, "SecurityGroupArns": { "target": "com.amazonaws.datasync#Ec2SecurityGroupArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the security groups that are used to configure the\n FSx for Lustre file system.

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

Specifies the Amazon Resource Names (ARNs) of up to five security groups that provide access to your\n FSx for Lustre file system.

\n

The security groups must be able to access the file system's ports. The file system must\n also allow access from the security groups. For information about file system access, see the\n \n Amazon FSx for Lustre User Guide\n .

", "smithy.api#required": {} } }, "Subdirectory": { "target": "com.amazonaws.datasync#FsxLustreSubdirectory", "traits": { - "smithy.api#documentation": "

A subdirectory in the location's path. This subdirectory in the FSx for Lustre\n file system is used to read data from the FSx for Lustre source location or write\n data to the FSx for Lustre destination.

" + "smithy.api#documentation": "

Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

\n

When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

" } }, "Tags": { "target": "com.amazonaws.datasync#InputTagList", "traits": { - "smithy.api#documentation": "

The key-value pair that represents a tag that you want to add to the resource. The value\n can be an empty string. This value helps you manage, filter, and search for your resources. We\n recommend that you create a name tag for your location.

" + "smithy.api#documentation": "

Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.

" } } }, @@ -748,7 +748,7 @@ "LocationArn": { "target": "com.amazonaws.datasync#LocationArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the FSx for Lustre file system location that's\n created.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the FSx for Lustre file system location that\n you created.

" } } }, @@ -802,7 +802,7 @@ "Subdirectory": { "target": "com.amazonaws.datasync#FsxOntapSubdirectory", "traits": { - "smithy.api#documentation": "

Specifies a path to the file share in the SVM where you'll copy your data.

\n

You can specify a junction path (also known as a mount point), qtree path (for NFS file\n shares), or share name (for SMB file shares). For example, your mount path might be\n /vol1, /vol1/tree1, or /share1.

\n \n

Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

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

Specifies a path to the file share in the SVM where you want to transfer data to or from.

\n

You can specify a junction path (also known as a mount point), qtree path (for NFS file\n shares), or share name (for SMB file shares). For example, your mount path might be\n /vol1, /vol1/tree1, or /share1.

\n \n

Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

\n
" } }, "Tags": { @@ -964,7 +964,7 @@ "Domain": { "target": "com.amazonaws.datasync#SmbDomain", "traits": { - "smithy.api#documentation": "

Specifies the name of the Microsoft Active Directory domain that the FSx for Windows File Server file system belongs to.

\n

If you have multiple Active Directory domains in your environment, configuring this\n parameter makes sure that DataSync connects to the right file system.

" + "smithy.api#documentation": "

Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.

\n

If you have multiple Active Directory domains in your environment, configuring this\n parameter makes sure that DataSync connects to the right file system.

" } }, "Password": { @@ -1133,7 +1133,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a transfer location for a Network File System (NFS) file\n server. DataSync can use this location as a source or destination for\n transferring data.

\n

Before you begin, make sure that you understand how DataSync\n accesses\n NFS file servers.

\n \n

If you're copying data to or from an Snowcone device, you can also use\n CreateLocationNfs to create your transfer location. For more information, see\n Configuring transfers with Snowcone.

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

Creates a transfer location for a Network File System (NFS) file\n server. DataSync can use this location as a source or destination for\n transferring data.

\n

Before you begin, make sure that you understand how DataSync\n accesses\n NFS file servers.

" } }, "com.amazonaws.datasync#CreateLocationNfsRequest": { @@ -4112,6 +4112,21 @@ { "target": "com.amazonaws.datasync#UpdateLocationAzureBlob" }, + { + "target": "com.amazonaws.datasync#UpdateLocationEfs" + }, + { + "target": "com.amazonaws.datasync#UpdateLocationFsxLustre" + }, + { + "target": "com.amazonaws.datasync#UpdateLocationFsxOntap" + }, + { + "target": "com.amazonaws.datasync#UpdateLocationFsxOpenZfs" + }, + { + "target": "com.amazonaws.datasync#UpdateLocationFsxWindows" + }, { "target": "com.amazonaws.datasync#UpdateLocationHdfs" }, @@ -4121,6 +4136,9 @@ { "target": "com.amazonaws.datasync#UpdateLocationObjectStorage" }, + { + "target": "com.amazonaws.datasync#UpdateLocationS3" + }, { "target": "com.amazonaws.datasync#UpdateLocationSmb" }, @@ -5197,7 +5215,7 @@ } }, "traits": { - "smithy.api#documentation": "

Specifies the Network File System (NFS) protocol configuration that DataSync\n uses to access your Amazon FSx for OpenZFS or Amazon FSx for NetApp ONTAP file\n system.

" + "smithy.api#documentation": "

Specifies the Network File System (NFS) protocol configuration that DataSync\n uses to access your FSx for OpenZFS file system or FSx for ONTAP file\n system's storage virtual machine (SVM).

" } }, "com.amazonaws.datasync#FsxProtocolSmb": { @@ -5206,7 +5224,7 @@ "Domain": { "target": "com.amazonaws.datasync#SmbDomain", "traits": { - "smithy.api#documentation": "

Specifies the fully qualified domain name (FQDN) of the Microsoft Active Directory that\n your storage virtual machine (SVM) belongs to.

\n

If you have multiple domains in your environment, configuring this setting makes sure that\n DataSync connects to the right SVM.

" + "smithy.api#documentation": "

Specifies the name of the Windows domain that your storage virtual machine (SVM) belongs to.

\n

If you have multiple domains in your environment, configuring this setting makes sure that\n DataSync connects to the right SVM.

\n

If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right SVM.

" } }, "MountOptions": { @@ -5228,7 +5246,63 @@ } }, "traits": { - "smithy.api#documentation": "

Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your Amazon FSx for NetApp ONTAP file system. For more information, see\n Accessing FSx for ONTAP file systems.

" + "smithy.api#documentation": "

Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your Amazon FSx for NetApp ONTAP file system's storage virtual machine (SVM). For more information, see\n Providing DataSync access to FSx for ONTAP file systems.

" + } + }, + "com.amazonaws.datasync#FsxUpdateProtocol": { + "type": "structure", + "members": { + "NFS": { + "target": "com.amazonaws.datasync#FsxProtocolNfs" + }, + "SMB": { + "target": "com.amazonaws.datasync#FsxUpdateProtocolSmb", + "traits": { + "smithy.api#documentation": "

Specifies the Server Message Block (SMB) protocol configuration that DataSync\n uses to access your FSx for ONTAP file system's storage virtual machine (SVM).

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

Specifies the data transfer protocol that DataSync uses to access your\n Amazon FSx file system.

\n \n

You can't update the Network File System (NFS) protocol configuration for FSx for ONTAP locations. DataSync currently only supports NFS version 3 with this location type.

\n
" + } + }, + "com.amazonaws.datasync#FsxUpdateProtocolSmb": { + "type": "structure", + "members": { + "Domain": { + "target": "com.amazonaws.datasync#FsxUpdateSmbDomain", + "traits": { + "smithy.api#documentation": "

Specifies the name of the Windows domain that your storage virtual machine (SVM) belongs to.

\n

If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right SVM.

" + } + }, + "MountOptions": { + "target": "com.amazonaws.datasync#SmbMountOptions" + }, + "Password": { + "target": "com.amazonaws.datasync#SmbPassword", + "traits": { + "smithy.api#documentation": "

Specifies the password of a user who has permission to access your SVM.

" + } + }, + "User": { + "target": "com.amazonaws.datasync#SmbUser", + "traits": { + "smithy.api#documentation": "

Specifies a user that can mount and access the files, folders, and metadata in your SVM.

\n

For information about choosing a user with the right level of access for your transfer, see Using\n the SMB protocol.

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

Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your Amazon FSx for NetApp ONTAP file system's storage virtual machine (SVM). For more information, see\n Providing DataSync access to FSx for ONTAP file systems.

" + } + }, + "com.amazonaws.datasync#FsxUpdateSmbDomain": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 253 + }, + "smithy.api#pattern": "^([A-Za-z0-9]((\\.|-+)?[A-Za-z0-9]){0,252})?$" } }, "com.amazonaws.datasync#FsxWindowsSubdirectory": { @@ -7750,7 +7824,7 @@ } }, "traits": { - "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

\n

For more information, see Accessing\n S3 buckets.

" + "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

\n

For more information, see Providing DataSync access to S3 buckets.

" } }, "com.amazonaws.datasync#S3ManifestConfig": { @@ -9174,7 +9248,7 @@ } ], "traits": { - "smithy.api#documentation": "

Modifies some configurations of the Microsoft Azure Blob Storage transfer location that you're using with DataSync.

" + "smithy.api#documentation": "

Modifies the following configurations of the Microsoft Azure Blob Storage transfer location that you're using with DataSync.

\n

For more information, see Configuring DataSync transfers with Azure Blob Storage.

" } }, "com.amazonaws.datasync#UpdateLocationAzureBlobRequest": { @@ -9235,6 +9309,291 @@ "smithy.api#output": {} } }, + "com.amazonaws.datasync#UpdateLocationEfs": { + "type": "operation", + "input": { + "target": "com.amazonaws.datasync#UpdateLocationEfsRequest" + }, + "output": { + "target": "com.amazonaws.datasync#UpdateLocationEfsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.datasync#InternalException" + }, + { + "target": "com.amazonaws.datasync#InvalidRequestException" + } + ], + "traits": { + "smithy.api#documentation": "

Modifies the following configuration parameters of the Amazon EFS transfer location that you're using with DataSync.

\n

For more information, see Configuring DataSync transfers with Amazon EFS.

" + } + }, + "com.amazonaws.datasync#UpdateLocationEfsRequest": { + "type": "structure", + "members": { + "LocationArn": { + "target": "com.amazonaws.datasync#LocationArn", + "traits": { + "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the Amazon EFS transfer location that you're updating.

", + "smithy.api#required": {} + } + }, + "Subdirectory": { + "target": "com.amazonaws.datasync#EfsSubdirectory", + "traits": { + "smithy.api#documentation": "

Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

\n

By default, DataSync uses the root directory (or access point if you provide one by using\n AccessPointArn). You can also include subdirectories using forward slashes (for\n example, /path/to/folder).

" + } + }, + "AccessPointArn": { + "target": "com.amazonaws.datasync#UpdatedEfsAccessPointArn", + "traits": { + "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses\n to mount your Amazon EFS file system.

\n

For more information, see Accessing restricted Amazon EFS file systems.

" + } + }, + "FileSystemAccessRoleArn": { + "target": "com.amazonaws.datasync#UpdatedEfsIamRoleArn", + "traits": { + "smithy.api#documentation": "

Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.

\n

For information on creating this role, see Creating a DataSync IAM role for Amazon EFS file system access.

" + } + }, + "InTransitEncryption": { + "target": "com.amazonaws.datasync#EfsInTransitEncryption", + "traits": { + "smithy.api#documentation": "

Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2\n encryption when it transfers data to or from your Amazon EFS file system.

\n

If you specify an access point using AccessPointArn or an IAM\n role using FileSystemAccessRoleArn, you must set this parameter to\n TLS1_2.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.datasync#UpdateLocationEfsResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.datasync#UpdateLocationFsxLustre": { + "type": "operation", + "input": { + "target": "com.amazonaws.datasync#UpdateLocationFsxLustreRequest" + }, + "output": { + "target": "com.amazonaws.datasync#UpdateLocationFsxLustreResponse" + }, + "errors": [ + { + "target": "com.amazonaws.datasync#InternalException" + }, + { + "target": "com.amazonaws.datasync#InvalidRequestException" + } + ], + "traits": { + "smithy.api#documentation": "

Modifies the following configuration parameters of the Amazon FSx for Lustre transfer location that you're using with DataSync.

\n

For more information, see Configuring DataSync transfers with FSx for Lustre.

" + } + }, + "com.amazonaws.datasync#UpdateLocationFsxLustreRequest": { + "type": "structure", + "members": { + "LocationArn": { + "target": "com.amazonaws.datasync#LocationArn", + "traits": { + "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the FSx for Lustre transfer location that you're updating.

", + "smithy.api#required": {} + } + }, + "Subdirectory": { + "target": "com.amazonaws.datasync#SmbSubdirectory", + "traits": { + "smithy.api#documentation": "

Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

\n

When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.datasync#UpdateLocationFsxLustreResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.datasync#UpdateLocationFsxOntap": { + "type": "operation", + "input": { + "target": "com.amazonaws.datasync#UpdateLocationFsxOntapRequest" + }, + "output": { + "target": "com.amazonaws.datasync#UpdateLocationFsxOntapResponse" + }, + "errors": [ + { + "target": "com.amazonaws.datasync#InternalException" + }, + { + "target": "com.amazonaws.datasync#InvalidRequestException" + } + ], + "traits": { + "smithy.api#documentation": "

Modifies the following configuration parameters of the Amazon FSx for NetApp ONTAP transfer location that you're using with DataSync.

\n

For more information, see Configuring DataSync transfers with FSx for ONTAP.

" + } + }, + "com.amazonaws.datasync#UpdateLocationFsxOntapRequest": { + "type": "structure", + "members": { + "LocationArn": { + "target": "com.amazonaws.datasync#LocationArn", + "traits": { + "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP transfer location that you're updating.

", + "smithy.api#required": {} + } + }, + "Protocol": { + "target": "com.amazonaws.datasync#FsxUpdateProtocol", + "traits": { + "smithy.api#documentation": "

Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

" + } + }, + "Subdirectory": { + "target": "com.amazonaws.datasync#FsxOntapSubdirectory", + "traits": { + "smithy.api#documentation": "

Specifies a path to the file share in the storage virtual machine (SVM) where you want to transfer data to or from.

\n

You can specify a junction path (also known as a mount point), qtree path (for NFS file\n shares), or share name (for SMB file shares). For example, your mount path might be\n /vol1, /vol1/tree1, or /share1.

\n \n

Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

\n
" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.datasync#UpdateLocationFsxOntapResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.datasync#UpdateLocationFsxOpenZfs": { + "type": "operation", + "input": { + "target": "com.amazonaws.datasync#UpdateLocationFsxOpenZfsRequest" + }, + "output": { + "target": "com.amazonaws.datasync#UpdateLocationFsxOpenZfsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.datasync#InternalException" + }, + { + "target": "com.amazonaws.datasync#InvalidRequestException" + } + ], + "traits": { + "smithy.api#documentation": "

Modifies the following configuration parameters of the Amazon FSx for OpenZFS transfer location that you're using with DataSync.

\n

For more information, see Configuring DataSync transfers with FSx for OpenZFS.

\n \n

Request parameters related to SMB aren't supported with the\n UpdateLocationFsxOpenZfs operation.

\n
" + } + }, + "com.amazonaws.datasync#UpdateLocationFsxOpenZfsRequest": { + "type": "structure", + "members": { + "LocationArn": { + "target": "com.amazonaws.datasync#LocationArn", + "traits": { + "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the FSx for OpenZFS transfer location that you're updating.

", + "smithy.api#required": {} + } + }, + "Protocol": { + "target": "com.amazonaws.datasync#FsxProtocol" + }, + "Subdirectory": { + "target": "com.amazonaws.datasync#SmbSubdirectory", + "traits": { + "smithy.api#documentation": "

Specifies a subdirectory in the location's path that must begin with /fsx. DataSync uses this subdirectory to read or write data (depending on whether the file\n system is a source or destination location).

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.datasync#UpdateLocationFsxOpenZfsResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.datasync#UpdateLocationFsxWindows": { + "type": "operation", + "input": { + "target": "com.amazonaws.datasync#UpdateLocationFsxWindowsRequest" + }, + "output": { + "target": "com.amazonaws.datasync#UpdateLocationFsxWindowsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.datasync#InternalException" + }, + { + "target": "com.amazonaws.datasync#InvalidRequestException" + } + ], + "traits": { + "smithy.api#documentation": "

Modifies the following configuration parameters of the Amazon FSx for Windows File Server transfer location that you're using with DataSync.

\n

For more information, see Configuring DataSync transfers with FSx for Windows File Server.

" + } + }, + "com.amazonaws.datasync#UpdateLocationFsxWindowsRequest": { + "type": "structure", + "members": { + "LocationArn": { + "target": "com.amazonaws.datasync#LocationArn", + "traits": { + "smithy.api#documentation": "

Specifies the ARN of the FSx for Windows File Server transfer location that you're updating.

", + "smithy.api#required": {} + } + }, + "Subdirectory": { + "target": "com.amazonaws.datasync#FsxWindowsSubdirectory", + "traits": { + "smithy.api#documentation": "

Specifies a mount path for your file system using forward slashes. DataSync uses this subdirectory to read or write data (depending on whether the file\n system is a source or destination location).

" + } + }, + "Domain": { + "target": "com.amazonaws.datasync#FsxUpdateSmbDomain", + "traits": { + "smithy.api#documentation": "

Specifies the name of the Windows domain that your FSx for Windows File Server file system belongs to.

\n

If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

" + } + }, + "User": { + "target": "com.amazonaws.datasync#SmbUser", + "traits": { + "smithy.api#documentation": "

Specifies the user with the permissions to mount and access the files, folders, and file\n metadata in your FSx for Windows File Server file system.

\n

For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.

" + } + }, + "Password": { + "target": "com.amazonaws.datasync#SmbPassword", + "traits": { + "smithy.api#documentation": "

Specifies the password of the user with the permissions to mount and access the files,\n folders, and file metadata in your FSx for Windows File Server file system.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.datasync#UpdateLocationFsxWindowsResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.datasync#UpdateLocationHdfs": { "type": "operation", "input": { @@ -9252,7 +9611,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates some parameters of a previously created location for a Hadoop Distributed File\n System cluster.

" + "smithy.api#documentation": "

Modifies the following configuration parameters of the Hadoop Distributed File\n System (HDFS) transfer location that you're using with DataSync.

\n

For more information, see Configuring DataSync transfers with an HDFS cluster.

" } }, "com.amazonaws.datasync#UpdateLocationHdfsRequest": { @@ -9366,7 +9725,7 @@ } ], "traits": { - "smithy.api#documentation": "

Modifies some configurations of the Network File System (NFS) transfer location that\n you're using with DataSync.

\n

For more information, see Configuring transfers to or from an\n NFS file server.

" + "smithy.api#documentation": "

Modifies the following configuration parameters of the Network File System (NFS) transfer location that you're using with DataSync.

\n

For more information, see Configuring transfers with an\n NFS file server.

" } }, "com.amazonaws.datasync#UpdateLocationNfsRequest": { @@ -9420,7 +9779,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates some parameters of an existing DataSync location for an object\n storage system.

" + "smithy.api#documentation": "

Modifies the following configuration parameters of the object storage transfer location that you're using with DataSync.

\n

For more information, see Configuring DataSync transfers with an object storage system.

" } }, "com.amazonaws.datasync#UpdateLocationObjectStorageRequest": { @@ -9487,6 +9846,63 @@ "smithy.api#output": {} } }, + "com.amazonaws.datasync#UpdateLocationS3": { + "type": "operation", + "input": { + "target": "com.amazonaws.datasync#UpdateLocationS3Request" + }, + "output": { + "target": "com.amazonaws.datasync#UpdateLocationS3Response" + }, + "errors": [ + { + "target": "com.amazonaws.datasync#InternalException" + }, + { + "target": "com.amazonaws.datasync#InvalidRequestException" + } + ], + "traits": { + "smithy.api#documentation": "

Modifies the following configuration parameters of the Amazon S3 transfer location that you're using with DataSync.

\n \n

Before you begin, make sure that you read the following topics:

\n \n
" + } + }, + "com.amazonaws.datasync#UpdateLocationS3Request": { + "type": "structure", + "members": { + "LocationArn": { + "target": "com.amazonaws.datasync#LocationArn", + "traits": { + "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the Amazon S3 transfer location that you're updating.

", + "smithy.api#required": {} + } + }, + "Subdirectory": { + "target": "com.amazonaws.datasync#S3Subdirectory", + "traits": { + "smithy.api#documentation": "

Specifies a prefix in the S3 bucket that DataSync reads from or writes to\n (depending on whether the bucket is a source or destination location).

\n \n

DataSync can't transfer objects with a prefix that begins with a slash\n (/) or includes //, /./, or\n /../ patterns. For example:

\n \n
" + } + }, + "S3StorageClass": { + "target": "com.amazonaws.datasync#S3StorageClass", + "traits": { + "smithy.api#documentation": "

Specifies the storage class that you want your objects to use when Amazon S3 is a\n transfer destination.

\n

For buckets in Amazon Web Services Regions, the storage class defaults to\n STANDARD. For buckets on Outposts, the storage class defaults to\n OUTPOSTS.

\n

For more information, see Storage class\n considerations with Amazon S3 transfers.

" + } + }, + "S3Config": { + "target": "com.amazonaws.datasync#S3Config" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.datasync#UpdateLocationS3Response": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.datasync#UpdateLocationSmb": { "type": "operation", "input": { @@ -9504,7 +9920,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates some of the parameters of a Server Message Block\n (SMB) file server location that you can use for DataSync transfers.

" + "smithy.api#documentation": "

Modifies the following configuration parameters of the Server Message Block\n (SMB) transfer location that you're using with DataSync.

\n

For more information, see Configuring DataSync transfers with an SMB file server.

" } }, "com.amazonaws.datasync#UpdateLocationSmbRequest": { @@ -9773,6 +10189,26 @@ "smithy.api#output": {} } }, + "com.amazonaws.datasync#UpdatedEfsAccessPointArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 128 + }, + "smithy.api#pattern": "^(^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):elasticfilesystem:[a-z\\-0-9]+:[0-9]{12}:access-point/fsap-[0-9a-f]{8,40}$)|(^$)$" + } + }, + "com.amazonaws.datasync#UpdatedEfsIamRoleArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": "^(^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):iam::[0-9]{12}:role/.*$)|(^$)$" + } + }, "com.amazonaws.datasync#VerifyMode": { "type": "enum", "members": { diff --git a/aws-models/iot.json b/aws-models/iot.json index 5c6749349046..a9c2ad09c8bf 100644 --- a/aws-models/iot.json +++ b/aws-models/iot.json @@ -468,6 +468,9 @@ { "target": "com.amazonaws.iot#GetStatistics" }, + { + "target": "com.amazonaws.iot#GetThingConnectivityData" + }, { "target": "com.amazonaws.iot#GetTopicRule" }, @@ -6890,6 +6893,17 @@ "smithy.api#pattern": "^[a-zA-Z0-9:.]+$" } }, + "com.amazonaws.iot#ConnectivityApiThingName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[a-zA-Z0-9:_-]+$", + "smithy.api#sensitive": {} + } + }, "com.amazonaws.iot#ConnectivityTimestamp": { "type": "long" }, @@ -7492,7 +7506,7 @@ "roleArn": { "target": "com.amazonaws.iot#RoleArn", "traits": { - "smithy.api#documentation": "

The IAM role that allows access to create the command.

" + "smithy.api#documentation": "

The IAM role that you must provide when using the AWS-IoT-FleetWise namespace.\n The role grants IoT Device Management the permission to access IoT FleetWise resources \n for generating the payload for the command. This field is not required when you use the\n AWS-IoT namespace.

" } }, "tags": { @@ -16802,6 +16816,95 @@ "com.amazonaws.iot#DisconnectReason": { "type": "string" }, + "com.amazonaws.iot#DisconnectReasonValue": { + "type": "enum", + "members": { + "AUTH_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUTH_ERROR" + } + }, + "CLIENT_INITIATED_DISCONNECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CLIENT_INITIATED_DISCONNECT" + } + }, + "CLIENT_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CLIENT_ERROR" + } + }, + "CONNECTION_LOST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONNECTION_LOST" + } + }, + "DUPLICATE_CLIENTID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DUPLICATE_CLIENTID" + } + }, + "FORBIDDEN_ACCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FORBIDDEN_ACCESS" + } + }, + "MQTT_KEEP_ALIVE_TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MQTT_KEEP_ALIVE_TIMEOUT" + } + }, + "SERVER_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SERVER_ERROR" + } + }, + "SERVER_INITIATED_DISCONNECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SERVER_INITIATED_DISCONNECT" + } + }, + "THROTTLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "THROTTLED" + } + }, + "WEBSOCKET_TTL_EXPIRATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WEBSOCKET_TTL_EXPIRATION" + } + }, + "CUSTOMAUTH_TTL_EXPIRATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CUSTOMAUTH_TTL_EXPIRATION" + } + }, + "UNKNOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNKNOWN" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + } + } + }, "com.amazonaws.iot#DisplayName": { "type": "string", "traits": { @@ -18414,7 +18517,7 @@ "timeToLive": { "target": "com.amazonaws.iot#DateType", "traits": { - "smithy.api#documentation": "

The time to live (TTL) parameter for the GetCommandExecution API.

" + "smithy.api#documentation": "

The time to live (TTL) parameter that indicates the duration for which executions will\n be retained in your account. The default value is six months.

" } } }, @@ -18486,7 +18589,7 @@ "roleArn": { "target": "com.amazonaws.iot#RoleArn", "traits": { - "smithy.api#documentation": "

The IAM role that allows access to retrieve information about the command.

" + "smithy.api#documentation": "

The IAM role that you provided when creating the command with AWS-IoT-FleetWise\n as the namespace.

" } }, "createdAt": { @@ -19605,6 +19708,94 @@ "smithy.api#output": {} } }, + "com.amazonaws.iot#GetThingConnectivityData": { + "type": "operation", + "input": { + "target": "com.amazonaws.iot#GetThingConnectivityDataRequest" + }, + "output": { + "target": "com.amazonaws.iot#GetThingConnectivityDataResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iot#IndexNotReadyException" + }, + { + "target": "com.amazonaws.iot#InternalFailureException" + }, + { + "target": "com.amazonaws.iot#InvalidRequestException" + }, + { + "target": "com.amazonaws.iot#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iot#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.iot#ThrottlingException" + }, + { + "target": "com.amazonaws.iot#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the live connectivity status per device.

", + "smithy.api#http": { + "method": "POST", + "uri": "/things/{thingName}/connectivity-data", + "code": 200 + } + } + }, + "com.amazonaws.iot#GetThingConnectivityDataRequest": { + "type": "structure", + "members": { + "thingName": { + "target": "com.amazonaws.iot#ConnectivityApiThingName", + "traits": { + "smithy.api#documentation": "

The name of your IoT thing.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.iot#GetThingConnectivityDataResponse": { + "type": "structure", + "members": { + "thingName": { + "target": "com.amazonaws.iot#ConnectivityApiThingName", + "traits": { + "smithy.api#documentation": "

The name of your IoT thing.

" + } + }, + "connected": { + "target": "com.amazonaws.iot#Boolean", + "traits": { + "smithy.api#documentation": "

A Boolean that indicates the connectivity status.

" + } + }, + "timestamp": { + "target": "com.amazonaws.iot#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp of when the event occurred.

" + } + }, + "disconnectReason": { + "target": "com.amazonaws.iot#DisconnectReasonValue", + "traits": { + "smithy.api#documentation": "

The reason why the client is disconnecting.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.iot#GetTopicRule": { "type": "operation", "input": { @@ -22712,7 +22903,7 @@ } ], "traits": { - "smithy.api#documentation": "

List all command executions.

\n \n

You must provide only the\n startedTimeFilter or the completedTimeFilter information. If you \n provide both time filters, the API will generate an error.\n You can use this information to find command executions that started within\n a specific timeframe.

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

List all command executions.

\n \n \n

For more information about considerations for using this API, see\n List\n command executions in your account (CLI).

\n
", "smithy.api#http": { "method": "POST", "uri": "/command-executions", diff --git a/aws-models/mwaa.json b/aws-models/mwaa.json index 161364d6708a..99d50643a87a 100644 --- a/aws-models/mwaa.json +++ b/aws-models/mwaa.json @@ -1136,7 +1136,7 @@ "AirflowVersion": { "target": "com.amazonaws.mwaa#AirflowVersion", "traits": { - "smithy.api#documentation": "

The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version.\n For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA).

\n

Valid values: 1.10.12, 2.0.2, 2.2.2,\n 2.4.3, 2.5.1, 2.6.3, 2.7.2,\n 2.8.1, 2.9.2, and 2.10.1.

" + "smithy.api#documentation": "

The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version.\n For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA).

\n

Valid values: 1.10.12, 2.0.2, 2.2.2,\n 2.4.3, 2.5.1, 2.6.3, 2.7.2,\n 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

" } }, "LoggingConfiguration": { @@ -1443,7 +1443,7 @@ "AirflowVersion": { "target": "com.amazonaws.mwaa#AirflowVersion", "traits": { - "smithy.api#documentation": "

The Apache Airflow version on your environment.

\n

Valid values: 1.10.12, 2.0.2, 2.2.2,\n 2.4.3, 2.5.1, 2.6.3, 2.7.2,\n 2.8.1, 2.9.2, and 2.10.1.

" + "smithy.api#documentation": "

The Apache Airflow version on your environment.

\n

Valid values: 1.10.12, 2.0.2, 2.2.2,\n 2.4.3, 2.5.1, 2.6.3, 2.7.2,\n 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

" } }, "SourceBucketArn": { @@ -2989,7 +2989,7 @@ "AirflowVersion": { "target": "com.amazonaws.mwaa#AirflowVersion", "traits": { - "smithy.api#documentation": "

The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.

\n

Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating\n your resources, see Upgrading an Amazon MWAA environment.

\n

Valid values: 1.10.12, 2.0.2, 2.2.2,\n 2.4.3, 2.5.1, 2.6.3, 2.7.2,\n 2.8.1, 2.9.2, and 2.10.1.

" + "smithy.api#documentation": "

The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.

\n

Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating\n your resources, see Upgrading an Amazon MWAA environment.

\n

Valid values: 1.10.12, 2.0.2, 2.2.2,\n 2.4.3, 2.5.1, 2.6.3, 2.7.2,\n 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

" } }, "SourceBucketArn": { diff --git a/aws-models/quicksight.json b/aws-models/quicksight.json index c949cbe8c3c8..8f68cab4baaf 100644 --- a/aws-models/quicksight.json +++ b/aws-models/quicksight.json @@ -9141,6 +9141,12 @@ "traits": { "smithy.api#documentation": "

When you create the dataset, Amazon QuickSight adds the dataset to these folders.

" } + }, + "PerformanceConfiguration": { + "target": "com.amazonaws.quicksight#PerformanceConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

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

The parameters that are declared in a dataset.

" } + }, + "PerformanceConfiguration": { + "target": "com.amazonaws.quicksight#PerformanceConfiguration", + "traits": { + "smithy.api#documentation": "

The performance optimization configuration of a dataset.

" + } } }, "traits": { @@ -40442,6 +40454,20 @@ } } }, + "com.amazonaws.quicksight#PerformanceConfiguration": { + "type": "structure", + "members": { + "UniqueKeys": { + "target": "com.amazonaws.quicksight#UniqueKeyList", + "traits": { + "smithy.api#documentation": "

A UniqueKey configuration.

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

The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

" + } + }, "com.amazonaws.quicksight#PeriodOverPeriodComputation": { "type": "structure", "members": { @@ -56274,6 +56300,45 @@ "smithy.api#pattern": "^[^\\u0000-\\u00FF]$" } }, + "com.amazonaws.quicksight#UniqueKey": { + "type": "structure", + "members": { + "ColumnNames": { + "target": "com.amazonaws.quicksight#UniqueKeyColumnNameList", + "traits": { + "smithy.api#documentation": "

The name of the column that is referenced in the UniqueKey configuration.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A UniqueKey configuration that references a dataset column.

" + } + }, + "com.amazonaws.quicksight#UniqueKeyColumnNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#ColumnName" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.quicksight#UniqueKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#UniqueKey" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, "com.amazonaws.quicksight#UniqueValuesComputation": { "type": "structure", "members": { @@ -58187,6 +58252,12 @@ "traits": { "smithy.api#documentation": "

The parameter declarations of the dataset.

" } + }, + "PerformanceConfiguration": { + "target": "com.amazonaws.quicksight#PerformanceConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

" + } } }, "traits": { diff --git a/aws-models/resiliencehub.json b/aws-models/resiliencehub.json index e2fc7be8969e..18f132ed97a2 100644 --- a/aws-models/resiliencehub.json +++ b/aws-models/resiliencehub.json @@ -225,6 +225,26 @@ } } }, + "com.amazonaws.resiliencehub#Alarm": { + "type": "structure", + "members": { + "alarmArn": { + "target": "com.amazonaws.resiliencehub#Arn", + "traits": { + "smithy.api#documentation": "

Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.

" + } + }, + "source": { + "target": "com.amazonaws.resiliencehub#String255", + "traits": { + "smithy.api#documentation": "

Indicates the source of the Amazon CloudWatch alarm. That is, it indicates if the\n alarm was created using Resilience Hub recommendation (AwsResilienceHub),\n or if you had created the alarm in Amazon CloudWatch (Customer).

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

Indicates the Amazon CloudWatch alarm detected while running an assessment.

" + } + }, "com.amazonaws.resiliencehub#AlarmRecommendation": { "type": "structure", "members": { @@ -683,7 +703,7 @@ "complianceStatus": { "target": "com.amazonaws.resiliencehub#ComplianceStatus", "traits": { - "smithy.api#documentation": "

Current\n status of compliance for the resiliency policy.

" + "smithy.api#documentation": "

Current status of compliance for the resiliency policy.

" } }, "cost": { @@ -1146,7 +1166,7 @@ "appComponents": { "target": "com.amazonaws.resiliencehub#AppComponentNameList", "traits": { - "smithy.api#documentation": "

Indicates the Application Components (AppComponents) that were assessed as part of the\n assessnent and are associated with the identified risk and recommendation.

\n \n

This property is available only in the US East (N. Virginia) Region.

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

Indicates the Application Components (AppComponents) that were assessed as part of the\n assessment and are associated with the identified risk and recommendation.

\n \n

This property is available only in the US East (N. Virginia) Region.

\n
" } } }, @@ -2465,6 +2485,12 @@ "smithy.api#required": {} } }, + "appComponentId": { + "target": "com.amazonaws.resiliencehub#EntityName255", + "traits": { + "smithy.api#documentation": "

Indicates the identifier of an AppComponent.

" + } + }, "excludeReason": { "target": "com.amazonaws.resiliencehub#ExcludeRecommendationReason", "traits": { @@ -2549,7 +2575,7 @@ "diffType": { "target": "com.amazonaws.resiliencehub#DifferenceType", "traits": { - "smithy.api#documentation": "

Difference type between actual and expected recovery point objective (RPO) and recovery\n time objective (RTO) values. Currently, Resilience Hub supports only\n NotEqual difference type.

" + "smithy.api#documentation": "

Difference type between actual and expected recovery point objective (RPO) and recovery\n time objective (RTO) values. Currently, Resilience Hub supports only\n NotEqual difference type.

" } } }, @@ -5422,6 +5448,26 @@ } } }, + "com.amazonaws.resiliencehub#Experiment": { + "type": "structure", + "members": { + "experimentArn": { + "target": "com.amazonaws.resiliencehub#String255", + "traits": { + "smithy.api#documentation": "

Amazon Resource Name (ARN) of the FIS experiment.

" + } + }, + "experimentTemplateId": { + "target": "com.amazonaws.resiliencehub#String255", + "traits": { + "smithy.api#documentation": "

Identifier of the FIS experiment template.

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

Indicates the FIS experiment detected while running an assessment.

" + } + }, "com.amazonaws.resiliencehub#FailedGroupingRecommendationEntries": { "type": "list", "member": { @@ -7987,7 +8033,7 @@ "invokerRoleName": { "target": "com.amazonaws.resiliencehub#IamRoleName", "traits": { - "smithy.api#documentation": "

Existing Amazon Web Services\n IAM role name in the primary Amazon Web Services account that will be assumed by\n Resilience Hub Service Principle to obtain a read-only access to your application\n resources while running an assessment.

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

Existing Amazon Web Services\n IAM role name in the primary Amazon Web Services account that will be assumed by\n Resilience Hub Service Principle to obtain a read-only access to your application\n resources while running an assessment.

\n

If your IAM role includes a path, you must include the path in the invokerRoleName parameter. \n For example, if your IAM role's ARN is arn:aws:iam:123456789012:role/my-path/role-name, you should pass my-path/role-name.\n

\n \n \n " } }, "crossAccountRoleArns": { @@ -8427,6 +8473,18 @@ "traits": { "smithy.api#documentation": "

Indicates the reason for excluding an operational recommendation.

" } + }, + "latestDiscoveredExperiment": { + "target": "com.amazonaws.resiliencehub#Experiment", + "traits": { + "smithy.api#documentation": "

Indicates the experiment created in FIS that was discovered by Resilience Hub, which matches the recommendation.

" + } + }, + "discoveredAlarm": { + "target": "com.amazonaws.resiliencehub#Alarm", + "traits": { + "smithy.api#documentation": "

Indicates the previously implemented Amazon CloudWatch alarm discovered by Resilience Hub.

" + } } }, "traits": { @@ -9205,7 +9263,7 @@ "hasMoreErrors": { "target": "com.amazonaws.resiliencehub#BooleanOptional", "traits": { - "smithy.api#documentation": "

This indicates if there are more errors not listed in the\n resourceErrors\n list.

" + "smithy.api#documentation": "

This indicates if there are more errors not listed in the resourceErrors\n list.

" } } }, @@ -10204,6 +10262,12 @@ "smithy.api#required": {} } }, + "appComponentId": { + "target": "com.amazonaws.resiliencehub#EntityName255", + "traits": { + "smithy.api#documentation": "

Indicates the identifier of the AppComponent.

" + } + }, "appComponentName": { "target": "com.amazonaws.resiliencehub#EntityId", "traits": { @@ -10924,6 +10988,12 @@ "smithy.api#required": {} } }, + "appComponentId": { + "target": "com.amazonaws.resiliencehub#EntityName255", + "traits": { + "smithy.api#documentation": "

Indicates the identifier of the AppComponent.

" + } + }, "excludeReason": { "target": "com.amazonaws.resiliencehub#ExcludeRecommendationReason", "traits": { diff --git a/aws-models/sdk-endpoints.json b/aws-models/sdk-endpoints.json index 1c7d34cccf30..7ea2f774a16b 100644 --- a/aws-models/sdk-endpoints.json +++ b/aws-models/sdk-endpoints.json @@ -5780,38 +5780,150 @@ }, "datasync" : { "endpoints" : { - "af-south-1" : { }, - "ap-east-1" : { }, - "ap-northeast-1" : { }, - "ap-northeast-2" : { }, - "ap-northeast-3" : { }, - "ap-south-1" : { }, - "ap-south-2" : { }, - "ap-southeast-1" : { }, - "ap-southeast-2" : { }, - "ap-southeast-3" : { }, - "ap-southeast-4" : { }, - "ap-southeast-5" : { }, + "af-south-1" : { + "variants" : [ { + "hostname" : "datasync.af-south-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "ap-east-1" : { + "variants" : [ { + "hostname" : "datasync.ap-east-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "ap-northeast-1" : { + "variants" : [ { + "hostname" : "datasync.ap-northeast-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "ap-northeast-2" : { + "variants" : [ { + "hostname" : "datasync.ap-northeast-2.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "ap-northeast-3" : { + "variants" : [ { + "hostname" : "datasync.ap-northeast-3.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "ap-south-1" : { + "variants" : [ { + "hostname" : "datasync.ap-south-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "ap-south-2" : { + "variants" : [ { + "hostname" : "datasync.ap-south-2.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "ap-southeast-1" : { + "variants" : [ { + "hostname" : "datasync.ap-southeast-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "ap-southeast-2" : { + "variants" : [ { + "hostname" : "datasync.ap-southeast-2.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "ap-southeast-3" : { + "variants" : [ { + "hostname" : "datasync.ap-southeast-3.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "ap-southeast-4" : { + "variants" : [ { + "hostname" : "datasync.ap-southeast-4.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "ap-southeast-5" : { + "variants" : [ { + "hostname" : "datasync.ap-southeast-5.api.aws", + "tags" : [ "dualstack" ] + } ] + }, "ca-central-1" : { "variants" : [ { "hostname" : "datasync-fips.ca-central-1.amazonaws.com", "tags" : [ "fips" ] + }, { + "hostname" : "datasync-fips.ca-central-1.api.aws", + "tags" : [ "dualstack", "fips" ] + }, { + "hostname" : "datasync.ca-central-1.api.aws", + "tags" : [ "dualstack" ] } ] }, "ca-west-1" : { "variants" : [ { "hostname" : "datasync-fips.ca-west-1.amazonaws.com", "tags" : [ "fips" ] + }, { + "hostname" : "datasync-fips.ca-west-1.api.aws", + "tags" : [ "dualstack", "fips" ] + }, { + "hostname" : "datasync.ca-west-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "eu-central-1" : { + "variants" : [ { + "hostname" : "datasync.eu-central-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "eu-central-2" : { + "variants" : [ { + "hostname" : "datasync.eu-central-2.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "eu-north-1" : { + "variants" : [ { + "hostname" : "datasync.eu-north-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "eu-south-1" : { + "variants" : [ { + "hostname" : "datasync.eu-south-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "eu-south-2" : { + "variants" : [ { + "hostname" : "datasync.eu-south-2.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "eu-west-1" : { + "variants" : [ { + "hostname" : "datasync.eu-west-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "eu-west-2" : { + "variants" : [ { + "hostname" : "datasync.eu-west-2.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "eu-west-3" : { + "variants" : [ { + "hostname" : "datasync.eu-west-3.api.aws", + "tags" : [ "dualstack" ] } ] }, - "eu-central-1" : { }, - "eu-central-2" : { }, - "eu-north-1" : { }, - "eu-south-1" : { }, - "eu-south-2" : { }, - "eu-west-1" : { }, - "eu-west-2" : { }, - "eu-west-3" : { }, "fips-ca-central-1" : { "credentialScope" : { "region" : "ca-central-1" @@ -5854,32 +5966,76 @@ "deprecated" : true, "hostname" : "datasync-fips.us-west-2.amazonaws.com" }, - "il-central-1" : { }, - "me-central-1" : { }, - "me-south-1" : { }, - "sa-east-1" : { }, + "il-central-1" : { + "variants" : [ { + "hostname" : "datasync.il-central-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "me-central-1" : { + "variants" : [ { + "hostname" : "datasync.me-central-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "me-south-1" : { + "variants" : [ { + "hostname" : "datasync.me-south-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, + "sa-east-1" : { + "variants" : [ { + "hostname" : "datasync.sa-east-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, "us-east-1" : { "variants" : [ { "hostname" : "datasync-fips.us-east-1.amazonaws.com", "tags" : [ "fips" ] + }, { + "hostname" : "datasync-fips.us-east-1.api.aws", + "tags" : [ "dualstack", "fips" ] + }, { + "hostname" : "datasync.us-east-1.api.aws", + "tags" : [ "dualstack" ] } ] }, "us-east-2" : { "variants" : [ { "hostname" : "datasync-fips.us-east-2.amazonaws.com", "tags" : [ "fips" ] + }, { + "hostname" : "datasync-fips.us-east-2.api.aws", + "tags" : [ "dualstack", "fips" ] + }, { + "hostname" : "datasync.us-east-2.api.aws", + "tags" : [ "dualstack" ] } ] }, "us-west-1" : { "variants" : [ { "hostname" : "datasync-fips.us-west-1.amazonaws.com", "tags" : [ "fips" ] + }, { + "hostname" : "datasync-fips.us-west-1.api.aws", + "tags" : [ "dualstack", "fips" ] + }, { + "hostname" : "datasync.us-west-1.api.aws", + "tags" : [ "dualstack" ] } ] }, "us-west-2" : { "variants" : [ { "hostname" : "datasync-fips.us-west-2.amazonaws.com", "tags" : [ "fips" ] + }, { + "hostname" : "datasync-fips.us-west-2.api.aws", + "tags" : [ "dualstack", "fips" ] + }, { + "hostname" : "datasync.us-west-2.api.aws", + "tags" : [ "dualstack" ] } ] } } @@ -11619,6 +11775,7 @@ "ap-southeast-2" : { }, "ap-southeast-3" : { }, "ap-southeast-4" : { }, + "ap-southeast-5" : { }, "ca-central-1" : { "variants" : [ { "hostname" : "kafka-fips.ca-central-1.amazonaws.com", @@ -24309,8 +24466,18 @@ }, "datasync" : { "endpoints" : { - "cn-north-1" : { }, - "cn-northwest-1" : { } + "cn-north-1" : { + "variants" : [ { + "hostname" : "datasync.cn-north-1.api.amazonwebservices.com.cn", + "tags" : [ "dualstack" ] + } ] + }, + "cn-northwest-1" : { + "variants" : [ { + "hostname" : "datasync.cn-northwest-1.api.amazonwebservices.com.cn", + "tags" : [ "dualstack" ] + } ] + } } }, "datazone" : { @@ -26830,12 +26997,24 @@ "variants" : [ { "hostname" : "datasync-fips.us-gov-east-1.amazonaws.com", "tags" : [ "fips" ] + }, { + "hostname" : "datasync-fips.us-gov-east-1.api.aws", + "tags" : [ "dualstack", "fips" ] + }, { + "hostname" : "datasync.us-gov-east-1.api.aws", + "tags" : [ "dualstack" ] } ] }, "us-gov-west-1" : { "variants" : [ { "hostname" : "datasync-fips.us-gov-west-1.amazonaws.com", "tags" : [ "fips" ] + }, { + "hostname" : "datasync-fips.us-gov-west-1.api.aws", + "tags" : [ "dualstack", "fips" ] + }, { + "hostname" : "datasync.us-gov-west-1.api.aws", + "tags" : [ "dualstack" ] } ] } } diff --git a/aws-models/transfer.json b/aws-models/transfer.json index fec686b645b5..9ed633734e36 100644 --- a/aws-models/transfer.json +++ b/aws-models/transfer.json @@ -180,6 +180,12 @@ "traits": { "smithy.api#documentation": "

Provides Basic authentication support to the AS2 Connectors API. To use Basic authentication,\n you must provide the name or Amazon Resource Name (ARN) of a secret in Secrets Manager.

\n

The default value for this parameter is null, which indicates that Basic authentication is not enabled for the connector.

\n

If the connector should use Basic authentication, the secret needs to be in the following format:

\n

\n {\n \"Username\": \"user-name\",\n \"Password\": \"user-password\"\n }\n

\n

Replace user-name and user-password with the credentials for the actual user that is being authenticated.

\n

Note the following:

\n \n

If you have previously enabled Basic authentication for a connector, you can disable it by using the UpdateConnector API call. For example, if you are using the CLI, you can run the following command to remove Basic authentication:

\n

\n update-connector --connector-id my-connector-id --as2-config 'BasicAuthSecretId=\"\"'\n

" } + }, + "PreserveContentType": { + "target": "com.amazonaws.transfer#PreserveContentType", + "traits": { + "smithy.api#documentation": "

Allows you to use the Amazon S3 Content-Type that is associated with objects in S3 instead of\n having the content type mapped based on the file extension. This parameter is enabled by default when you create an AS2 connector\n from the console, but disabled by default when you create an AS2 connector by calling the API directly.

" + } } }, "traits": { @@ -766,6 +772,18 @@ "traits": { "smithy.api#documentation": "

Key-value pairs that can be used to group and search for agreements.

" } + }, + "PreserveFilename": { + "target": "com.amazonaws.transfer#PreserveFilenameType", + "traits": { + "smithy.api#documentation": "

\n Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload\n filename when saving it.\n

\n " + } + }, + "EnforceMessageSigning": { + "target": "com.amazonaws.transfer#EnforceMessageSigningType", + "traits": { + "smithy.api#documentation": "

\n Determines whether or not unsigned messages from your trading partners will be accepted.\n

\n " + } } }, "traits": { @@ -3218,6 +3236,18 @@ "traits": { "smithy.api#documentation": "

Key-value pairs that can be used to group and search for agreements.

" } + }, + "PreserveFilename": { + "target": "com.amazonaws.transfer#PreserveFilenameType", + "traits": { + "smithy.api#documentation": "

\n Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload\n filename when saving it.\n

\n " + } + }, + "EnforceMessageSigning": { + "target": "com.amazonaws.transfer#EnforceMessageSigningType", + "traits": { + "smithy.api#documentation": "

\n Determines whether or not unsigned messages from your trading partners will be accepted.\n

\n " + } } }, "traits": { @@ -3250,7 +3280,7 @@ "Status": { "target": "com.amazonaws.transfer#CertificateStatusType", "traits": { - "smithy.api#documentation": "

The certificate can be either ACTIVE, PENDING_ROTATION, or\n INACTIVE. PENDING_ROTATION means that this certificate will\n replace the current certificate when it expires.

" + "smithy.api#documentation": "

Currently, the only available status is ACTIVE: all other values are reserved for future use.

" } }, "Certificate": { @@ -4227,6 +4257,23 @@ } } }, + "com.amazonaws.transfer#EnforceMessageSigningType": { + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } + } + }, "com.amazonaws.transfer#ExecutionError": { "type": "structure", "members": { @@ -7017,6 +7064,40 @@ "smithy.api#pattern": "^[\\x09-\\x0D\\x20-\\x7E]*$" } }, + "com.amazonaws.transfer#PreserveContentType": { + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } + } + }, + "com.amazonaws.transfer#PreserveFilenameType": { + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } + } + }, "com.amazonaws.transfer#PrivateKeyType": { "type": "string", "traits": { @@ -9988,6 +10069,18 @@ "traits": { "smithy.api#documentation": "

Connectors are used to send files using either the AS2 or SFTP protocol. For the access role,\n provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.

\n

\n For AS2 connectors\n

\n

With AS2, you can send files by calling StartFileTransfer and specifying the\n file paths in the request parameter, SendFilePaths. We use the file’s parent\n directory (for example, for --send-file-paths /bucket/dir/file.txt, parent\n directory is /bucket/dir/) to temporarily store a processed AS2 message file,\n store the MDN when we receive them from the partner, and write a final JSON file containing\n relevant metadata of the transmission. So, the AccessRole needs to provide read\n and write access to the parent directory of the file location used in the\n StartFileTransfer request. Additionally, you need to provide read and write\n access to the parent directory of the files that you intend to send with\n StartFileTransfer.

\n

If you are using Basic authentication for your AS2 connector, the access role requires the\n secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using\n a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also\n needs the kms:Decrypt permission for that key.

\n

\n For SFTP connectors\n

\n

Make sure that the access role provides\n read and write access to the parent directory of the file location\n that's used in the StartFileTransfer request.\n Additionally, make sure that the role provides\n secretsmanager:GetSecretValue permission to Secrets Manager.

" } + }, + "PreserveFilename": { + "target": "com.amazonaws.transfer#PreserveFilenameType", + "traits": { + "smithy.api#documentation": "

\n Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload\n filename when saving it.\n

\n " + } + }, + "EnforceMessageSigning": { + "target": "com.amazonaws.transfer#EnforceMessageSigningType", + "traits": { + "smithy.api#documentation": "

\n Determines whether or not unsigned messages from your trading partners will be accepted.\n

\n " + } } }, "traits": { diff --git a/examples/examples/iot/Cargo.toml b/examples/examples/iot/Cargo.toml index 2622052de3d3..99ce5228c5de 100644 --- a/examples/examples/iot/Cargo.toml +++ b/examples/examples/iot/Cargo.toml @@ -8,7 +8,7 @@ publish = false [dependencies] aws-config= { version = "1.5.11", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } -aws-sdk-iot= { version = "1.58.0", path = "../../../sdk/iot" } +aws-sdk-iot= { version = "1.59.0", path = "../../../sdk/iot" } aws-types= { version = "1.3.3", path = "../../../sdk/aws-types" } [dependencies.tokio] diff --git a/sdk/amplify/Cargo.toml b/sdk/amplify/Cargo.toml index 19572e0be147..fd8877e12d3f 100644 --- a/sdk/amplify/Cargo.toml +++ b/sdk/amplify/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-amplify" -version = "1.55.0" +version = "1.56.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for AWS Amplify" edition = "2021" diff --git a/sdk/amplify/README.md b/sdk/amplify/README.md index 14d7050bda41..b2d287d5e6d4 100644 --- a/sdk/amplify/README.md +++ b/sdk/amplify/README.md @@ -14,7 +14,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-amplify = "1.55.0" +aws-sdk-amplify = "1.56.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/amplify/src/lib.rs b/sdk/amplify/src/lib.rs index 08aff4d2108c..981fa592981f 100644 --- a/sdk/amplify/src/lib.rs +++ b/sdk/amplify/src/lib.rs @@ -31,7 +31,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-amplify = "1.55.0" +//! aws-sdk-amplify = "1.56.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/amplify/src/protocol_serde.rs b/sdk/amplify/src/protocol_serde.rs index 73d099ac3964..4ff4ce8421f6 100644 --- a/sdk/amplify/src/protocol_serde.rs +++ b/sdk/amplify/src/protocol_serde.rs @@ -213,6 +213,8 @@ pub(crate) mod shape_steps; pub(crate) mod shape_sub_domains; +pub(crate) mod shape_waf_configuration; + pub(crate) mod shape_step; pub(crate) mod shape_sub_domain; diff --git a/sdk/amplify/src/protocol_serde/shape_app.rs b/sdk/amplify/src/protocol_serde/shape_app.rs index 650b825b287a..3eac058c719e 100644 --- a/sdk/amplify/src/protocol_serde/shape_app.rs +++ b/sdk/amplify/src/protocol_serde/shape_app.rs @@ -151,6 +151,15 @@ where "cacheConfig" => { builder = builder.set_cache_config(crate::protocol_serde::shape_cache_config::de_cache_config(tokens)?); } + "webhookCreateTime" => { + builder = builder.set_webhook_create_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( + tokens.next(), + ::aws_smithy_types::date_time::Format::EpochSeconds, + )?); + } + "wafConfiguration" => { + builder = builder.set_waf_configuration(crate::protocol_serde::shape_waf_configuration::de_waf_configuration(tokens)?); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/amplify/src/protocol_serde/shape_waf_configuration.rs b/sdk/amplify/src/protocol_serde/shape_waf_configuration.rs new file mode 100644 index 000000000000..50f9ea8b8ab7 --- /dev/null +++ b/sdk/amplify/src/protocol_serde/shape_waf_configuration.rs @@ -0,0 +1,54 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_waf_configuration<'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::WafConfigurationBuilder::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() { + "webAclArn" => { + builder = builder.set_web_acl_arn( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "wafStatus" => { + builder = builder.set_waf_status( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::WafStatus::from(u.as_ref()))) + .transpose()?, + ); + } + "statusReason" => { + builder = builder.set_status_reason( + ::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(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/amplify/src/types.rs b/sdk/amplify/src/types.rs index bdbef60b31be..4d854933fd7a 100644 --- a/sdk/amplify/src/types.rs +++ b/sdk/amplify/src/types.rs @@ -25,6 +25,10 @@ pub use crate::types::_stage::Stage; pub use crate::types::_app::App; +pub use crate::types::_waf_configuration::WafConfiguration; + +pub use crate::types::_waf_status::WafStatus; + pub use crate::types::_cache_config::CacheConfig; pub use crate::types::_cache_config_type::CacheConfigType; @@ -109,6 +113,10 @@ mod _sub_domain_setting; mod _update_status; +mod _waf_configuration; + +mod _waf_status; + mod _webhook; /// Builders diff --git a/sdk/amplify/src/types/_app.rs b/sdk/amplify/src/types/_app.rs index c527334977f7..57625e92c8d1 100644 --- a/sdk/amplify/src/types/_app.rs +++ b/sdk/amplify/src/types/_app.rs @@ -19,9 +19,9 @@ pub struct App { ///

The platform for the Amplify app. For a static app, set the platform type to WEB. For a dynamic server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC.

///

If you are deploying an SSG only app with Next.js 14 or later, you must use the platform type WEB_COMPUTE.

pub platform: crate::types::Platform, - ///

Creates a date and time for the Amplify app.

+ ///

A timestamp of when Amplify created the application.

pub create_time: ::aws_smithy_types::DateTime, - ///

Updates the date and time for the Amplify app.

+ ///

A timestamp of when Amplify updated the application.

pub update_time: ::aws_smithy_types::DateTime, ///

The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) of the Amplify app.

pub iam_service_role_arn: ::std::option::Option<::std::string::String>, @@ -59,6 +59,10 @@ pub struct App { pub repository_clone_method: ::std::option::Option, ///

The cache configuration for the Amplify app. If you don't specify the cache configuration type, Amplify uses the default AMPLIFY_MANAGED setting.

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

A timestamp of when Amplify created the webhook in your Git repository.

+ pub webhook_create_time: ::std::option::Option<::aws_smithy_types::DateTime>, + ///

Describes the Firewall configuration for the Amplify app. Firewall support enables you to protect your hosted applications with a direct integration with WAF.

+ pub waf_configuration: ::std::option::Option, } impl App { ///

The unique ID of the Amplify app.

@@ -95,11 +99,11 @@ impl App { pub fn platform(&self) -> &crate::types::Platform { &self.platform } - ///

Creates a date and time for the Amplify app.

+ ///

A timestamp of when Amplify created the application.

pub fn create_time(&self) -> &::aws_smithy_types::DateTime { &self.create_time } - ///

Updates the date and time for the Amplify app.

+ ///

A timestamp of when Amplify updated the application.

pub fn update_time(&self) -> &::aws_smithy_types::DateTime { &self.update_time } @@ -176,6 +180,14 @@ impl App { pub fn cache_config(&self) -> ::std::option::Option<&crate::types::CacheConfig> { self.cache_config.as_ref() } + ///

A timestamp of when Amplify created the webhook in your Git repository.

+ pub fn webhook_create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> { + self.webhook_create_time.as_ref() + } + ///

Describes the Firewall configuration for the Amplify app. Firewall support enables you to protect your hosted applications with a direct integration with WAF.

+ pub fn waf_configuration(&self) -> ::std::option::Option<&crate::types::WafConfiguration> { + self.waf_configuration.as_ref() + } } impl ::std::fmt::Debug for App { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { @@ -205,6 +217,8 @@ impl ::std::fmt::Debug for App { formatter.field("auto_branch_creation_config", &self.auto_branch_creation_config); formatter.field("repository_clone_method", &self.repository_clone_method); formatter.field("cache_config", &self.cache_config); + formatter.field("webhook_create_time", &self.webhook_create_time); + formatter.field("waf_configuration", &self.waf_configuration); formatter.finish() } } @@ -244,6 +258,8 @@ pub struct AppBuilder { pub(crate) auto_branch_creation_config: ::std::option::Option, pub(crate) repository_clone_method: ::std::option::Option, pub(crate) cache_config: ::std::option::Option, + pub(crate) webhook_create_time: ::std::option::Option<::aws_smithy_types::DateTime>, + pub(crate) waf_configuration: ::std::option::Option, } impl AppBuilder { ///

The unique ID of the Amplify app.

@@ -359,33 +375,33 @@ impl AppBuilder { pub fn get_platform(&self) -> &::std::option::Option { &self.platform } - ///

Creates a date and time for the Amplify app.

+ ///

A timestamp of when Amplify created the application.

/// This field is required. pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.create_time = ::std::option::Option::Some(input); self } - ///

Creates a date and time for the Amplify app.

+ ///

A timestamp of when Amplify created the application.

pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.create_time = input; self } - ///

Creates a date and time for the Amplify app.

+ ///

A timestamp of when Amplify created the application.

pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.create_time } - ///

Updates the date and time for the Amplify app.

+ ///

A timestamp of when Amplify updated the application.

/// This field is required. pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.update_time = ::std::option::Option::Some(input); self } - ///

Updates the date and time for the Amplify app.

+ ///

A timestamp of when Amplify updated the application.

pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.update_time = input; self } - ///

Updates the date and time for the Amplify app.

+ ///

A timestamp of when Amplify updated the application.

pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.update_time } @@ -653,6 +669,34 @@ impl AppBuilder { pub fn get_cache_config(&self) -> &::std::option::Option { &self.cache_config } + ///

A timestamp of when Amplify created the webhook in your Git repository.

+ pub fn webhook_create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self { + self.webhook_create_time = ::std::option::Option::Some(input); + self + } + ///

A timestamp of when Amplify created the webhook in your Git repository.

+ pub fn set_webhook_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { + self.webhook_create_time = input; + self + } + ///

A timestamp of when Amplify created the webhook in your Git repository.

+ pub fn get_webhook_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { + &self.webhook_create_time + } + ///

Describes the Firewall configuration for the Amplify app. Firewall support enables you to protect your hosted applications with a direct integration with WAF.

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

Describes the Firewall configuration for the Amplify app. Firewall support enables you to protect your hosted applications with a direct integration with WAF.

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

Describes the Firewall configuration for the Amplify app. Firewall support enables you to protect your hosted applications with a direct integration with WAF.

+ pub fn get_waf_configuration(&self) -> &::std::option::Option { + &self.waf_configuration + } /// Consumes the builder and constructs a [`App`](crate::types::App). /// This method will fail if any of the following fields are not set: /// - [`app_id`](crate::types::builders::AppBuilder::app_id) @@ -751,6 +795,8 @@ impl AppBuilder { auto_branch_creation_config: self.auto_branch_creation_config, repository_clone_method: self.repository_clone_method, cache_config: self.cache_config, + webhook_create_time: self.webhook_create_time, + waf_configuration: self.waf_configuration, }) } } @@ -782,6 +828,8 @@ impl ::std::fmt::Debug for AppBuilder { formatter.field("auto_branch_creation_config", &self.auto_branch_creation_config); formatter.field("repository_clone_method", &self.repository_clone_method); formatter.field("cache_config", &self.cache_config); + formatter.field("webhook_create_time", &self.webhook_create_time); + formatter.field("waf_configuration", &self.waf_configuration); formatter.finish() } } diff --git a/sdk/amplify/src/types/_branch.rs b/sdk/amplify/src/types/_branch.rs index aaf4ffeef38f..e77c51d1d6c6 100644 --- a/sdk/amplify/src/types/_branch.rs +++ b/sdk/amplify/src/types/_branch.rs @@ -18,9 +18,9 @@ pub struct Branch { pub display_name: ::std::string::String, ///

Enables notifications for a branch that is part of an Amplify app.

pub enable_notification: bool, - ///

The creation date and time for a branch that is part of an Amplify app.

+ ///

A timestamp of when Amplify created the branch.

pub create_time: ::aws_smithy_types::DateTime, - ///

The last updated date and time for a branch that is part of an Amplify app.

+ ///

A timestamp for the last updated time for a branch.

pub update_time: ::aws_smithy_types::DateTime, ///

The environment variables specific to a branch of an Amplify app.

pub environment_variables: ::std::collections::HashMap<::std::string::String, ::std::string::String>, @@ -97,11 +97,11 @@ impl Branch { pub fn enable_notification(&self) -> bool { self.enable_notification } - ///

The creation date and time for a branch that is part of an Amplify app.

+ ///

A timestamp of when Amplify created the branch.

pub fn create_time(&self) -> &::aws_smithy_types::DateTime { &self.create_time } - ///

The last updated date and time for a branch that is part of an Amplify app.

+ ///

A timestamp for the last updated time for a branch.

pub fn update_time(&self) -> &::aws_smithy_types::DateTime { &self.update_time } @@ -377,33 +377,33 @@ impl BranchBuilder { pub fn get_enable_notification(&self) -> &::std::option::Option { &self.enable_notification } - ///

The creation date and time for a branch that is part of an Amplify app.

+ ///

A timestamp of when Amplify created the branch.

/// This field is required. pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.create_time = ::std::option::Option::Some(input); self } - ///

The creation date and time for a branch that is part of an Amplify app.

+ ///

A timestamp of when Amplify created the branch.

pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.create_time = input; self } - ///

The creation date and time for a branch that is part of an Amplify app.

+ ///

A timestamp of when Amplify created the branch.

pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.create_time } - ///

The last updated date and time for a branch that is part of an Amplify app.

+ ///

A timestamp for the last updated time for a branch.

/// This field is required. pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.update_time = ::std::option::Option::Some(input); self } - ///

The last updated date and time for a branch that is part of an Amplify app.

+ ///

A timestamp for the last updated time for a branch.

pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.update_time = input; self } - ///

The last updated date and time for a branch that is part of an Amplify app.

+ ///

A timestamp for the last updated time for a branch.

pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.update_time } diff --git a/sdk/amplify/src/types/_job_status.rs b/sdk/amplify/src/types/_job_status.rs index 5fa1fdc90805..88af60b27aa2 100644 --- a/sdk/amplify/src/types/_job_status.rs +++ b/sdk/amplify/src/types/_job_status.rs @@ -14,6 +14,7 @@ /// match jobstatus { /// JobStatus::Cancelled => { /* ... */ }, /// JobStatus::Cancelling => { /* ... */ }, +/// JobStatus::Created => { /* ... */ }, /// JobStatus::Failed => { /* ... */ }, /// JobStatus::Pending => { /* ... */ }, /// JobStatus::Provisioning => { /* ... */ }, @@ -52,6 +53,8 @@ pub enum JobStatus { #[allow(missing_docs)] // documentation missing in model Cancelling, #[allow(missing_docs)] // documentation missing in model + Created, + #[allow(missing_docs)] // documentation missing in model Failed, #[allow(missing_docs)] // documentation missing in model Pending, @@ -70,6 +73,7 @@ impl ::std::convert::From<&str> for JobStatus { match s { "CANCELLED" => JobStatus::Cancelled, "CANCELLING" => JobStatus::Cancelling, + "CREATED" => JobStatus::Created, "FAILED" => JobStatus::Failed, "PENDING" => JobStatus::Pending, "PROVISIONING" => JobStatus::Provisioning, @@ -92,6 +96,7 @@ impl JobStatus { match self { JobStatus::Cancelled => "CANCELLED", JobStatus::Cancelling => "CANCELLING", + JobStatus::Created => "CREATED", JobStatus::Failed => "FAILED", JobStatus::Pending => "PENDING", JobStatus::Provisioning => "PROVISIONING", @@ -102,7 +107,16 @@ impl JobStatus { } /// Returns all the `&str` representations of the enum members. pub const fn values() -> &'static [&'static str] { - &["CANCELLED", "CANCELLING", "FAILED", "PENDING", "PROVISIONING", "RUNNING", "SUCCEED"] + &[ + "CANCELLED", + "CANCELLING", + "CREATED", + "FAILED", + "PENDING", + "PROVISIONING", + "RUNNING", + "SUCCEED", + ] } } impl ::std::convert::AsRef for JobStatus { @@ -127,6 +141,7 @@ impl ::std::fmt::Display for JobStatus { match self { JobStatus::Cancelled => write!(f, "CANCELLED"), JobStatus::Cancelling => write!(f, "CANCELLING"), + JobStatus::Created => write!(f, "CREATED"), JobStatus::Failed => write!(f, "FAILED"), JobStatus::Pending => write!(f, "PENDING"), JobStatus::Provisioning => write!(f, "PROVISIONING"), diff --git a/sdk/amplify/src/types/_waf_configuration.rs b/sdk/amplify/src/types/_waf_configuration.rs new file mode 100644 index 000000000000..295f45111152 --- /dev/null +++ b/sdk/amplify/src/types/_waf_configuration.rs @@ -0,0 +1,94 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

Describes the Firewall configuration for a hosted Amplify application. Firewall support enables you to protect your web applications with a direct integration with WAF. For more information about using WAF protections for an Amplify application, see Firewall support for hosted sites in the Amplify User Guide.

+#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct WafConfiguration { + ///

The Amazon Resource Name (ARN) for the web ACL associated with an Amplify app.

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

The status of the process to associate or disassociate a web ACL to an Amplify app.

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

The reason for the current status of the Firewall configuration.

+ pub status_reason: ::std::option::Option<::std::string::String>, +} +impl WafConfiguration { + ///

The Amazon Resource Name (ARN) for the web ACL associated with an Amplify app.

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

The status of the process to associate or disassociate a web ACL to an Amplify app.

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

The reason for the current status of the Firewall configuration.

+ pub fn status_reason(&self) -> ::std::option::Option<&str> { + self.status_reason.as_deref() + } +} +impl WafConfiguration { + /// Creates a new builder-style object to manufacture [`WafConfiguration`](crate::types::WafConfiguration). + pub fn builder() -> crate::types::builders::WafConfigurationBuilder { + crate::types::builders::WafConfigurationBuilder::default() + } +} + +/// A builder for [`WafConfiguration`](crate::types::WafConfiguration). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct WafConfigurationBuilder { + pub(crate) web_acl_arn: ::std::option::Option<::std::string::String>, + pub(crate) waf_status: ::std::option::Option, + pub(crate) status_reason: ::std::option::Option<::std::string::String>, +} +impl WafConfigurationBuilder { + ///

The Amazon Resource Name (ARN) for the web ACL associated with an Amplify app.

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

The Amazon Resource Name (ARN) for the web ACL associated with an Amplify app.

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

The Amazon Resource Name (ARN) for the web ACL associated with an Amplify app.

+ pub fn get_web_acl_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.web_acl_arn + } + ///

The status of the process to associate or disassociate a web ACL to an Amplify app.

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

The status of the process to associate or disassociate a web ACL to an Amplify app.

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

The status of the process to associate or disassociate a web ACL to an Amplify app.

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

The reason for the current status of the Firewall configuration.

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

The reason for the current status of the Firewall configuration.

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

The reason for the current status of the Firewall configuration.

+ pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> { + &self.status_reason + } + /// Consumes the builder and constructs a [`WafConfiguration`](crate::types::WafConfiguration). + pub fn build(self) -> crate::types::WafConfiguration { + crate::types::WafConfiguration { + web_acl_arn: self.web_acl_arn, + waf_status: self.waf_status, + status_reason: self.status_reason, + } + } +} diff --git a/sdk/amplify/src/types/_waf_status.rs b/sdk/amplify/src/types/_waf_status.rs new file mode 100644 index 000000000000..da620ddb279b --- /dev/null +++ b/sdk/amplify/src/types/_waf_status.rs @@ -0,0 +1,132 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `WafStatus`, 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 wafstatus = unimplemented!(); +/// match wafstatus { +/// WafStatus::Associating => { /* ... */ }, +/// WafStatus::AssociationFailed => { /* ... */ }, +/// WafStatus::AssociationSuccess => { /* ... */ }, +/// WafStatus::Disassociating => { /* ... */ }, +/// WafStatus::DisassociationFailed => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `wafstatus` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `WafStatus::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `WafStatus::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 `WafStatus::NewFeature` is defined. +/// Specifically, when `wafstatus` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `WafStatus::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 WafStatus { + #[allow(missing_docs)] // documentation missing in model + Associating, + #[allow(missing_docs)] // documentation missing in model + AssociationFailed, + #[allow(missing_docs)] // documentation missing in model + AssociationSuccess, + #[allow(missing_docs)] // documentation missing in model + Disassociating, + #[allow(missing_docs)] // documentation missing in model + DisassociationFailed, + /// `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 WafStatus { + fn from(s: &str) -> Self { + match s { + "ASSOCIATING" => WafStatus::Associating, + "ASSOCIATION_FAILED" => WafStatus::AssociationFailed, + "ASSOCIATION_SUCCESS" => WafStatus::AssociationSuccess, + "DISASSOCIATING" => WafStatus::Disassociating, + "DISASSOCIATION_FAILED" => WafStatus::DisassociationFailed, + other => WafStatus::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for WafStatus { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(WafStatus::from(s)) + } +} +impl WafStatus { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + WafStatus::Associating => "ASSOCIATING", + WafStatus::AssociationFailed => "ASSOCIATION_FAILED", + WafStatus::AssociationSuccess => "ASSOCIATION_SUCCESS", + WafStatus::Disassociating => "DISASSOCIATING", + WafStatus::DisassociationFailed => "DISASSOCIATION_FAILED", + WafStatus::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &[ + "ASSOCIATING", + "ASSOCIATION_FAILED", + "ASSOCIATION_SUCCESS", + "DISASSOCIATING", + "DISASSOCIATION_FAILED", + ] + } +} +impl ::std::convert::AsRef for WafStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl WafStatus { + /// 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 WafStatus { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + WafStatus::Associating => write!(f, "ASSOCIATING"), + WafStatus::AssociationFailed => write!(f, "ASSOCIATION_FAILED"), + WafStatus::AssociationSuccess => write!(f, "ASSOCIATION_SUCCESS"), + WafStatus::Disassociating => write!(f, "DISASSOCIATING"), + WafStatus::DisassociationFailed => write!(f, "DISASSOCIATION_FAILED"), + WafStatus::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/amplify/src/types/_webhook.rs b/sdk/amplify/src/types/_webhook.rs index 46a21ee8f153..8ebee83c5a5b 100644 --- a/sdk/amplify/src/types/_webhook.rs +++ b/sdk/amplify/src/types/_webhook.rs @@ -14,9 +14,9 @@ pub struct Webhook { pub branch_name: ::std::string::String, ///

The description for a webhook.

pub description: ::std::string::String, - ///

The create date and time for a webhook.

+ ///

A timestamp of when Amplify created the webhook in your Git repository.

pub create_time: ::aws_smithy_types::DateTime, - ///

Updates the date and time for a webhook.

+ ///

A timestamp of when Amplify updated the webhook in your Git repository.

pub update_time: ::aws_smithy_types::DateTime, } impl Webhook { @@ -45,11 +45,11 @@ impl Webhook { use std::ops::Deref; self.description.deref() } - ///

The create date and time for a webhook.

+ ///

A timestamp of when Amplify created the webhook in your Git repository.

pub fn create_time(&self) -> &::aws_smithy_types::DateTime { &self.create_time } - ///

Updates the date and time for a webhook.

+ ///

A timestamp of when Amplify updated the webhook in your Git repository.

pub fn update_time(&self) -> &::aws_smithy_types::DateTime { &self.update_time } @@ -149,33 +149,33 @@ impl WebhookBuilder { pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { &self.description } - ///

The create date and time for a webhook.

+ ///

A timestamp of when Amplify created the webhook in your Git repository.

/// This field is required. pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.create_time = ::std::option::Option::Some(input); self } - ///

The create date and time for a webhook.

+ ///

A timestamp of when Amplify created the webhook in your Git repository.

pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.create_time = input; self } - ///

The create date and time for a webhook.

+ ///

A timestamp of when Amplify created the webhook in your Git repository.

pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.create_time } - ///

Updates the date and time for a webhook.

+ ///

A timestamp of when Amplify updated the webhook in your Git repository.

/// This field is required. pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.update_time = ::std::option::Option::Some(input); self } - ///

Updates the date and time for a webhook.

+ ///

A timestamp of when Amplify updated the webhook in your Git repository.

pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.update_time = input; self } - ///

Updates the date and time for a webhook.

+ ///

A timestamp of when Amplify updated the webhook in your Git repository.

pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.update_time } diff --git a/sdk/amplify/src/types/builders.rs b/sdk/amplify/src/types/builders.rs index 0c7947e2ee8e..9b6295bb3ec0 100644 --- a/sdk/amplify/src/types/builders.rs +++ b/sdk/amplify/src/types/builders.rs @@ -17,6 +17,8 @@ pub use crate::types::_backend::BackendBuilder; pub use crate::types::_app::AppBuilder; +pub use crate::types::_waf_configuration::WafConfigurationBuilder; + pub use crate::types::_cache_config::CacheConfigBuilder; pub use crate::types::_auto_branch_creation_config::AutoBranchCreationConfigBuilder; diff --git a/sdk/budgets/Cargo.toml b/sdk/budgets/Cargo.toml index d30066ccd7fb..3383531ef8c4 100644 --- a/sdk/budgets/Cargo.toml +++ b/sdk/budgets/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-budgets" -version = "1.52.0" +version = "1.53.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for AWS Budgets" edition = "2021" diff --git a/sdk/budgets/README.md b/sdk/budgets/README.md index 2fc10c306102..8e390b2b6b61 100644 --- a/sdk/budgets/README.md +++ b/sdk/budgets/README.md @@ -33,7 +33,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-budgets = "1.52.0" +aws-sdk-budgets = "1.53.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/budgets/src/config/endpoint.rs b/sdk/budgets/src/config/endpoint.rs index 31ffb4982481..26d6c975c5ba 100644 --- a/sdk/budgets/src/config/endpoint.rs +++ b/sdk/budgets/src/config/endpoint.rs @@ -326,9 +326,39 @@ mod test { ); } - /// For region us-iso-east-1 with FIPS enabled and DualStack enabled + /// For region aws-iso-global with FIPS disabled and DualStack disabled #[test] fn test_15() { + let params = crate::config::endpoint::Params::builder() + .region("aws-iso-global".to_string()) + .use_fips(false) + .use_dual_stack(false) + .build() + .expect("invalid params"); + let resolver = crate::config::endpoint::DefaultResolver::new(); + let endpoint = resolver.resolve_endpoint(¶ms); + let endpoint = endpoint.expect("Expected valid endpoint: https://budgets.c2s.ic.gov"); + assert_eq!( + endpoint, + ::aws_smithy_types::endpoint::Endpoint::builder() + .url("https://budgets.c2s.ic.gov") + .property( + "authSchemes", + vec![::aws_smithy_types::Document::from({ + let mut out = ::std::collections::HashMap::::new(); + out.insert("name".to_string(), "sigv4".to_string().into()); + out.insert("signingName".to_string(), "budgets".to_string().into()); + out.insert("signingRegion".to_string(), "us-iso-east-1".to_string().into()); + out + })] + ) + .build() + ); + } + + /// For region us-iso-east-1 with FIPS enabled and DualStack enabled + #[test] + fn test_16() { let params = crate::config::endpoint::Params::builder() .region("us-iso-east-1".to_string()) .use_fips(true) @@ -346,7 +376,7 @@ mod test { /// For region us-iso-east-1 with FIPS enabled and DualStack disabled #[test] - fn test_16() { + fn test_17() { let params = crate::config::endpoint::Params::builder() .region("us-iso-east-1".to_string()) .use_fips(true) @@ -366,7 +396,7 @@ mod test { /// For region us-iso-east-1 with FIPS disabled and DualStack enabled #[test] - fn test_17() { + fn test_18() { let params = crate::config::endpoint::Params::builder() .region("us-iso-east-1".to_string()) .use_fips(false) @@ -381,7 +411,7 @@ mod test { /// For region us-iso-east-1 with FIPS disabled and DualStack disabled #[test] - fn test_18() { + fn test_19() { let params = crate::config::endpoint::Params::builder() .region("us-iso-east-1".to_string()) .use_fips(false) @@ -390,18 +420,58 @@ mod test { .expect("invalid params"); let resolver = crate::config::endpoint::DefaultResolver::new(); let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://budgets.us-iso-east-1.c2s.ic.gov"); + let endpoint = endpoint.expect("Expected valid endpoint: https://budgets.c2s.ic.gov"); + assert_eq!( + endpoint, + ::aws_smithy_types::endpoint::Endpoint::builder() + .url("https://budgets.c2s.ic.gov") + .property( + "authSchemes", + vec![::aws_smithy_types::Document::from({ + let mut out = ::std::collections::HashMap::::new(); + out.insert("name".to_string(), "sigv4".to_string().into()); + out.insert("signingName".to_string(), "budgets".to_string().into()); + out.insert("signingRegion".to_string(), "us-iso-east-1".to_string().into()); + out + })] + ) + .build() + ); + } + + /// For region aws-iso-b-global with FIPS disabled and DualStack disabled + #[test] + fn test_20() { + let params = crate::config::endpoint::Params::builder() + .region("aws-iso-b-global".to_string()) + .use_fips(false) + .use_dual_stack(false) + .build() + .expect("invalid params"); + let resolver = crate::config::endpoint::DefaultResolver::new(); + let endpoint = resolver.resolve_endpoint(¶ms); + let endpoint = endpoint.expect("Expected valid endpoint: https://budgets.global.sc2s.sgov.gov"); assert_eq!( endpoint, ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://budgets.us-iso-east-1.c2s.ic.gov") + .url("https://budgets.global.sc2s.sgov.gov") + .property( + "authSchemes", + vec![::aws_smithy_types::Document::from({ + let mut out = ::std::collections::HashMap::::new(); + out.insert("name".to_string(), "sigv4".to_string().into()); + out.insert("signingName".to_string(), "budgets".to_string().into()); + out.insert("signingRegion".to_string(), "us-isob-east-1".to_string().into()); + out + })] + ) .build() ); } /// For region us-isob-east-1 with FIPS enabled and DualStack enabled #[test] - fn test_19() { + fn test_21() { let params = crate::config::endpoint::Params::builder() .region("us-isob-east-1".to_string()) .use_fips(true) @@ -419,7 +489,7 @@ mod test { /// For region us-isob-east-1 with FIPS enabled and DualStack disabled #[test] - fn test_20() { + fn test_22() { let params = crate::config::endpoint::Params::builder() .region("us-isob-east-1".to_string()) .use_fips(true) @@ -439,7 +509,7 @@ mod test { /// For region us-isob-east-1 with FIPS disabled and DualStack enabled #[test] - fn test_21() { + fn test_23() { let params = crate::config::endpoint::Params::builder() .region("us-isob-east-1".to_string()) .use_fips(false) @@ -454,7 +524,7 @@ mod test { /// For region us-isob-east-1 with FIPS disabled and DualStack disabled #[test] - fn test_22() { + fn test_24() { let params = crate::config::endpoint::Params::builder() .region("us-isob-east-1".to_string()) .use_fips(false) @@ -463,18 +533,28 @@ mod test { .expect("invalid params"); let resolver = crate::config::endpoint::DefaultResolver::new(); let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://budgets.us-isob-east-1.sc2s.sgov.gov"); + let endpoint = endpoint.expect("Expected valid endpoint: https://budgets.global.sc2s.sgov.gov"); assert_eq!( endpoint, ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://budgets.us-isob-east-1.sc2s.sgov.gov") + .url("https://budgets.global.sc2s.sgov.gov") + .property( + "authSchemes", + vec![::aws_smithy_types::Document::from({ + let mut out = ::std::collections::HashMap::::new(); + out.insert("name".to_string(), "sigv4".to_string().into()); + out.insert("signingName".to_string(), "budgets".to_string().into()); + out.insert("signingRegion".to_string(), "us-isob-east-1".to_string().into()); + out + })] + ) .build() ); } /// For region eu-isoe-west-1 with FIPS disabled and DualStack disabled #[test] - fn test_23() { + fn test_25() { let params = crate::config::endpoint::Params::builder() .region("eu-isoe-west-1".to_string()) .use_fips(false) @@ -504,7 +584,7 @@ mod test { /// For region us-isof-south-1 with FIPS disabled and DualStack disabled #[test] - fn test_24() { + fn test_26() { let params = crate::config::endpoint::Params::builder() .region("us-isof-south-1".to_string()) .use_fips(false) @@ -534,7 +614,7 @@ mod test { /// For custom endpoint with region set and fips disabled and dualstack disabled #[test] - fn test_25() { + fn test_27() { let params = crate::config::endpoint::Params::builder() .region("us-east-1".to_string()) .use_fips(false) @@ -553,7 +633,7 @@ mod test { /// For custom endpoint with region not set and fips disabled and dualstack disabled #[test] - fn test_26() { + fn test_28() { let params = crate::config::endpoint::Params::builder() .use_fips(false) .use_dual_stack(false) @@ -571,7 +651,7 @@ mod test { /// For custom endpoint with fips enabled and dualstack disabled #[test] - fn test_27() { + fn test_29() { let params = crate::config::endpoint::Params::builder() .region("us-east-1".to_string()) .use_fips(true) @@ -587,7 +667,7 @@ mod test { /// For custom endpoint with fips disabled and dualstack enabled #[test] - fn test_28() { + fn test_30() { let params = crate::config::endpoint::Params::builder() .region("us-east-1".to_string()) .use_fips(false) @@ -606,7 +686,7 @@ mod test { /// Missing region #[test] - fn test_29() { + fn test_31() { let params = crate::config::endpoint::Params::builder().build().expect("invalid params"); let resolver = crate::config::endpoint::DefaultResolver::new(); let endpoint = resolver.resolve_endpoint(¶ms); diff --git a/sdk/budgets/src/config/endpoint/internals.rs b/sdk/budgets/src/config/endpoint/internals.rs index fbcf767d35cf..c756731e11ef 100644 --- a/sdk/budgets/src/config/endpoint/internals.rs +++ b/sdk/budgets/src/config/endpoint/internals.rs @@ -75,6 +75,44 @@ pub(super) fn resolve_endpoint( } } } + if (partition_result.name()) == ("aws-iso") { + if (*use_fips) == (false) { + if (*use_dual_stack) == (false) { + return Ok(::aws_smithy_types::endpoint::Endpoint::builder() + .url("https://budgets.c2s.ic.gov".to_string()) + .property( + "authSchemes", + vec![::aws_smithy_types::Document::from({ + let mut out = ::std::collections::HashMap::::new(); + out.insert("name".to_string(), "sigv4".to_string().into()); + out.insert("signingName".to_string(), "budgets".to_string().into()); + out.insert("signingRegion".to_string(), "us-iso-east-1".to_string().into()); + out + })], + ) + .build()); + } + } + } + if (partition_result.name()) == ("aws-iso-b") { + if (*use_fips) == (false) { + if (*use_dual_stack) == (false) { + return Ok(::aws_smithy_types::endpoint::Endpoint::builder() + .url("https://budgets.global.sc2s.sgov.gov".to_string()) + .property( + "authSchemes", + vec![::aws_smithy_types::Document::from({ + let mut out = ::std::collections::HashMap::::new(); + out.insert("name".to_string(), "sigv4".to_string().into()); + out.insert("signingName".to_string(), "budgets".to_string().into()); + out.insert("signingRegion".to_string(), "us-isob-east-1".to_string().into()); + out + })], + ) + .build()); + } + } + } if (partition_result.name()) == ("aws-iso-e") { if (*use_fips) == (false) { if (*use_dual_stack) == (false) { diff --git a/sdk/budgets/src/lib.rs b/sdk/budgets/src/lib.rs index 3583b0f76dfe..29bcd57ef0a6 100644 --- a/sdk/budgets/src/lib.rs +++ b/sdk/budgets/src/lib.rs @@ -50,7 +50,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-budgets = "1.52.0" +//! aws-sdk-budgets = "1.53.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/connect/Cargo.toml b/sdk/connect/Cargo.toml index ae4031f5c1d7..5116e95535e1 100644 --- a/sdk/connect/Cargo.toml +++ b/sdk/connect/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-connect" -version = "1.81.0" +version = "1.82.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for Amazon Connect Service" edition = "2021" diff --git a/sdk/connect/README.md b/sdk/connect/README.md index be092790a79e..8d9ca538a1f5 100644 --- a/sdk/connect/README.md +++ b/sdk/connect/README.md @@ -23,7 +23,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-connect = "1.81.0" +aws-sdk-connect = "1.82.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/connect/src/client.rs b/sdk/connect/src/client.rs index 084698c8b7dd..1c13dabb2d43 100644 --- a/sdk/connect/src/client.rs +++ b/sdk/connect/src/client.rs @@ -657,6 +657,8 @@ mod update_instance_attribute; mod update_instance_storage_config; +mod update_participant_authentication; + mod update_participant_role_config; mod update_phone_number; diff --git a/sdk/connect/src/client/start_chat_contact.rs b/sdk/connect/src/client/start_chat_contact.rs index 2ee2ff0909d6..ca61ad8481a5 100644 --- a/sdk/connect/src/client/start_chat_contact.rs +++ b/sdk/connect/src/client/start_chat_contact.rs @@ -14,6 +14,7 @@ impl super::Client { /// - [`persistent_chat(PersistentChat)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::persistent_chat) / [`set_persistent_chat(Option)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_persistent_chat):
required: **false**

Enable persistent chats. For more information about enabling persistent chat, and for example use cases and how to configure for them, see Enable persistent chat.


/// - [`related_contact_id(impl Into)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::related_contact_id) / [`set_related_contact_id(Option)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_related_contact_id):
required: **false**

The unique identifier for an Amazon Connect contact. This identifier is related to the chat starting.

You cannot provide data for both RelatedContactId and PersistentChat.


/// - [`segment_attributes(impl Into, SegmentAttributeValue)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::segment_attributes) / [`set_segment_attributes(Option>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_segment_attributes):
required: **false**

A set of system defined key-value pairs stored on individual contact segments using an attribute map. The attributes are standard Amazon Connect attributes. They can be accessed in flows.

Attribute keys can include only alphanumeric, -, and _.

This field can be used to show channel subtype, such as connect:Guide.

The types application/vnd.amazonaws.connect.message.interactive and application/vnd.amazonaws.connect.message.interactive.response must be present in the SupportedMessagingContentTypes field of this API in order to set SegmentAttributes as { "connect:Subtype": {"valueString" : "connect:Guide" }}.


+ /// - [`customer_id(impl Into)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::customer_id) / [`set_customer_id(Option)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_customer_id):
required: **false**

The customer's identification number. For example, the CustomerId may be a customer number from your CRM.


/// - On success, responds with [`StartChatContactOutput`](crate::operation::start_chat_contact::StartChatContactOutput) with field(s): /// - [`contact_id(Option)`](crate::operation::start_chat_contact::StartChatContactOutput::contact_id):

The identifier of this contact within the Amazon Connect instance.

/// - [`participant_id(Option)`](crate::operation::start_chat_contact::StartChatContactOutput::participant_id):

The identifier for a chat participant. The participantId for a chat participant is the same throughout the chat lifecycle.

diff --git a/sdk/connect/src/client/update_participant_authentication.rs b/sdk/connect/src/client/update_participant_authentication.rs new file mode 100644 index 000000000000..c334939f39f3 --- /dev/null +++ b/sdk/connect/src/client/update_participant_authentication.rs @@ -0,0 +1,18 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`UpdateParticipantAuthentication`](crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`state(impl Into)`](crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationFluentBuilder::state) / [`set_state(Option)`](crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationFluentBuilder::set_state):
required: **true**

The state query parameter that was provided by Cognito in the redirectUri. This will also match the state parameter provided in the AuthenticationUrl from the GetAuthenticationUrl response.


+ /// - [`instance_id(impl Into)`](crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationFluentBuilder::instance_id) / [`set_instance_id(Option)`](crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationFluentBuilder::set_instance_id):
required: **true**

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.


+ /// - [`code(impl Into)`](crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationFluentBuilder::code) / [`set_code(Option)`](crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationFluentBuilder::set_code):
required: **false**

The code query parameter provided by Cognito in the redirectUri.


+ /// - [`error(impl Into)`](crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationFluentBuilder::error) / [`set_error(Option)`](crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationFluentBuilder::set_error):
required: **false**

The error query parameter provided by Cognito in the redirectUri.


+ /// - [`error_description(impl Into)`](crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationFluentBuilder::error_description) / [`set_error_description(Option)`](crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationFluentBuilder::set_error_description):
required: **false**

The error_description parameter provided by Cognito in the redirectUri.


+ /// - On success, responds with [`UpdateParticipantAuthenticationOutput`](crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput) + /// - On failure, responds with [`SdkError`](crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError) + pub fn update_participant_authentication( + &self, + ) -> crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationFluentBuilder { + crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/connect/src/error_meta.rs b/sdk/connect/src/error_meta.rs index 4e6df29d7560..0793568a85aa 100644 --- a/sdk/connect/src/error_meta.rs +++ b/sdk/connect/src/error_meta.rs @@ -9014,6 +9014,56 @@ impl From + From< + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError, + R, + >, + > for Error +where + R: Send + Sync + std::fmt::Debug + 'static, +{ + fn from( + err: ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError, + R, + >, + ) -> 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::update_participant_authentication::UpdateParticipantAuthenticationError) -> Self { + match err { + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::AccessDeniedException(inner) => { + Error::AccessDeniedException(inner) + } + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::ConflictException(inner) => { + Error::ConflictException(inner) + } + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::InternalServiceException(inner) => { + Error::InternalServiceException(inner) + } + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::InvalidParameterException(inner) => { + Error::InvalidParameterException(inner) + } + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::InvalidRequestException(inner) => { + Error::InvalidRequestException(inner) + } + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::ThrottlingException(inner) => { + Error::ThrottlingException(inner) + } + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::Unhandled(inner) => Error::Unhandled(inner), + } + } +} impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error diff --git a/sdk/connect/src/lib.rs b/sdk/connect/src/lib.rs index d7d2d62afab8..298e3fe8a02a 100644 --- a/sdk/connect/src/lib.rs +++ b/sdk/connect/src/lib.rs @@ -40,7 +40,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-connect = "1.81.0" +//! aws-sdk-connect = "1.82.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/connect/src/operation.rs b/sdk/connect/src/operation.rs index f2ee1ea52092..6e4b098d67e8 100644 --- a/sdk/connect/src/operation.rs +++ b/sdk/connect/src/operation.rs @@ -742,6 +742,9 @@ pub mod update_instance_attribute; /// Types for the `UpdateInstanceStorageConfig` operation. pub mod update_instance_storage_config; +/// Types for the `UpdateParticipantAuthentication` operation. +pub mod update_participant_authentication; + /// Types for the `UpdateParticipantRoleConfig` operation. pub mod update_participant_role_config; diff --git a/sdk/connect/src/operation/create_push_notification_registration/builders.rs b/sdk/connect/src/operation/create_push_notification_registration/builders.rs index 04319a6ec239..734b421ef838 100644 --- a/sdk/connect/src/operation/create_push_notification_registration/builders.rs +++ b/sdk/connect/src/operation/create_push_notification_registration/builders.rs @@ -22,7 +22,7 @@ impl crate::operation::create_push_notification_registration::builders::CreatePu } /// Fluent builder constructing a request to `CreatePushNotificationRegistration`. /// -///

Creates registration for a device token and a chat contact to receive real-time push notifications. For more information about push notifications, see Set up push notifications in Amazon Connect for mobile chat in the Amazon Connect Administrator Guide.

+///

Creates registration for a device token and a chat contact to receive real-time push notifications. For more information about push notifications, see Set up push notifications in Amazon Connect for mobile chat in the Amazon Connect Administrator Guide.

#[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct CreatePushNotificationRegistrationFluentBuilder { handle: ::std::sync::Arc, diff --git a/sdk/connect/src/operation/list_bots/builders.rs b/sdk/connect/src/operation/list_bots/builders.rs index cebd87b80ea3..2b15e2ec850d 100644 --- a/sdk/connect/src/operation/list_bots/builders.rs +++ b/sdk/connect/src/operation/list_bots/builders.rs @@ -23,7 +23,7 @@ impl crate::operation::list_bots::builders::ListBotsInputBuilder { /// Fluent builder constructing a request to `ListBots`. /// ///

This API is in preview release for Amazon Connect and is subject to change.

-///

For the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently associated with the instance. Use this API to returns both Amazon Lex V1 and V2 bots.

+///

For the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently associated with the instance. Use this API to return both Amazon Lex V1 and V2 bots.

#[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct ListBotsFluentBuilder { handle: ::std::sync::Arc, diff --git a/sdk/connect/src/operation/start_chat_contact/_start_chat_contact_input.rs b/sdk/connect/src/operation/start_chat_contact/_start_chat_contact_input.rs index da340df87bc8..c94979d9da5f 100644 --- a/sdk/connect/src/operation/start_chat_contact/_start_chat_contact_input.rs +++ b/sdk/connect/src/operation/start_chat_contact/_start_chat_contact_input.rs @@ -1,7 +1,7 @@ // 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)] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq)] pub struct StartChatContactInput { ///

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

pub instance_id: ::std::option::Option<::std::string::String>, @@ -36,6 +36,8 @@ pub struct StartChatContactInput { ///

The types application/vnd.amazonaws.connect.message.interactive and application/vnd.amazonaws.connect.message.interactive.response must be present in the SupportedMessagingContentTypes field of this API in order to set SegmentAttributes as { "connect:Subtype": {"valueString" : "connect:Guide" }}.

/// pub segment_attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>>, + ///

The customer's identification number. For example, the CustomerId may be a customer number from your CRM.

+ pub customer_id: ::std::option::Option<::std::string::String>, } impl StartChatContactInput { ///

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

@@ -97,6 +99,28 @@ impl StartChatContactInput { ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>> { self.segment_attributes.as_ref() } + ///

The customer's identification number. For example, the CustomerId may be a customer number from your CRM.

+ pub fn customer_id(&self) -> ::std::option::Option<&str> { + self.customer_id.as_deref() + } +} +impl ::std::fmt::Debug for StartChatContactInput { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("StartChatContactInput"); + formatter.field("instance_id", &self.instance_id); + formatter.field("contact_flow_id", &self.contact_flow_id); + formatter.field("attributes", &self.attributes); + formatter.field("participant_details", &self.participant_details); + formatter.field("initial_message", &self.initial_message); + formatter.field("client_token", &self.client_token); + formatter.field("chat_duration_in_minutes", &self.chat_duration_in_minutes); + formatter.field("supported_messaging_content_types", &self.supported_messaging_content_types); + formatter.field("persistent_chat", &self.persistent_chat); + formatter.field("related_contact_id", &self.related_contact_id); + formatter.field("segment_attributes", &self.segment_attributes); + formatter.field("customer_id", &"*** Sensitive Data Redacted ***"); + formatter.finish() + } } impl StartChatContactInput { /// Creates a new builder-style object to manufacture [`StartChatContactInput`](crate::operation::start_chat_contact::StartChatContactInput). @@ -106,7 +130,7 @@ impl StartChatContactInput { } /// A builder for [`StartChatContactInput`](crate::operation::start_chat_contact::StartChatContactInput). -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)] #[non_exhaustive] pub struct StartChatContactInputBuilder { pub(crate) instance_id: ::std::option::Option<::std::string::String>, @@ -120,6 +144,7 @@ pub struct StartChatContactInputBuilder { pub(crate) persistent_chat: ::std::option::Option, pub(crate) related_contact_id: ::std::option::Option<::std::string::String>, pub(crate) segment_attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>>, + pub(crate) customer_id: ::std::option::Option<::std::string::String>, } impl StartChatContactInputBuilder { ///

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

@@ -335,6 +360,20 @@ impl StartChatContactInputBuilder { ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>> { &self.segment_attributes } + ///

The customer's identification number. For example, the CustomerId may be a customer number from your CRM.

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

The customer's identification number. For example, the CustomerId may be a customer number from your CRM.

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

The customer's identification number. For example, the CustomerId may be a customer number from your CRM.

+ pub fn get_customer_id(&self) -> &::std::option::Option<::std::string::String> { + &self.customer_id + } /// Consumes the builder and constructs a [`StartChatContactInput`](crate::operation::start_chat_contact::StartChatContactInput). pub fn build( self, @@ -351,6 +390,25 @@ impl StartChatContactInputBuilder { persistent_chat: self.persistent_chat, related_contact_id: self.related_contact_id, segment_attributes: self.segment_attributes, + customer_id: self.customer_id, }) } } +impl ::std::fmt::Debug for StartChatContactInputBuilder { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("StartChatContactInputBuilder"); + formatter.field("instance_id", &self.instance_id); + formatter.field("contact_flow_id", &self.contact_flow_id); + formatter.field("attributes", &self.attributes); + formatter.field("participant_details", &self.participant_details); + formatter.field("initial_message", &self.initial_message); + formatter.field("client_token", &self.client_token); + formatter.field("chat_duration_in_minutes", &self.chat_duration_in_minutes); + formatter.field("supported_messaging_content_types", &self.supported_messaging_content_types); + formatter.field("persistent_chat", &self.persistent_chat); + formatter.field("related_contact_id", &self.related_contact_id); + formatter.field("segment_attributes", &self.segment_attributes); + formatter.field("customer_id", &"*** Sensitive Data Redacted ***"); + formatter.finish() + } +} diff --git a/sdk/connect/src/operation/start_chat_contact/builders.rs b/sdk/connect/src/operation/start_chat_contact/builders.rs index af15048b6612..1985e5f15221 100644 --- a/sdk/connect/src/operation/start_chat_contact/builders.rs +++ b/sdk/connect/src/operation/start_chat_contact/builders.rs @@ -331,4 +331,18 @@ impl StartChatContactFluentBuilder { ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>> { self.inner.get_segment_attributes() } + ///

The customer's identification number. For example, the CustomerId may be a customer number from your CRM.

+ pub fn customer_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.customer_id(input.into()); + self + } + ///

The customer's identification number. For example, the CustomerId may be a customer number from your CRM.

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

The customer's identification number. For example, the CustomerId may be a customer number from your CRM.

+ pub fn get_customer_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_customer_id() + } } diff --git a/sdk/connect/src/operation/update_participant_authentication.rs b/sdk/connect/src/operation/update_participant_authentication.rs new file mode 100644 index 000000000000..c598d17a0309 --- /dev/null +++ b/sdk/connect/src/operation/update_participant_authentication.rs @@ -0,0 +1,412 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `UpdateParticipantAuthentication`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateParticipantAuthentication; +impl UpdateParticipantAuthentication { + /// Creates a new `UpdateParticipantAuthentication` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::update_participant_authentication::UpdateParticipantAuthenticationInput, + ) -> ::std::result::Result< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError, + ::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::update_participant_authentication::UpdateParticipantAuthenticationInput, + 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( + "connect", + "UpdateParticipantAuthentication", + 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 UpdateParticipantAuthentication { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateParticipantAuthentication"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + UpdateParticipantAuthenticationRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + UpdateParticipantAuthenticationResponseDeserializer, + )); + + 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( + "UpdateParticipantAuthentication", + "connect", + )); + 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("UpdateParticipantAuthentication") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(UpdateParticipantAuthenticationEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct UpdateParticipantAuthenticationResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateParticipantAuthenticationResponseDeserializer { + 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_update_participant_authentication::de_update_participant_authentication_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_update_participant_authentication::de_update_participant_authentication_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct UpdateParticipantAuthenticationRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateParticipantAuthenticationRequestSerializer { + #[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::update_participant_authentication::UpdateParticipantAuthenticationInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/contact/update-participant-authentication").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::update_participant_authentication::UpdateParticipantAuthenticationInput, + 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_update_participant_authentication::ser_update_participant_authentication_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 UpdateParticipantAuthenticationEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateParticipantAuthenticationEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "UpdateParticipantAuthenticationEndpointParamsInterceptor" + } + + 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 UpdateParticipantAuthenticationInput")?; + + 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(()) + } +} + +// The get_* functions below are generated from JMESPath expressions in the +// operationContextParams trait. They target the operation's input shape. + +/// Error type for the `UpdateParticipantAuthenticationError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum UpdateParticipantAuthenticationError { + ///

You do not have sufficient permissions to perform this action.

+ AccessDeniedException(crate::types::error::AccessDeniedException), + ///

Operation cannot be performed at this time as there is a conflict with another operation or contact state.

+ ConflictException(crate::types::error::ConflictException), + ///

Request processing failed because of an error or failure with the service.

+ InternalServiceException(crate::types::error::InternalServiceException), + ///

One or more of the specified parameters are not valid.

+ InvalidParameterException(crate::types::error::InvalidParameterException), + ///

The request is not valid.

+ InvalidRequestException(crate::types::error::InvalidRequestException), + ///

The throttling limit has been exceeded.

+ ThrottlingException(crate::types::error::ThrottlingException), + /// 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-UpdateParticipantAuthenticationError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl UpdateParticipantAuthenticationError { + /// Creates the `UpdateParticipantAuthenticationError::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 `UpdateParticipantAuthenticationError::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::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InvalidParameterException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InvalidRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `UpdateParticipantAuthenticationError::AccessDeniedException`. + pub fn is_access_denied_exception(&self) -> bool { + matches!(self, Self::AccessDeniedException(_)) + } + /// Returns `true` if the error kind is `UpdateParticipantAuthenticationError::ConflictException`. + pub fn is_conflict_exception(&self) -> bool { + matches!(self, Self::ConflictException(_)) + } + /// Returns `true` if the error kind is `UpdateParticipantAuthenticationError::InternalServiceException`. + pub fn is_internal_service_exception(&self) -> bool { + matches!(self, Self::InternalServiceException(_)) + } + /// Returns `true` if the error kind is `UpdateParticipantAuthenticationError::InvalidParameterException`. + pub fn is_invalid_parameter_exception(&self) -> bool { + matches!(self, Self::InvalidParameterException(_)) + } + /// Returns `true` if the error kind is `UpdateParticipantAuthenticationError::InvalidRequestException`. + pub fn is_invalid_request_exception(&self) -> bool { + matches!(self, Self::InvalidRequestException(_)) + } + /// Returns `true` if the error kind is `UpdateParticipantAuthenticationError::ThrottlingException`. + pub fn is_throttling_exception(&self) -> bool { + matches!(self, Self::ThrottlingException(_)) + } +} +impl ::std::error::Error for UpdateParticipantAuthenticationError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), + Self::ConflictException(_inner) => ::std::option::Option::Some(_inner), + Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner), + Self::InvalidParameterException(_inner) => ::std::option::Option::Some(_inner), + Self::InvalidRequestException(_inner) => ::std::option::Option::Some(_inner), + Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for UpdateParticipantAuthenticationError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::AccessDeniedException(_inner) => _inner.fmt(f), + Self::ConflictException(_inner) => _inner.fmt(f), + Self::InternalServiceException(_inner) => _inner.fmt(f), + Self::InvalidParameterException(_inner) => _inner.fmt(f), + Self::InvalidRequestException(_inner) => _inner.fmt(f), + Self::ThrottlingException(_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 UpdateParticipantAuthenticationError { + 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 UpdateParticipantAuthenticationError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InvalidParameterException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InvalidRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateParticipantAuthenticationError { + 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::update_participant_authentication::UpdateParticipantAuthenticationError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::update_participant_authentication::_update_participant_authentication_output::UpdateParticipantAuthenticationOutput; + +pub use crate::operation::update_participant_authentication::_update_participant_authentication_input::UpdateParticipantAuthenticationInput; + +mod _update_participant_authentication_input; + +mod _update_participant_authentication_output; + +/// Builders +pub mod builders; diff --git a/sdk/connect/src/operation/update_participant_authentication/_update_participant_authentication_input.rs b/sdk/connect/src/operation/update_participant_authentication/_update_participant_authentication_input.rs new file mode 100644 index 000000000000..a744024d8463 --- /dev/null +++ b/sdk/connect/src/operation/update_participant_authentication/_update_participant_authentication_input.rs @@ -0,0 +1,168 @@ +// 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)] +pub struct UpdateParticipantAuthenticationInput { + ///

The state query parameter that was provided by Cognito in the redirectUri. This will also match the state parameter provided in the AuthenticationUrl from the GetAuthenticationUrl response.

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

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

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

The code query parameter provided by Cognito in the redirectUri.

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

The error query parameter provided by Cognito in the redirectUri.

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

The error_description parameter provided by Cognito in the redirectUri.

+ pub error_description: ::std::option::Option<::std::string::String>, +} +impl UpdateParticipantAuthenticationInput { + ///

The state query parameter that was provided by Cognito in the redirectUri. This will also match the state parameter provided in the AuthenticationUrl from the GetAuthenticationUrl response.

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

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

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

The code query parameter provided by Cognito in the redirectUri.

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

The error query parameter provided by Cognito in the redirectUri.

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

The error_description parameter provided by Cognito in the redirectUri.

+ pub fn error_description(&self) -> ::std::option::Option<&str> { + self.error_description.as_deref() + } +} +impl ::std::fmt::Debug for UpdateParticipantAuthenticationInput { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("UpdateParticipantAuthenticationInput"); + formatter.field("state", &self.state); + formatter.field("instance_id", &self.instance_id); + formatter.field("code", &"*** Sensitive Data Redacted ***"); + formatter.field("error", &"*** Sensitive Data Redacted ***"); + formatter.field("error_description", &"*** Sensitive Data Redacted ***"); + formatter.finish() + } +} +impl UpdateParticipantAuthenticationInput { + /// Creates a new builder-style object to manufacture [`UpdateParticipantAuthenticationInput`](crate::operation::update_participant_authentication::UpdateParticipantAuthenticationInput). + pub fn builder() -> crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationInputBuilder { + crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationInputBuilder::default() + } +} + +/// A builder for [`UpdateParticipantAuthenticationInput`](crate::operation::update_participant_authentication::UpdateParticipantAuthenticationInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)] +#[non_exhaustive] +pub struct UpdateParticipantAuthenticationInputBuilder { + pub(crate) state: ::std::option::Option<::std::string::String>, + pub(crate) instance_id: ::std::option::Option<::std::string::String>, + pub(crate) code: ::std::option::Option<::std::string::String>, + pub(crate) error: ::std::option::Option<::std::string::String>, + pub(crate) error_description: ::std::option::Option<::std::string::String>, +} +impl UpdateParticipantAuthenticationInputBuilder { + ///

The state query parameter that was provided by Cognito in the redirectUri. This will also match the state parameter provided in the AuthenticationUrl from the GetAuthenticationUrl response.

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

The state query parameter that was provided by Cognito in the redirectUri. This will also match the state parameter provided in the AuthenticationUrl from the GetAuthenticationUrl response.

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

The state query parameter that was provided by Cognito in the redirectUri. This will also match the state parameter provided in the AuthenticationUrl from the GetAuthenticationUrl response.

+ pub fn get_state(&self) -> &::std::option::Option<::std::string::String> { + &self.state + } + ///

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

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

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

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

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

+ pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> { + &self.instance_id + } + ///

The code query parameter provided by Cognito in the redirectUri.

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

The code query parameter provided by Cognito in the redirectUri.

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

The code query parameter provided by Cognito in the redirectUri.

+ pub fn get_code(&self) -> &::std::option::Option<::std::string::String> { + &self.code + } + ///

The error query parameter provided by Cognito in the redirectUri.

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

The error query parameter provided by Cognito in the redirectUri.

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

The error query parameter provided by Cognito in the redirectUri.

+ pub fn get_error(&self) -> &::std::option::Option<::std::string::String> { + &self.error + } + ///

The error_description parameter provided by Cognito in the redirectUri.

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

The error_description parameter provided by Cognito in the redirectUri.

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

The error_description parameter provided by Cognito in the redirectUri.

+ pub fn get_error_description(&self) -> &::std::option::Option<::std::string::String> { + &self.error_description + } + /// Consumes the builder and constructs a [`UpdateParticipantAuthenticationInput`](crate::operation::update_participant_authentication::UpdateParticipantAuthenticationInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok( + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationInput { + state: self.state, + instance_id: self.instance_id, + code: self.code, + error: self.error, + error_description: self.error_description, + }, + ) + } +} +impl ::std::fmt::Debug for UpdateParticipantAuthenticationInputBuilder { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("UpdateParticipantAuthenticationInputBuilder"); + formatter.field("state", &self.state); + formatter.field("instance_id", &self.instance_id); + formatter.field("code", &"*** Sensitive Data Redacted ***"); + formatter.field("error", &"*** Sensitive Data Redacted ***"); + formatter.field("error_description", &"*** Sensitive Data Redacted ***"); + formatter.finish() + } +} diff --git a/sdk/connect/src/operation/update_participant_authentication/_update_participant_authentication_output.rs b/sdk/connect/src/operation/update_participant_authentication/_update_participant_authentication_output.rs new file mode 100644 index 000000000000..a1bdc18df8c2 --- /dev/null +++ b/sdk/connect/src/operation/update_participant_authentication/_update_participant_authentication_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 UpdateParticipantAuthenticationOutput { + _request_id: Option, +} +impl ::aws_types::request_id::RequestId for UpdateParticipantAuthenticationOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl UpdateParticipantAuthenticationOutput { + /// Creates a new builder-style object to manufacture [`UpdateParticipantAuthenticationOutput`](crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput). + pub fn builder() -> crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationOutputBuilder { + crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationOutputBuilder::default() + } +} + +/// A builder for [`UpdateParticipantAuthenticationOutput`](crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateParticipantAuthenticationOutputBuilder { + _request_id: Option, +} +impl UpdateParticipantAuthenticationOutputBuilder { + 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 [`UpdateParticipantAuthenticationOutput`](crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput). + pub fn build(self) -> crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput { + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput { + _request_id: self._request_id, + } + } +} diff --git a/sdk/connect/src/operation/update_participant_authentication/builders.rs b/sdk/connect/src/operation/update_participant_authentication/builders.rs new file mode 100644 index 000000000000..ed32054e3bab --- /dev/null +++ b/sdk/connect/src/operation/update_participant_authentication/builders.rs @@ -0,0 +1,189 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::update_participant_authentication::_update_participant_authentication_output::UpdateParticipantAuthenticationOutputBuilder; + +pub use crate::operation::update_participant_authentication::_update_participant_authentication_input::UpdateParticipantAuthenticationInputBuilder; + +impl crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.update_participant_authentication(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `UpdateParticipantAuthentication`. +/// +///

Instructs Amazon Connect to resume the authentication process. The subsequent actions depend on the request body contents:

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

    If a code is provided: Connect retrieves the identity information from Amazon Cognito and imports it into Connect Customer Profiles.

  • +///
  • +///

    If an error is provided: The error branch of the Authenticate Customer block is executed.

  • +///
+///

The API returns a success response to acknowledge the request. However, the interaction and exchange of identity information occur asynchronously after the response is returned.

+///
+#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct UpdateParticipantAuthenticationFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput, + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError, + > for UpdateParticipantAuthenticationFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput, + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl UpdateParticipantAuthenticationFluentBuilder { + /// Creates a new `UpdateParticipantAuthenticationFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the UpdateParticipantAuthentication as a reference. + pub fn as_input(&self) -> &crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationInputBuilder { + &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::update_participant_authentication::UpdateParticipantAuthenticationOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError, + ::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::update_participant_authentication::UpdateParticipantAuthentication::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::update_participant_authentication::UpdateParticipantAuthentication::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::update_participant_authentication::UpdateParticipantAuthenticationOutput, + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError, + 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 state query parameter that was provided by Cognito in the redirectUri. This will also match the state parameter provided in the AuthenticationUrl from the GetAuthenticationUrl response.

+ pub fn state(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.state(input.into()); + self + } + ///

The state query parameter that was provided by Cognito in the redirectUri. This will also match the state parameter provided in the AuthenticationUrl from the GetAuthenticationUrl response.

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

The state query parameter that was provided by Cognito in the redirectUri. This will also match the state parameter provided in the AuthenticationUrl from the GetAuthenticationUrl response.

+ pub fn get_state(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_state() + } + ///

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

+ pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.instance_id(input.into()); + self + } + ///

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

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

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

+ pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_instance_id() + } + ///

The code query parameter provided by Cognito in the redirectUri.

+ pub fn code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.code(input.into()); + self + } + ///

The code query parameter provided by Cognito in the redirectUri.

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

The code query parameter provided by Cognito in the redirectUri.

+ pub fn get_code(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_code() + } + ///

The error query parameter provided by Cognito in the redirectUri.

+ pub fn error(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.error(input.into()); + self + } + ///

The error query parameter provided by Cognito in the redirectUri.

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

The error query parameter provided by Cognito in the redirectUri.

+ pub fn get_error(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_error() + } + ///

The error_description parameter provided by Cognito in the redirectUri.

+ pub fn error_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.error_description(input.into()); + self + } + ///

The error_description parameter provided by Cognito in the redirectUri.

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

The error_description parameter provided by Cognito in the redirectUri.

+ pub fn get_error_description(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_error_description() + } +} diff --git a/sdk/connect/src/protocol_serde.rs b/sdk/connect/src/protocol_serde.rs index 6e3d968cc8e8..b6c1e6016dee 100644 --- a/sdk/connect/src/protocol_serde.rs +++ b/sdk/connect/src/protocol_serde.rs @@ -517,6 +517,8 @@ pub(crate) mod shape_update_instance_attribute; pub(crate) mod shape_update_instance_storage_config; +pub(crate) mod shape_update_participant_authentication; + pub(crate) mod shape_update_participant_role_config; pub(crate) mod shape_update_phone_number; @@ -897,6 +899,8 @@ pub(crate) mod shape_update_instance_attribute_input; pub(crate) mod shape_update_instance_storage_config_input; +pub(crate) mod shape_update_participant_authentication_input; + pub(crate) mod shape_update_participant_role_config_input; pub(crate) mod shape_update_phone_number_input; diff --git a/sdk/connect/src/protocol_serde/shape_contact.rs b/sdk/connect/src/protocol_serde/shape_contact.rs index 8b5709939009..df916401c97d 100644 --- a/sdk/connect/src/protocol_serde/shape_contact.rs +++ b/sdk/connect/src/protocol_serde/shape_contact.rs @@ -143,6 +143,13 @@ where "WisdomInfo" => { builder = builder.set_wisdom_info(crate::protocol_serde::shape_wisdom_info::de_wisdom_info(tokens)?); } + "CustomerId" => { + builder = builder.set_customer_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } "CustomerEndpoint" => { builder = builder.set_customer_endpoint(crate::protocol_serde::shape_endpoint_info::de_endpoint_info(tokens)?); } diff --git a/sdk/connect/src/protocol_serde/shape_start_chat_contact_input.rs b/sdk/connect/src/protocol_serde/shape_start_chat_contact_input.rs index 6ea5fc442ec2..e2dff1d19476 100644 --- a/sdk/connect/src/protocol_serde/shape_start_chat_contact_input.rs +++ b/sdk/connect/src/protocol_serde/shape_start_chat_contact_input.rs @@ -25,51 +25,54 @@ pub fn ser_start_chat_contact_input_input( if let Some(var_7) = &input.contact_flow_id { object.key("ContactFlowId").string(var_7.as_str()); } - if let Some(var_8) = &input.initial_message { + if let Some(var_8) = &input.customer_id { + object.key("CustomerId").string(var_8.as_str()); + } + if let Some(var_9) = &input.initial_message { #[allow(unused_mut)] - let mut object_9 = object.key("InitialMessage").start_object(); - crate::protocol_serde::shape_chat_message::ser_chat_message(&mut object_9, var_8)?; - object_9.finish(); + let mut object_10 = object.key("InitialMessage").start_object(); + crate::protocol_serde::shape_chat_message::ser_chat_message(&mut object_10, var_9)?; + object_10.finish(); } - if let Some(var_10) = &input.instance_id { - object.key("InstanceId").string(var_10.as_str()); + if let Some(var_11) = &input.instance_id { + object.key("InstanceId").string(var_11.as_str()); } - if let Some(var_11) = &input.participant_details { + if let Some(var_12) = &input.participant_details { #[allow(unused_mut)] - let mut object_12 = object.key("ParticipantDetails").start_object(); - crate::protocol_serde::shape_participant_details::ser_participant_details(&mut object_12, var_11)?; - object_12.finish(); + let mut object_13 = object.key("ParticipantDetails").start_object(); + crate::protocol_serde::shape_participant_details::ser_participant_details(&mut object_13, var_12)?; + object_13.finish(); } - if let Some(var_13) = &input.persistent_chat { + if let Some(var_14) = &input.persistent_chat { #[allow(unused_mut)] - let mut object_14 = object.key("PersistentChat").start_object(); - crate::protocol_serde::shape_persistent_chat::ser_persistent_chat(&mut object_14, var_13)?; - object_14.finish(); + let mut object_15 = object.key("PersistentChat").start_object(); + crate::protocol_serde::shape_persistent_chat::ser_persistent_chat(&mut object_15, var_14)?; + object_15.finish(); } - if let Some(var_15) = &input.related_contact_id { - object.key("RelatedContactId").string(var_15.as_str()); + if let Some(var_16) = &input.related_contact_id { + object.key("RelatedContactId").string(var_16.as_str()); } - if let Some(var_16) = &input.segment_attributes { + if let Some(var_17) = &input.segment_attributes { #[allow(unused_mut)] - let mut object_17 = object.key("SegmentAttributes").start_object(); - for (key_18, value_19) in var_16 { + let mut object_18 = object.key("SegmentAttributes").start_object(); + for (key_19, value_20) in var_17 { { #[allow(unused_mut)] - let mut object_20 = object_17.key(key_18.as_str()).start_object(); - crate::protocol_serde::shape_segment_attribute_value::ser_segment_attribute_value(&mut object_20, value_19)?; - object_20.finish(); + let mut object_21 = object_18.key(key_19.as_str()).start_object(); + crate::protocol_serde::shape_segment_attribute_value::ser_segment_attribute_value(&mut object_21, value_20)?; + object_21.finish(); } } - object_17.finish(); + object_18.finish(); } - if let Some(var_21) = &input.supported_messaging_content_types { - let mut array_22 = object.key("SupportedMessagingContentTypes").start_array(); - for item_23 in var_21 { + if let Some(var_22) = &input.supported_messaging_content_types { + let mut array_23 = object.key("SupportedMessagingContentTypes").start_array(); + for item_24 in var_22 { { - array_22.value().string(item_23.as_str()); + array_23.value().string(item_24.as_str()); } } - array_22.finish(); + array_23.finish(); } Ok(()) } diff --git a/sdk/connect/src/protocol_serde/shape_update_participant_authentication.rs b/sdk/connect/src/protocol_serde/shape_update_participant_authentication.rs new file mode 100644 index 000000000000..e282501ff65e --- /dev/null +++ b/sdk/connect/src/protocol_serde/shape_update_participant_authentication.rs @@ -0,0 +1,151 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_participant_authentication_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput, + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::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::update_participant_authentication::UpdateParticipantAuthenticationError::unhandled(generic)), + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "AccessDeniedException" => { + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::AccessDeniedException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); + output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) + .map_err(crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "ConflictException" => crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::ConflictException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ConflictExceptionBuilder::default(); + output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output) + .map_err(crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "InternalServiceException" => { + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::InternalServiceException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalServiceExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_service_exception::de_internal_service_exception_json_err(_response_body, output) + .map_err(crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "InvalidParameterException" => { + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::InvalidParameterException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default(); + output = + crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output) + .map_err(crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "InvalidRequestException" => { + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::InvalidRequestException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InvalidRequestExceptionBuilder::default(); + output = crate::protocol_serde::shape_invalid_request_exception::de_invalid_request_exception_json_err(_response_body, output) + .map_err(crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "ThrottlingException" => crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::ThrottlingException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); + output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) + .map_err(crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_participant_authentication_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput, + crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationOutputBuilder::default(); + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_update_participant_authentication_input( + input: &crate::operation::update_participant_authentication::UpdateParticipantAuthenticationInput, +) -> 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_update_participant_authentication_input::ser_update_participant_authentication_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} diff --git a/sdk/connect/src/protocol_serde/shape_update_participant_authentication_input.rs b/sdk/connect/src/protocol_serde/shape_update_participant_authentication_input.rs new file mode 100644 index 000000000000..7cba91615620 --- /dev/null +++ b/sdk/connect/src/protocol_serde/shape_update_participant_authentication_input.rs @@ -0,0 +1,22 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_update_participant_authentication_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::update_participant_authentication::UpdateParticipantAuthenticationInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.code { + object.key("Code").string(var_1.as_str()); + } + if let Some(var_2) = &input.error { + object.key("Error").string(var_2.as_str()); + } + if let Some(var_3) = &input.error_description { + object.key("ErrorDescription").string(var_3.as_str()); + } + if let Some(var_4) = &input.instance_id { + object.key("InstanceId").string(var_4.as_str()); + } + if let Some(var_5) = &input.state { + object.key("State").string(var_5.as_str()); + } + Ok(()) +} diff --git a/sdk/connect/src/types/_contact.rs b/sdk/connect/src/types/_contact.rs index 7ef21ab9a2b4..f9028ec2557b 100644 --- a/sdk/connect/src/types/_contact.rs +++ b/sdk/connect/src/types/_contact.rs @@ -46,6 +46,8 @@ pub struct Contact { pub related_contact_id: ::std::option::Option<::std::string::String>, ///

Information about Amazon Connect Wisdom.

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

The customer's identification number. For example, the CustomerId may be a customer number from your CRM. You can create a Lambda function to pull the unique customer ID of the caller from your CRM system. If you enable Amazon Connect Voice ID capability, this attribute is populated with the CustomerSpeakerId of the caller.

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

The customer or external third party participant endpoint.

pub customer_endpoint: ::std::option::Option, ///

The system endpoint. For INBOUND, this is the phone number or email address that the customer dialed. For OUTBOUND and EXTERNAL_OUTBOUND, this is the outbound caller ID number assigned to the outbound queue that is used to dial the customer. For callback, this shows up as Softphone for calls handled by agents with softphone.

@@ -162,6 +164,10 @@ impl Contact { pub fn wisdom_info(&self) -> ::std::option::Option<&crate::types::WisdomInfo> { self.wisdom_info.as_ref() } + ///

The customer's identification number. For example, the CustomerId may be a customer number from your CRM. You can create a Lambda function to pull the unique customer ID of the caller from your CRM system. If you enable Amazon Connect Voice ID capability, this attribute is populated with the CustomerSpeakerId of the caller.

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

The customer or external third party participant endpoint.

pub fn customer_endpoint(&self) -> ::std::option::Option<&crate::types::EndpointInfo> { self.customer_endpoint.as_ref() @@ -249,6 +255,7 @@ impl ::std::fmt::Debug for Contact { formatter.field("scheduled_timestamp", &self.scheduled_timestamp); formatter.field("related_contact_id", &self.related_contact_id); formatter.field("wisdom_info", &self.wisdom_info); + formatter.field("customer_id", &self.customer_id); formatter.field("customer_endpoint", &self.customer_endpoint); formatter.field("system_endpoint", &self.system_endpoint); formatter.field("queue_time_adjustment_seconds", &self.queue_time_adjustment_seconds); @@ -299,6 +306,7 @@ pub struct ContactBuilder { pub(crate) scheduled_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>, pub(crate) related_contact_id: ::std::option::Option<::std::string::String>, pub(crate) wisdom_info: ::std::option::Option, + pub(crate) customer_id: ::std::option::Option<::std::string::String>, pub(crate) customer_endpoint: ::std::option::Option, pub(crate) system_endpoint: ::std::option::Option, pub(crate) queue_time_adjustment_seconds: ::std::option::Option, @@ -610,6 +618,20 @@ impl ContactBuilder { pub fn get_wisdom_info(&self) -> &::std::option::Option { &self.wisdom_info } + ///

The customer's identification number. For example, the CustomerId may be a customer number from your CRM. You can create a Lambda function to pull the unique customer ID of the caller from your CRM system. If you enable Amazon Connect Voice ID capability, this attribute is populated with the CustomerSpeakerId of the caller.

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

The customer's identification number. For example, the CustomerId may be a customer number from your CRM. You can create a Lambda function to pull the unique customer ID of the caller from your CRM system. If you enable Amazon Connect Voice ID capability, this attribute is populated with the CustomerSpeakerId of the caller.

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

The customer's identification number. For example, the CustomerId may be a customer number from your CRM. You can create a Lambda function to pull the unique customer ID of the caller from your CRM system. If you enable Amazon Connect Voice ID capability, this attribute is populated with the CustomerSpeakerId of the caller.

+ pub fn get_customer_id(&self) -> &::std::option::Option<::std::string::String> { + &self.customer_id + } ///

The customer or external third party participant endpoint.

pub fn customer_endpoint(mut self, input: crate::types::EndpointInfo) -> Self { self.customer_endpoint = ::std::option::Option::Some(input); @@ -861,6 +883,7 @@ impl ContactBuilder { scheduled_timestamp: self.scheduled_timestamp, related_contact_id: self.related_contact_id, wisdom_info: self.wisdom_info, + customer_id: self.customer_id, customer_endpoint: self.customer_endpoint, system_endpoint: self.system_endpoint, queue_time_adjustment_seconds: self.queue_time_adjustment_seconds, @@ -903,6 +926,7 @@ impl ::std::fmt::Debug for ContactBuilder { formatter.field("scheduled_timestamp", &self.scheduled_timestamp); formatter.field("related_contact_id", &self.related_contact_id); formatter.field("wisdom_info", &self.wisdom_info); + formatter.field("customer_id", &self.customer_id); formatter.field("customer_endpoint", &self.customer_endpoint); formatter.field("system_endpoint", &self.system_endpoint); formatter.field("queue_time_adjustment_seconds", &self.queue_time_adjustment_seconds); diff --git a/sdk/connect/src/types/_instance_attribute_type.rs b/sdk/connect/src/types/_instance_attribute_type.rs index e84cbb7eb638..f56de2d71522 100644 --- a/sdk/connect/src/types/_instance_attribute_type.rs +++ b/sdk/connect/src/types/_instance_attribute_type.rs @@ -20,6 +20,7 @@ /// InstanceAttributeType::EnhancedContactMonitoring => { /* ... */ }, /// InstanceAttributeType::HighVolumeOutbound => { /* ... */ }, /// InstanceAttributeType::InboundCalls => { /* ... */ }, +/// InstanceAttributeType::MultiPartyChatConference => { /* ... */ }, /// InstanceAttributeType::MultiPartyConference => { /* ... */ }, /// InstanceAttributeType::OutboundCalls => { /* ... */ }, /// InstanceAttributeType::UseCustomTtsVoices => { /* ... */ }, @@ -68,6 +69,8 @@ pub enum InstanceAttributeType { #[allow(missing_docs)] // documentation missing in model InboundCalls, #[allow(missing_docs)] // documentation missing in model + MultiPartyChatConference, + #[allow(missing_docs)] // documentation missing in model MultiPartyConference, #[allow(missing_docs)] // documentation missing in model OutboundCalls, @@ -88,6 +91,7 @@ impl ::std::convert::From<&str> for InstanceAttributeType { "ENHANCED_CONTACT_MONITORING" => InstanceAttributeType::EnhancedContactMonitoring, "HIGH_VOLUME_OUTBOUND" => InstanceAttributeType::HighVolumeOutbound, "INBOUND_CALLS" => InstanceAttributeType::InboundCalls, + "MULTI_PARTY_CHAT_CONFERENCE" => InstanceAttributeType::MultiPartyChatConference, "MULTI_PARTY_CONFERENCE" => InstanceAttributeType::MultiPartyConference, "OUTBOUND_CALLS" => InstanceAttributeType::OutboundCalls, "USE_CUSTOM_TTS_VOICES" => InstanceAttributeType::UseCustomTtsVoices, @@ -114,6 +118,7 @@ impl InstanceAttributeType { InstanceAttributeType::EnhancedContactMonitoring => "ENHANCED_CONTACT_MONITORING", InstanceAttributeType::HighVolumeOutbound => "HIGH_VOLUME_OUTBOUND", InstanceAttributeType::InboundCalls => "INBOUND_CALLS", + InstanceAttributeType::MultiPartyChatConference => "MULTI_PARTY_CHAT_CONFERENCE", InstanceAttributeType::MultiPartyConference => "MULTI_PARTY_CONFERENCE", InstanceAttributeType::OutboundCalls => "OUTBOUND_CALLS", InstanceAttributeType::UseCustomTtsVoices => "USE_CUSTOM_TTS_VOICES", @@ -131,6 +136,7 @@ impl InstanceAttributeType { "ENHANCED_CONTACT_MONITORING", "HIGH_VOLUME_OUTBOUND", "INBOUND_CALLS", + "MULTI_PARTY_CHAT_CONFERENCE", "MULTI_PARTY_CONFERENCE", "OUTBOUND_CALLS", "USE_CUSTOM_TTS_VOICES", @@ -165,6 +171,7 @@ impl ::std::fmt::Display for InstanceAttributeType { InstanceAttributeType::EnhancedContactMonitoring => write!(f, "ENHANCED_CONTACT_MONITORING"), InstanceAttributeType::HighVolumeOutbound => write!(f, "HIGH_VOLUME_OUTBOUND"), InstanceAttributeType::InboundCalls => write!(f, "INBOUND_CALLS"), + InstanceAttributeType::MultiPartyChatConference => write!(f, "MULTI_PARTY_CHAT_CONFERENCE"), InstanceAttributeType::MultiPartyConference => write!(f, "MULTI_PARTY_CONFERENCE"), InstanceAttributeType::OutboundCalls => write!(f, "OUTBOUND_CALLS"), InstanceAttributeType::UseCustomTtsVoices => write!(f, "USE_CUSTOM_TTS_VOICES"), diff --git a/sdk/connect/src/types/_integration_type.rs b/sdk/connect/src/types/_integration_type.rs index e9aec988c7e8..b779c7ca9ff0 100644 --- a/sdk/connect/src/types/_integration_type.rs +++ b/sdk/connect/src/types/_integration_type.rs @@ -16,6 +16,7 @@ /// IntegrationType::Application => { /* ... */ }, /// IntegrationType::CallTransferConnector => { /* ... */ }, /// IntegrationType::CasesDomain => { /* ... */ }, +/// IntegrationType::CognitoUserPool => { /* ... */ }, /// IntegrationType::Event => { /* ... */ }, /// IntegrationType::FileScanner => { /* ... */ }, /// IntegrationType::PinpointApp => { /* ... */ }, @@ -62,6 +63,8 @@ pub enum IntegrationType { #[allow(missing_docs)] // documentation missing in model CasesDomain, #[allow(missing_docs)] // documentation missing in model + CognitoUserPool, + #[allow(missing_docs)] // documentation missing in model Event, #[allow(missing_docs)] // documentation missing in model FileScanner, @@ -90,6 +93,7 @@ impl ::std::convert::From<&str> for IntegrationType { "APPLICATION" => IntegrationType::Application, "CALL_TRANSFER_CONNECTOR" => IntegrationType::CallTransferConnector, "CASES_DOMAIN" => IntegrationType::CasesDomain, + "COGNITO_USER_POOL" => IntegrationType::CognitoUserPool, "EVENT" => IntegrationType::Event, "FILE_SCANNER" => IntegrationType::FileScanner, "PINPOINT_APP" => IntegrationType::PinpointApp, @@ -118,6 +122,7 @@ impl IntegrationType { IntegrationType::Application => "APPLICATION", IntegrationType::CallTransferConnector => "CALL_TRANSFER_CONNECTOR", IntegrationType::CasesDomain => "CASES_DOMAIN", + IntegrationType::CognitoUserPool => "COGNITO_USER_POOL", IntegrationType::Event => "EVENT", IntegrationType::FileScanner => "FILE_SCANNER", IntegrationType::PinpointApp => "PINPOINT_APP", @@ -137,6 +142,7 @@ impl IntegrationType { "APPLICATION", "CALL_TRANSFER_CONNECTOR", "CASES_DOMAIN", + "COGNITO_USER_POOL", "EVENT", "FILE_SCANNER", "PINPOINT_APP", @@ -173,6 +179,7 @@ impl ::std::fmt::Display for IntegrationType { IntegrationType::Application => write!(f, "APPLICATION"), IntegrationType::CallTransferConnector => write!(f, "CALL_TRANSFER_CONNECTOR"), IntegrationType::CasesDomain => write!(f, "CASES_DOMAIN"), + IntegrationType::CognitoUserPool => write!(f, "COGNITO_USER_POOL"), IntegrationType::Event => write!(f, "EVENT"), IntegrationType::FileScanner => write!(f, "FILE_SCANNER"), IntegrationType::PinpointApp => write!(f, "PINPOINT_APP"), diff --git a/sdk/connect/src/types/_voice_recording_configuration.rs b/sdk/connect/src/types/_voice_recording_configuration.rs index bc6e17866831..58f8e9d3b04d 100644 --- a/sdk/connect/src/types/_voice_recording_configuration.rs +++ b/sdk/connect/src/types/_voice_recording_configuration.rs @@ -7,6 +7,7 @@ pub struct VoiceRecordingConfiguration { ///

Identifies which track is being recorded.

pub voice_recording_track: ::std::option::Option, ///

Identifies which IVR track is being recorded.

+ ///

One and only one of the track configurations should be presented in the request.

pub ivr_recording_track: ::std::option::Option, } impl VoiceRecordingConfiguration { @@ -15,6 +16,7 @@ impl VoiceRecordingConfiguration { self.voice_recording_track.as_ref() } ///

Identifies which IVR track is being recorded.

+ ///

One and only one of the track configurations should be presented in the request.

pub fn ivr_recording_track(&self) -> ::std::option::Option<&crate::types::IvrRecordingTrack> { self.ivr_recording_track.as_ref() } @@ -49,16 +51,19 @@ impl VoiceRecordingConfigurationBuilder { &self.voice_recording_track } ///

Identifies which IVR track is being recorded.

+ ///

One and only one of the track configurations should be presented in the request.

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

Identifies which IVR track is being recorded.

+ ///

One and only one of the track configurations should be presented in the request.

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

Identifies which IVR track is being recorded.

+ ///

One and only one of the track configurations should be presented in the request.

pub fn get_ivr_recording_track(&self) -> &::std::option::Option { &self.ivr_recording_track } diff --git a/sdk/connect/src/types/error.rs b/sdk/connect/src/types/error.rs index ad327edbed34..14cf72d17bd7 100644 --- a/sdk/connect/src/types/error.rs +++ b/sdk/connect/src/types/error.rs @@ -27,14 +27,14 @@ pub use crate::types::error::_conditional_operation_failed_exception::Conditiona pub use crate::types::error::_idempotency_exception::IdempotencyException; +pub use crate::types::error::_conflict_exception::ConflictException; + pub use crate::types::error::_limit_exceeded_exception::LimitExceededException; pub use crate::types::error::_invalid_contact_flow_module_exception::InvalidContactFlowModuleException; pub use crate::types::error::_invalid_contact_flow_exception::InvalidContactFlowException; -pub use crate::types::error::_conflict_exception::ConflictException; - pub use crate::types::error::_contact_not_found_exception::ContactNotFoundException; pub use crate::types::error::_outbound_contact_not_permitted_exception::OutboundContactNotPermittedException; diff --git a/sdk/connect/src/types/error/builders.rs b/sdk/connect/src/types/error/builders.rs index 3436d1e0695f..8eebe26d149a 100644 --- a/sdk/connect/src/types/error/builders.rs +++ b/sdk/connect/src/types/error/builders.rs @@ -27,14 +27,14 @@ pub use crate::types::error::_conditional_operation_failed_exception::Conditiona pub use crate::types::error::_idempotency_exception::IdempotencyExceptionBuilder; +pub use crate::types::error::_conflict_exception::ConflictExceptionBuilder; + pub use crate::types::error::_limit_exceeded_exception::LimitExceededExceptionBuilder; pub use crate::types::error::_invalid_contact_flow_module_exception::InvalidContactFlowModuleExceptionBuilder; pub use crate::types::error::_invalid_contact_flow_exception::InvalidContactFlowExceptionBuilder; -pub use crate::types::error::_conflict_exception::ConflictExceptionBuilder; - pub use crate::types::error::_contact_not_found_exception::ContactNotFoundExceptionBuilder; pub use crate::types::error::_outbound_contact_not_permitted_exception::OutboundContactNotPermittedExceptionBuilder; diff --git a/sdk/connectparticipant/Cargo.toml b/sdk/connectparticipant/Cargo.toml index 4c4a0cc85051..ad3ff9575375 100644 --- a/sdk/connectparticipant/Cargo.toml +++ b/sdk/connectparticipant/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-connectparticipant" -version = "1.52.0" +version = "1.53.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for Amazon Connect Participant Service" edition = "2021" diff --git a/sdk/connectparticipant/README.md b/sdk/connectparticipant/README.md index c9e3cf257234..670d2d12432f 100644 --- a/sdk/connectparticipant/README.md +++ b/sdk/connectparticipant/README.md @@ -1,5 +1,8 @@ # aws-sdk-connectparticipant + - [Participant Service actions](https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Participant_Service.html) + - [Participant Service data types](https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Participant_Service.html) + Amazon Connect is an easy-to-use omnichannel cloud contact center service that enables companies of any size to deliver superior customer service at a lower cost. Amazon Connect communications capabilities make it easy for companies to deliver personalized interactions across communication channels, including chat. Use the Amazon Connect Participant Service to manage participants (for example, agents, customers, and managers listening in), and to send messages and events within a chat contact. The APIs in the service enable the following: sending chat messages, attachment sharing, managing a participant's connection state and message events, and retrieving chat transcripts. @@ -16,7 +19,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-connectparticipant = "1.52.0" +aws-sdk-connectparticipant = "1.53.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/connectparticipant/src/client.rs b/sdk/connectparticipant/src/client.rs index c31657890f32..2abf12ea5206 100644 --- a/sdk/connectparticipant/src/client.rs +++ b/sdk/connectparticipant/src/client.rs @@ -59,14 +59,14 @@ pub(crate) struct Handle { /// # Using the `Client` /// /// A client has a function for every operation that can be performed by the service. -/// For example, the [`CompleteAttachmentUpload`](crate::operation::complete_attachment_upload) operation has -/// a [`Client::complete_attachment_upload`], function which returns a builder for that operation. +/// For example, the [`CancelParticipantAuthentication`](crate::operation::cancel_participant_authentication) operation has +/// a [`Client::cancel_participant_authentication`], function which returns a builder for that operation. /// The fluent builder ultimately has a `send()` function that returns an async future that /// returns a result, as illustrated below: /// /// ```rust,ignore -/// let result = client.complete_attachment_upload() -/// .client_token("example") +/// let result = client.cancel_participant_authentication() +/// .session_id("example") /// .send() /// .await; /// ``` @@ -136,6 +136,8 @@ impl Client { } } +mod cancel_participant_authentication; + mod complete_attachment_upload; mod create_participant_connection; @@ -151,7 +153,7 @@ mod create_participant_connection; /// # let client: aws_sdk_connectparticipant::Client = unimplemented!(); /// use ::http::header::{HeaderName, HeaderValue}; /// -/// let result = client.complete_attachment_upload() +/// let result = client.cancel_participant_authentication() /// .customize() /// .mutate_request(|req| { /// // Add `x-example-header` with value @@ -173,6 +175,8 @@ mod disconnect_participant; mod get_attachment; +mod get_authentication_url; + mod get_transcript; mod send_event; diff --git a/sdk/connectparticipant/src/client/cancel_participant_authentication.rs b/sdk/connectparticipant/src/client/cancel_participant_authentication.rs new file mode 100644 index 000000000000..79fd990c537f --- /dev/null +++ b/sdk/connectparticipant/src/client/cancel_participant_authentication.rs @@ -0,0 +1,15 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`CancelParticipantAuthentication`](crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`session_id(impl Into)`](crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationFluentBuilder::session_id) / [`set_session_id(Option)`](crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationFluentBuilder::set_session_id):
required: **true**

The sessionId provided in the authenticationInitiated event.


+ /// - [`connection_token(impl Into)`](crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationFluentBuilder::connection_token) / [`set_connection_token(Option)`](crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationFluentBuilder::set_connection_token):
required: **true**

The authentication token associated with the participant's connection.


+ /// - On success, responds with [`CancelParticipantAuthenticationOutput`](crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationOutput) + /// - On failure, responds with [`SdkError`](crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError) + pub fn cancel_participant_authentication( + &self, + ) -> crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationFluentBuilder { + crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/connectparticipant/src/client/get_attachment.rs b/sdk/connectparticipant/src/client/get_attachment.rs index df4b122bc898..5ea6f747c214 100644 --- a/sdk/connectparticipant/src/client/get_attachment.rs +++ b/sdk/connectparticipant/src/client/get_attachment.rs @@ -5,9 +5,11 @@ impl super::Client { /// - The fluent builder is configurable: /// - [`attachment_id(impl Into)`](crate::operation::get_attachment::builders::GetAttachmentFluentBuilder::attachment_id) / [`set_attachment_id(Option)`](crate::operation::get_attachment::builders::GetAttachmentFluentBuilder::set_attachment_id):
required: **true**

A unique identifier for the attachment.


/// - [`connection_token(impl Into)`](crate::operation::get_attachment::builders::GetAttachmentFluentBuilder::connection_token) / [`set_connection_token(Option)`](crate::operation::get_attachment::builders::GetAttachmentFluentBuilder::set_connection_token):
required: **true**

The authentication token associated with the participant's connection.


+ /// - [`url_expiry_in_seconds(i32)`](crate::operation::get_attachment::builders::GetAttachmentFluentBuilder::url_expiry_in_seconds) / [`set_url_expiry_in_seconds(Option)`](crate::operation::get_attachment::builders::GetAttachmentFluentBuilder::set_url_expiry_in_seconds):
required: **false**

The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.


/// - On success, responds with [`GetAttachmentOutput`](crate::operation::get_attachment::GetAttachmentOutput) with field(s): /// - [`url(Option)`](crate::operation::get_attachment::GetAttachmentOutput::url):

This is the pre-signed URL that can be used for uploading the file to Amazon S3 when used in response to StartAttachmentUpload.

/// - [`url_expiry(Option)`](crate::operation::get_attachment::GetAttachmentOutput::url_expiry):

The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

+ /// - [`attachment_size_in_bytes(i64)`](crate::operation::get_attachment::GetAttachmentOutput::attachment_size_in_bytes):

The size of the attachment in bytes.

/// - On failure, responds with [`SdkError`](crate::operation::get_attachment::GetAttachmentError) pub fn get_attachment(&self) -> crate::operation::get_attachment::builders::GetAttachmentFluentBuilder { crate::operation::get_attachment::builders::GetAttachmentFluentBuilder::new(self.handle.clone()) diff --git a/sdk/connectparticipant/src/client/get_authentication_url.rs b/sdk/connectparticipant/src/client/get_authentication_url.rs new file mode 100644 index 000000000000..17aa77322c8c --- /dev/null +++ b/sdk/connectparticipant/src/client/get_authentication_url.rs @@ -0,0 +1,15 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`GetAuthenticationUrl`](crate::operation::get_authentication_url::builders::GetAuthenticationUrlFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`session_id(impl Into)`](crate::operation::get_authentication_url::builders::GetAuthenticationUrlFluentBuilder::session_id) / [`set_session_id(Option)`](crate::operation::get_authentication_url::builders::GetAuthenticationUrlFluentBuilder::set_session_id):
required: **true**

The sessionId provided in the authenticationInitiated event.


+ /// - [`redirect_uri(impl Into)`](crate::operation::get_authentication_url::builders::GetAuthenticationUrlFluentBuilder::redirect_uri) / [`set_redirect_uri(Option)`](crate::operation::get_authentication_url::builders::GetAuthenticationUrlFluentBuilder::set_redirect_uri):
required: **true**

The URL where the customer will be redirected after Amazon Cognito authorizes the user.


+ /// - [`connection_token(impl Into)`](crate::operation::get_authentication_url::builders::GetAuthenticationUrlFluentBuilder::connection_token) / [`set_connection_token(Option)`](crate::operation::get_authentication_url::builders::GetAuthenticationUrlFluentBuilder::set_connection_token):
required: **true**

The authentication token associated with the participant's connection.


+ /// - On success, responds with [`GetAuthenticationUrlOutput`](crate::operation::get_authentication_url::GetAuthenticationUrlOutput) with field(s): + /// - [`authentication_url(Option)`](crate::operation::get_authentication_url::GetAuthenticationUrlOutput::authentication_url):

The URL where the customer will sign in to the identity provider. This URL contains the authorize endpoint for the Cognito UserPool used in the authentication.

+ /// - On failure, responds with [`SdkError`](crate::operation::get_authentication_url::GetAuthenticationUrlError) + pub fn get_authentication_url(&self) -> crate::operation::get_authentication_url::builders::GetAuthenticationUrlFluentBuilder { + crate::operation::get_authentication_url::builders::GetAuthenticationUrlFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/connectparticipant/src/client/start_attachment_upload.rs b/sdk/connectparticipant/src/client/start_attachment_upload.rs index b371ada4ac97..677834452a44 100644 --- a/sdk/connectparticipant/src/client/start_attachment_upload.rs +++ b/sdk/connectparticipant/src/client/start_attachment_upload.rs @@ -10,7 +10,7 @@ impl super::Client { /// - [`connection_token(impl Into)`](crate::operation::start_attachment_upload::builders::StartAttachmentUploadFluentBuilder::connection_token) / [`set_connection_token(Option)`](crate::operation::start_attachment_upload::builders::StartAttachmentUploadFluentBuilder::set_connection_token):
required: **true**

The authentication token associated with the participant's connection.


/// - On success, responds with [`StartAttachmentUploadOutput`](crate::operation::start_attachment_upload::StartAttachmentUploadOutput) with field(s): /// - [`attachment_id(Option)`](crate::operation::start_attachment_upload::StartAttachmentUploadOutput::attachment_id):

A unique identifier for the attachment.

- /// - [`upload_metadata(Option)`](crate::operation::start_attachment_upload::StartAttachmentUploadOutput::upload_metadata):

Fields to be used while uploading the attachment.

+ /// - [`upload_metadata(Option)`](crate::operation::start_attachment_upload::StartAttachmentUploadOutput::upload_metadata):

The headers to be provided while uploading the file to the URL.

/// - On failure, responds with [`SdkError`](crate::operation::start_attachment_upload::StartAttachmentUploadError) pub fn start_attachment_upload(&self) -> crate::operation::start_attachment_upload::builders::StartAttachmentUploadFluentBuilder { crate::operation::start_attachment_upload::builders::StartAttachmentUploadFluentBuilder::new(self.handle.clone()) diff --git a/sdk/connectparticipant/src/error_meta.rs b/sdk/connectparticipant/src/error_meta.rs index d1b13a81ff7a..4f4bd465b918 100644 --- a/sdk/connectparticipant/src/error_meta.rs +++ b/sdk/connectparticipant/src/error_meta.rs @@ -68,6 +68,50 @@ impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error { } } } +impl + From< + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError, + R, + >, + > for Error +where + R: Send + Sync + std::fmt::Debug + 'static, +{ + fn from( + err: ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError, + R, + >, + ) -> 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::cancel_participant_authentication::CancelParticipantAuthenticationError) -> Self { + match err { + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::AccessDeniedException(inner) => { + Error::AccessDeniedException(inner) + } + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::InternalServerException(inner) => { + Error::InternalServerException(inner) + } + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::ThrottlingException(inner) => { + Error::ThrottlingException(inner) + } + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::ValidationException(inner) => { + Error::ValidationException(inner) + } + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::Unhandled(inner) => Error::Unhandled(inner), + } + } +} impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error where @@ -224,6 +268,33 @@ impl From for Error { } } } +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::get_authentication_url::GetAuthenticationUrlError) -> Self { + match err { + crate::operation::get_authentication_url::GetAuthenticationUrlError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), + crate::operation::get_authentication_url::GetAuthenticationUrlError::InternalServerException(inner) => { + Error::InternalServerException(inner) + } + crate::operation::get_authentication_url::GetAuthenticationUrlError::ThrottlingException(inner) => Error::ThrottlingException(inner), + crate::operation::get_authentication_url::GetAuthenticationUrlError::ValidationException(inner) => Error::ValidationException(inner), + crate::operation::get_authentication_url::GetAuthenticationUrlError::Unhandled(inner) => Error::Unhandled(inner), + } + } +} impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error where R: Send + Sync + std::fmt::Debug + 'static, diff --git a/sdk/connectparticipant/src/lib.rs b/sdk/connectparticipant/src/lib.rs index 8d2cc1aba3ed..5a5f33879bb9 100644 --- a/sdk/connectparticipant/src/lib.rs +++ b/sdk/connectparticipant/src/lib.rs @@ -17,6 +17,9 @@ #![forbid(unsafe_code)] #![warn(missing_docs)] #![cfg_attr(docsrs, feature(doc_auto_cfg))] +//! - [Participant Service actions](https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Participant_Service.html) +//! - [Participant Service data types](https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Participant_Service.html) +//! //! Amazon Connect is an easy-to-use omnichannel cloud contact center service that enables companies of any size to deliver superior customer service at a lower cost. Amazon Connect communications capabilities make it easy for companies to deliver personalized interactions across communication channels, including chat. //! //! Use the Amazon Connect Participant Service to manage participants (for example, agents, customers, and managers listening in), and to send messages and events within a chat contact. The APIs in the service enable the following: sending chat messages, attachment sharing, managing a participant's connection state and message events, and retrieving chat transcripts. @@ -33,7 +36,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-connectparticipant = "1.52.0" +//! aws-sdk-connectparticipant = "1.53.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! @@ -150,14 +153,14 @@ pub use config::Config; /// # Using the `Client` /// /// A client has a function for every operation that can be performed by the service. -/// For example, the [`CompleteAttachmentUpload`](crate::operation::complete_attachment_upload) operation has -/// a [`Client::complete_attachment_upload`], function which returns a builder for that operation. +/// For example, the [`CancelParticipantAuthentication`](crate::operation::cancel_participant_authentication) operation has +/// a [`Client::cancel_participant_authentication`], function which returns a builder for that operation. /// The fluent builder ultimately has a `send()` function that returns an async future that /// returns a result, as illustrated below: /// /// ```rust,ignore -/// let result = client.complete_attachment_upload() -/// .client_token("example") +/// let result = client.cancel_participant_authentication() +/// .session_id("example") /// .send() /// .await; /// ``` diff --git a/sdk/connectparticipant/src/operation.rs b/sdk/connectparticipant/src/operation.rs index f59c86515a73..f5df3dc4d6a0 100644 --- a/sdk/connectparticipant/src/operation.rs +++ b/sdk/connectparticipant/src/operation.rs @@ -1,6 +1,9 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. pub use ::aws_types::request_id::RequestId; +/// Types for the `CancelParticipantAuthentication` operation. +pub mod cancel_participant_authentication; + /// Types for the `CompleteAttachmentUpload` operation. pub mod complete_attachment_upload; @@ -16,6 +19,9 @@ pub mod disconnect_participant; /// Types for the `GetAttachment` operation. pub mod get_attachment; +/// Types for the `GetAuthenticationUrl` operation. +pub mod get_authentication_url; + /// Types for the `GetTranscript` operation. pub mod get_transcript; diff --git a/sdk/connectparticipant/src/operation/cancel_participant_authentication.rs b/sdk/connectparticipant/src/operation/cancel_participant_authentication.rs new file mode 100644 index 000000000000..f39525185e1a --- /dev/null +++ b/sdk/connectparticipant/src/operation/cancel_participant_authentication.rs @@ -0,0 +1,394 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `CancelParticipantAuthentication`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CancelParticipantAuthentication; +impl CancelParticipantAuthentication { + /// Creates a new `CancelParticipantAuthentication` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationInput, + ) -> ::std::result::Result< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError, + ::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::cancel_participant_authentication::CancelParticipantAuthenticationInput, + 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( + "connectparticipant", + "CancelParticipantAuthentication", + 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 CancelParticipantAuthentication { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CancelParticipantAuthentication"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + CancelParticipantAuthenticationRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + CancelParticipantAuthenticationResponseDeserializer, + )); + + 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( + "CancelParticipantAuthentication", + "connectparticipant", + )); + 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("CancelParticipantAuthentication") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(CancelParticipantAuthenticationEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct CancelParticipantAuthenticationResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CancelParticipantAuthenticationResponseDeserializer { + 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_cancel_participant_authentication::de_cancel_participant_authentication_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_cancel_participant_authentication::de_cancel_participant_authentication_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct CancelParticipantAuthenticationRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CancelParticipantAuthenticationRequestSerializer { + #[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::cancel_participant_authentication::CancelParticipantAuthenticationInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/participant/cancel-authentication").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationInput, + 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)?; + let builder = + crate::protocol_serde::shape_cancel_participant_authentication::ser_cancel_participant_authentication_headers(input, builder)?; + ::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_cancel_participant_authentication::ser_cancel_participant_authentication_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 CancelParticipantAuthenticationEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CancelParticipantAuthenticationEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "CancelParticipantAuthenticationEndpointParamsInterceptor" + } + + 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 CancelParticipantAuthenticationInput")?; + + 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(()) + } +} + +// The get_* functions below are generated from JMESPath expressions in the +// operationContextParams trait. They target the operation's input shape. + +/// Error type for the `CancelParticipantAuthenticationError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum CancelParticipantAuthenticationError { + ///

You do not have sufficient access to perform this action.

+ AccessDeniedException(crate::types::error::AccessDeniedException), + ///

This exception occurs when there is an internal failure in the Amazon Connect service.

+ InternalServerException(crate::types::error::InternalServerException), + ///

The request was denied due to request throttling.

+ ThrottlingException(crate::types::error::ThrottlingException), + ///

The input fails to satisfy the constraints specified by Amazon Connect.

+ ValidationException(crate::types::error::ValidationException), + /// 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-CancelParticipantAuthenticationError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl CancelParticipantAuthenticationError { + /// Creates the `CancelParticipantAuthenticationError::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 `CancelParticipantAuthenticationError::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::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `CancelParticipantAuthenticationError::AccessDeniedException`. + pub fn is_access_denied_exception(&self) -> bool { + matches!(self, Self::AccessDeniedException(_)) + } + /// Returns `true` if the error kind is `CancelParticipantAuthenticationError::InternalServerException`. + pub fn is_internal_server_exception(&self) -> bool { + matches!(self, Self::InternalServerException(_)) + } + /// Returns `true` if the error kind is `CancelParticipantAuthenticationError::ThrottlingException`. + pub fn is_throttling_exception(&self) -> bool { + matches!(self, Self::ThrottlingException(_)) + } + /// Returns `true` if the error kind is `CancelParticipantAuthenticationError::ValidationException`. + pub fn is_validation_exception(&self) -> bool { + matches!(self, Self::ValidationException(_)) + } +} +impl ::std::error::Error for CancelParticipantAuthenticationError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), + Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), + Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), + Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for CancelParticipantAuthenticationError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::AccessDeniedException(_inner) => _inner.fmt(f), + Self::InternalServerException(_inner) => _inner.fmt(f), + Self::ThrottlingException(_inner) => _inner.fmt(f), + Self::ValidationException(_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 CancelParticipantAuthenticationError { + 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 CancelParticipantAuthenticationError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CancelParticipantAuthenticationError { + 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::cancel_participant_authentication::CancelParticipantAuthenticationError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::cancel_participant_authentication::_cancel_participant_authentication_output::CancelParticipantAuthenticationOutput; + +pub use crate::operation::cancel_participant_authentication::_cancel_participant_authentication_input::CancelParticipantAuthenticationInput; + +mod _cancel_participant_authentication_input; + +mod _cancel_participant_authentication_output; + +/// Builders +pub mod builders; diff --git a/sdk/connectparticipant/src/operation/cancel_participant_authentication/_cancel_participant_authentication_input.rs b/sdk/connectparticipant/src/operation/cancel_participant_authentication/_cancel_participant_authentication_input.rs new file mode 100644 index 000000000000..d76cf3d42443 --- /dev/null +++ b/sdk/connectparticipant/src/operation/cancel_participant_authentication/_cancel_participant_authentication_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 CancelParticipantAuthenticationInput { + ///

The sessionId provided in the authenticationInitiated event.

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

The authentication token associated with the participant's connection.

+ pub connection_token: ::std::option::Option<::std::string::String>, +} +impl CancelParticipantAuthenticationInput { + ///

The sessionId provided in the authenticationInitiated event.

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

The authentication token associated with the participant's connection.

+ pub fn connection_token(&self) -> ::std::option::Option<&str> { + self.connection_token.as_deref() + } +} +impl CancelParticipantAuthenticationInput { + /// Creates a new builder-style object to manufacture [`CancelParticipantAuthenticationInput`](crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationInput). + pub fn builder() -> crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationInputBuilder { + crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationInputBuilder::default() + } +} + +/// A builder for [`CancelParticipantAuthenticationInput`](crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CancelParticipantAuthenticationInputBuilder { + pub(crate) session_id: ::std::option::Option<::std::string::String>, + pub(crate) connection_token: ::std::option::Option<::std::string::String>, +} +impl CancelParticipantAuthenticationInputBuilder { + ///

The sessionId provided in the authenticationInitiated event.

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

The sessionId provided in the authenticationInitiated event.

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

The sessionId provided in the authenticationInitiated event.

+ pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> { + &self.session_id + } + ///

The authentication token associated with the participant's connection.

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

The authentication token associated with the participant's connection.

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

The authentication token associated with the participant's connection.

+ pub fn get_connection_token(&self) -> &::std::option::Option<::std::string::String> { + &self.connection_token + } + /// Consumes the builder and constructs a [`CancelParticipantAuthenticationInput`](crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok( + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationInput { + session_id: self.session_id, + connection_token: self.connection_token, + }, + ) + } +} diff --git a/sdk/connectparticipant/src/operation/cancel_participant_authentication/_cancel_participant_authentication_output.rs b/sdk/connectparticipant/src/operation/cancel_participant_authentication/_cancel_participant_authentication_output.rs new file mode 100644 index 000000000000..262e7bb987fe --- /dev/null +++ b/sdk/connectparticipant/src/operation/cancel_participant_authentication/_cancel_participant_authentication_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 CancelParticipantAuthenticationOutput { + _request_id: Option, +} +impl ::aws_types::request_id::RequestId for CancelParticipantAuthenticationOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl CancelParticipantAuthenticationOutput { + /// Creates a new builder-style object to manufacture [`CancelParticipantAuthenticationOutput`](crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationOutput). + pub fn builder() -> crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationOutputBuilder { + crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationOutputBuilder::default() + } +} + +/// A builder for [`CancelParticipantAuthenticationOutput`](crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CancelParticipantAuthenticationOutputBuilder { + _request_id: Option, +} +impl CancelParticipantAuthenticationOutputBuilder { + 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 [`CancelParticipantAuthenticationOutput`](crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationOutput). + pub fn build(self) -> crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationOutput { + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationOutput { + _request_id: self._request_id, + } + } +} diff --git a/sdk/connectparticipant/src/operation/cancel_participant_authentication/builders.rs b/sdk/connectparticipant/src/operation/cancel_participant_authentication/builders.rs new file mode 100644 index 000000000000..ee762994d035 --- /dev/null +++ b/sdk/connectparticipant/src/operation/cancel_participant_authentication/builders.rs @@ -0,0 +1,141 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::cancel_participant_authentication::_cancel_participant_authentication_output::CancelParticipantAuthenticationOutputBuilder; + +pub use crate::operation::cancel_participant_authentication::_cancel_participant_authentication_input::CancelParticipantAuthenticationInputBuilder; + +impl crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.cancel_participant_authentication(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CancelParticipantAuthentication`. +/// +///

Cancels the authentication session. The opted out branch of the Authenticate Customer flow block will be taken.

+///

The current supported channel is chat. This API is not supported for Apple Messages for Business, WhatsApp, or SMS chats.

+///
+#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CancelParticipantAuthenticationFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationOutput, + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError, + > for CancelParticipantAuthenticationFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationOutput, + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl CancelParticipantAuthenticationFluentBuilder { + /// Creates a new `CancelParticipantAuthenticationFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the CancelParticipantAuthentication as a reference. + pub fn as_input(&self) -> &crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationInputBuilder { + &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::cancel_participant_authentication::CancelParticipantAuthenticationOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError, + ::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::cancel_participant_authentication::CancelParticipantAuthentication::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::cancel_participant_authentication::CancelParticipantAuthentication::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::cancel_participant_authentication::CancelParticipantAuthenticationOutput, + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError, + 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 sessionId provided in the authenticationInitiated event.

+ pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.session_id(input.into()); + self + } + ///

The sessionId provided in the authenticationInitiated event.

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

The sessionId provided in the authenticationInitiated event.

+ pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_session_id() + } + ///

The authentication token associated with the participant's connection.

+ pub fn connection_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.connection_token(input.into()); + self + } + ///

The authentication token associated with the participant's connection.

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

The authentication token associated with the participant's connection.

+ pub fn get_connection_token(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_connection_token() + } +} diff --git a/sdk/connectparticipant/src/operation/complete_attachment_upload/builders.rs b/sdk/connectparticipant/src/operation/complete_attachment_upload/builders.rs index 130b3554d6ef..ca609c35f013 100644 --- a/sdk/connectparticipant/src/operation/complete_attachment_upload/builders.rs +++ b/sdk/connectparticipant/src/operation/complete_attachment_upload/builders.rs @@ -22,7 +22,8 @@ impl crate::operation::complete_attachment_upload::builders::CompleteAttachmentU } /// Fluent builder constructing a request to `CompleteAttachmentUpload`. /// -///

Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in StartAttachmentUpload API. A conflict exception is thrown when an attachment with that identifier is already being uploaded.

+///

Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in StartAttachmentUpload API. A conflict exception is thrown when an attachment with that identifier is already being uploaded.

+///

For security recommendations, see Amazon Connect Chat security best practices.

///

ConnectionToken is used for invoking this API instead of ParticipantToken.

///
///

The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.

diff --git a/sdk/connectparticipant/src/operation/create_participant_connection/builders.rs b/sdk/connectparticipant/src/operation/create_participant_connection/builders.rs index cde71f913fae..d1d06f5c19dd 100644 --- a/sdk/connectparticipant/src/operation/create_participant_connection/builders.rs +++ b/sdk/connectparticipant/src/operation/create_participant_connection/builders.rs @@ -22,7 +22,8 @@ impl crate::operation::create_participant_connection::builders::CreateParticipan } /// Fluent builder constructing a request to `CreateParticipantConnection`. /// -///

Creates the participant's connection.

+///

Creates the participant's connection.

+///

For security recommendations, see Amazon Connect Chat security best practices.

///

ParticipantToken is used for invoking this API instead of ConnectionToken.

///
///

The participant token is valid for the lifetime of the participant – until they are part of a contact.

diff --git a/sdk/connectparticipant/src/operation/describe_view/builders.rs b/sdk/connectparticipant/src/operation/describe_view/builders.rs index c04337ba1303..f2e4d61bf285 100644 --- a/sdk/connectparticipant/src/operation/describe_view/builders.rs +++ b/sdk/connectparticipant/src/operation/describe_view/builders.rs @@ -23,6 +23,7 @@ impl crate::operation::describe_view::builders::DescribeViewInputBuilder { /// Fluent builder constructing a request to `DescribeView`. /// ///

Retrieves the view for the specified view token.

+///

For security recommendations, see Amazon Connect Chat security best practices.

#[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct DescribeViewFluentBuilder { handle: ::std::sync::Arc, diff --git a/sdk/connectparticipant/src/operation/disconnect_participant/builders.rs b/sdk/connectparticipant/src/operation/disconnect_participant/builders.rs index e31b8f5ba2b3..391eb9ea96e9 100644 --- a/sdk/connectparticipant/src/operation/disconnect_participant/builders.rs +++ b/sdk/connectparticipant/src/operation/disconnect_participant/builders.rs @@ -22,7 +22,8 @@ impl crate::operation::disconnect_participant::builders::DisconnectParticipantIn } /// Fluent builder constructing a request to `DisconnectParticipant`. /// -///

Disconnects a participant.

+///

Disconnects a participant.

+///

For security recommendations, see Amazon Connect Chat security best practices.

///

ConnectionToken is used for invoking this API instead of ParticipantToken.

///
///

The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.

diff --git a/sdk/connectparticipant/src/operation/get_attachment/_get_attachment_input.rs b/sdk/connectparticipant/src/operation/get_attachment/_get_attachment_input.rs index 5188ca75cb3e..a786486129c5 100644 --- a/sdk/connectparticipant/src/operation/get_attachment/_get_attachment_input.rs +++ b/sdk/connectparticipant/src/operation/get_attachment/_get_attachment_input.rs @@ -7,6 +7,8 @@ pub struct GetAttachmentInput { pub attachment_id: ::std::option::Option<::std::string::String>, ///

The authentication token associated with the participant's connection.

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

The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

+ pub url_expiry_in_seconds: ::std::option::Option, } impl GetAttachmentInput { ///

A unique identifier for the attachment.

@@ -17,6 +19,10 @@ impl GetAttachmentInput { pub fn connection_token(&self) -> ::std::option::Option<&str> { self.connection_token.as_deref() } + ///

The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

+ pub fn url_expiry_in_seconds(&self) -> ::std::option::Option { + self.url_expiry_in_seconds + } } impl GetAttachmentInput { /// Creates a new builder-style object to manufacture [`GetAttachmentInput`](crate::operation::get_attachment::GetAttachmentInput). @@ -31,6 +37,7 @@ impl GetAttachmentInput { pub struct GetAttachmentInputBuilder { pub(crate) attachment_id: ::std::option::Option<::std::string::String>, pub(crate) connection_token: ::std::option::Option<::std::string::String>, + pub(crate) url_expiry_in_seconds: ::std::option::Option, } impl GetAttachmentInputBuilder { ///

A unique identifier for the attachment.

@@ -63,6 +70,20 @@ impl GetAttachmentInputBuilder { pub fn get_connection_token(&self) -> &::std::option::Option<::std::string::String> { &self.connection_token } + ///

The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

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

The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

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

The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

+ pub fn get_url_expiry_in_seconds(&self) -> &::std::option::Option { + &self.url_expiry_in_seconds + } /// Consumes the builder and constructs a [`GetAttachmentInput`](crate::operation::get_attachment::GetAttachmentInput). pub fn build( self, @@ -70,6 +91,7 @@ impl GetAttachmentInputBuilder { ::std::result::Result::Ok(crate::operation::get_attachment::GetAttachmentInput { attachment_id: self.attachment_id, connection_token: self.connection_token, + url_expiry_in_seconds: self.url_expiry_in_seconds, }) } } diff --git a/sdk/connectparticipant/src/operation/get_attachment/_get_attachment_output.rs b/sdk/connectparticipant/src/operation/get_attachment/_get_attachment_output.rs index 2231111ad886..dc4b3ba7f1db 100644 --- a/sdk/connectparticipant/src/operation/get_attachment/_get_attachment_output.rs +++ b/sdk/connectparticipant/src/operation/get_attachment/_get_attachment_output.rs @@ -7,6 +7,8 @@ pub struct GetAttachmentOutput { pub url: ::std::option::Option<::std::string::String>, ///

The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

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

The size of the attachment in bytes.

+ pub attachment_size_in_bytes: i64, _request_id: Option, } impl GetAttachmentOutput { @@ -18,6 +20,10 @@ impl GetAttachmentOutput { pub fn url_expiry(&self) -> ::std::option::Option<&str> { self.url_expiry.as_deref() } + ///

The size of the attachment in bytes.

+ pub fn attachment_size_in_bytes(&self) -> i64 { + self.attachment_size_in_bytes + } } impl ::aws_types::request_id::RequestId for GetAttachmentOutput { fn request_id(&self) -> Option<&str> { @@ -37,6 +43,7 @@ impl GetAttachmentOutput { pub struct GetAttachmentOutputBuilder { pub(crate) url: ::std::option::Option<::std::string::String>, pub(crate) url_expiry: ::std::option::Option<::std::string::String>, + pub(crate) attachment_size_in_bytes: ::std::option::Option, _request_id: Option, } impl GetAttachmentOutputBuilder { @@ -68,6 +75,21 @@ impl GetAttachmentOutputBuilder { pub fn get_url_expiry(&self) -> &::std::option::Option<::std::string::String> { &self.url_expiry } + ///

The size of the attachment in bytes.

+ /// This field is required. + pub fn attachment_size_in_bytes(mut self, input: i64) -> Self { + self.attachment_size_in_bytes = ::std::option::Option::Some(input); + self + } + ///

The size of the attachment in bytes.

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

The size of the attachment in bytes.

+ pub fn get_attachment_size_in_bytes(&self) -> &::std::option::Option { + &self.attachment_size_in_bytes + } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -78,11 +100,21 @@ impl GetAttachmentOutputBuilder { self } /// Consumes the builder and constructs a [`GetAttachmentOutput`](crate::operation::get_attachment::GetAttachmentOutput). - pub fn build(self) -> crate::operation::get_attachment::GetAttachmentOutput { - crate::operation::get_attachment::GetAttachmentOutput { + /// This method will fail if any of the following fields are not set: + /// - [`attachment_size_in_bytes`](crate::operation::get_attachment::builders::GetAttachmentOutputBuilder::attachment_size_in_bytes) + pub fn build( + self, + ) -> ::std::result::Result { + ::std::result::Result::Ok(crate::operation::get_attachment::GetAttachmentOutput { url: self.url, url_expiry: self.url_expiry, + attachment_size_in_bytes: self.attachment_size_in_bytes.ok_or_else(|| { + ::aws_smithy_types::error::operation::BuildError::missing_field( + "attachment_size_in_bytes", + "attachment_size_in_bytes was not specified but it is required when building GetAttachmentOutput", + ) + })?, _request_id: self._request_id, - } + }) } } diff --git a/sdk/connectparticipant/src/operation/get_attachment/builders.rs b/sdk/connectparticipant/src/operation/get_attachment/builders.rs index 4bc461d79622..245a8b53d6bd 100644 --- a/sdk/connectparticipant/src/operation/get_attachment/builders.rs +++ b/sdk/connectparticipant/src/operation/get_attachment/builders.rs @@ -22,7 +22,8 @@ impl crate::operation::get_attachment::builders::GetAttachmentInputBuilder { } /// Fluent builder constructing a request to `GetAttachment`. /// -///

Provides a pre-signed URL for download of a completed attachment. This is an asynchronous API for use with active contacts.

+///

Provides a pre-signed URL for download of a completed attachment. This is an asynchronous API for use with active contacts.

+///

For security recommendations, see Amazon Connect Chat security best practices.

///

ConnectionToken is used for invoking this API instead of ParticipantToken.

///
///

The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.

@@ -139,4 +140,18 @@ impl GetAttachmentFluentBuilder { pub fn get_connection_token(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_connection_token() } + ///

The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

+ pub fn url_expiry_in_seconds(mut self, input: i32) -> Self { + self.inner = self.inner.url_expiry_in_seconds(input); + self + } + ///

The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

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

The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

+ pub fn get_url_expiry_in_seconds(&self) -> &::std::option::Option { + self.inner.get_url_expiry_in_seconds() + } } diff --git a/sdk/connectparticipant/src/operation/get_authentication_url.rs b/sdk/connectparticipant/src/operation/get_authentication_url.rs new file mode 100644 index 000000000000..dcbadbdb6efc --- /dev/null +++ b/sdk/connectparticipant/src/operation/get_authentication_url.rs @@ -0,0 +1,393 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `GetAuthenticationUrl`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetAuthenticationUrl; +impl GetAuthenticationUrl { + /// Creates a new `GetAuthenticationUrl` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::get_authentication_url::GetAuthenticationUrlInput, + ) -> ::std::result::Result< + crate::operation::get_authentication_url::GetAuthenticationUrlOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::get_authentication_url::GetAuthenticationUrlError, + ::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::get_authentication_url::GetAuthenticationUrlInput, + 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( + "connectparticipant", + "GetAuthenticationUrl", + 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 GetAuthenticationUrl { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetAuthenticationUrl"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + GetAuthenticationUrlRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + GetAuthenticationUrlResponseDeserializer, + )); + + 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( + "GetAuthenticationUrl", + "connectparticipant", + )); + 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("GetAuthenticationUrl") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(GetAuthenticationUrlEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::get_authentication_url::GetAuthenticationUrlError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::get_authentication_url::GetAuthenticationUrlError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::get_authentication_url::GetAuthenticationUrlError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct GetAuthenticationUrlResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetAuthenticationUrlResponseDeserializer { + 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_get_authentication_url::de_get_authentication_url_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_get_authentication_url::de_get_authentication_url_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct GetAuthenticationUrlRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetAuthenticationUrlRequestSerializer { + #[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::get_authentication_url::GetAuthenticationUrlInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/participant/authentication-url").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::get_authentication_url::GetAuthenticationUrlInput, + 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)?; + let builder = crate::protocol_serde::shape_get_authentication_url::ser_get_authentication_url_headers(input, builder)?; + ::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_get_authentication_url::ser_get_authentication_url_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 GetAuthenticationUrlEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetAuthenticationUrlEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "GetAuthenticationUrlEndpointParamsInterceptor" + } + + 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 GetAuthenticationUrlInput")?; + + 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(()) + } +} + +// The get_* functions below are generated from JMESPath expressions in the +// operationContextParams trait. They target the operation's input shape. + +/// Error type for the `GetAuthenticationUrlError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum GetAuthenticationUrlError { + ///

You do not have sufficient access to perform this action.

+ AccessDeniedException(crate::types::error::AccessDeniedException), + ///

This exception occurs when there is an internal failure in the Amazon Connect service.

+ InternalServerException(crate::types::error::InternalServerException), + ///

The request was denied due to request throttling.

+ ThrottlingException(crate::types::error::ThrottlingException), + ///

The input fails to satisfy the constraints specified by Amazon Connect.

+ ValidationException(crate::types::error::ValidationException), + /// 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-GetAuthenticationUrlError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl GetAuthenticationUrlError { + /// Creates the `GetAuthenticationUrlError::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 `GetAuthenticationUrlError::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::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `GetAuthenticationUrlError::AccessDeniedException`. + pub fn is_access_denied_exception(&self) -> bool { + matches!(self, Self::AccessDeniedException(_)) + } + /// Returns `true` if the error kind is `GetAuthenticationUrlError::InternalServerException`. + pub fn is_internal_server_exception(&self) -> bool { + matches!(self, Self::InternalServerException(_)) + } + /// Returns `true` if the error kind is `GetAuthenticationUrlError::ThrottlingException`. + pub fn is_throttling_exception(&self) -> bool { + matches!(self, Self::ThrottlingException(_)) + } + /// Returns `true` if the error kind is `GetAuthenticationUrlError::ValidationException`. + pub fn is_validation_exception(&self) -> bool { + matches!(self, Self::ValidationException(_)) + } +} +impl ::std::error::Error for GetAuthenticationUrlError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), + Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), + Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), + Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for GetAuthenticationUrlError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::AccessDeniedException(_inner) => _inner.fmt(f), + Self::InternalServerException(_inner) => _inner.fmt(f), + Self::ThrottlingException(_inner) => _inner.fmt(f), + Self::ValidationException(_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 GetAuthenticationUrlError { + 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 GetAuthenticationUrlError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetAuthenticationUrlError { + 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::get_authentication_url::GetAuthenticationUrlError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::get_authentication_url::_get_authentication_url_output::GetAuthenticationUrlOutput; + +pub use crate::operation::get_authentication_url::_get_authentication_url_input::GetAuthenticationUrlInput; + +mod _get_authentication_url_input; + +mod _get_authentication_url_output; + +/// Builders +pub mod builders; diff --git a/sdk/connectparticipant/src/operation/get_authentication_url/_get_authentication_url_input.rs b/sdk/connectparticipant/src/operation/get_authentication_url/_get_authentication_url_input.rs new file mode 100644 index 000000000000..99e7f9e401a8 --- /dev/null +++ b/sdk/connectparticipant/src/operation/get_authentication_url/_get_authentication_url_input.rs @@ -0,0 +1,99 @@ +// 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 GetAuthenticationUrlInput { + ///

The sessionId provided in the authenticationInitiated event.

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

The URL where the customer will be redirected after Amazon Cognito authorizes the user.

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

The authentication token associated with the participant's connection.

+ pub connection_token: ::std::option::Option<::std::string::String>, +} +impl GetAuthenticationUrlInput { + ///

The sessionId provided in the authenticationInitiated event.

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

The URL where the customer will be redirected after Amazon Cognito authorizes the user.

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

The authentication token associated with the participant's connection.

+ pub fn connection_token(&self) -> ::std::option::Option<&str> { + self.connection_token.as_deref() + } +} +impl GetAuthenticationUrlInput { + /// Creates a new builder-style object to manufacture [`GetAuthenticationUrlInput`](crate::operation::get_authentication_url::GetAuthenticationUrlInput). + pub fn builder() -> crate::operation::get_authentication_url::builders::GetAuthenticationUrlInputBuilder { + crate::operation::get_authentication_url::builders::GetAuthenticationUrlInputBuilder::default() + } +} + +/// A builder for [`GetAuthenticationUrlInput`](crate::operation::get_authentication_url::GetAuthenticationUrlInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetAuthenticationUrlInputBuilder { + pub(crate) session_id: ::std::option::Option<::std::string::String>, + pub(crate) redirect_uri: ::std::option::Option<::std::string::String>, + pub(crate) connection_token: ::std::option::Option<::std::string::String>, +} +impl GetAuthenticationUrlInputBuilder { + ///

The sessionId provided in the authenticationInitiated event.

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

The sessionId provided in the authenticationInitiated event.

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

The sessionId provided in the authenticationInitiated event.

+ pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> { + &self.session_id + } + ///

The URL where the customer will be redirected after Amazon Cognito authorizes the user.

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

The URL where the customer will be redirected after Amazon Cognito authorizes the user.

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

The URL where the customer will be redirected after Amazon Cognito authorizes the user.

+ pub fn get_redirect_uri(&self) -> &::std::option::Option<::std::string::String> { + &self.redirect_uri + } + ///

The authentication token associated with the participant's connection.

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

The authentication token associated with the participant's connection.

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

The authentication token associated with the participant's connection.

+ pub fn get_connection_token(&self) -> &::std::option::Option<::std::string::String> { + &self.connection_token + } + /// Consumes the builder and constructs a [`GetAuthenticationUrlInput`](crate::operation::get_authentication_url::GetAuthenticationUrlInput). + pub fn build( + self, + ) -> ::std::result::Result + { + ::std::result::Result::Ok(crate::operation::get_authentication_url::GetAuthenticationUrlInput { + session_id: self.session_id, + redirect_uri: self.redirect_uri, + connection_token: self.connection_token, + }) + } +} diff --git a/sdk/connectparticipant/src/operation/get_authentication_url/_get_authentication_url_output.rs b/sdk/connectparticipant/src/operation/get_authentication_url/_get_authentication_url_output.rs new file mode 100644 index 000000000000..f9b76842d487 --- /dev/null +++ b/sdk/connectparticipant/src/operation/get_authentication_url/_get_authentication_url_output.rs @@ -0,0 +1,66 @@ +// 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 GetAuthenticationUrlOutput { + ///

The URL where the customer will sign in to the identity provider. This URL contains the authorize endpoint for the Cognito UserPool used in the authentication.

+ pub authentication_url: ::std::option::Option<::std::string::String>, + _request_id: Option, +} +impl GetAuthenticationUrlOutput { + ///

The URL where the customer will sign in to the identity provider. This URL contains the authorize endpoint for the Cognito UserPool used in the authentication.

+ pub fn authentication_url(&self) -> ::std::option::Option<&str> { + self.authentication_url.as_deref() + } +} +impl ::aws_types::request_id::RequestId for GetAuthenticationUrlOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl GetAuthenticationUrlOutput { + /// Creates a new builder-style object to manufacture [`GetAuthenticationUrlOutput`](crate::operation::get_authentication_url::GetAuthenticationUrlOutput). + pub fn builder() -> crate::operation::get_authentication_url::builders::GetAuthenticationUrlOutputBuilder { + crate::operation::get_authentication_url::builders::GetAuthenticationUrlOutputBuilder::default() + } +} + +/// A builder for [`GetAuthenticationUrlOutput`](crate::operation::get_authentication_url::GetAuthenticationUrlOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetAuthenticationUrlOutputBuilder { + pub(crate) authentication_url: ::std::option::Option<::std::string::String>, + _request_id: Option, +} +impl GetAuthenticationUrlOutputBuilder { + ///

The URL where the customer will sign in to the identity provider. This URL contains the authorize endpoint for the Cognito UserPool used in the authentication.

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

The URL where the customer will sign in to the identity provider. This URL contains the authorize endpoint for the Cognito UserPool used in the authentication.

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

The URL where the customer will sign in to the identity provider. This URL contains the authorize endpoint for the Cognito UserPool used in the authentication.

+ pub fn get_authentication_url(&self) -> &::std::option::Option<::std::string::String> { + &self.authentication_url + } + 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 [`GetAuthenticationUrlOutput`](crate::operation::get_authentication_url::GetAuthenticationUrlOutput). + pub fn build(self) -> crate::operation::get_authentication_url::GetAuthenticationUrlOutput { + crate::operation::get_authentication_url::GetAuthenticationUrlOutput { + authentication_url: self.authentication_url, + _request_id: self._request_id, + } + } +} diff --git a/sdk/connectparticipant/src/operation/get_authentication_url/builders.rs b/sdk/connectparticipant/src/operation/get_authentication_url/builders.rs new file mode 100644 index 000000000000..24322aa6d50e --- /dev/null +++ b/sdk/connectparticipant/src/operation/get_authentication_url/builders.rs @@ -0,0 +1,161 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::get_authentication_url::_get_authentication_url_output::GetAuthenticationUrlOutputBuilder; + +pub use crate::operation::get_authentication_url::_get_authentication_url_input::GetAuthenticationUrlInputBuilder; + +impl crate::operation::get_authentication_url::builders::GetAuthenticationUrlInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::get_authentication_url::GetAuthenticationUrlOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::get_authentication_url::GetAuthenticationUrlError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.get_authentication_url(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetAuthenticationUrl`. +/// +///

Retrieves the AuthenticationUrl for the current authentication session for the AuthenticateCustomer flow block.

+///

For security recommendations, see Amazon Connect Chat security best practices.

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

    This API can only be called within one minute of receiving the authenticationInitiated event.

  • +///
  • +///

    The current supported channel is chat. This API is not supported for Apple Messages for Business, WhatsApp, or SMS chats.

  • +///
+///
+#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetAuthenticationUrlFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::get_authentication_url::builders::GetAuthenticationUrlInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::get_authentication_url::GetAuthenticationUrlOutput, + crate::operation::get_authentication_url::GetAuthenticationUrlError, + > for GetAuthenticationUrlFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::get_authentication_url::GetAuthenticationUrlOutput, + crate::operation::get_authentication_url::GetAuthenticationUrlError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl GetAuthenticationUrlFluentBuilder { + /// Creates a new `GetAuthenticationUrlFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the GetAuthenticationUrl as a reference. + pub fn as_input(&self) -> &crate::operation::get_authentication_url::builders::GetAuthenticationUrlInputBuilder { + &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::get_authentication_url::GetAuthenticationUrlOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::get_authentication_url::GetAuthenticationUrlError, + ::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::get_authentication_url::GetAuthenticationUrl::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::get_authentication_url::GetAuthenticationUrl::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::get_authentication_url::GetAuthenticationUrlOutput, + crate::operation::get_authentication_url::GetAuthenticationUrlError, + 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 sessionId provided in the authenticationInitiated event.

+ pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.session_id(input.into()); + self + } + ///

The sessionId provided in the authenticationInitiated event.

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

The sessionId provided in the authenticationInitiated event.

+ pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_session_id() + } + ///

The URL where the customer will be redirected after Amazon Cognito authorizes the user.

+ pub fn redirect_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.redirect_uri(input.into()); + self + } + ///

The URL where the customer will be redirected after Amazon Cognito authorizes the user.

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

The URL where the customer will be redirected after Amazon Cognito authorizes the user.

+ pub fn get_redirect_uri(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_redirect_uri() + } + ///

The authentication token associated with the participant's connection.

+ pub fn connection_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.connection_token(input.into()); + self + } + ///

The authentication token associated with the participant's connection.

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

The authentication token associated with the participant's connection.

+ pub fn get_connection_token(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_connection_token() + } +} diff --git a/sdk/connectparticipant/src/operation/get_transcript/builders.rs b/sdk/connectparticipant/src/operation/get_transcript/builders.rs index 4ebd36af1692..27d2fd9bc422 100644 --- a/sdk/connectparticipant/src/operation/get_transcript/builders.rs +++ b/sdk/connectparticipant/src/operation/get_transcript/builders.rs @@ -23,6 +23,7 @@ impl crate::operation::get_transcript::builders::GetTranscriptInputBuilder { /// Fluent builder constructing a request to `GetTranscript`. /// ///

Retrieves a transcript of the session, including details about any attachments. For information about accessing past chat contact transcripts for a persistent chat, see Enable persistent chat.

+///

For security recommendations, see Amazon Connect Chat security best practices.

///

If you have a process that consumes events in the transcript of an chat that has ended, note that chat transcripts contain the following event content types if the event has occurred during the chat session:

///
    ///
  • diff --git a/sdk/connectparticipant/src/operation/send_event/builders.rs b/sdk/connectparticipant/src/operation/send_event/builders.rs index 1497c5bcd71e..41c0378b374a 100644 --- a/sdk/connectparticipant/src/operation/send_event/builders.rs +++ b/sdk/connectparticipant/src/operation/send_event/builders.rs @@ -25,7 +25,8 @@ impl crate::operation::send_event::builders::SendEventInputBuilder { /// ///

    The application/vnd.amazonaws.connect.event.connection.acknowledged ContentType will no longer be supported starting December 31, 2024. This event has been migrated to the CreateParticipantConnection API using the ConnectParticipant field.

    ///
    -///

    Sends an event. Message receipts are not supported when there are more than two active participants in the chat. Using the SendEvent API for message receipts when a supervisor is barged-in will result in a conflict exception.

    +///

    Sends an event. Message receipts are not supported when there are more than two active participants in the chat. Using the SendEvent API for message receipts when a supervisor is barged-in will result in a conflict exception.

    +///

    For security recommendations, see Amazon Connect Chat security best practices.

    ///

    ConnectionToken is used for invoking this API instead of ParticipantToken.

    ///
    ///

    The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.

    diff --git a/sdk/connectparticipant/src/operation/send_message/builders.rs b/sdk/connectparticipant/src/operation/send_message/builders.rs index b7d2f840707e..02b9587c43d5 100644 --- a/sdk/connectparticipant/src/operation/send_message/builders.rs +++ b/sdk/connectparticipant/src/operation/send_message/builders.rs @@ -22,7 +22,8 @@ impl crate::operation::send_message::builders::SendMessageInputBuilder { } /// Fluent builder constructing a request to `SendMessage`. /// -///

    Sends a message.

    +///

    Sends a message.

    +///

    For security recommendations, see Amazon Connect Chat security best practices.

    ///

    ConnectionToken is used for invoking this API instead of ParticipantToken.

    ///
    ///

    The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.

    diff --git a/sdk/connectparticipant/src/operation/start_attachment_upload/_start_attachment_upload_output.rs b/sdk/connectparticipant/src/operation/start_attachment_upload/_start_attachment_upload_output.rs index 4808de83e21c..d18accaf961e 100644 --- a/sdk/connectparticipant/src/operation/start_attachment_upload/_start_attachment_upload_output.rs +++ b/sdk/connectparticipant/src/operation/start_attachment_upload/_start_attachment_upload_output.rs @@ -5,7 +5,7 @@ pub struct StartAttachmentUploadOutput { ///

    A unique identifier for the attachment.

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

    Fields to be used while uploading the attachment.

    + ///

    The headers to be provided while uploading the file to the URL.

    pub upload_metadata: ::std::option::Option, _request_id: Option, } @@ -14,7 +14,7 @@ impl StartAttachmentUploadOutput { pub fn attachment_id(&self) -> ::std::option::Option<&str> { self.attachment_id.as_deref() } - ///

    Fields to be used while uploading the attachment.

    + ///

    The headers to be provided while uploading the file to the URL.

    pub fn upload_metadata(&self) -> ::std::option::Option<&crate::types::UploadMetadata> { self.upload_metadata.as_ref() } @@ -54,17 +54,17 @@ impl StartAttachmentUploadOutputBuilder { pub fn get_attachment_id(&self) -> &::std::option::Option<::std::string::String> { &self.attachment_id } - ///

    Fields to be used while uploading the attachment.

    + ///

    The headers to be provided while uploading the file to the URL.

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

    Fields to be used while uploading the attachment.

    + ///

    The headers to be provided while uploading the file to the URL.

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

    Fields to be used while uploading the attachment.

    + ///

    The headers to be provided while uploading the file to the URL.

    pub fn get_upload_metadata(&self) -> &::std::option::Option { &self.upload_metadata } diff --git a/sdk/connectparticipant/src/operation/start_attachment_upload/builders.rs b/sdk/connectparticipant/src/operation/start_attachment_upload/builders.rs index d88231845eb2..97099a7639d2 100644 --- a/sdk/connectparticipant/src/operation/start_attachment_upload/builders.rs +++ b/sdk/connectparticipant/src/operation/start_attachment_upload/builders.rs @@ -22,7 +22,8 @@ impl crate::operation::start_attachment_upload::builders::StartAttachmentUploadI } /// Fluent builder constructing a request to `StartAttachmentUpload`. /// -///

    Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.

    +///

    Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.

    +///

    For security recommendations, see Amazon Connect Chat security best practices.

    ///

    ConnectionToken is used for invoking this API instead of ParticipantToken.

    ///
    ///

    The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.

    diff --git a/sdk/connectparticipant/src/protocol_serde.rs b/sdk/connectparticipant/src/protocol_serde.rs index 64b2199f7bb0..6c7f13c91bc2 100644 --- a/sdk/connectparticipant/src/protocol_serde.rs +++ b/sdk/connectparticipant/src/protocol_serde.rs @@ -23,6 +23,8 @@ pub fn parse_http_error_metadata( crate::json_errors::parse_error_metadata(response_body, response_headers) } +pub(crate) mod shape_cancel_participant_authentication; + pub(crate) mod shape_complete_attachment_upload; pub(crate) mod shape_create_participant_connection; @@ -33,6 +35,8 @@ pub(crate) mod shape_disconnect_participant; pub(crate) mod shape_get_attachment; +pub(crate) mod shape_get_authentication_url; + pub(crate) mod shape_get_transcript; pub(crate) mod shape_send_event; @@ -51,6 +55,8 @@ pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] { pub(crate) mod shape_access_denied_exception; +pub(crate) mod shape_cancel_participant_authentication_input; + pub(crate) mod shape_complete_attachment_upload_input; pub(crate) mod shape_conflict_exception; @@ -61,6 +67,8 @@ pub(crate) mod shape_disconnect_participant_input; pub(crate) mod shape_get_attachment_input; +pub(crate) mod shape_get_authentication_url_input; + pub(crate) mod shape_get_transcript_input; pub(crate) mod shape_internal_server_exception; diff --git a/sdk/connectparticipant/src/protocol_serde/shape_cancel_participant_authentication.rs b/sdk/connectparticipant/src/protocol_serde/shape_cancel_participant_authentication.rs new file mode 100644 index 000000000000..239a650d8d17 --- /dev/null +++ b/sdk/connectparticipant/src/protocol_serde/shape_cancel_participant_authentication.rs @@ -0,0 +1,130 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_cancel_participant_authentication_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationOutput, + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::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::cancel_participant_authentication::CancelParticipantAuthenticationError::unhandled(generic)), + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "AccessDeniedException" => { + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::AccessDeniedException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); + output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) + .map_err(crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::unhandled)?; + let output = output.meta(generic); + crate::serde_util::access_denied_exception_correct_errors(output) + .build() + .map_err(crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::unhandled)? + }; + tmp + }) + } + "InternalServerException" => { + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::InternalServerException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) + .map_err(crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::unhandled)?; + let output = output.meta(generic); + crate::serde_util::internal_server_exception_correct_errors(output) + .build() + .map_err(crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::unhandled)? + }; + tmp + }) + } + "ThrottlingException" => crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::ThrottlingException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); + output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) + .map_err(crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::unhandled)?; + let output = output.meta(generic); + crate::serde_util::throttling_exception_correct_errors(output) + .build() + .map_err(crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::unhandled)? + }; + tmp + }), + "ValidationException" => crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::ValidationException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); + output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) + .map_err(crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::unhandled)?; + let output = output.meta(generic); + crate::serde_util::validation_exception_correct_errors(output) + .build() + .map_err(crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::unhandled)? + }; + tmp + }), + _ => crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_cancel_participant_authentication_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationOutput, + crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::cancel_participant_authentication::builders::CancelParticipantAuthenticationOutputBuilder::default(); + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_cancel_participant_authentication_headers( + input: &crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationInput, + mut builder: ::http::request::Builder, +) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { + if let ::std::option::Option::Some(inner_1) = &input.connection_token { + let formatted_2 = inner_1.as_str(); + let header_value = formatted_2; + let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| { + ::aws_smithy_types::error::operation::BuildError::invalid_field( + "connection_token", + format!("`{}` cannot be used as a header value: {}", &header_value, err), + ) + })?; + builder = builder.header("X-Amz-Bearer", header_value); + } + Ok(builder) +} + +pub fn ser_cancel_participant_authentication_input( + input: &crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationInput, +) -> 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_cancel_participant_authentication_input::ser_cancel_participant_authentication_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} diff --git a/sdk/connectparticipant/src/protocol_serde/shape_cancel_participant_authentication_input.rs b/sdk/connectparticipant/src/protocol_serde/shape_cancel_participant_authentication_input.rs new file mode 100644 index 000000000000..585636112738 --- /dev/null +++ b/sdk/connectparticipant/src/protocol_serde/shape_cancel_participant_authentication_input.rs @@ -0,0 +1,10 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_cancel_participant_authentication_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.session_id { + object.key("SessionId").string(var_1.as_str()); + } + Ok(()) +} diff --git a/sdk/connectparticipant/src/protocol_serde/shape_get_attachment.rs b/sdk/connectparticipant/src/protocol_serde/shape_get_attachment.rs index 767d1a0e3a72..0dc49cc0f85e 100644 --- a/sdk/connectparticipant/src/protocol_serde/shape_get_attachment.rs +++ b/sdk/connectparticipant/src/protocol_serde/shape_get_attachment.rs @@ -89,7 +89,9 @@ pub fn de_get_attachment_http_response( output = crate::protocol_serde::shape_get_attachment::de_get_attachment(_response_body, output) .map_err(crate::operation::get_attachment::GetAttachmentError::unhandled)?; output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - output.build() + crate::serde_util::get_attachment_output_output_correct_errors(output) + .build() + .map_err(crate::operation::get_attachment::GetAttachmentError::unhandled)? }) } @@ -132,6 +134,13 @@ pub(crate) fn de_get_attachment( 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() { + "AttachmentSizeInBytes" => { + builder = builder.set_attachment_size_in_bytes( + ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())? + .map(i64::try_from) + .transpose()?, + ); + } "Url" => { builder = builder.set_url( ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? diff --git a/sdk/connectparticipant/src/protocol_serde/shape_get_attachment_input.rs b/sdk/connectparticipant/src/protocol_serde/shape_get_attachment_input.rs index a21abd0d649a..6304d9a6aa31 100644 --- a/sdk/connectparticipant/src/protocol_serde/shape_get_attachment_input.rs +++ b/sdk/connectparticipant/src/protocol_serde/shape_get_attachment_input.rs @@ -6,5 +6,11 @@ pub fn ser_get_attachment_input_input( if let Some(var_1) = &input.attachment_id { object.key("AttachmentId").string(var_1.as_str()); } + if let Some(var_2) = &input.url_expiry_in_seconds { + object.key("UrlExpiryInSeconds").number( + #[allow(clippy::useless_conversion)] + ::aws_smithy_types::Number::NegInt((*var_2).into()), + ); + } Ok(()) } diff --git a/sdk/connectparticipant/src/protocol_serde/shape_get_authentication_url.rs b/sdk/connectparticipant/src/protocol_serde/shape_get_authentication_url.rs new file mode 100644 index 000000000000..6c88721c4b45 --- /dev/null +++ b/sdk/connectparticipant/src/protocol_serde/shape_get_authentication_url.rs @@ -0,0 +1,167 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_get_authentication_url_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::get_authentication_url::GetAuthenticationUrlOutput, + crate::operation::get_authentication_url::GetAuthenticationUrlError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::get_authentication_url::GetAuthenticationUrlError::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::get_authentication_url::GetAuthenticationUrlError::unhandled(generic)), + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "AccessDeniedException" => crate::operation::get_authentication_url::GetAuthenticationUrlError::AccessDeniedException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); + output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) + .map_err(crate::operation::get_authentication_url::GetAuthenticationUrlError::unhandled)?; + let output = output.meta(generic); + crate::serde_util::access_denied_exception_correct_errors(output) + .build() + .map_err(crate::operation::get_authentication_url::GetAuthenticationUrlError::unhandled)? + }; + tmp + }), + "InternalServerException" => crate::operation::get_authentication_url::GetAuthenticationUrlError::InternalServerException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) + .map_err(crate::operation::get_authentication_url::GetAuthenticationUrlError::unhandled)?; + let output = output.meta(generic); + crate::serde_util::internal_server_exception_correct_errors(output) + .build() + .map_err(crate::operation::get_authentication_url::GetAuthenticationUrlError::unhandled)? + }; + tmp + }), + "ThrottlingException" => crate::operation::get_authentication_url::GetAuthenticationUrlError::ThrottlingException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); + output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) + .map_err(crate::operation::get_authentication_url::GetAuthenticationUrlError::unhandled)?; + let output = output.meta(generic); + crate::serde_util::throttling_exception_correct_errors(output) + .build() + .map_err(crate::operation::get_authentication_url::GetAuthenticationUrlError::unhandled)? + }; + tmp + }), + "ValidationException" => crate::operation::get_authentication_url::GetAuthenticationUrlError::ValidationException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); + output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) + .map_err(crate::operation::get_authentication_url::GetAuthenticationUrlError::unhandled)?; + let output = output.meta(generic); + crate::serde_util::validation_exception_correct_errors(output) + .build() + .map_err(crate::operation::get_authentication_url::GetAuthenticationUrlError::unhandled)? + }; + tmp + }), + _ => crate::operation::get_authentication_url::GetAuthenticationUrlError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_get_authentication_url_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::get_authentication_url::GetAuthenticationUrlOutput, + crate::operation::get_authentication_url::GetAuthenticationUrlError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::get_authentication_url::builders::GetAuthenticationUrlOutputBuilder::default(); + output = crate::protocol_serde::shape_get_authentication_url::de_get_authentication_url(_response_body, output) + .map_err(crate::operation::get_authentication_url::GetAuthenticationUrlError::unhandled)?; + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_get_authentication_url_headers( + input: &crate::operation::get_authentication_url::GetAuthenticationUrlInput, + mut builder: ::http::request::Builder, +) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { + if let ::std::option::Option::Some(inner_1) = &input.connection_token { + let formatted_2 = inner_1.as_str(); + let header_value = formatted_2; + let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| { + ::aws_smithy_types::error::operation::BuildError::invalid_field( + "connection_token", + format!("`{}` cannot be used as a header value: {}", &header_value, err), + ) + })?; + builder = builder.header("X-Amz-Bearer", header_value); + } + Ok(builder) +} + +pub fn ser_get_authentication_url_input( + input: &crate::operation::get_authentication_url::GetAuthenticationUrlInput, +) -> 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_get_authentication_url_input::ser_get_authentication_url_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} + +pub(crate) fn de_get_authentication_url( + value: &[u8], + mut builder: crate::operation::get_authentication_url::builders::GetAuthenticationUrlOutputBuilder, +) -> Result< + crate::operation::get_authentication_url::builders::GetAuthenticationUrlOutputBuilder, + ::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() { + "AuthenticationUrl" => { + builder = builder.set_authentication_url( + ::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/connectparticipant/src/protocol_serde/shape_get_authentication_url_input.rs b/sdk/connectparticipant/src/protocol_serde/shape_get_authentication_url_input.rs new file mode 100644 index 000000000000..c97770ce15c0 --- /dev/null +++ b/sdk/connectparticipant/src/protocol_serde/shape_get_authentication_url_input.rs @@ -0,0 +1,13 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_get_authentication_url_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::get_authentication_url::GetAuthenticationUrlInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.redirect_uri { + object.key("RedirectUri").string(var_1.as_str()); + } + if let Some(var_2) = &input.session_id { + object.key("SessionId").string(var_2.as_str()); + } + Ok(()) +} diff --git a/sdk/connectparticipant/src/serde_util.rs b/sdk/connectparticipant/src/serde_util.rs index df4f9ff94a8e..074627ec72ef 100644 --- a/sdk/connectparticipant/src/serde_util.rs +++ b/sdk/connectparticipant/src/serde_util.rs @@ -8,47 +8,56 @@ pub(crate) fn access_denied_exception_correct_errors( builder } -pub(crate) fn conflict_exception_correct_errors( - mut builder: crate::types::error::builders::ConflictExceptionBuilder, -) -> crate::types::error::builders::ConflictExceptionBuilder { +pub(crate) fn internal_server_exception_correct_errors( + mut builder: crate::types::error::builders::InternalServerExceptionBuilder, +) -> crate::types::error::builders::InternalServerExceptionBuilder { if builder.message.is_none() { builder.message = Some(Default::default()) } builder } -pub(crate) fn internal_server_exception_correct_errors( - mut builder: crate::types::error::builders::InternalServerExceptionBuilder, -) -> crate::types::error::builders::InternalServerExceptionBuilder { +pub(crate) fn throttling_exception_correct_errors( + mut builder: crate::types::error::builders::ThrottlingExceptionBuilder, +) -> crate::types::error::builders::ThrottlingExceptionBuilder { if builder.message.is_none() { builder.message = Some(Default::default()) } builder } -pub(crate) fn service_quota_exceeded_exception_correct_errors( - mut builder: crate::types::error::builders::ServiceQuotaExceededExceptionBuilder, -) -> crate::types::error::builders::ServiceQuotaExceededExceptionBuilder { +pub(crate) fn validation_exception_correct_errors( + mut builder: crate::types::error::builders::ValidationExceptionBuilder, +) -> crate::types::error::builders::ValidationExceptionBuilder { if builder.message.is_none() { builder.message = Some(Default::default()) } builder } -pub(crate) fn throttling_exception_correct_errors( - mut builder: crate::types::error::builders::ThrottlingExceptionBuilder, -) -> crate::types::error::builders::ThrottlingExceptionBuilder { +pub(crate) fn conflict_exception_correct_errors( + mut builder: crate::types::error::builders::ConflictExceptionBuilder, +) -> crate::types::error::builders::ConflictExceptionBuilder { if builder.message.is_none() { builder.message = Some(Default::default()) } builder } -pub(crate) fn validation_exception_correct_errors( - mut builder: crate::types::error::builders::ValidationExceptionBuilder, -) -> crate::types::error::builders::ValidationExceptionBuilder { +pub(crate) fn service_quota_exceeded_exception_correct_errors( + mut builder: crate::types::error::builders::ServiceQuotaExceededExceptionBuilder, +) -> crate::types::error::builders::ServiceQuotaExceededExceptionBuilder { if builder.message.is_none() { builder.message = Some(Default::default()) } builder } + +pub(crate) fn get_attachment_output_output_correct_errors( + mut builder: crate::operation::get_attachment::builders::GetAttachmentOutputBuilder, +) -> crate::operation::get_attachment::builders::GetAttachmentOutputBuilder { + if builder.attachment_size_in_bytes.is_none() { + builder.attachment_size_in_bytes = Some(Default::default()) + } + builder +} diff --git a/sdk/datasync/Cargo.toml b/sdk/datasync/Cargo.toml index 75fa524cfb8b..b9bf3d9ac88f 100644 --- a/sdk/datasync/Cargo.toml +++ b/sdk/datasync/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-datasync" -version = "1.55.0" +version = "1.56.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for AWS DataSync" edition = "2021" diff --git a/sdk/datasync/README.md b/sdk/datasync/README.md index 7f5ea873db30..5acd6216b01a 100644 --- a/sdk/datasync/README.md +++ b/sdk/datasync/README.md @@ -16,7 +16,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-datasync = "1.55.0" +aws-sdk-datasync = "1.56.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/datasync/src/client.rs b/sdk/datasync/src/client.rs index f69c42cbd59f..5aa150169aef 100644 --- a/sdk/datasync/src/client.rs +++ b/sdk/datasync/src/client.rs @@ -269,12 +269,24 @@ mod update_discovery_job; mod update_location_azure_blob; +mod update_location_efs; + +mod update_location_fsx_lustre; + +mod update_location_fsx_ontap; + +mod update_location_fsx_open_zfs; + +mod update_location_fsx_windows; + mod update_location_hdfs; mod update_location_nfs; mod update_location_object_storage; +mod update_location_s3; + mod update_location_smb; mod update_storage_system; diff --git a/sdk/datasync/src/client/create_location_efs.rs b/sdk/datasync/src/client/create_location_efs.rs index aa8d594713af..1fb2e1de4caa 100644 --- a/sdk/datasync/src/client/create_location_efs.rs +++ b/sdk/datasync/src/client/create_location_efs.rs @@ -3,7 +3,7 @@ impl super::Client { /// Constructs a fluent builder for the [`CreateLocationEfs`](crate::operation::create_location_efs::builders::CreateLocationEfsFluentBuilder) operation. /// /// - The fluent builder is configurable: - /// - [`subdirectory(impl Into)`](crate::operation::create_location_efs::builders::CreateLocationEfsFluentBuilder::subdirectory) / [`set_subdirectory(Option)`](crate::operation::create_location_efs::builders::CreateLocationEfsFluentBuilder::set_subdirectory):
    required: **false**

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location) on your file system.

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).


    + /// - [`subdirectory(impl Into)`](crate::operation::create_location_efs::builders::CreateLocationEfsFluentBuilder::subdirectory) / [`set_subdirectory(Option)`](crate::operation::create_location_efs::builders::CreateLocationEfsFluentBuilder::set_subdirectory):
    required: **false**

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).


    /// - [`efs_filesystem_arn(impl Into)`](crate::operation::create_location_efs::builders::CreateLocationEfsFluentBuilder::efs_filesystem_arn) / [`set_efs_filesystem_arn(Option)`](crate::operation::create_location_efs::builders::CreateLocationEfsFluentBuilder::set_efs_filesystem_arn):
    required: **true**

    Specifies the ARN for your Amazon EFS file system.


    /// - [`ec2_config(Ec2Config)`](crate::operation::create_location_efs::builders::CreateLocationEfsFluentBuilder::ec2_config) / [`set_ec2_config(Option)`](crate::operation::create_location_efs::builders::CreateLocationEfsFluentBuilder::set_ec2_config):
    required: **true**

    Specifies the subnet and security groups DataSync uses to connect to one of your Amazon EFS file system's mount targets.


    /// - [`tags(TagListEntry)`](crate::operation::create_location_efs::builders::CreateLocationEfsFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_location_efs::builders::CreateLocationEfsFluentBuilder::set_tags):
    required: **false**

    Specifies the key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.


    diff --git a/sdk/datasync/src/client/create_location_fsx_lustre.rs b/sdk/datasync/src/client/create_location_fsx_lustre.rs index d1d567c05ef5..99c69d4b48c4 100644 --- a/sdk/datasync/src/client/create_location_fsx_lustre.rs +++ b/sdk/datasync/src/client/create_location_fsx_lustre.rs @@ -3,12 +3,12 @@ impl super::Client { /// Constructs a fluent builder for the [`CreateLocationFsxLustre`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder) operation. /// /// - The fluent builder is configurable: - /// - [`fsx_filesystem_arn(impl Into)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::fsx_filesystem_arn) / [`set_fsx_filesystem_arn(Option)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::set_fsx_filesystem_arn):
    required: **true**

    The Amazon Resource Name (ARN) for the FSx for Lustre file system.


    - /// - [`security_group_arns(impl Into)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::security_group_arns) / [`set_security_group_arns(Option>)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::set_security_group_arns):
    required: **true**

    The Amazon Resource Names (ARNs) of the security groups that are used to configure the FSx for Lustre file system.


    - /// - [`subdirectory(impl Into)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::subdirectory) / [`set_subdirectory(Option)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::set_subdirectory):
    required: **false**

    A subdirectory in the location's path. This subdirectory in the FSx for Lustre file system is used to read data from the FSx for Lustre source location or write data to the FSx for Lustre destination.


    - /// - [`tags(TagListEntry)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::set_tags):
    required: **false**

    The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.


    + /// - [`fsx_filesystem_arn(impl Into)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::fsx_filesystem_arn) / [`set_fsx_filesystem_arn(Option)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::set_fsx_filesystem_arn):
    required: **true**

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre file system.


    + /// - [`security_group_arns(impl Into)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::security_group_arns) / [`set_security_group_arns(Option>)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::set_security_group_arns):
    required: **true**

    Specifies the Amazon Resource Names (ARNs) of up to five security groups that provide access to your FSx for Lustre file system.

    The security groups must be able to access the file system's ports. The file system must also allow access from the security groups. For information about file system access, see the Amazon FSx for Lustre User Guide .


    + /// - [`subdirectory(impl Into)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::subdirectory) / [`set_subdirectory(Option)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::set_subdirectory):
    required: **false**

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).


    + /// - [`tags(TagListEntry)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::set_tags):
    required: **false**

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.


    /// - On success, responds with [`CreateLocationFsxLustreOutput`](crate::operation::create_location_fsx_lustre::CreateLocationFsxLustreOutput) with field(s): - /// - [`location_arn(Option)`](crate::operation::create_location_fsx_lustre::CreateLocationFsxLustreOutput::location_arn):

    The Amazon Resource Name (ARN) of the FSx for Lustre file system location that's created.

    + /// - [`location_arn(Option)`](crate::operation::create_location_fsx_lustre::CreateLocationFsxLustreOutput::location_arn):

    The Amazon Resource Name (ARN) of the FSx for Lustre file system location that you created.

    /// - On failure, responds with [`SdkError`](crate::operation::create_location_fsx_lustre::CreateLocationFsxLustreError) pub fn create_location_fsx_lustre(&self) -> crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder { crate::operation::create_location_fsx_lustre::builders::CreateLocationFsxLustreFluentBuilder::new(self.handle.clone()) diff --git a/sdk/datasync/src/client/create_location_fsx_ontap.rs b/sdk/datasync/src/client/create_location_fsx_ontap.rs index f2fe34f0c8c1..abefe5c675b9 100644 --- a/sdk/datasync/src/client/create_location_fsx_ontap.rs +++ b/sdk/datasync/src/client/create_location_fsx_ontap.rs @@ -6,7 +6,7 @@ impl super::Client { /// - [`protocol(FsxProtocol)`](crate::operation::create_location_fsx_ontap::builders::CreateLocationFsxOntapFluentBuilder::protocol) / [`set_protocol(Option)`](crate::operation::create_location_fsx_ontap::builders::CreateLocationFsxOntapFluentBuilder::set_protocol):
    required: **true**

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.


    /// - [`security_group_arns(impl Into)`](crate::operation::create_location_fsx_ontap::builders::CreateLocationFsxOntapFluentBuilder::security_group_arns) / [`set_security_group_arns(Option>)`](crate::operation::create_location_fsx_ontap::builders::CreateLocationFsxOntapFluentBuilder::set_security_group_arns):
    required: **true**

    Specifies the Amazon EC2 security groups that provide access to your file system's preferred subnet.

    The security groups must allow outbound traffic on the following ports (depending on the protocol you use):

    • Network File System (NFS): TCP ports 111, 635, and 2049

    • Server Message Block (SMB): TCP port 445

    Your file system's security groups must also allow inbound traffic on the same ports.


    /// - [`storage_virtual_machine_arn(impl Into)`](crate::operation::create_location_fsx_ontap::builders::CreateLocationFsxOntapFluentBuilder::storage_virtual_machine_arn) / [`set_storage_virtual_machine_arn(Option)`](crate::operation::create_location_fsx_ontap::builders::CreateLocationFsxOntapFluentBuilder::set_storage_virtual_machine_arn):
    required: **true**

    Specifies the ARN of the storage virtual machine (SVM) in your file system where you want to copy data to or from.


    - /// - [`subdirectory(impl Into)`](crate::operation::create_location_fsx_ontap::builders::CreateLocationFsxOntapFluentBuilder::subdirectory) / [`set_subdirectory(Option)`](crate::operation::create_location_fsx_ontap::builders::CreateLocationFsxOntapFluentBuilder::set_subdirectory):
    required: **false**

    Specifies a path to the file share in the SVM where you'll copy your data.

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.


    + /// - [`subdirectory(impl Into)`](crate::operation::create_location_fsx_ontap::builders::CreateLocationFsxOntapFluentBuilder::subdirectory) / [`set_subdirectory(Option)`](crate::operation::create_location_fsx_ontap::builders::CreateLocationFsxOntapFluentBuilder::set_subdirectory):
    required: **false**

    Specifies a path to the file share in the SVM where you want to transfer data to or from.

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.


    /// - [`tags(TagListEntry)`](crate::operation::create_location_fsx_ontap::builders::CreateLocationFsxOntapFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_location_fsx_ontap::builders::CreateLocationFsxOntapFluentBuilder::set_tags):
    required: **false**

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.


    /// - On success, responds with [`CreateLocationFsxOntapOutput`](crate::operation::create_location_fsx_ontap::CreateLocationFsxOntapOutput) with field(s): /// - [`location_arn(Option)`](crate::operation::create_location_fsx_ontap::CreateLocationFsxOntapOutput::location_arn):

    Specifies the ARN of the FSx for ONTAP file system location that you create.

    diff --git a/sdk/datasync/src/client/create_location_fsx_windows.rs b/sdk/datasync/src/client/create_location_fsx_windows.rs index e9dbd2504cac..63a01f237bfa 100644 --- a/sdk/datasync/src/client/create_location_fsx_windows.rs +++ b/sdk/datasync/src/client/create_location_fsx_windows.rs @@ -8,7 +8,7 @@ impl super::Client { /// - [`security_group_arns(impl Into)`](crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsFluentBuilder::security_group_arns) / [`set_security_group_arns(Option>)`](crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsFluentBuilder::set_security_group_arns):
    required: **true**

    Specifies the ARNs of the Amazon EC2 security groups that provide access to your file system's preferred subnet.

    The security groups that you specify must be able to communicate with your file system's security groups. For information about configuring security groups for file system access, see the Amazon FSx for Windows File Server User Guide .

    If you choose a security group that doesn't allow connections from within itself, do one of the following:

    • Configure the security group to allow it to communicate within itself.

    • Choose a different security group that can communicate with the mount target's security group.


    /// - [`tags(TagListEntry)`](crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsFluentBuilder::set_tags):
    required: **false**

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.


    /// - [`user(impl Into)`](crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsFluentBuilder::user) / [`set_user(Option)`](crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsFluentBuilder::set_user):
    required: **true**

    Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.


    - /// - [`domain(impl Into)`](crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsFluentBuilder::domain) / [`set_domain(Option)`](crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsFluentBuilder::set_domain):
    required: **false**

    Specifies the name of the Microsoft Active Directory domain that the FSx for Windows File Server file system belongs to.

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.


    + /// - [`domain(impl Into)`](crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsFluentBuilder::domain) / [`set_domain(Option)`](crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsFluentBuilder::set_domain):
    required: **false**

    Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.


    /// - [`password(impl Into)`](crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsFluentBuilder::password) / [`set_password(Option)`](crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsFluentBuilder::set_password):
    required: **true**

    Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.


    /// - On success, responds with [`CreateLocationFsxWindowsOutput`](crate::operation::create_location_fsx_windows::CreateLocationFsxWindowsOutput) with field(s): /// - [`location_arn(Option)`](crate::operation::create_location_fsx_windows::CreateLocationFsxWindowsOutput::location_arn):

    The ARN of the FSx for Windows File Server file system location you created.

    diff --git a/sdk/datasync/src/client/create_location_s3.rs b/sdk/datasync/src/client/create_location_s3.rs index 5ea05e816024..a05b0c2d32d8 100644 --- a/sdk/datasync/src/client/create_location_s3.rs +++ b/sdk/datasync/src/client/create_location_s3.rs @@ -6,7 +6,7 @@ impl super::Client { /// - [`subdirectory(impl Into)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::subdirectory) / [`set_subdirectory(Option)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::set_subdirectory):
    required: **false**

    Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location).

    DataSync can't transfer objects with a prefix that begins with a slash (/) or includes //, /./, or /../ patterns. For example:

    • /photos

    • photos//2006/January

    • photos/./2006/February

    • photos/../2006/March


    /// - [`s3_bucket_arn(impl Into)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::s3_bucket_arn) / [`set_s3_bucket_arn(Option)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::set_s3_bucket_arn):
    required: **true**

    Specifies the ARN of the S3 bucket that you want to use as a location. (When creating your DataSync task later, you specify whether this location is a transfer source or destination.)

    If your S3 bucket is located on an Outposts resource, you must specify an Amazon S3 access point. For more information, see Managing data access with Amazon S3 access points in the Amazon S3 User Guide.


    /// - [`s3_storage_class(S3StorageClass)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::s3_storage_class) / [`set_s3_storage_class(Option)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::set_s3_storage_class):
    required: **false**

    Specifies the storage class that you want your objects to use when Amazon S3 is a transfer destination.

    For buckets in Amazon Web Services Regions, the storage class defaults to STANDARD. For buckets on Outposts, the storage class defaults to OUTPOSTS.

    For more information, see Storage class considerations with Amazon S3 transfers.


    - /// - [`s3_config(S3Config)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::s3_config) / [`set_s3_config(Option)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::set_s3_config):
    required: **true**

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    For more information, see Accessing S3 buckets.


    + /// - [`s3_config(S3Config)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::s3_config) / [`set_s3_config(Option)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::set_s3_config):
    required: **true**

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    For more information, see Providing DataSync access to S3 buckets.


    /// - [`agent_arns(impl Into)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::agent_arns) / [`set_agent_arns(Option>)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::set_agent_arns):
    required: **false**

    (Amazon S3 on Outposts only) Specifies the Amazon Resource Name (ARN) of the DataSync agent on your Outpost.

    For more information, see Deploy your DataSync agent on Outposts.


    /// - [`tags(TagListEntry)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_location_s3::builders::CreateLocationS3FluentBuilder::set_tags):
    required: **false**

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your transfer location.


    /// - On success, responds with [`CreateLocationS3Output`](crate::operation::create_location_s3::CreateLocationS3Output) with field(s): diff --git a/sdk/datasync/src/client/describe_location_s3.rs b/sdk/datasync/src/client/describe_location_s3.rs index e2d8a8b76507..486de071a773 100644 --- a/sdk/datasync/src/client/describe_location_s3.rs +++ b/sdk/datasync/src/client/describe_location_s3.rs @@ -8,7 +8,7 @@ impl super::Client { /// - [`location_arn(Option)`](crate::operation::describe_location_s3::DescribeLocationS3Output::location_arn):

    The ARN of the Amazon S3 location.

    /// - [`location_uri(Option)`](crate::operation::describe_location_s3::DescribeLocationS3Output::location_uri):

    The URL of the Amazon S3 location that was described.

    /// - [`s3_storage_class(Option)`](crate::operation::describe_location_s3::DescribeLocationS3Output::s3_storage_class):

    When Amazon S3 is a destination location, this is the storage class that you chose for your objects.

    Some storage classes have behaviors that can affect your Amazon S3 storage costs. For more information, see Storage class considerations with Amazon S3 transfers.

    - /// - [`s3_config(Option)`](crate::operation::describe_location_s3::DescribeLocationS3Output::s3_config):

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    For more information, see Accessing S3 buckets.

    + /// - [`s3_config(Option)`](crate::operation::describe_location_s3::DescribeLocationS3Output::s3_config):

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    For more information, see Providing DataSync access to S3 buckets.

    /// - [`agent_arns(Option>)`](crate::operation::describe_location_s3::DescribeLocationS3Output::agent_arns):

    The ARNs of the DataSync agents deployed on your Outpost when using working with Amazon S3 on Outposts.

    For more information, see Deploy your DataSync agent on Outposts.

    /// - [`creation_time(Option)`](crate::operation::describe_location_s3::DescribeLocationS3Output::creation_time):

    The time that the Amazon S3 location was created.

    /// - On failure, responds with [`SdkError`](crate::operation::describe_location_s3::DescribeLocationS3Error) diff --git a/sdk/datasync/src/client/update_location_efs.rs b/sdk/datasync/src/client/update_location_efs.rs new file mode 100644 index 000000000000..49f4c36303d0 --- /dev/null +++ b/sdk/datasync/src/client/update_location_efs.rs @@ -0,0 +1,16 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`UpdateLocationEfs`](crate::operation::update_location_efs::builders::UpdateLocationEfsFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`location_arn(impl Into)`](crate::operation::update_location_efs::builders::UpdateLocationEfsFluentBuilder::location_arn) / [`set_location_arn(Option)`](crate::operation::update_location_efs::builders::UpdateLocationEfsFluentBuilder::set_location_arn):
    required: **true**

    Specifies the Amazon Resource Name (ARN) of the Amazon EFS transfer location that you're updating.


    + /// - [`subdirectory(impl Into)`](crate::operation::update_location_efs::builders::UpdateLocationEfsFluentBuilder::subdirectory) / [`set_subdirectory(Option)`](crate::operation::update_location_efs::builders::UpdateLocationEfsFluentBuilder::set_subdirectory):
    required: **false**

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).


    + /// - [`access_point_arn(impl Into)`](crate::operation::update_location_efs::builders::UpdateLocationEfsFluentBuilder::access_point_arn) / [`set_access_point_arn(Option)`](crate::operation::update_location_efs::builders::UpdateLocationEfsFluentBuilder::set_access_point_arn):
    required: **false**

    Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.

    For more information, see Accessing restricted Amazon EFS file systems.


    + /// - [`file_system_access_role_arn(impl Into)`](crate::operation::update_location_efs::builders::UpdateLocationEfsFluentBuilder::file_system_access_role_arn) / [`set_file_system_access_role_arn(Option)`](crate::operation::update_location_efs::builders::UpdateLocationEfsFluentBuilder::set_file_system_access_role_arn):
    required: **false**

    Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.

    For information on creating this role, see Creating a DataSync IAM role for Amazon EFS file system access.


    + /// - [`in_transit_encryption(EfsInTransitEncryption)`](crate::operation::update_location_efs::builders::UpdateLocationEfsFluentBuilder::in_transit_encryption) / [`set_in_transit_encryption(Option)`](crate::operation::update_location_efs::builders::UpdateLocationEfsFluentBuilder::set_in_transit_encryption):
    required: **false**

    Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.

    If you specify an access point using AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this parameter to TLS1_2.


    + /// - On success, responds with [`UpdateLocationEfsOutput`](crate::operation::update_location_efs::UpdateLocationEfsOutput) + /// - On failure, responds with [`SdkError`](crate::operation::update_location_efs::UpdateLocationEfsError) + pub fn update_location_efs(&self) -> crate::operation::update_location_efs::builders::UpdateLocationEfsFluentBuilder { + crate::operation::update_location_efs::builders::UpdateLocationEfsFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/datasync/src/client/update_location_fsx_lustre.rs b/sdk/datasync/src/client/update_location_fsx_lustre.rs new file mode 100644 index 000000000000..9d9a9f354240 --- /dev/null +++ b/sdk/datasync/src/client/update_location_fsx_lustre.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 [`UpdateLocationFsxLustre`](crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`location_arn(impl Into)`](crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreFluentBuilder::location_arn) / [`set_location_arn(Option)`](crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreFluentBuilder::set_location_arn):
    required: **true**

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre transfer location that you're updating.


    + /// - [`subdirectory(impl Into)`](crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreFluentBuilder::subdirectory) / [`set_subdirectory(Option)`](crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreFluentBuilder::set_subdirectory):
    required: **false**

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).


    + /// - On success, responds with [`UpdateLocationFsxLustreOutput`](crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreOutput) + /// - On failure, responds with [`SdkError`](crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError) + pub fn update_location_fsx_lustre(&self) -> crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreFluentBuilder { + crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/datasync/src/client/update_location_fsx_ontap.rs b/sdk/datasync/src/client/update_location_fsx_ontap.rs new file mode 100644 index 000000000000..482e9ff782d2 --- /dev/null +++ b/sdk/datasync/src/client/update_location_fsx_ontap.rs @@ -0,0 +1,14 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`UpdateLocationFsxOntap`](crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`location_arn(impl Into)`](crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapFluentBuilder::location_arn) / [`set_location_arn(Option)`](crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapFluentBuilder::set_location_arn):
    required: **true**

    Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP transfer location that you're updating.


    + /// - [`protocol(FsxUpdateProtocol)`](crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapFluentBuilder::protocol) / [`set_protocol(Option)`](crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapFluentBuilder::set_protocol):
    required: **false**

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.


    + /// - [`subdirectory(impl Into)`](crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapFluentBuilder::subdirectory) / [`set_subdirectory(Option)`](crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapFluentBuilder::set_subdirectory):
    required: **false**

    Specifies a path to the file share in the storage virtual machine (SVM) where you want to transfer data to or from.

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.


    + /// - On success, responds with [`UpdateLocationFsxOntapOutput`](crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapOutput) + /// - On failure, responds with [`SdkError`](crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError) + pub fn update_location_fsx_ontap(&self) -> crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapFluentBuilder { + crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/datasync/src/client/update_location_fsx_open_zfs.rs b/sdk/datasync/src/client/update_location_fsx_open_zfs.rs new file mode 100644 index 000000000000..ca06d31d392c --- /dev/null +++ b/sdk/datasync/src/client/update_location_fsx_open_zfs.rs @@ -0,0 +1,14 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`UpdateLocationFsxOpenZfs`](crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`location_arn(impl Into)`](crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsFluentBuilder::location_arn) / [`set_location_arn(Option)`](crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsFluentBuilder::set_location_arn):
    required: **true**

    Specifies the Amazon Resource Name (ARN) of the FSx for OpenZFS transfer location that you're updating.


    + /// - [`protocol(FsxProtocol)`](crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsFluentBuilder::protocol) / [`set_protocol(Option)`](crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsFluentBuilder::set_protocol):
    required: **false**

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.


    + /// - [`subdirectory(impl Into)`](crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsFluentBuilder::subdirectory) / [`set_subdirectory(Option)`](crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsFluentBuilder::set_subdirectory):
    required: **false**

    Specifies a subdirectory in the location's path that must begin with /fsx. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).


    + /// - On success, responds with [`UpdateLocationFsxOpenZfsOutput`](crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput) + /// - On failure, responds with [`SdkError`](crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError) + pub fn update_location_fsx_open_zfs(&self) -> crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsFluentBuilder { + crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/datasync/src/client/update_location_fsx_windows.rs b/sdk/datasync/src/client/update_location_fsx_windows.rs new file mode 100644 index 000000000000..d24da339fea4 --- /dev/null +++ b/sdk/datasync/src/client/update_location_fsx_windows.rs @@ -0,0 +1,16 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`UpdateLocationFsxWindows`](crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`location_arn(impl Into)`](crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsFluentBuilder::location_arn) / [`set_location_arn(Option)`](crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsFluentBuilder::set_location_arn):
    required: **true**

    Specifies the ARN of the FSx for Windows File Server transfer location that you're updating.


    + /// - [`subdirectory(impl Into)`](crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsFluentBuilder::subdirectory) / [`set_subdirectory(Option)`](crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsFluentBuilder::set_subdirectory):
    required: **false**

    Specifies a mount path for your file system using forward slashes. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).


    + /// - [`domain(impl Into)`](crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsFluentBuilder::domain) / [`set_domain(Option)`](crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsFluentBuilder::set_domain):
    required: **false**

    Specifies the name of the Windows domain that your FSx for Windows File Server file system belongs to.

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.


    + /// - [`user(impl Into)`](crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsFluentBuilder::user) / [`set_user(Option)`](crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsFluentBuilder::set_user):
    required: **false**

    Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.


    + /// - [`password(impl Into)`](crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsFluentBuilder::password) / [`set_password(Option)`](crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsFluentBuilder::set_password):
    required: **false**

    Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.


    + /// - On success, responds with [`UpdateLocationFsxWindowsOutput`](crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsOutput) + /// - On failure, responds with [`SdkError`](crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError) + pub fn update_location_fsx_windows(&self) -> crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsFluentBuilder { + crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/datasync/src/client/update_location_s3.rs b/sdk/datasync/src/client/update_location_s3.rs new file mode 100644 index 000000000000..cb42b1b80f49 --- /dev/null +++ b/sdk/datasync/src/client/update_location_s3.rs @@ -0,0 +1,15 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`UpdateLocationS3`](crate::operation::update_location_s3::builders::UpdateLocationS3FluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`location_arn(impl Into)`](crate::operation::update_location_s3::builders::UpdateLocationS3FluentBuilder::location_arn) / [`set_location_arn(Option)`](crate::operation::update_location_s3::builders::UpdateLocationS3FluentBuilder::set_location_arn):
    required: **true**

    Specifies the Amazon Resource Name (ARN) of the Amazon S3 transfer location that you're updating.


    + /// - [`subdirectory(impl Into)`](crate::operation::update_location_s3::builders::UpdateLocationS3FluentBuilder::subdirectory) / [`set_subdirectory(Option)`](crate::operation::update_location_s3::builders::UpdateLocationS3FluentBuilder::set_subdirectory):
    required: **false**

    Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location).

    DataSync can't transfer objects with a prefix that begins with a slash (/) or includes //, /./, or /../ patterns. For example:

    • /photos

    • photos//2006/January

    • photos/./2006/February

    • photos/../2006/March


    + /// - [`s3_storage_class(S3StorageClass)`](crate::operation::update_location_s3::builders::UpdateLocationS3FluentBuilder::s3_storage_class) / [`set_s3_storage_class(Option)`](crate::operation::update_location_s3::builders::UpdateLocationS3FluentBuilder::set_s3_storage_class):
    required: **false**

    Specifies the storage class that you want your objects to use when Amazon S3 is a transfer destination.

    For buckets in Amazon Web Services Regions, the storage class defaults to STANDARD. For buckets on Outposts, the storage class defaults to OUTPOSTS.

    For more information, see Storage class considerations with Amazon S3 transfers.


    + /// - [`s3_config(S3Config)`](crate::operation::update_location_s3::builders::UpdateLocationS3FluentBuilder::s3_config) / [`set_s3_config(Option)`](crate::operation::update_location_s3::builders::UpdateLocationS3FluentBuilder::set_s3_config):
    required: **false**

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    For more information, see Providing DataSync access to S3 buckets.


    + /// - On success, responds with [`UpdateLocationS3Output`](crate::operation::update_location_s3::UpdateLocationS3Output) + /// - On failure, responds with [`SdkError`](crate::operation::update_location_s3::UpdateLocationS3Error) + pub fn update_location_s3(&self) -> crate::operation::update_location_s3::builders::UpdateLocationS3FluentBuilder { + crate::operation::update_location_s3::builders::UpdateLocationS3FluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/datasync/src/error_meta.rs b/sdk/datasync/src/error_meta.rs index a4fdcd8e12f2..8cb408db5709 100644 --- a/sdk/datasync/src/error_meta.rs +++ b/sdk/datasync/src/error_meta.rs @@ -1416,6 +1416,143 @@ 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::update_location_efs::UpdateLocationEfsError) -> Self { + match err { + crate::operation::update_location_efs::UpdateLocationEfsError::InternalException(inner) => Error::InternalException(inner), + crate::operation::update_location_efs::UpdateLocationEfsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner), + crate::operation::update_location_efs::UpdateLocationEfsError::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::update_location_fsx_lustre::UpdateLocationFsxLustreError) -> Self { + match err { + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError::InternalException(inner) => Error::InternalException(inner), + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError::InvalidRequestException(inner) => { + Error::InvalidRequestException(inner) + } + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError::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::update_location_fsx_ontap::UpdateLocationFsxOntapError) -> Self { + match err { + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError::InternalException(inner) => Error::InternalException(inner), + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError::InvalidRequestException(inner) => { + Error::InvalidRequestException(inner) + } + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError::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::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError) -> Self { + match err { + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError::InternalException(inner) => { + Error::InternalException(inner) + } + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError::InvalidRequestException(inner) => { + Error::InvalidRequestException(inner) + } + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError::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::update_location_fsx_windows::UpdateLocationFsxWindowsError) -> Self { + match err { + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError::InternalException(inner) => Error::InternalException(inner), + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError::InvalidRequestException(inner) => { + Error::InvalidRequestException(inner) + } + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError::Unhandled(inner) => Error::Unhandled(inner), + } + } +} impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error where R: Send + Sync + std::fmt::Debug + 'static, @@ -1496,6 +1633,29 @@ 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::update_location_s3::UpdateLocationS3Error) -> Self { + match err { + crate::operation::update_location_s3::UpdateLocationS3Error::InternalException(inner) => Error::InternalException(inner), + crate::operation::update_location_s3::UpdateLocationS3Error::InvalidRequestException(inner) => Error::InvalidRequestException(inner), + crate::operation::update_location_s3::UpdateLocationS3Error::Unhandled(inner) => Error::Unhandled(inner), + } + } +} impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error where R: Send + Sync + std::fmt::Debug + 'static, diff --git a/sdk/datasync/src/lib.rs b/sdk/datasync/src/lib.rs index ca5db74ebd2a..45b0ac788e70 100644 --- a/sdk/datasync/src/lib.rs +++ b/sdk/datasync/src/lib.rs @@ -33,7 +33,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-datasync = "1.55.0" +//! aws-sdk-datasync = "1.56.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/datasync/src/operation.rs b/sdk/datasync/src/operation.rs index 80042ece387a..ce41586c0e34 100644 --- a/sdk/datasync/src/operation.rs +++ b/sdk/datasync/src/operation.rs @@ -160,6 +160,21 @@ pub mod update_discovery_job; /// Types for the `UpdateLocationAzureBlob` operation. pub mod update_location_azure_blob; +/// Types for the `UpdateLocationEfs` operation. +pub mod update_location_efs; + +/// Types for the `UpdateLocationFsxLustre` operation. +pub mod update_location_fsx_lustre; + +/// Types for the `UpdateLocationFsxOntap` operation. +pub mod update_location_fsx_ontap; + +/// Types for the `UpdateLocationFsxOpenZfs` operation. +pub mod update_location_fsx_open_zfs; + +/// Types for the `UpdateLocationFsxWindows` operation. +pub mod update_location_fsx_windows; + /// Types for the `UpdateLocationHdfs` operation. pub mod update_location_hdfs; @@ -169,6 +184,9 @@ pub mod update_location_nfs; /// Types for the `UpdateLocationObjectStorage` operation. pub mod update_location_object_storage; +/// Types for the `UpdateLocationS3` operation. +pub mod update_location_s3; + /// Types for the `UpdateLocationSmb` operation. pub mod update_location_smb; diff --git a/sdk/datasync/src/operation/create_location_efs/_create_location_efs_input.rs b/sdk/datasync/src/operation/create_location_efs/_create_location_efs_input.rs index e10c0e1a2489..24418f28ea41 100644 --- a/sdk/datasync/src/operation/create_location_efs/_create_location_efs_input.rs +++ b/sdk/datasync/src/operation/create_location_efs/_create_location_efs_input.rs @@ -4,7 +4,7 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct CreateLocationEfsInput { - ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location) on your file system.

    + ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

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

    Specifies the ARN for your Amazon EFS file system.

    @@ -24,7 +24,7 @@ pub struct CreateLocationEfsInput { pub in_transit_encryption: ::std::option::Option, } impl CreateLocationEfsInput { - ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location) on your file system.

    + ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

    pub fn subdirectory(&self) -> ::std::option::Option<&str> { self.subdirectory.as_deref() @@ -79,19 +79,19 @@ pub struct CreateLocationEfsInputBuilder { pub(crate) in_transit_encryption: ::std::option::Option, } impl CreateLocationEfsInputBuilder { - ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location) on your file system.

    + ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

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

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location) on your file system.

    + ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

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

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location) on your file system.

    + ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

    pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { &self.subdirectory diff --git a/sdk/datasync/src/operation/create_location_efs/builders.rs b/sdk/datasync/src/operation/create_location_efs/builders.rs index fbec191fc3a3..292ace2b93a0 100644 --- a/sdk/datasync/src/operation/create_location_efs/builders.rs +++ b/sdk/datasync/src/operation/create_location_efs/builders.rs @@ -109,19 +109,19 @@ impl CreateLocationEfsFluentBuilder { self.config_override = config_override; self } - ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location) on your file system.

    + ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

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

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location) on your file system.

    + ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

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

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location) on your file system.

    + ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

    pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_subdirectory() diff --git a/sdk/datasync/src/operation/create_location_fsx_lustre/_create_location_fsx_lustre_input.rs b/sdk/datasync/src/operation/create_location_fsx_lustre/_create_location_fsx_lustre_input.rs index 5a59219b2564..970bd3528757 100644 --- a/sdk/datasync/src/operation/create_location_fsx_lustre/_create_location_fsx_lustre_input.rs +++ b/sdk/datasync/src/operation/create_location_fsx_lustre/_create_location_fsx_lustre_input.rs @@ -3,31 +3,35 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct CreateLocationFsxLustreInput { - ///

    The Amazon Resource Name (ARN) for the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre file system.

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

    The Amazon Resource Names (ARNs) of the security groups that are used to configure the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Names (ARNs) of up to five security groups that provide access to your FSx for Lustre file system.

    + ///

    The security groups must be able to access the file system's ports. The file system must also allow access from the security groups. For information about file system access, see the Amazon FSx for Lustre User Guide .

    pub security_group_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>, - ///

    A subdirectory in the location's path. This subdirectory in the FSx for Lustre file system is used to read data from the FSx for Lustre source location or write data to the FSx for Lustre destination.

    + ///

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

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

    The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.

    + ///

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.

    pub tags: ::std::option::Option<::std::vec::Vec>, } impl CreateLocationFsxLustreInput { - ///

    The Amazon Resource Name (ARN) for the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre file system.

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

    The Amazon Resource Names (ARNs) of the security groups that are used to configure the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Names (ARNs) of up to five security groups that provide access to your FSx for Lustre file system.

    + ///

    The security groups must be able to access the file system's ports. The file system must also allow access from the security groups. For information about file system access, see the Amazon FSx for Lustre User Guide .

    /// /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_group_arns.is_none()`. pub fn security_group_arns(&self) -> &[::std::string::String] { self.security_group_arns.as_deref().unwrap_or_default() } - ///

    A subdirectory in the location's path. This subdirectory in the FSx for Lustre file system is used to read data from the FSx for Lustre source location or write data to the FSx for Lustre destination.

    + ///

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

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

    The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.

    + ///

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.

    /// /// 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::TagListEntry] { @@ -51,18 +55,18 @@ pub struct CreateLocationFsxLustreInputBuilder { pub(crate) tags: ::std::option::Option<::std::vec::Vec>, } impl CreateLocationFsxLustreInputBuilder { - ///

    The Amazon Resource Name (ARN) for the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre file system.

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

    The Amazon Resource Name (ARN) for the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre file system.

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

    The Amazon Resource Name (ARN) for the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre file system.

    pub fn get_fsx_filesystem_arn(&self) -> &::std::option::Option<::std::string::String> { &self.fsx_filesystem_arn } @@ -70,33 +74,39 @@ impl CreateLocationFsxLustreInputBuilder { /// /// To override the contents of this collection use [`set_security_group_arns`](Self::set_security_group_arns). /// - ///

    The Amazon Resource Names (ARNs) of the security groups that are used to configure the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Names (ARNs) of up to five security groups that provide access to your FSx for Lustre file system.

    + ///

    The security groups must be able to access the file system's ports. The file system must also allow access from the security groups. For information about file system access, see the Amazon FSx for Lustre User Guide .

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

    The Amazon Resource Names (ARNs) of the security groups that are used to configure the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Names (ARNs) of up to five security groups that provide access to your FSx for Lustre file system.

    + ///

    The security groups must be able to access the file system's ports. The file system must also allow access from the security groups. For information about file system access, see the Amazon FSx for Lustre User Guide .

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

    The Amazon Resource Names (ARNs) of the security groups that are used to configure the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Names (ARNs) of up to five security groups that provide access to your FSx for Lustre file system.

    + ///

    The security groups must be able to access the file system's ports. The file system must also allow access from the security groups. For information about file system access, see the Amazon FSx for Lustre User Guide .

    pub fn get_security_group_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { &self.security_group_arns } - ///

    A subdirectory in the location's path. This subdirectory in the FSx for Lustre file system is used to read data from the FSx for Lustre source location or write data to the FSx for Lustre destination.

    + ///

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

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

    A subdirectory in the location's path. This subdirectory in the FSx for Lustre file system is used to read data from the FSx for Lustre source location or write data to the FSx for Lustre destination.

    + ///

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

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

    A subdirectory in the location's path. This subdirectory in the FSx for Lustre file system is used to read data from the FSx for Lustre source location or write data to the FSx for Lustre destination.

    + ///

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

    pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { &self.subdirectory } @@ -104,19 +114,19 @@ impl CreateLocationFsxLustreInputBuilder { /// /// To override the contents of this collection use [`set_tags`](Self::set_tags). /// - ///

    The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.

    + ///

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.

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

    The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.

    + ///

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.

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

    The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.

    + ///

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.

    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { &self.tags } diff --git a/sdk/datasync/src/operation/create_location_fsx_lustre/_create_location_fsx_lustre_output.rs b/sdk/datasync/src/operation/create_location_fsx_lustre/_create_location_fsx_lustre_output.rs index 9d242507fd84..8c557e7a4bd6 100644 --- a/sdk/datasync/src/operation/create_location_fsx_lustre/_create_location_fsx_lustre_output.rs +++ b/sdk/datasync/src/operation/create_location_fsx_lustre/_create_location_fsx_lustre_output.rs @@ -3,12 +3,12 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct CreateLocationFsxLustreOutput { - ///

    The Amazon Resource Name (ARN) of the FSx for Lustre file system location that's created.

    + ///

    The Amazon Resource Name (ARN) of the FSx for Lustre file system location that you created.

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

    The Amazon Resource Name (ARN) of the FSx for Lustre file system location that's created.

    + ///

    The Amazon Resource Name (ARN) of the FSx for Lustre file system location that you created.

    pub fn location_arn(&self) -> ::std::option::Option<&str> { self.location_arn.as_deref() } @@ -33,17 +33,17 @@ pub struct CreateLocationFsxLustreOutputBuilder { _request_id: Option, } impl CreateLocationFsxLustreOutputBuilder { - ///

    The Amazon Resource Name (ARN) of the FSx for Lustre file system location that's created.

    + ///

    The Amazon Resource Name (ARN) of the FSx for Lustre file system location that you created.

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

    The Amazon Resource Name (ARN) of the FSx for Lustre file system location that's created.

    + ///

    The Amazon Resource Name (ARN) of the FSx for Lustre file system location that you created.

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

    The Amazon Resource Name (ARN) of the FSx for Lustre file system location that's created.

    + ///

    The Amazon Resource Name (ARN) of the FSx for Lustre file system location that you created.

    pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> { &self.location_arn } diff --git a/sdk/datasync/src/operation/create_location_fsx_lustre/builders.rs b/sdk/datasync/src/operation/create_location_fsx_lustre/builders.rs index bba7c28614d0..23f7943be845 100644 --- a/sdk/datasync/src/operation/create_location_fsx_lustre/builders.rs +++ b/sdk/datasync/src/operation/create_location_fsx_lustre/builders.rs @@ -109,17 +109,17 @@ impl CreateLocationFsxLustreFluentBuilder { self.config_override = config_override; self } - ///

    The Amazon Resource Name (ARN) for the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre file system.

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

    The Amazon Resource Name (ARN) for the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre file system.

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

    The Amazon Resource Name (ARN) for the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre file system.

    pub fn get_fsx_filesystem_arn(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_fsx_filesystem_arn() } @@ -128,31 +128,37 @@ impl CreateLocationFsxLustreFluentBuilder { /// /// To override the contents of this collection use [`set_security_group_arns`](Self::set_security_group_arns). /// - ///

    The Amazon Resource Names (ARNs) of the security groups that are used to configure the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Names (ARNs) of up to five security groups that provide access to your FSx for Lustre file system.

    + ///

    The security groups must be able to access the file system's ports. The file system must also allow access from the security groups. For information about file system access, see the Amazon FSx for Lustre User Guide .

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

    The Amazon Resource Names (ARNs) of the security groups that are used to configure the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Names (ARNs) of up to five security groups that provide access to your FSx for Lustre file system.

    + ///

    The security groups must be able to access the file system's ports. The file system must also allow access from the security groups. For information about file system access, see the Amazon FSx for Lustre User Guide .

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

    The Amazon Resource Names (ARNs) of the security groups that are used to configure the FSx for Lustre file system.

    + ///

    Specifies the Amazon Resource Names (ARNs) of up to five security groups that provide access to your FSx for Lustre file system.

    + ///

    The security groups must be able to access the file system's ports. The file system must also allow access from the security groups. For information about file system access, see the Amazon FSx for Lustre User Guide .

    pub fn get_security_group_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { self.inner.get_security_group_arns() } - ///

    A subdirectory in the location's path. This subdirectory in the FSx for Lustre file system is used to read data from the FSx for Lustre source location or write data to the FSx for Lustre destination.

    + ///

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

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

    A subdirectory in the location's path. This subdirectory in the FSx for Lustre file system is used to read data from the FSx for Lustre source location or write data to the FSx for Lustre destination.

    + ///

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

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

    A subdirectory in the location's path. This subdirectory in the FSx for Lustre file system is used to read data from the FSx for Lustre source location or write data to the FSx for Lustre destination.

    + ///

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

    pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_subdirectory() } @@ -161,17 +167,17 @@ impl CreateLocationFsxLustreFluentBuilder { /// /// To override the contents of this collection use [`set_tags`](Self::set_tags). /// - ///

    The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.

    + ///

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.

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

    The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.

    + ///

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.

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

    The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.

    + ///

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.

    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { self.inner.get_tags() } diff --git a/sdk/datasync/src/operation/create_location_fsx_ontap/_create_location_fsx_ontap_input.rs b/sdk/datasync/src/operation/create_location_fsx_ontap/_create_location_fsx_ontap_input.rs index 668ae24fcd9a..b6579ea50009 100644 --- a/sdk/datasync/src/operation/create_location_fsx_ontap/_create_location_fsx_ontap_input.rs +++ b/sdk/datasync/src/operation/create_location_fsx_ontap/_create_location_fsx_ontap_input.rs @@ -17,7 +17,7 @@ pub struct CreateLocationFsxOntapInput { pub security_group_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>, ///

    Specifies the ARN of the storage virtual machine (SVM) in your file system where you want to copy data to or from.

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

    Specifies a path to the file share in the SVM where you'll copy your data.

    + ///

    Specifies a path to the file share in the SVM where you want to transfer data to or from.

    ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

    ///
    @@ -48,7 +48,7 @@ impl CreateLocationFsxOntapInput { pub fn storage_virtual_machine_arn(&self) -> ::std::option::Option<&str> { self.storage_virtual_machine_arn.as_deref() } - ///

    Specifies a path to the file share in the SVM where you'll copy your data.

    + ///

    Specifies a path to the file share in the SVM where you want to transfer data to or from.

    ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

    ///
    @@ -154,7 +154,7 @@ impl CreateLocationFsxOntapInputBuilder { pub fn get_storage_virtual_machine_arn(&self) -> &::std::option::Option<::std::string::String> { &self.storage_virtual_machine_arn } - ///

    Specifies a path to the file share in the SVM where you'll copy your data.

    + ///

    Specifies a path to the file share in the SVM where you want to transfer data to or from.

    ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

    ///
    @@ -162,7 +162,7 @@ impl CreateLocationFsxOntapInputBuilder { self.subdirectory = ::std::option::Option::Some(input.into()); self } - ///

    Specifies a path to the file share in the SVM where you'll copy your data.

    + ///

    Specifies a path to the file share in the SVM where you want to transfer data to or from.

    ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

    ///
    @@ -170,7 +170,7 @@ impl CreateLocationFsxOntapInputBuilder { self.subdirectory = input; self } - ///

    Specifies a path to the file share in the SVM where you'll copy your data.

    + ///

    Specifies a path to the file share in the SVM where you want to transfer data to or from.

    ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

    ///
    diff --git a/sdk/datasync/src/operation/create_location_fsx_ontap/builders.rs b/sdk/datasync/src/operation/create_location_fsx_ontap/builders.rs index 7ad13957259e..59a7dc1942d3 100644 --- a/sdk/datasync/src/operation/create_location_fsx_ontap/builders.rs +++ b/sdk/datasync/src/operation/create_location_fsx_ontap/builders.rs @@ -180,7 +180,7 @@ impl CreateLocationFsxOntapFluentBuilder { pub fn get_storage_virtual_machine_arn(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_storage_virtual_machine_arn() } - ///

    Specifies a path to the file share in the SVM where you'll copy your data.

    + ///

    Specifies a path to the file share in the SVM where you want to transfer data to or from.

    ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

    ///
    @@ -188,7 +188,7 @@ impl CreateLocationFsxOntapFluentBuilder { self.inner = self.inner.subdirectory(input.into()); self } - ///

    Specifies a path to the file share in the SVM where you'll copy your data.

    + ///

    Specifies a path to the file share in the SVM where you want to transfer data to or from.

    ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

    ///
    @@ -196,7 +196,7 @@ impl CreateLocationFsxOntapFluentBuilder { self.inner = self.inner.set_subdirectory(input); self } - ///

    Specifies a path to the file share in the SVM where you'll copy your data.

    + ///

    Specifies a path to the file share in the SVM where you want to transfer data to or from.

    ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

    ///
    diff --git a/sdk/datasync/src/operation/create_location_fsx_windows/_create_location_fsx_windows_input.rs b/sdk/datasync/src/operation/create_location_fsx_windows/_create_location_fsx_windows_input.rs index 2d6fe0ff40db..6d872696e480 100644 --- a/sdk/datasync/src/operation/create_location_fsx_windows/_create_location_fsx_windows_input.rs +++ b/sdk/datasync/src/operation/create_location_fsx_windows/_create_location_fsx_windows_input.rs @@ -23,7 +23,7 @@ pub struct CreateLocationFsxWindowsInput { ///

    Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    ///

    For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.

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

    Specifies the name of the Microsoft Active Directory domain that the FSx for Windows File Server file system belongs to.

    + ///

    Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.

    ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

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

    Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    @@ -64,7 +64,7 @@ impl CreateLocationFsxWindowsInput { pub fn user(&self) -> ::std::option::Option<&str> { self.user.as_deref() } - ///

    Specifies the name of the Microsoft Active Directory domain that the FSx for Windows File Server file system belongs to.

    + ///

    Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.

    ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

    pub fn domain(&self) -> ::std::option::Option<&str> { self.domain.as_deref() @@ -221,19 +221,19 @@ impl CreateLocationFsxWindowsInputBuilder { pub fn get_user(&self) -> &::std::option::Option<::std::string::String> { &self.user } - ///

    Specifies the name of the Microsoft Active Directory domain that the FSx for Windows File Server file system belongs to.

    + ///

    Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.

    ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

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

    Specifies the name of the Microsoft Active Directory domain that the FSx for Windows File Server file system belongs to.

    + ///

    Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.

    ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

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

    Specifies the name of the Microsoft Active Directory domain that the FSx for Windows File Server file system belongs to.

    + ///

    Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.

    ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

    pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> { &self.domain diff --git a/sdk/datasync/src/operation/create_location_fsx_windows/builders.rs b/sdk/datasync/src/operation/create_location_fsx_windows/builders.rs index 84f0f7c9c7b2..08a5989e57fe 100644 --- a/sdk/datasync/src/operation/create_location_fsx_windows/builders.rs +++ b/sdk/datasync/src/operation/create_location_fsx_windows/builders.rs @@ -219,19 +219,19 @@ impl CreateLocationFsxWindowsFluentBuilder { pub fn get_user(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_user() } - ///

    Specifies the name of the Microsoft Active Directory domain that the FSx for Windows File Server file system belongs to.

    + ///

    Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.

    ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

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

    Specifies the name of the Microsoft Active Directory domain that the FSx for Windows File Server file system belongs to.

    + ///

    Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.

    ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

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

    Specifies the name of the Microsoft Active Directory domain that the FSx for Windows File Server file system belongs to.

    + ///

    Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.

    ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

    pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_domain() diff --git a/sdk/datasync/src/operation/create_location_nfs/builders.rs b/sdk/datasync/src/operation/create_location_nfs/builders.rs index b9714ac42059..ddba84e52c67 100644 --- a/sdk/datasync/src/operation/create_location_nfs/builders.rs +++ b/sdk/datasync/src/operation/create_location_nfs/builders.rs @@ -23,9 +23,7 @@ impl crate::operation::create_location_nfs::builders::CreateLocationNfsInputBuil /// Fluent builder constructing a request to `CreateLocationNfs`. /// ///

    Creates a transfer location for a Network File System (NFS) file server. DataSync can use this location as a source or destination for transferring data.

    -///

    Before you begin, make sure that you understand how DataSync accesses NFS file servers.

    -///

    If you're copying data to or from an Snowcone device, you can also use CreateLocationNfs to create your transfer location. For more information, see Configuring transfers with Snowcone.

    -///
    +///

    Before you begin, make sure that you understand how DataSync accesses NFS file servers.

    #[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct CreateLocationNfsFluentBuilder { handle: ::std::sync::Arc, diff --git a/sdk/datasync/src/operation/create_location_s3/_create_location_s3_input.rs b/sdk/datasync/src/operation/create_location_s3/_create_location_s3_input.rs index 4236ac92cfe8..b8ef99788e91 100644 --- a/sdk/datasync/src/operation/create_location_s3/_create_location_s3_input.rs +++ b/sdk/datasync/src/operation/create_location_s3/_create_location_s3_input.rs @@ -26,7 +26,7 @@ pub struct CreateLocationS3Input { ///

    For more information, see Storage class considerations with Amazon S3 transfers.

    pub s3_storage_class: ::std::option::Option, ///

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    - ///

    For more information, see Accessing S3 buckets.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

    pub s3_config: ::std::option::Option, ///

    (Amazon S3 on Outposts only) Specifies the Amazon Resource Name (ARN) of the DataSync agent on your Outpost.

    ///

    For more information, see Deploy your DataSync agent on Outposts.

    @@ -63,7 +63,7 @@ impl CreateLocationS3Input { self.s3_storage_class.as_ref() } ///

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    - ///

    For more information, see Accessing S3 buckets.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

    pub fn s3_config(&self) -> ::std::option::Option<&crate::types::S3Config> { self.s3_config.as_ref() } @@ -189,20 +189,20 @@ impl CreateLocationS3InputBuilder { &self.s3_storage_class } ///

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    - ///

    For more information, see Accessing S3 buckets.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    - ///

    For more information, see Accessing S3 buckets.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    - ///

    For more information, see Accessing S3 buckets.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

    pub fn get_s3_config(&self) -> &::std::option::Option { &self.s3_config } diff --git a/sdk/datasync/src/operation/create_location_s3/builders.rs b/sdk/datasync/src/operation/create_location_s3/builders.rs index 01c81cc55039..b2b1234d33e0 100644 --- a/sdk/datasync/src/operation/create_location_s3/builders.rs +++ b/sdk/datasync/src/operation/create_location_s3/builders.rs @@ -205,19 +205,19 @@ impl CreateLocationS3FluentBuilder { self.inner.get_s3_storage_class() } ///

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    - ///

    For more information, see Accessing S3 buckets.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    - ///

    For more information, see Accessing S3 buckets.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    - ///

    For more information, see Accessing S3 buckets.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

    pub fn get_s3_config(&self) -> &::std::option::Option { self.inner.get_s3_config() } diff --git a/sdk/datasync/src/operation/describe_location_s3/_describe_location_s3_output.rs b/sdk/datasync/src/operation/describe_location_s3/_describe_location_s3_output.rs index c98d8d340760..9e000d0a2d28 100644 --- a/sdk/datasync/src/operation/describe_location_s3/_describe_location_s3_output.rs +++ b/sdk/datasync/src/operation/describe_location_s3/_describe_location_s3_output.rs @@ -12,7 +12,7 @@ pub struct DescribeLocationS3Output { ///

    Some storage classes have behaviors that can affect your Amazon S3 storage costs. For more information, see Storage class considerations with Amazon S3 transfers.

    pub s3_storage_class: ::std::option::Option, ///

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    - ///

    For more information, see Accessing S3 buckets.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

    pub s3_config: ::std::option::Option, ///

    The ARNs of the DataSync agents deployed on your Outpost when using working with Amazon S3 on Outposts.

    ///

    For more information, see Deploy your DataSync agent on Outposts.

    @@ -36,7 +36,7 @@ impl DescribeLocationS3Output { self.s3_storage_class.as_ref() } ///

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    - ///

    For more information, see Accessing S3 buckets.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

    pub fn s3_config(&self) -> ::std::option::Option<&crate::types::S3Config> { self.s3_config.as_ref() } @@ -123,19 +123,19 @@ impl DescribeLocationS3OutputBuilder { &self.s3_storage_class } ///

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    - ///

    For more information, see Accessing S3 buckets.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    - ///

    For more information, see Accessing S3 buckets.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    - ///

    For more information, see Accessing S3 buckets.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

    pub fn get_s3_config(&self) -> &::std::option::Option { &self.s3_config } diff --git a/sdk/datasync/src/operation/update_location_azure_blob/builders.rs b/sdk/datasync/src/operation/update_location_azure_blob/builders.rs index 787f24384f92..f6304b433c9d 100644 --- a/sdk/datasync/src/operation/update_location_azure_blob/builders.rs +++ b/sdk/datasync/src/operation/update_location_azure_blob/builders.rs @@ -22,7 +22,8 @@ impl crate::operation::update_location_azure_blob::builders::UpdateLocationAzure } /// Fluent builder constructing a request to `UpdateLocationAzureBlob`. /// -///

    Modifies some configurations of the Microsoft Azure Blob Storage transfer location that you're using with DataSync.

    +///

    Modifies the following configurations of the Microsoft Azure Blob Storage transfer location that you're using with DataSync.

    +///

    For more information, see Configuring DataSync transfers with Azure Blob Storage.

    #[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct UpdateLocationAzureBlobFluentBuilder { handle: ::std::sync::Arc, diff --git a/sdk/datasync/src/operation/update_location_efs.rs b/sdk/datasync/src/operation/update_location_efs.rs new file mode 100644 index 000000000000..f5be1bd89ef2 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_efs.rs @@ -0,0 +1,368 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `UpdateLocationEfs`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationEfs; +impl UpdateLocationEfs { + /// Creates a new `UpdateLocationEfs` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::update_location_efs::UpdateLocationEfsInput, + ) -> ::std::result::Result< + crate::operation::update_location_efs::UpdateLocationEfsOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_efs::UpdateLocationEfsError, + ::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::update_location_efs::UpdateLocationEfsInput, + 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("datasync", "UpdateLocationEfs", 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 UpdateLocationEfs { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateLocationEfs"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + UpdateLocationEfsRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + UpdateLocationEfsResponseDeserializer, + )); + + 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( + "UpdateLocationEfs", + "datasync", + )); + 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("UpdateLocationEfs") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(UpdateLocationEfsEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::update_location_efs::UpdateLocationEfsError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::update_location_efs::UpdateLocationEfsError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::update_location_efs::UpdateLocationEfsError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct UpdateLocationEfsResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateLocationEfsResponseDeserializer { + 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_update_location_efs::de_update_location_efs_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_update_location_efs::de_update_location_efs_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct UpdateLocationEfsRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateLocationEfsRequestSerializer { + #[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::update_location_efs::UpdateLocationEfsInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::update_location_efs::UpdateLocationEfsInput, + 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/x-amz-json-1.1"); + builder = _header_serialization_settings.set_default_header( + builder, + ::http::header::HeaderName::from_static("x-amz-target"), + "FmrsService.UpdateLocationEfs", + ); + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_location_efs::ser_update_location_efs_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 UpdateLocationEfsEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateLocationEfsEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "UpdateLocationEfsEndpointParamsInterceptor" + } + + 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 UpdateLocationEfsInput")?; + + 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(()) + } +} + +// The get_* functions below are generated from JMESPath expressions in the +// operationContextParams trait. They target the operation's input shape. + +/// Error type for the `UpdateLocationEfsError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum UpdateLocationEfsError { + ///

    This exception is thrown when an error occurs in the DataSync service.

    + InternalException(crate::types::error::InternalException), + ///

    This exception is thrown when the client submits a malformed request.

    + InvalidRequestException(crate::types::error::InvalidRequestException), + /// 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-UpdateLocationEfsError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl UpdateLocationEfsError { + /// Creates the `UpdateLocationEfsError::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 `UpdateLocationEfsError::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::InternalException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InvalidRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `UpdateLocationEfsError::InternalException`. + pub fn is_internal_exception(&self) -> bool { + matches!(self, Self::InternalException(_)) + } + /// Returns `true` if the error kind is `UpdateLocationEfsError::InvalidRequestException`. + pub fn is_invalid_request_exception(&self) -> bool { + matches!(self, Self::InvalidRequestException(_)) + } +} +impl ::std::error::Error for UpdateLocationEfsError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::InternalException(_inner) => ::std::option::Option::Some(_inner), + Self::InvalidRequestException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for UpdateLocationEfsError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::InternalException(_inner) => _inner.fmt(f), + Self::InvalidRequestException(_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 UpdateLocationEfsError { + 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 UpdateLocationEfsError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::InternalException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InvalidRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateLocationEfsError { + 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::update_location_efs::UpdateLocationEfsError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::update_location_efs::_update_location_efs_output::UpdateLocationEfsOutput; + +pub use crate::operation::update_location_efs::_update_location_efs_input::UpdateLocationEfsInput; + +mod _update_location_efs_input; + +mod _update_location_efs_output; + +/// Builders +pub mod builders; diff --git a/sdk/datasync/src/operation/update_location_efs/_update_location_efs_input.rs b/sdk/datasync/src/operation/update_location_efs/_update_location_efs_input.rs new file mode 100644 index 000000000000..df899848e61e --- /dev/null +++ b/sdk/datasync/src/operation/update_location_efs/_update_location_efs_input.rs @@ -0,0 +1,160 @@ +// 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 UpdateLocationEfsInput { + ///

    Specifies the Amazon Resource Name (ARN) of the Amazon EFS transfer location that you're updating.

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

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    + ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

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

    Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.

    + ///

    For more information, see Accessing restricted Amazon EFS file systems.

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

    Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.

    + ///

    For information on creating this role, see Creating a DataSync IAM role for Amazon EFS file system access.

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

    Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.

    + ///

    If you specify an access point using AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this parameter to TLS1_2.

    + pub in_transit_encryption: ::std::option::Option, +} +impl UpdateLocationEfsInput { + ///

    Specifies the Amazon Resource Name (ARN) of the Amazon EFS transfer location that you're updating.

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

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    + ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

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

    Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.

    + ///

    For more information, see Accessing restricted Amazon EFS file systems.

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

    Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.

    + ///

    For information on creating this role, see Creating a DataSync IAM role for Amazon EFS file system access.

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

    Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.

    + ///

    If you specify an access point using AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this parameter to TLS1_2.

    + pub fn in_transit_encryption(&self) -> ::std::option::Option<&crate::types::EfsInTransitEncryption> { + self.in_transit_encryption.as_ref() + } +} +impl UpdateLocationEfsInput { + /// Creates a new builder-style object to manufacture [`UpdateLocationEfsInput`](crate::operation::update_location_efs::UpdateLocationEfsInput). + pub fn builder() -> crate::operation::update_location_efs::builders::UpdateLocationEfsInputBuilder { + crate::operation::update_location_efs::builders::UpdateLocationEfsInputBuilder::default() + } +} + +/// A builder for [`UpdateLocationEfsInput`](crate::operation::update_location_efs::UpdateLocationEfsInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationEfsInputBuilder { + pub(crate) location_arn: ::std::option::Option<::std::string::String>, + pub(crate) subdirectory: ::std::option::Option<::std::string::String>, + pub(crate) access_point_arn: ::std::option::Option<::std::string::String>, + pub(crate) file_system_access_role_arn: ::std::option::Option<::std::string::String>, + pub(crate) in_transit_encryption: ::std::option::Option, +} +impl UpdateLocationEfsInputBuilder { + ///

    Specifies the Amazon Resource Name (ARN) of the Amazon EFS transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the Amazon EFS transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the Amazon EFS transfer location that you're updating.

    + pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.location_arn + } + ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    + ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

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

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    + ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

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

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    + ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

    + pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { + &self.subdirectory + } + ///

    Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.

    + ///

    For more information, see Accessing restricted Amazon EFS file systems.

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

    Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.

    + ///

    For more information, see Accessing restricted Amazon EFS file systems.

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

    Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.

    + ///

    For more information, see Accessing restricted Amazon EFS file systems.

    + pub fn get_access_point_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.access_point_arn + } + ///

    Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.

    + ///

    For information on creating this role, see Creating a DataSync IAM role for Amazon EFS file system access.

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

    Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.

    + ///

    For information on creating this role, see Creating a DataSync IAM role for Amazon EFS file system access.

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

    Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.

    + ///

    For information on creating this role, see Creating a DataSync IAM role for Amazon EFS file system access.

    + pub fn get_file_system_access_role_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.file_system_access_role_arn + } + ///

    Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.

    + ///

    If you specify an access point using AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this parameter to TLS1_2.

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

    Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.

    + ///

    If you specify an access point using AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this parameter to TLS1_2.

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

    Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.

    + ///

    If you specify an access point using AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this parameter to TLS1_2.

    + pub fn get_in_transit_encryption(&self) -> &::std::option::Option { + &self.in_transit_encryption + } + /// Consumes the builder and constructs a [`UpdateLocationEfsInput`](crate::operation::update_location_efs::UpdateLocationEfsInput). + pub fn build( + self, + ) -> ::std::result::Result { + ::std::result::Result::Ok(crate::operation::update_location_efs::UpdateLocationEfsInput { + location_arn: self.location_arn, + subdirectory: self.subdirectory, + access_point_arn: self.access_point_arn, + file_system_access_role_arn: self.file_system_access_role_arn, + in_transit_encryption: self.in_transit_encryption, + }) + } +} diff --git a/sdk/datasync/src/operation/update_location_efs/_update_location_efs_output.rs b/sdk/datasync/src/operation/update_location_efs/_update_location_efs_output.rs new file mode 100644 index 000000000000..c34a56c15a7f --- /dev/null +++ b/sdk/datasync/src/operation/update_location_efs/_update_location_efs_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 UpdateLocationEfsOutput { + _request_id: Option, +} +impl ::aws_types::request_id::RequestId for UpdateLocationEfsOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl UpdateLocationEfsOutput { + /// Creates a new builder-style object to manufacture [`UpdateLocationEfsOutput`](crate::operation::update_location_efs::UpdateLocationEfsOutput). + pub fn builder() -> crate::operation::update_location_efs::builders::UpdateLocationEfsOutputBuilder { + crate::operation::update_location_efs::builders::UpdateLocationEfsOutputBuilder::default() + } +} + +/// A builder for [`UpdateLocationEfsOutput`](crate::operation::update_location_efs::UpdateLocationEfsOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationEfsOutputBuilder { + _request_id: Option, +} +impl UpdateLocationEfsOutputBuilder { + 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 [`UpdateLocationEfsOutput`](crate::operation::update_location_efs::UpdateLocationEfsOutput). + pub fn build(self) -> crate::operation::update_location_efs::UpdateLocationEfsOutput { + crate::operation::update_location_efs::UpdateLocationEfsOutput { + _request_id: self._request_id, + } + } +} diff --git a/sdk/datasync/src/operation/update_location_efs/builders.rs b/sdk/datasync/src/operation/update_location_efs/builders.rs new file mode 100644 index 000000000000..1aceabf82ffe --- /dev/null +++ b/sdk/datasync/src/operation/update_location_efs/builders.rs @@ -0,0 +1,194 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::update_location_efs::_update_location_efs_output::UpdateLocationEfsOutputBuilder; + +pub use crate::operation::update_location_efs::_update_location_efs_input::UpdateLocationEfsInputBuilder; + +impl crate::operation::update_location_efs::builders::UpdateLocationEfsInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::update_location_efs::UpdateLocationEfsOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_efs::UpdateLocationEfsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.update_location_efs(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `UpdateLocationEfs`. +/// +///

    Modifies the following configuration parameters of the Amazon EFS transfer location that you're using with DataSync.

    +///

    For more information, see Configuring DataSync transfers with Amazon EFS.

    +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct UpdateLocationEfsFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::update_location_efs::builders::UpdateLocationEfsInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::update_location_efs::UpdateLocationEfsOutput, + crate::operation::update_location_efs::UpdateLocationEfsError, + > for UpdateLocationEfsFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::update_location_efs::UpdateLocationEfsOutput, + crate::operation::update_location_efs::UpdateLocationEfsError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl UpdateLocationEfsFluentBuilder { + /// Creates a new `UpdateLocationEfsFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the UpdateLocationEfs as a reference. + pub fn as_input(&self) -> &crate::operation::update_location_efs::builders::UpdateLocationEfsInputBuilder { + &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::update_location_efs::UpdateLocationEfsOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_efs::UpdateLocationEfsError, + ::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::update_location_efs::UpdateLocationEfs::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::update_location_efs::UpdateLocationEfs::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::update_location_efs::UpdateLocationEfsOutput, + crate::operation::update_location_efs::UpdateLocationEfsError, + 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 + } + ///

    Specifies the Amazon Resource Name (ARN) of the Amazon EFS transfer location that you're updating.

    + pub fn location_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.location_arn(input.into()); + self + } + ///

    Specifies the Amazon Resource Name (ARN) of the Amazon EFS transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the Amazon EFS transfer location that you're updating.

    + pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_location_arn() + } + ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    + ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

    + pub fn subdirectory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.subdirectory(input.into()); + self + } + ///

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    + ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

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

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    + ///

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

    + pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_subdirectory() + } + ///

    Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.

    + ///

    For more information, see Accessing restricted Amazon EFS file systems.

    + pub fn access_point_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.access_point_arn(input.into()); + self + } + ///

    Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.

    + ///

    For more information, see Accessing restricted Amazon EFS file systems.

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

    Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.

    + ///

    For more information, see Accessing restricted Amazon EFS file systems.

    + pub fn get_access_point_arn(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_access_point_arn() + } + ///

    Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.

    + ///

    For information on creating this role, see Creating a DataSync IAM role for Amazon EFS file system access.

    + pub fn file_system_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.file_system_access_role_arn(input.into()); + self + } + ///

    Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.

    + ///

    For information on creating this role, see Creating a DataSync IAM role for Amazon EFS file system access.

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

    Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.

    + ///

    For information on creating this role, see Creating a DataSync IAM role for Amazon EFS file system access.

    + pub fn get_file_system_access_role_arn(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_file_system_access_role_arn() + } + ///

    Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.

    + ///

    If you specify an access point using AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this parameter to TLS1_2.

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

    Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.

    + ///

    If you specify an access point using AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this parameter to TLS1_2.

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

    Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.

    + ///

    If you specify an access point using AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this parameter to TLS1_2.

    + pub fn get_in_transit_encryption(&self) -> &::std::option::Option { + self.inner.get_in_transit_encryption() + } +} diff --git a/sdk/datasync/src/operation/update_location_fsx_lustre.rs b/sdk/datasync/src/operation/update_location_fsx_lustre.rs new file mode 100644 index 000000000000..a7035cb1fafe --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_lustre.rs @@ -0,0 +1,371 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `UpdateLocationFsxLustre`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationFsxLustre; +impl UpdateLocationFsxLustre { + /// Creates a new `UpdateLocationFsxLustre` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreInput, + ) -> ::std::result::Result< + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError, + ::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::update_location_fsx_lustre::UpdateLocationFsxLustreInput, + 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("datasync", "UpdateLocationFsxLustre", 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 UpdateLocationFsxLustre { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateLocationFsxLustre"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + UpdateLocationFsxLustreRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + UpdateLocationFsxLustreResponseDeserializer, + )); + + 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( + "UpdateLocationFsxLustre", + "datasync", + )); + 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("UpdateLocationFsxLustre") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(UpdateLocationFsxLustreEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct UpdateLocationFsxLustreResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateLocationFsxLustreResponseDeserializer { + 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_update_location_fsx_lustre::de_update_location_fsx_lustre_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_update_location_fsx_lustre::de_update_location_fsx_lustre_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct UpdateLocationFsxLustreRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateLocationFsxLustreRequestSerializer { + #[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::update_location_fsx_lustre::UpdateLocationFsxLustreInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreInput, + 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/x-amz-json-1.1"); + builder = _header_serialization_settings.set_default_header( + builder, + ::http::header::HeaderName::from_static("x-amz-target"), + "FmrsService.UpdateLocationFsxLustre", + ); + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from( + crate::protocol_serde::shape_update_location_fsx_lustre::ser_update_location_fsx_lustre_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 UpdateLocationFsxLustreEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateLocationFsxLustreEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "UpdateLocationFsxLustreEndpointParamsInterceptor" + } + + 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 UpdateLocationFsxLustreInput")?; + + 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(()) + } +} + +// The get_* functions below are generated from JMESPath expressions in the +// operationContextParams trait. They target the operation's input shape. + +/// Error type for the `UpdateLocationFsxLustreError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum UpdateLocationFsxLustreError { + ///

    This exception is thrown when an error occurs in the DataSync service.

    + InternalException(crate::types::error::InternalException), + ///

    This exception is thrown when the client submits a malformed request.

    + InvalidRequestException(crate::types::error::InvalidRequestException), + /// 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-UpdateLocationFsxLustreError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl UpdateLocationFsxLustreError { + /// Creates the `UpdateLocationFsxLustreError::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 `UpdateLocationFsxLustreError::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::InternalException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InvalidRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `UpdateLocationFsxLustreError::InternalException`. + pub fn is_internal_exception(&self) -> bool { + matches!(self, Self::InternalException(_)) + } + /// Returns `true` if the error kind is `UpdateLocationFsxLustreError::InvalidRequestException`. + pub fn is_invalid_request_exception(&self) -> bool { + matches!(self, Self::InvalidRequestException(_)) + } +} +impl ::std::error::Error for UpdateLocationFsxLustreError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::InternalException(_inner) => ::std::option::Option::Some(_inner), + Self::InvalidRequestException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for UpdateLocationFsxLustreError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::InternalException(_inner) => _inner.fmt(f), + Self::InvalidRequestException(_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 UpdateLocationFsxLustreError { + 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 UpdateLocationFsxLustreError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::InternalException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InvalidRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateLocationFsxLustreError { + 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::update_location_fsx_lustre::UpdateLocationFsxLustreError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::update_location_fsx_lustre::_update_location_fsx_lustre_output::UpdateLocationFsxLustreOutput; + +pub use crate::operation::update_location_fsx_lustre::_update_location_fsx_lustre_input::UpdateLocationFsxLustreInput; + +mod _update_location_fsx_lustre_input; + +mod _update_location_fsx_lustre_output; + +/// Builders +pub mod builders; diff --git a/sdk/datasync/src/operation/update_location_fsx_lustre/_update_location_fsx_lustre_input.rs b/sdk/datasync/src/operation/update_location_fsx_lustre/_update_location_fsx_lustre_input.rs new file mode 100644 index 000000000000..5a128c34a205 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_lustre/_update_location_fsx_lustre_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 UpdateLocationFsxLustreInput { + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre transfer location that you're updating.

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

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

    + pub subdirectory: ::std::option::Option<::std::string::String>, +} +impl UpdateLocationFsxLustreInput { + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre transfer location that you're updating.

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

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

    + pub fn subdirectory(&self) -> ::std::option::Option<&str> { + self.subdirectory.as_deref() + } +} +impl UpdateLocationFsxLustreInput { + /// Creates a new builder-style object to manufacture [`UpdateLocationFsxLustreInput`](crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreInput). + pub fn builder() -> crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreInputBuilder { + crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreInputBuilder::default() + } +} + +/// A builder for [`UpdateLocationFsxLustreInput`](crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationFsxLustreInputBuilder { + pub(crate) location_arn: ::std::option::Option<::std::string::String>, + pub(crate) subdirectory: ::std::option::Option<::std::string::String>, +} +impl UpdateLocationFsxLustreInputBuilder { + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre transfer location that you're updating.

    + pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.location_arn + } + ///

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

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

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

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

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

    + pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { + &self.subdirectory + } + /// Consumes the builder and constructs a [`UpdateLocationFsxLustreInput`](crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreInput { + location_arn: self.location_arn, + subdirectory: self.subdirectory, + }) + } +} diff --git a/sdk/datasync/src/operation/update_location_fsx_lustre/_update_location_fsx_lustre_output.rs b/sdk/datasync/src/operation/update_location_fsx_lustre/_update_location_fsx_lustre_output.rs new file mode 100644 index 000000000000..29aa2a3cfeb4 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_lustre/_update_location_fsx_lustre_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 UpdateLocationFsxLustreOutput { + _request_id: Option, +} +impl ::aws_types::request_id::RequestId for UpdateLocationFsxLustreOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl UpdateLocationFsxLustreOutput { + /// Creates a new builder-style object to manufacture [`UpdateLocationFsxLustreOutput`](crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreOutput). + pub fn builder() -> crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreOutputBuilder { + crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreOutputBuilder::default() + } +} + +/// A builder for [`UpdateLocationFsxLustreOutput`](crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationFsxLustreOutputBuilder { + _request_id: Option, +} +impl UpdateLocationFsxLustreOutputBuilder { + 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 [`UpdateLocationFsxLustreOutput`](crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreOutput). + pub fn build(self) -> crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreOutput { + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreOutput { + _request_id: self._request_id, + } + } +} diff --git a/sdk/datasync/src/operation/update_location_fsx_lustre/builders.rs b/sdk/datasync/src/operation/update_location_fsx_lustre/builders.rs new file mode 100644 index 000000000000..32a2372f380c --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_lustre/builders.rs @@ -0,0 +1,143 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::update_location_fsx_lustre::_update_location_fsx_lustre_output::UpdateLocationFsxLustreOutputBuilder; + +pub use crate::operation::update_location_fsx_lustre::_update_location_fsx_lustre_input::UpdateLocationFsxLustreInputBuilder; + +impl crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.update_location_fsx_lustre(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `UpdateLocationFsxLustre`. +/// +///

    Modifies the following configuration parameters of the Amazon FSx for Lustre transfer location that you're using with DataSync.

    +///

    For more information, see Configuring DataSync transfers with FSx for Lustre.

    +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct UpdateLocationFsxLustreFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreOutput, + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError, + > for UpdateLocationFsxLustreFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreOutput, + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl UpdateLocationFsxLustreFluentBuilder { + /// Creates a new `UpdateLocationFsxLustreFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the UpdateLocationFsxLustre as a reference. + pub fn as_input(&self) -> &crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreInputBuilder { + &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::update_location_fsx_lustre::UpdateLocationFsxLustreOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError, + ::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::update_location_fsx_lustre::UpdateLocationFsxLustre::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustre::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::update_location_fsx_lustre::UpdateLocationFsxLustreOutput, + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError, + 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 + } + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre transfer location that you're updating.

    + pub fn location_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.location_arn(input.into()); + self + } + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the FSx for Lustre transfer location that you're updating.

    + pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_location_arn() + } + ///

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

    + pub fn subdirectory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.subdirectory(input.into()); + self + } + ///

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

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

    Specifies a mount path for your FSx for Lustre file system. The path can include subdirectories.

    + ///

    When the location is used as a source, DataSync reads data from the mount path. When the location is used as a destination, DataSync writes data to the mount path. If you don't include this parameter, DataSync uses the file system's root directory (/).

    + pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_subdirectory() + } +} diff --git a/sdk/datasync/src/operation/update_location_fsx_ontap.rs b/sdk/datasync/src/operation/update_location_fsx_ontap.rs new file mode 100644 index 000000000000..93335fc2478a --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_ontap.rs @@ -0,0 +1,371 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `UpdateLocationFsxOntap`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationFsxOntap; +impl UpdateLocationFsxOntap { + /// Creates a new `UpdateLocationFsxOntap` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapInput, + ) -> ::std::result::Result< + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError, + ::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::update_location_fsx_ontap::UpdateLocationFsxOntapInput, + 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("datasync", "UpdateLocationFsxOntap", 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 UpdateLocationFsxOntap { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateLocationFsxOntap"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + UpdateLocationFsxOntapRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + UpdateLocationFsxOntapResponseDeserializer, + )); + + 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( + "UpdateLocationFsxOntap", + "datasync", + )); + 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("UpdateLocationFsxOntap") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(UpdateLocationFsxOntapEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct UpdateLocationFsxOntapResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateLocationFsxOntapResponseDeserializer { + 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_update_location_fsx_ontap::de_update_location_fsx_ontap_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_update_location_fsx_ontap::de_update_location_fsx_ontap_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct UpdateLocationFsxOntapRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateLocationFsxOntapRequestSerializer { + #[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::update_location_fsx_ontap::UpdateLocationFsxOntapInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapInput, + 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/x-amz-json-1.1"); + builder = _header_serialization_settings.set_default_header( + builder, + ::http::header::HeaderName::from_static("x-amz-target"), + "FmrsService.UpdateLocationFsxOntap", + ); + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from( + crate::protocol_serde::shape_update_location_fsx_ontap::ser_update_location_fsx_ontap_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 UpdateLocationFsxOntapEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateLocationFsxOntapEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "UpdateLocationFsxOntapEndpointParamsInterceptor" + } + + 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 UpdateLocationFsxOntapInput")?; + + 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(()) + } +} + +// The get_* functions below are generated from JMESPath expressions in the +// operationContextParams trait. They target the operation's input shape. + +/// Error type for the `UpdateLocationFsxOntapError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum UpdateLocationFsxOntapError { + ///

    This exception is thrown when an error occurs in the DataSync service.

    + InternalException(crate::types::error::InternalException), + ///

    This exception is thrown when the client submits a malformed request.

    + InvalidRequestException(crate::types::error::InvalidRequestException), + /// 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-UpdateLocationFsxOntapError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl UpdateLocationFsxOntapError { + /// Creates the `UpdateLocationFsxOntapError::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 `UpdateLocationFsxOntapError::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::InternalException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InvalidRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `UpdateLocationFsxOntapError::InternalException`. + pub fn is_internal_exception(&self) -> bool { + matches!(self, Self::InternalException(_)) + } + /// Returns `true` if the error kind is `UpdateLocationFsxOntapError::InvalidRequestException`. + pub fn is_invalid_request_exception(&self) -> bool { + matches!(self, Self::InvalidRequestException(_)) + } +} +impl ::std::error::Error for UpdateLocationFsxOntapError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::InternalException(_inner) => ::std::option::Option::Some(_inner), + Self::InvalidRequestException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for UpdateLocationFsxOntapError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::InternalException(_inner) => _inner.fmt(f), + Self::InvalidRequestException(_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 UpdateLocationFsxOntapError { + 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 UpdateLocationFsxOntapError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::InternalException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InvalidRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateLocationFsxOntapError { + 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::update_location_fsx_ontap::UpdateLocationFsxOntapError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::update_location_fsx_ontap::_update_location_fsx_ontap_output::UpdateLocationFsxOntapOutput; + +pub use crate::operation::update_location_fsx_ontap::_update_location_fsx_ontap_input::UpdateLocationFsxOntapInput; + +mod _update_location_fsx_ontap_input; + +mod _update_location_fsx_ontap_output; + +/// Builders +pub mod builders; diff --git a/sdk/datasync/src/operation/update_location_fsx_ontap/_update_location_fsx_ontap_input.rs b/sdk/datasync/src/operation/update_location_fsx_ontap/_update_location_fsx_ontap_input.rs new file mode 100644 index 000000000000..58b2a8e6b956 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_ontap/_update_location_fsx_ontap_input.rs @@ -0,0 +1,114 @@ +// 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 UpdateLocationFsxOntapInput { + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP transfer location that you're updating.

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

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies a path to the file share in the storage virtual machine (SVM) where you want to transfer data to or from.

    + ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    + ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

    + ///
    + pub subdirectory: ::std::option::Option<::std::string::String>, +} +impl UpdateLocationFsxOntapInput { + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP transfer location that you're updating.

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

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies a path to the file share in the storage virtual machine (SVM) where you want to transfer data to or from.

    + ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    + ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

    + ///
    + pub fn subdirectory(&self) -> ::std::option::Option<&str> { + self.subdirectory.as_deref() + } +} +impl UpdateLocationFsxOntapInput { + /// Creates a new builder-style object to manufacture [`UpdateLocationFsxOntapInput`](crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapInput). + pub fn builder() -> crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapInputBuilder { + crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapInputBuilder::default() + } +} + +/// A builder for [`UpdateLocationFsxOntapInput`](crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationFsxOntapInputBuilder { + pub(crate) location_arn: ::std::option::Option<::std::string::String>, + pub(crate) protocol: ::std::option::Option, + pub(crate) subdirectory: ::std::option::Option<::std::string::String>, +} +impl UpdateLocationFsxOntapInputBuilder { + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP transfer location that you're updating.

    + pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.location_arn + } + ///

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies a path to the file share in the storage virtual machine (SVM) where you want to transfer data to or from.

    + ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    + ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

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

    Specifies a path to the file share in the storage virtual machine (SVM) where you want to transfer data to or from.

    + ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    + ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

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

    Specifies a path to the file share in the storage virtual machine (SVM) where you want to transfer data to or from.

    + ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    + ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

    + ///
    + pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { + &self.subdirectory + } + /// Consumes the builder and constructs a [`UpdateLocationFsxOntapInput`](crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapInput { + location_arn: self.location_arn, + protocol: self.protocol, + subdirectory: self.subdirectory, + }) + } +} diff --git a/sdk/datasync/src/operation/update_location_fsx_ontap/_update_location_fsx_ontap_output.rs b/sdk/datasync/src/operation/update_location_fsx_ontap/_update_location_fsx_ontap_output.rs new file mode 100644 index 000000000000..0e288c44a564 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_ontap/_update_location_fsx_ontap_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 UpdateLocationFsxOntapOutput { + _request_id: Option, +} +impl ::aws_types::request_id::RequestId for UpdateLocationFsxOntapOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl UpdateLocationFsxOntapOutput { + /// Creates a new builder-style object to manufacture [`UpdateLocationFsxOntapOutput`](crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapOutput). + pub fn builder() -> crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapOutputBuilder { + crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapOutputBuilder::default() + } +} + +/// A builder for [`UpdateLocationFsxOntapOutput`](crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationFsxOntapOutputBuilder { + _request_id: Option, +} +impl UpdateLocationFsxOntapOutputBuilder { + 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 [`UpdateLocationFsxOntapOutput`](crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapOutput). + pub fn build(self) -> crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapOutput { + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapOutput { + _request_id: self._request_id, + } + } +} diff --git a/sdk/datasync/src/operation/update_location_fsx_ontap/builders.rs b/sdk/datasync/src/operation/update_location_fsx_ontap/builders.rs new file mode 100644 index 000000000000..d62a0f341a1d --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_ontap/builders.rs @@ -0,0 +1,163 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::update_location_fsx_ontap::_update_location_fsx_ontap_output::UpdateLocationFsxOntapOutputBuilder; + +pub use crate::operation::update_location_fsx_ontap::_update_location_fsx_ontap_input::UpdateLocationFsxOntapInputBuilder; + +impl crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.update_location_fsx_ontap(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `UpdateLocationFsxOntap`. +/// +///

    Modifies the following configuration parameters of the Amazon FSx for NetApp ONTAP transfer location that you're using with DataSync.

    +///

    For more information, see Configuring DataSync transfers with FSx for ONTAP.

    +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct UpdateLocationFsxOntapFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapOutput, + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError, + > for UpdateLocationFsxOntapFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapOutput, + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl UpdateLocationFsxOntapFluentBuilder { + /// Creates a new `UpdateLocationFsxOntapFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the UpdateLocationFsxOntap as a reference. + pub fn as_input(&self) -> &crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapInputBuilder { + &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::update_location_fsx_ontap::UpdateLocationFsxOntapOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError, + ::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::update_location_fsx_ontap::UpdateLocationFsxOntap::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntap::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::update_location_fsx_ontap::UpdateLocationFsxOntapOutput, + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError, + 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 + } + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP transfer location that you're updating.

    + pub fn location_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.location_arn(input.into()); + self + } + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP transfer location that you're updating.

    + pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_location_arn() + } + ///

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies a path to the file share in the storage virtual machine (SVM) where you want to transfer data to or from.

    + ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    + ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

    + ///
    + pub fn subdirectory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.subdirectory(input.into()); + self + } + ///

    Specifies a path to the file share in the storage virtual machine (SVM) where you want to transfer data to or from.

    + ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    + ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

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

    Specifies a path to the file share in the storage virtual machine (SVM) where you want to transfer data to or from.

    + ///

    You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1, /vol1/tree1, or /share1.

    + ///

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

    + ///
    + pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_subdirectory() + } +} diff --git a/sdk/datasync/src/operation/update_location_fsx_open_zfs.rs b/sdk/datasync/src/operation/update_location_fsx_open_zfs.rs new file mode 100644 index 000000000000..78af18ea5c36 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_open_zfs.rs @@ -0,0 +1,371 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `UpdateLocationFsxOpenZfs`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationFsxOpenZfs; +impl UpdateLocationFsxOpenZfs { + /// Creates a new `UpdateLocationFsxOpenZfs` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsInput, + ) -> ::std::result::Result< + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError, + ::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::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsInput, + 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("datasync", "UpdateLocationFsxOpenZfs", 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 UpdateLocationFsxOpenZfs { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateLocationFsxOpenZfs"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + UpdateLocationFsxOpenZfsRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + UpdateLocationFsxOpenZfsResponseDeserializer, + )); + + 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( + "UpdateLocationFsxOpenZfs", + "datasync", + )); + 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("UpdateLocationFsxOpenZfs") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(UpdateLocationFsxOpenZfsEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct UpdateLocationFsxOpenZfsResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateLocationFsxOpenZfsResponseDeserializer { + 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_update_location_fsx_open_zfs::de_update_location_fsx_open_zfs_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_update_location_fsx_open_zfs::de_update_location_fsx_open_zfs_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct UpdateLocationFsxOpenZfsRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateLocationFsxOpenZfsRequestSerializer { + #[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::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsInput, + 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/x-amz-json-1.1"); + builder = _header_serialization_settings.set_default_header( + builder, + ::http::header::HeaderName::from_static("x-amz-target"), + "FmrsService.UpdateLocationFsxOpenZfs", + ); + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from( + crate::protocol_serde::shape_update_location_fsx_open_zfs::ser_update_location_fsx_open_zfs_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 UpdateLocationFsxOpenZfsEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateLocationFsxOpenZfsEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "UpdateLocationFsxOpenZfsEndpointParamsInterceptor" + } + + 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 UpdateLocationFsxOpenZfsInput")?; + + 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(()) + } +} + +// The get_* functions below are generated from JMESPath expressions in the +// operationContextParams trait. They target the operation's input shape. + +/// Error type for the `UpdateLocationFsxOpenZfsError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum UpdateLocationFsxOpenZfsError { + ///

    This exception is thrown when an error occurs in the DataSync service.

    + InternalException(crate::types::error::InternalException), + ///

    This exception is thrown when the client submits a malformed request.

    + InvalidRequestException(crate::types::error::InvalidRequestException), + /// 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-UpdateLocationFsxOpenZfsError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl UpdateLocationFsxOpenZfsError { + /// Creates the `UpdateLocationFsxOpenZfsError::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 `UpdateLocationFsxOpenZfsError::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::InternalException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InvalidRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `UpdateLocationFsxOpenZfsError::InternalException`. + pub fn is_internal_exception(&self) -> bool { + matches!(self, Self::InternalException(_)) + } + /// Returns `true` if the error kind is `UpdateLocationFsxOpenZfsError::InvalidRequestException`. + pub fn is_invalid_request_exception(&self) -> bool { + matches!(self, Self::InvalidRequestException(_)) + } +} +impl ::std::error::Error for UpdateLocationFsxOpenZfsError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::InternalException(_inner) => ::std::option::Option::Some(_inner), + Self::InvalidRequestException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for UpdateLocationFsxOpenZfsError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::InternalException(_inner) => _inner.fmt(f), + Self::InvalidRequestException(_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 UpdateLocationFsxOpenZfsError { + 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 UpdateLocationFsxOpenZfsError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::InternalException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InvalidRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateLocationFsxOpenZfsError { + 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::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::update_location_fsx_open_zfs::_update_location_fsx_open_zfs_output::UpdateLocationFsxOpenZfsOutput; + +pub use crate::operation::update_location_fsx_open_zfs::_update_location_fsx_open_zfs_input::UpdateLocationFsxOpenZfsInput; + +mod _update_location_fsx_open_zfs_input; + +mod _update_location_fsx_open_zfs_output; + +/// Builders +pub mod builders; diff --git a/sdk/datasync/src/operation/update_location_fsx_open_zfs/_update_location_fsx_open_zfs_input.rs b/sdk/datasync/src/operation/update_location_fsx_open_zfs/_update_location_fsx_open_zfs_input.rs new file mode 100644 index 000000000000..8db39aa4494b --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_open_zfs/_update_location_fsx_open_zfs_input.rs @@ -0,0 +1,99 @@ +// 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 UpdateLocationFsxOpenZfsInput { + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for OpenZFS transfer location that you're updating.

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

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies a subdirectory in the location's path that must begin with /fsx. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

    + pub subdirectory: ::std::option::Option<::std::string::String>, +} +impl UpdateLocationFsxOpenZfsInput { + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for OpenZFS transfer location that you're updating.

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

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies a subdirectory in the location's path that must begin with /fsx. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

    + pub fn subdirectory(&self) -> ::std::option::Option<&str> { + self.subdirectory.as_deref() + } +} +impl UpdateLocationFsxOpenZfsInput { + /// Creates a new builder-style object to manufacture [`UpdateLocationFsxOpenZfsInput`](crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsInput). + pub fn builder() -> crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsInputBuilder { + crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsInputBuilder::default() + } +} + +/// A builder for [`UpdateLocationFsxOpenZfsInput`](crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationFsxOpenZfsInputBuilder { + pub(crate) location_arn: ::std::option::Option<::std::string::String>, + pub(crate) protocol: ::std::option::Option, + pub(crate) subdirectory: ::std::option::Option<::std::string::String>, +} +impl UpdateLocationFsxOpenZfsInputBuilder { + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for OpenZFS transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the FSx for OpenZFS transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the FSx for OpenZFS transfer location that you're updating.

    + pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.location_arn + } + ///

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies a subdirectory in the location's path that must begin with /fsx. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

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

    Specifies a subdirectory in the location's path that must begin with /fsx. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

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

    Specifies a subdirectory in the location's path that must begin with /fsx. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

    + pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { + &self.subdirectory + } + /// Consumes the builder and constructs a [`UpdateLocationFsxOpenZfsInput`](crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsInput { + location_arn: self.location_arn, + protocol: self.protocol, + subdirectory: self.subdirectory, + }) + } +} diff --git a/sdk/datasync/src/operation/update_location_fsx_open_zfs/_update_location_fsx_open_zfs_output.rs b/sdk/datasync/src/operation/update_location_fsx_open_zfs/_update_location_fsx_open_zfs_output.rs new file mode 100644 index 000000000000..3ff428157211 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_open_zfs/_update_location_fsx_open_zfs_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 UpdateLocationFsxOpenZfsOutput { + _request_id: Option, +} +impl ::aws_types::request_id::RequestId for UpdateLocationFsxOpenZfsOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl UpdateLocationFsxOpenZfsOutput { + /// Creates a new builder-style object to manufacture [`UpdateLocationFsxOpenZfsOutput`](crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput). + pub fn builder() -> crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsOutputBuilder { + crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsOutputBuilder::default() + } +} + +/// A builder for [`UpdateLocationFsxOpenZfsOutput`](crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationFsxOpenZfsOutputBuilder { + _request_id: Option, +} +impl UpdateLocationFsxOpenZfsOutputBuilder { + 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 [`UpdateLocationFsxOpenZfsOutput`](crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput). + pub fn build(self) -> crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput { + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput { + _request_id: self._request_id, + } + } +} diff --git a/sdk/datasync/src/operation/update_location_fsx_open_zfs/builders.rs b/sdk/datasync/src/operation/update_location_fsx_open_zfs/builders.rs new file mode 100644 index 000000000000..64ee981d2a60 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_open_zfs/builders.rs @@ -0,0 +1,156 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::update_location_fsx_open_zfs::_update_location_fsx_open_zfs_output::UpdateLocationFsxOpenZfsOutputBuilder; + +pub use crate::operation::update_location_fsx_open_zfs::_update_location_fsx_open_zfs_input::UpdateLocationFsxOpenZfsInputBuilder; + +impl crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.update_location_fsx_open_zfs(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `UpdateLocationFsxOpenZfs`. +/// +///

    Modifies the following configuration parameters of the Amazon FSx for OpenZFS transfer location that you're using with DataSync.

    +///

    For more information, see Configuring DataSync transfers with FSx for OpenZFS.

    +///

    Request parameters related to SMB aren't supported with the UpdateLocationFsxOpenZfs operation.

    +///
    +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct UpdateLocationFsxOpenZfsFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput, + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError, + > for UpdateLocationFsxOpenZfsFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput, + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl UpdateLocationFsxOpenZfsFluentBuilder { + /// Creates a new `UpdateLocationFsxOpenZfsFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the UpdateLocationFsxOpenZfs as a reference. + pub fn as_input(&self) -> &crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsInputBuilder { + &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::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError, + ::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::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfs::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfs::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::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput, + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError, + 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 + } + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for OpenZFS transfer location that you're updating.

    + pub fn location_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.location_arn(input.into()); + self + } + ///

    Specifies the Amazon Resource Name (ARN) of the FSx for OpenZFS transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the FSx for OpenZFS transfer location that you're updating.

    + pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_location_arn() + } + ///

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

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

    Specifies a subdirectory in the location's path that must begin with /fsx. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

    + pub fn subdirectory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.subdirectory(input.into()); + self + } + ///

    Specifies a subdirectory in the location's path that must begin with /fsx. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

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

    Specifies a subdirectory in the location's path that must begin with /fsx. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

    + pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_subdirectory() + } +} diff --git a/sdk/datasync/src/operation/update_location_fsx_windows.rs b/sdk/datasync/src/operation/update_location_fsx_windows.rs new file mode 100644 index 000000000000..145a1d049103 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_windows.rs @@ -0,0 +1,371 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `UpdateLocationFsxWindows`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationFsxWindows; +impl UpdateLocationFsxWindows { + /// Creates a new `UpdateLocationFsxWindows` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsInput, + ) -> ::std::result::Result< + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError, + ::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::update_location_fsx_windows::UpdateLocationFsxWindowsInput, + 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("datasync", "UpdateLocationFsxWindows", 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 UpdateLocationFsxWindows { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateLocationFsxWindows"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + UpdateLocationFsxWindowsRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + UpdateLocationFsxWindowsResponseDeserializer, + )); + + 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( + "UpdateLocationFsxWindows", + "datasync", + )); + 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("UpdateLocationFsxWindows") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(UpdateLocationFsxWindowsEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct UpdateLocationFsxWindowsResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateLocationFsxWindowsResponseDeserializer { + 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_update_location_fsx_windows::de_update_location_fsx_windows_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_update_location_fsx_windows::de_update_location_fsx_windows_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct UpdateLocationFsxWindowsRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateLocationFsxWindowsRequestSerializer { + #[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::update_location_fsx_windows::UpdateLocationFsxWindowsInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsInput, + 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/x-amz-json-1.1"); + builder = _header_serialization_settings.set_default_header( + builder, + ::http::header::HeaderName::from_static("x-amz-target"), + "FmrsService.UpdateLocationFsxWindows", + ); + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from( + crate::protocol_serde::shape_update_location_fsx_windows::ser_update_location_fsx_windows_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 UpdateLocationFsxWindowsEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateLocationFsxWindowsEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "UpdateLocationFsxWindowsEndpointParamsInterceptor" + } + + 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 UpdateLocationFsxWindowsInput")?; + + 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(()) + } +} + +// The get_* functions below are generated from JMESPath expressions in the +// operationContextParams trait. They target the operation's input shape. + +/// Error type for the `UpdateLocationFsxWindowsError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum UpdateLocationFsxWindowsError { + ///

    This exception is thrown when an error occurs in the DataSync service.

    + InternalException(crate::types::error::InternalException), + ///

    This exception is thrown when the client submits a malformed request.

    + InvalidRequestException(crate::types::error::InvalidRequestException), + /// 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-UpdateLocationFsxWindowsError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl UpdateLocationFsxWindowsError { + /// Creates the `UpdateLocationFsxWindowsError::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 `UpdateLocationFsxWindowsError::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::InternalException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InvalidRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `UpdateLocationFsxWindowsError::InternalException`. + pub fn is_internal_exception(&self) -> bool { + matches!(self, Self::InternalException(_)) + } + /// Returns `true` if the error kind is `UpdateLocationFsxWindowsError::InvalidRequestException`. + pub fn is_invalid_request_exception(&self) -> bool { + matches!(self, Self::InvalidRequestException(_)) + } +} +impl ::std::error::Error for UpdateLocationFsxWindowsError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::InternalException(_inner) => ::std::option::Option::Some(_inner), + Self::InvalidRequestException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for UpdateLocationFsxWindowsError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::InternalException(_inner) => _inner.fmt(f), + Self::InvalidRequestException(_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 UpdateLocationFsxWindowsError { + 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 UpdateLocationFsxWindowsError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::InternalException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InvalidRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateLocationFsxWindowsError { + 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::update_location_fsx_windows::UpdateLocationFsxWindowsError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::update_location_fsx_windows::_update_location_fsx_windows_output::UpdateLocationFsxWindowsOutput; + +pub use crate::operation::update_location_fsx_windows::_update_location_fsx_windows_input::UpdateLocationFsxWindowsInput; + +mod _update_location_fsx_windows_input; + +mod _update_location_fsx_windows_output; + +/// Builders +pub mod builders; diff --git a/sdk/datasync/src/operation/update_location_fsx_windows/_update_location_fsx_windows_input.rs b/sdk/datasync/src/operation/update_location_fsx_windows/_update_location_fsx_windows_input.rs new file mode 100644 index 000000000000..bb33ec8d4b26 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_windows/_update_location_fsx_windows_input.rs @@ -0,0 +1,175 @@ +// 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)] +pub struct UpdateLocationFsxWindowsInput { + ///

    Specifies the ARN of the FSx for Windows File Server transfer location that you're updating.

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

    Specifies a mount path for your file system using forward slashes. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

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

    Specifies the name of the Windows domain that your FSx for Windows File Server file system belongs to.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

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

    Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    + ///

    For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.

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

    Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    + pub password: ::std::option::Option<::std::string::String>, +} +impl UpdateLocationFsxWindowsInput { + ///

    Specifies the ARN of the FSx for Windows File Server transfer location that you're updating.

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

    Specifies a mount path for your file system using forward slashes. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

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

    Specifies the name of the Windows domain that your FSx for Windows File Server file system belongs to.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

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

    Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    + ///

    For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.

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

    Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    + pub fn password(&self) -> ::std::option::Option<&str> { + self.password.as_deref() + } +} +impl ::std::fmt::Debug for UpdateLocationFsxWindowsInput { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("UpdateLocationFsxWindowsInput"); + formatter.field("location_arn", &self.location_arn); + formatter.field("subdirectory", &self.subdirectory); + formatter.field("domain", &self.domain); + formatter.field("user", &self.user); + formatter.field("password", &"*** Sensitive Data Redacted ***"); + formatter.finish() + } +} +impl UpdateLocationFsxWindowsInput { + /// Creates a new builder-style object to manufacture [`UpdateLocationFsxWindowsInput`](crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsInput). + pub fn builder() -> crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsInputBuilder { + crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsInputBuilder::default() + } +} + +/// A builder for [`UpdateLocationFsxWindowsInput`](crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)] +#[non_exhaustive] +pub struct UpdateLocationFsxWindowsInputBuilder { + pub(crate) location_arn: ::std::option::Option<::std::string::String>, + pub(crate) subdirectory: ::std::option::Option<::std::string::String>, + pub(crate) domain: ::std::option::Option<::std::string::String>, + pub(crate) user: ::std::option::Option<::std::string::String>, + pub(crate) password: ::std::option::Option<::std::string::String>, +} +impl UpdateLocationFsxWindowsInputBuilder { + ///

    Specifies the ARN of the FSx for Windows File Server transfer location that you're updating.

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

    Specifies the ARN of the FSx for Windows File Server transfer location that you're updating.

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

    Specifies the ARN of the FSx for Windows File Server transfer location that you're updating.

    + pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.location_arn + } + ///

    Specifies a mount path for your file system using forward slashes. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

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

    Specifies a mount path for your file system using forward slashes. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

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

    Specifies a mount path for your file system using forward slashes. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

    + pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { + &self.subdirectory + } + ///

    Specifies the name of the Windows domain that your FSx for Windows File Server file system belongs to.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

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

    Specifies the name of the Windows domain that your FSx for Windows File Server file system belongs to.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

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

    Specifies the name of the Windows domain that your FSx for Windows File Server file system belongs to.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

    + pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> { + &self.domain + } + ///

    Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    + ///

    For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.

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

    Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    + ///

    For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.

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

    Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    + ///

    For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.

    + pub fn get_user(&self) -> &::std::option::Option<::std::string::String> { + &self.user + } + ///

    Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

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

    Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

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

    Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    + pub fn get_password(&self) -> &::std::option::Option<::std::string::String> { + &self.password + } + /// Consumes the builder and constructs a [`UpdateLocationFsxWindowsInput`](crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsInput { + location_arn: self.location_arn, + subdirectory: self.subdirectory, + domain: self.domain, + user: self.user, + password: self.password, + }) + } +} +impl ::std::fmt::Debug for UpdateLocationFsxWindowsInputBuilder { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("UpdateLocationFsxWindowsInputBuilder"); + formatter.field("location_arn", &self.location_arn); + formatter.field("subdirectory", &self.subdirectory); + formatter.field("domain", &self.domain); + formatter.field("user", &self.user); + formatter.field("password", &"*** Sensitive Data Redacted ***"); + formatter.finish() + } +} diff --git a/sdk/datasync/src/operation/update_location_fsx_windows/_update_location_fsx_windows_output.rs b/sdk/datasync/src/operation/update_location_fsx_windows/_update_location_fsx_windows_output.rs new file mode 100644 index 000000000000..f68267f26206 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_windows/_update_location_fsx_windows_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 UpdateLocationFsxWindowsOutput { + _request_id: Option, +} +impl ::aws_types::request_id::RequestId for UpdateLocationFsxWindowsOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl UpdateLocationFsxWindowsOutput { + /// Creates a new builder-style object to manufacture [`UpdateLocationFsxWindowsOutput`](crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsOutput). + pub fn builder() -> crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsOutputBuilder { + crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsOutputBuilder::default() + } +} + +/// A builder for [`UpdateLocationFsxWindowsOutput`](crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationFsxWindowsOutputBuilder { + _request_id: Option, +} +impl UpdateLocationFsxWindowsOutputBuilder { + 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 [`UpdateLocationFsxWindowsOutput`](crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsOutput). + pub fn build(self) -> crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsOutput { + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsOutput { + _request_id: self._request_id, + } + } +} diff --git a/sdk/datasync/src/operation/update_location_fsx_windows/builders.rs b/sdk/datasync/src/operation/update_location_fsx_windows/builders.rs new file mode 100644 index 000000000000..ebce09b10a2f --- /dev/null +++ b/sdk/datasync/src/operation/update_location_fsx_windows/builders.rs @@ -0,0 +1,188 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::update_location_fsx_windows::_update_location_fsx_windows_output::UpdateLocationFsxWindowsOutputBuilder; + +pub use crate::operation::update_location_fsx_windows::_update_location_fsx_windows_input::UpdateLocationFsxWindowsInputBuilder; + +impl crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.update_location_fsx_windows(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `UpdateLocationFsxWindows`. +/// +///

    Modifies the following configuration parameters of the Amazon FSx for Windows File Server transfer location that you're using with DataSync.

    +///

    For more information, see Configuring DataSync transfers with FSx for Windows File Server.

    +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct UpdateLocationFsxWindowsFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsOutput, + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError, + > for UpdateLocationFsxWindowsFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsOutput, + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl UpdateLocationFsxWindowsFluentBuilder { + /// Creates a new `UpdateLocationFsxWindowsFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the UpdateLocationFsxWindows as a reference. + pub fn as_input(&self) -> &crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsInputBuilder { + &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::update_location_fsx_windows::UpdateLocationFsxWindowsOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError, + ::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::update_location_fsx_windows::UpdateLocationFsxWindows::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindows::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::update_location_fsx_windows::UpdateLocationFsxWindowsOutput, + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError, + 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 + } + ///

    Specifies the ARN of the FSx for Windows File Server transfer location that you're updating.

    + pub fn location_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.location_arn(input.into()); + self + } + ///

    Specifies the ARN of the FSx for Windows File Server transfer location that you're updating.

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

    Specifies the ARN of the FSx for Windows File Server transfer location that you're updating.

    + pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_location_arn() + } + ///

    Specifies a mount path for your file system using forward slashes. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

    + pub fn subdirectory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.subdirectory(input.into()); + self + } + ///

    Specifies a mount path for your file system using forward slashes. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

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

    Specifies a mount path for your file system using forward slashes. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

    + pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_subdirectory() + } + ///

    Specifies the name of the Windows domain that your FSx for Windows File Server file system belongs to.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

    + pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.domain(input.into()); + self + } + ///

    Specifies the name of the Windows domain that your FSx for Windows File Server file system belongs to.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

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

    Specifies the name of the Windows domain that your FSx for Windows File Server file system belongs to.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

    + pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_domain() + } + ///

    Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    + ///

    For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.

    + pub fn user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.user(input.into()); + self + } + ///

    Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    + ///

    For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.

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

    Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    + ///

    For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.

    + pub fn get_user(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_user() + } + ///

    Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    + pub fn password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.password(input.into()); + self + } + ///

    Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

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

    Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

    + pub fn get_password(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_password() + } +} diff --git a/sdk/datasync/src/operation/update_location_hdfs/builders.rs b/sdk/datasync/src/operation/update_location_hdfs/builders.rs index 9dd78837b34d..9c8461ede2ed 100644 --- a/sdk/datasync/src/operation/update_location_hdfs/builders.rs +++ b/sdk/datasync/src/operation/update_location_hdfs/builders.rs @@ -22,7 +22,8 @@ impl crate::operation::update_location_hdfs::builders::UpdateLocationHdfsInputBu } /// Fluent builder constructing a request to `UpdateLocationHdfs`. /// -///

    Updates some parameters of a previously created location for a Hadoop Distributed File System cluster.

    +///

    Modifies the following configuration parameters of the Hadoop Distributed File System (HDFS) transfer location that you're using with DataSync.

    +///

    For more information, see Configuring DataSync transfers with an HDFS cluster.

    #[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct UpdateLocationHdfsFluentBuilder { handle: ::std::sync::Arc, diff --git a/sdk/datasync/src/operation/update_location_nfs/builders.rs b/sdk/datasync/src/operation/update_location_nfs/builders.rs index 350250b96bb5..81a748795210 100644 --- a/sdk/datasync/src/operation/update_location_nfs/builders.rs +++ b/sdk/datasync/src/operation/update_location_nfs/builders.rs @@ -22,8 +22,8 @@ impl crate::operation::update_location_nfs::builders::UpdateLocationNfsInputBuil } /// Fluent builder constructing a request to `UpdateLocationNfs`. /// -///

    Modifies some configurations of the Network File System (NFS) transfer location that you're using with DataSync.

    -///

    For more information, see Configuring transfers to or from an NFS file server.

    +///

    Modifies the following configuration parameters of the Network File System (NFS) transfer location that you're using with DataSync.

    +///

    For more information, see Configuring transfers with an NFS file server.

    #[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct UpdateLocationNfsFluentBuilder { handle: ::std::sync::Arc, diff --git a/sdk/datasync/src/operation/update_location_object_storage/builders.rs b/sdk/datasync/src/operation/update_location_object_storage/builders.rs index f62758dce981..26ef4eb4a676 100644 --- a/sdk/datasync/src/operation/update_location_object_storage/builders.rs +++ b/sdk/datasync/src/operation/update_location_object_storage/builders.rs @@ -22,7 +22,8 @@ impl crate::operation::update_location_object_storage::builders::UpdateLocationO } /// Fluent builder constructing a request to `UpdateLocationObjectStorage`. /// -///

    Updates some parameters of an existing DataSync location for an object storage system.

    +///

    Modifies the following configuration parameters of the object storage transfer location that you're using with DataSync.

    +///

    For more information, see Configuring DataSync transfers with an object storage system.

    #[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct UpdateLocationObjectStorageFluentBuilder { handle: ::std::sync::Arc, diff --git a/sdk/datasync/src/operation/update_location_s3.rs b/sdk/datasync/src/operation/update_location_s3.rs new file mode 100644 index 000000000000..ac4b5cb4eb7b --- /dev/null +++ b/sdk/datasync/src/operation/update_location_s3.rs @@ -0,0 +1,368 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `UpdateLocationS3`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationS3; +impl UpdateLocationS3 { + /// Creates a new `UpdateLocationS3` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::update_location_s3::UpdateLocationS3Input, + ) -> ::std::result::Result< + crate::operation::update_location_s3::UpdateLocationS3Output, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_s3::UpdateLocationS3Error, + ::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::update_location_s3::UpdateLocationS3Input, + 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("datasync", "UpdateLocationS3", 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 UpdateLocationS3 { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateLocationS3"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + UpdateLocationS3RequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + UpdateLocationS3ResponseDeserializer, + )); + + 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( + "UpdateLocationS3", + "datasync", + )); + 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("UpdateLocationS3") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(UpdateLocationS3EndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::update_location_s3::UpdateLocationS3Error, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::update_location_s3::UpdateLocationS3Error, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::update_location_s3::UpdateLocationS3Error, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct UpdateLocationS3ResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateLocationS3ResponseDeserializer { + 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_update_location_s3::de_update_location_s3_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_update_location_s3::de_update_location_s3_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct UpdateLocationS3RequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateLocationS3RequestSerializer { + #[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::update_location_s3::UpdateLocationS3Input, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::update_location_s3::UpdateLocationS3Input, + 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/x-amz-json-1.1"); + builder = _header_serialization_settings.set_default_header( + builder, + ::http::header::HeaderName::from_static("x-amz-target"), + "FmrsService.UpdateLocationS3", + ); + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_location_s3::ser_update_location_s3_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 UpdateLocationS3EndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateLocationS3EndpointParamsInterceptor { + fn name(&self) -> &'static str { + "UpdateLocationS3EndpointParamsInterceptor" + } + + 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 UpdateLocationS3Input")?; + + 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(()) + } +} + +// The get_* functions below are generated from JMESPath expressions in the +// operationContextParams trait. They target the operation's input shape. + +/// Error type for the `UpdateLocationS3Error` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum UpdateLocationS3Error { + ///

    This exception is thrown when an error occurs in the DataSync service.

    + InternalException(crate::types::error::InternalException), + ///

    This exception is thrown when the client submits a malformed request.

    + InvalidRequestException(crate::types::error::InvalidRequestException), + /// 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-UpdateLocationS3Error) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl UpdateLocationS3Error { + /// Creates the `UpdateLocationS3Error::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 `UpdateLocationS3Error::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::InternalException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InvalidRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `UpdateLocationS3Error::InternalException`. + pub fn is_internal_exception(&self) -> bool { + matches!(self, Self::InternalException(_)) + } + /// Returns `true` if the error kind is `UpdateLocationS3Error::InvalidRequestException`. + pub fn is_invalid_request_exception(&self) -> bool { + matches!(self, Self::InvalidRequestException(_)) + } +} +impl ::std::error::Error for UpdateLocationS3Error { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::InternalException(_inner) => ::std::option::Option::Some(_inner), + Self::InvalidRequestException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for UpdateLocationS3Error { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::InternalException(_inner) => _inner.fmt(f), + Self::InvalidRequestException(_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 UpdateLocationS3Error { + 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 UpdateLocationS3Error { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::InternalException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InvalidRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateLocationS3Error { + 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::update_location_s3::UpdateLocationS3Error { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::update_location_s3::_update_location_s3_output::UpdateLocationS3Output; + +pub use crate::operation::update_location_s3::_update_location_s3_input::UpdateLocationS3Input; + +mod _update_location_s3_input; + +mod _update_location_s3_output; + +/// Builders +pub mod builders; diff --git a/sdk/datasync/src/operation/update_location_s3/_update_location_s3_input.rs b/sdk/datasync/src/operation/update_location_s3/_update_location_s3_input.rs new file mode 100644 index 000000000000..17bbb7b03e66 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_s3/_update_location_s3_input.rs @@ -0,0 +1,193 @@ +// 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 UpdateLocationS3Input { + ///

    Specifies the Amazon Resource Name (ARN) of the Amazon S3 transfer location that you're updating.

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

    Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location).

    + ///

    DataSync can't transfer objects with a prefix that begins with a slash (/) or includes //, /./, or /../ patterns. For example:

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

      /photos

    • + ///
    • + ///

      photos//2006/January

    • + ///
    • + ///

      photos/./2006/February

    • + ///
    • + ///

      photos/../2006/March

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

    Specifies the storage class that you want your objects to use when Amazon S3 is a transfer destination.

    + ///

    For buckets in Amazon Web Services Regions, the storage class defaults to STANDARD. For buckets on Outposts, the storage class defaults to OUTPOSTS.

    + ///

    For more information, see Storage class considerations with Amazon S3 transfers.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

    + pub s3_config: ::std::option::Option, +} +impl UpdateLocationS3Input { + ///

    Specifies the Amazon Resource Name (ARN) of the Amazon S3 transfer location that you're updating.

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

    Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location).

    + ///

    DataSync can't transfer objects with a prefix that begins with a slash (/) or includes //, /./, or /../ patterns. For example:

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

      /photos

    • + ///
    • + ///

      photos//2006/January

    • + ///
    • + ///

      photos/./2006/February

    • + ///
    • + ///

      photos/../2006/March

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

    Specifies the storage class that you want your objects to use when Amazon S3 is a transfer destination.

    + ///

    For buckets in Amazon Web Services Regions, the storage class defaults to STANDARD. For buckets on Outposts, the storage class defaults to OUTPOSTS.

    + ///

    For more information, see Storage class considerations with Amazon S3 transfers.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

    + pub fn s3_config(&self) -> ::std::option::Option<&crate::types::S3Config> { + self.s3_config.as_ref() + } +} +impl UpdateLocationS3Input { + /// Creates a new builder-style object to manufacture [`UpdateLocationS3Input`](crate::operation::update_location_s3::UpdateLocationS3Input). + pub fn builder() -> crate::operation::update_location_s3::builders::UpdateLocationS3InputBuilder { + crate::operation::update_location_s3::builders::UpdateLocationS3InputBuilder::default() + } +} + +/// A builder for [`UpdateLocationS3Input`](crate::operation::update_location_s3::UpdateLocationS3Input). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationS3InputBuilder { + pub(crate) location_arn: ::std::option::Option<::std::string::String>, + pub(crate) subdirectory: ::std::option::Option<::std::string::String>, + pub(crate) s3_storage_class: ::std::option::Option, + pub(crate) s3_config: ::std::option::Option, +} +impl UpdateLocationS3InputBuilder { + ///

    Specifies the Amazon Resource Name (ARN) of the Amazon S3 transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the Amazon S3 transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the Amazon S3 transfer location that you're updating.

    + pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.location_arn + } + ///

    Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location).

    + ///

    DataSync can't transfer objects with a prefix that begins with a slash (/) or includes //, /./, or /../ patterns. For example:

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

      /photos

    • + ///
    • + ///

      photos//2006/January

    • + ///
    • + ///

      photos/./2006/February

    • + ///
    • + ///

      photos/../2006/March

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

    Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location).

    + ///

    DataSync can't transfer objects with a prefix that begins with a slash (/) or includes //, /./, or /../ patterns. For example:

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

      /photos

    • + ///
    • + ///

      photos//2006/January

    • + ///
    • + ///

      photos/./2006/February

    • + ///
    • + ///

      photos/../2006/March

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

    Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location).

    + ///

    DataSync can't transfer objects with a prefix that begins with a slash (/) or includes //, /./, or /../ patterns. For example:

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

      /photos

    • + ///
    • + ///

      photos//2006/January

    • + ///
    • + ///

      photos/./2006/February

    • + ///
    • + ///

      photos/../2006/March

    • + ///
    + ///
    + pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { + &self.subdirectory + } + ///

    Specifies the storage class that you want your objects to use when Amazon S3 is a transfer destination.

    + ///

    For buckets in Amazon Web Services Regions, the storage class defaults to STANDARD. For buckets on Outposts, the storage class defaults to OUTPOSTS.

    + ///

    For more information, see Storage class considerations with Amazon S3 transfers.

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

    Specifies the storage class that you want your objects to use when Amazon S3 is a transfer destination.

    + ///

    For buckets in Amazon Web Services Regions, the storage class defaults to STANDARD. For buckets on Outposts, the storage class defaults to OUTPOSTS.

    + ///

    For more information, see Storage class considerations with Amazon S3 transfers.

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

    Specifies the storage class that you want your objects to use when Amazon S3 is a transfer destination.

    + ///

    For buckets in Amazon Web Services Regions, the storage class defaults to STANDARD. For buckets on Outposts, the storage class defaults to OUTPOSTS.

    + ///

    For more information, see Storage class considerations with Amazon S3 transfers.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

    + pub fn get_s3_config(&self) -> &::std::option::Option { + &self.s3_config + } + /// Consumes the builder and constructs a [`UpdateLocationS3Input`](crate::operation::update_location_s3::UpdateLocationS3Input). + pub fn build( + self, + ) -> ::std::result::Result { + ::std::result::Result::Ok(crate::operation::update_location_s3::UpdateLocationS3Input { + location_arn: self.location_arn, + subdirectory: self.subdirectory, + s3_storage_class: self.s3_storage_class, + s3_config: self.s3_config, + }) + } +} diff --git a/sdk/datasync/src/operation/update_location_s3/_update_location_s3_output.rs b/sdk/datasync/src/operation/update_location_s3/_update_location_s3_output.rs new file mode 100644 index 000000000000..919a15fc3b61 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_s3/_update_location_s3_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 UpdateLocationS3Output { + _request_id: Option, +} +impl ::aws_types::request_id::RequestId for UpdateLocationS3Output { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl UpdateLocationS3Output { + /// Creates a new builder-style object to manufacture [`UpdateLocationS3Output`](crate::operation::update_location_s3::UpdateLocationS3Output). + pub fn builder() -> crate::operation::update_location_s3::builders::UpdateLocationS3OutputBuilder { + crate::operation::update_location_s3::builders::UpdateLocationS3OutputBuilder::default() + } +} + +/// A builder for [`UpdateLocationS3Output`](crate::operation::update_location_s3::UpdateLocationS3Output). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateLocationS3OutputBuilder { + _request_id: Option, +} +impl UpdateLocationS3OutputBuilder { + 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 [`UpdateLocationS3Output`](crate::operation::update_location_s3::UpdateLocationS3Output). + pub fn build(self) -> crate::operation::update_location_s3::UpdateLocationS3Output { + crate::operation::update_location_s3::UpdateLocationS3Output { + _request_id: self._request_id, + } + } +} diff --git a/sdk/datasync/src/operation/update_location_s3/builders.rs b/sdk/datasync/src/operation/update_location_s3/builders.rs new file mode 100644 index 000000000000..0acaf74bf106 --- /dev/null +++ b/sdk/datasync/src/operation/update_location_s3/builders.rs @@ -0,0 +1,220 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::update_location_s3::_update_location_s3_output::UpdateLocationS3OutputBuilder; + +pub use crate::operation::update_location_s3::_update_location_s3_input::UpdateLocationS3InputBuilder; + +impl crate::operation::update_location_s3::builders::UpdateLocationS3InputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::update_location_s3::UpdateLocationS3Output, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_s3::UpdateLocationS3Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.update_location_s3(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `UpdateLocationS3`. +/// +///

    Modifies the following configuration parameters of the Amazon S3 transfer location that you're using with DataSync.

    +///

    Before you begin, make sure that you read the following topics:

    +/// +///
    +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct UpdateLocationS3FluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::update_location_s3::builders::UpdateLocationS3InputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::update_location_s3::UpdateLocationS3Output, + crate::operation::update_location_s3::UpdateLocationS3Error, + > for UpdateLocationS3FluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::update_location_s3::UpdateLocationS3Output, + crate::operation::update_location_s3::UpdateLocationS3Error, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl UpdateLocationS3FluentBuilder { + /// Creates a new `UpdateLocationS3FluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the UpdateLocationS3 as a reference. + pub fn as_input(&self) -> &crate::operation::update_location_s3::builders::UpdateLocationS3InputBuilder { + &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::update_location_s3::UpdateLocationS3Output, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_location_s3::UpdateLocationS3Error, + ::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::update_location_s3::UpdateLocationS3::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::update_location_s3::UpdateLocationS3::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::update_location_s3::UpdateLocationS3Output, + crate::operation::update_location_s3::UpdateLocationS3Error, + 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 + } + ///

    Specifies the Amazon Resource Name (ARN) of the Amazon S3 transfer location that you're updating.

    + pub fn location_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.location_arn(input.into()); + self + } + ///

    Specifies the Amazon Resource Name (ARN) of the Amazon S3 transfer location that you're updating.

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

    Specifies the Amazon Resource Name (ARN) of the Amazon S3 transfer location that you're updating.

    + pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_location_arn() + } + ///

    Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location).

    + ///

    DataSync can't transfer objects with a prefix that begins with a slash (/) or includes //, /./, or /../ patterns. For example:

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

      /photos

    • + ///
    • + ///

      photos//2006/January

    • + ///
    • + ///

      photos/./2006/February

    • + ///
    • + ///

      photos/../2006/March

    • + ///
    + ///
    + pub fn subdirectory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.subdirectory(input.into()); + self + } + ///

    Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location).

    + ///

    DataSync can't transfer objects with a prefix that begins with a slash (/) or includes //, /./, or /../ patterns. For example:

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

      /photos

    • + ///
    • + ///

      photos//2006/January

    • + ///
    • + ///

      photos/./2006/February

    • + ///
    • + ///

      photos/../2006/March

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

    Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location).

    + ///

    DataSync can't transfer objects with a prefix that begins with a slash (/) or includes //, /./, or /../ patterns. For example:

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

      /photos

    • + ///
    • + ///

      photos//2006/January

    • + ///
    • + ///

      photos/./2006/February

    • + ///
    • + ///

      photos/../2006/March

    • + ///
    + ///
    + pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_subdirectory() + } + ///

    Specifies the storage class that you want your objects to use when Amazon S3 is a transfer destination.

    + ///

    For buckets in Amazon Web Services Regions, the storage class defaults to STANDARD. For buckets on Outposts, the storage class defaults to OUTPOSTS.

    + ///

    For more information, see Storage class considerations with Amazon S3 transfers.

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

    Specifies the storage class that you want your objects to use when Amazon S3 is a transfer destination.

    + ///

    For buckets in Amazon Web Services Regions, the storage class defaults to STANDARD. For buckets on Outposts, the storage class defaults to OUTPOSTS.

    + ///

    For more information, see Storage class considerations with Amazon S3 transfers.

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

    Specifies the storage class that you want your objects to use when Amazon S3 is a transfer destination.

    + ///

    For buckets in Amazon Web Services Regions, the storage class defaults to STANDARD. For buckets on Outposts, the storage class defaults to OUTPOSTS.

    + ///

    For more information, see Storage class considerations with Amazon S3 transfers.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

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

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    + ///

    For more information, see Providing DataSync access to S3 buckets.

    + pub fn get_s3_config(&self) -> &::std::option::Option { + self.inner.get_s3_config() + } +} diff --git a/sdk/datasync/src/operation/update_location_smb/builders.rs b/sdk/datasync/src/operation/update_location_smb/builders.rs index e17b6998ee8a..9244a519bfa3 100644 --- a/sdk/datasync/src/operation/update_location_smb/builders.rs +++ b/sdk/datasync/src/operation/update_location_smb/builders.rs @@ -22,7 +22,8 @@ impl crate::operation::update_location_smb::builders::UpdateLocationSmbInputBuil } /// Fluent builder constructing a request to `UpdateLocationSmb`. /// -///

    Updates some of the parameters of a Server Message Block (SMB) file server location that you can use for DataSync transfers.

    +///

    Modifies the following configuration parameters of the Server Message Block (SMB) transfer location that you're using with DataSync.

    +///

    For more information, see Configuring DataSync transfers with an SMB file server.

    #[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct UpdateLocationSmbFluentBuilder { handle: ::std::sync::Arc, diff --git a/sdk/datasync/src/protocol_serde.rs b/sdk/datasync/src/protocol_serde.rs index 947e09336126..a62250282811 100644 --- a/sdk/datasync/src/protocol_serde.rs +++ b/sdk/datasync/src/protocol_serde.rs @@ -129,12 +129,24 @@ pub(crate) mod shape_update_discovery_job; pub(crate) mod shape_update_location_azure_blob; +pub(crate) mod shape_update_location_efs; + +pub(crate) mod shape_update_location_fsx_lustre; + +pub(crate) mod shape_update_location_fsx_ontap; + +pub(crate) mod shape_update_location_fsx_open_zfs; + +pub(crate) mod shape_update_location_fsx_windows; + pub(crate) mod shape_update_location_hdfs; pub(crate) mod shape_update_location_nfs; pub(crate) mod shape_update_location_object_storage; +pub(crate) mod shape_update_location_s3; + pub(crate) mod shape_update_location_smb; pub(crate) mod shape_update_storage_system; @@ -261,12 +273,24 @@ pub(crate) mod shape_update_discovery_job_input; pub(crate) mod shape_update_location_azure_blob_input; +pub(crate) mod shape_update_location_efs_input; + +pub(crate) mod shape_update_location_fsx_lustre_input; + +pub(crate) mod shape_update_location_fsx_ontap_input; + +pub(crate) mod shape_update_location_fsx_open_zfs_input; + +pub(crate) mod shape_update_location_fsx_windows_input; + pub(crate) mod shape_update_location_hdfs_input; pub(crate) mod shape_update_location_nfs_input; pub(crate) mod shape_update_location_object_storage_input; +pub(crate) mod shape_update_location_s3_input; + pub(crate) mod shape_update_location_smb_input; pub(crate) mod shape_update_storage_system_input; @@ -301,6 +325,8 @@ pub(crate) mod shape_filter_rule; pub(crate) mod shape_fsx_protocol; +pub(crate) mod shape_fsx_update_protocol; + pub(crate) mod shape_hdfs_name_node; pub(crate) mod shape_hdfs_name_node_list; @@ -367,6 +393,8 @@ pub(crate) mod shape_fsx_protocol_nfs; pub(crate) mod shape_fsx_protocol_smb; +pub(crate) mod shape_fsx_update_protocol_smb; + pub(crate) mod shape_location_list_entry; pub(crate) mod shape_net_app_ontap_clusters; diff --git a/sdk/datasync/src/protocol_serde/shape_fsx_update_protocol.rs b/sdk/datasync/src/protocol_serde/shape_fsx_update_protocol.rs new file mode 100644 index 000000000000..36262220ea00 --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_fsx_update_protocol.rs @@ -0,0 +1,19 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_fsx_update_protocol( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::FsxUpdateProtocol, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.nfs { + #[allow(unused_mut)] + let mut object_2 = object.key("NFS").start_object(); + crate::protocol_serde::shape_fsx_protocol_nfs::ser_fsx_protocol_nfs(&mut object_2, var_1)?; + object_2.finish(); + } + if let Some(var_3) = &input.smb { + #[allow(unused_mut)] + let mut object_4 = object.key("SMB").start_object(); + crate::protocol_serde::shape_fsx_update_protocol_smb::ser_fsx_update_protocol_smb(&mut object_4, var_3)?; + object_4.finish(); + } + Ok(()) +} diff --git a/sdk/datasync/src/protocol_serde/shape_fsx_update_protocol_smb.rs b/sdk/datasync/src/protocol_serde/shape_fsx_update_protocol_smb.rs new file mode 100644 index 000000000000..1767b4f86d3a --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_fsx_update_protocol_smb.rs @@ -0,0 +1,22 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_fsx_update_protocol_smb( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::FsxUpdateProtocolSmb, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.domain { + object.key("Domain").string(var_1.as_str()); + } + if let Some(var_2) = &input.mount_options { + #[allow(unused_mut)] + let mut object_3 = object.key("MountOptions").start_object(); + crate::protocol_serde::shape_smb_mount_options::ser_smb_mount_options(&mut object_3, var_2)?; + object_3.finish(); + } + if let Some(var_4) = &input.password { + object.key("Password").string(var_4.as_str()); + } + if let Some(var_5) = &input.user { + object.key("User").string(var_5.as_str()); + } + Ok(()) +} diff --git a/sdk/datasync/src/protocol_serde/shape_update_location_efs.rs b/sdk/datasync/src/protocol_serde/shape_update_location_efs.rs new file mode 100644 index 000000000000..a5765574a03e --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_update_location_efs.rs @@ -0,0 +1,78 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_location_efs_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::update_location_efs::UpdateLocationEfsError::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::update_location_efs::UpdateLocationEfsError::unhandled(generic)), + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "InternalException" => crate::operation::update_location_efs::UpdateLocationEfsError::InternalException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_exception::de_internal_exception_json_err(_response_body, output) + .map_err(crate::operation::update_location_efs::UpdateLocationEfsError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "InvalidRequestException" => crate::operation::update_location_efs::UpdateLocationEfsError::InvalidRequestException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InvalidRequestExceptionBuilder::default(); + output = crate::protocol_serde::shape_invalid_request_exception::de_invalid_request_exception_json_err(_response_body, output) + .map_err(crate::operation::update_location_efs::UpdateLocationEfsError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::update_location_efs::UpdateLocationEfsError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_location_efs_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::update_location_efs::builders::UpdateLocationEfsOutputBuilder::default(); + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_update_location_efs_input( + input: &crate::operation::update_location_efs::UpdateLocationEfsInput, +) -> 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_update_location_efs_input::ser_update_location_efs_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} diff --git a/sdk/datasync/src/protocol_serde/shape_update_location_efs_input.rs b/sdk/datasync/src/protocol_serde/shape_update_location_efs_input.rs new file mode 100644 index 000000000000..e46aa0a8d667 --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_update_location_efs_input.rs @@ -0,0 +1,22 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_update_location_efs_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::update_location_efs::UpdateLocationEfsInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.location_arn { + object.key("LocationArn").string(var_1.as_str()); + } + if let Some(var_2) = &input.subdirectory { + object.key("Subdirectory").string(var_2.as_str()); + } + if let Some(var_3) = &input.access_point_arn { + object.key("AccessPointArn").string(var_3.as_str()); + } + if let Some(var_4) = &input.file_system_access_role_arn { + object.key("FileSystemAccessRoleArn").string(var_4.as_str()); + } + if let Some(var_5) = &input.in_transit_encryption { + object.key("InTransitEncryption").string(var_5.as_str()); + } + Ok(()) +} diff --git a/sdk/datasync/src/protocol_serde/shape_update_location_fsx_lustre.rs b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_lustre.rs new file mode 100644 index 000000000000..543cd8c1df6c --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_lustre.rs @@ -0,0 +1,86 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_location_fsx_lustre_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreOutput, + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError::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::update_location_fsx_lustre::UpdateLocationFsxLustreError::unhandled( + generic, + )) + } + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "InternalException" => crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError::InternalException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_exception::de_internal_exception_json_err(_response_body, output) + .map_err(crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "InvalidRequestException" => crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError::InvalidRequestException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InvalidRequestExceptionBuilder::default(); + output = crate::protocol_serde::shape_invalid_request_exception::de_invalid_request_exception_json_err(_response_body, output) + .map_err(crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_location_fsx_lustre_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreOutput, + crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::update_location_fsx_lustre::builders::UpdateLocationFsxLustreOutputBuilder::default(); + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_update_location_fsx_lustre_input( + input: &crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreInput, +) -> 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_update_location_fsx_lustre_input::ser_update_location_fsx_lustre_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} diff --git a/sdk/datasync/src/protocol_serde/shape_update_location_fsx_lustre_input.rs b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_lustre_input.rs new file mode 100644 index 000000000000..c60e042f5006 --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_lustre_input.rs @@ -0,0 +1,13 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_update_location_fsx_lustre_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::update_location_fsx_lustre::UpdateLocationFsxLustreInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.location_arn { + object.key("LocationArn").string(var_1.as_str()); + } + if let Some(var_2) = &input.subdirectory { + object.key("Subdirectory").string(var_2.as_str()); + } + Ok(()) +} diff --git a/sdk/datasync/src/protocol_serde/shape_update_location_fsx_ontap.rs b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_ontap.rs new file mode 100644 index 000000000000..9cb021c74336 --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_ontap.rs @@ -0,0 +1,86 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_location_fsx_ontap_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapOutput, + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError::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::update_location_fsx_ontap::UpdateLocationFsxOntapError::unhandled( + generic, + )) + } + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "InternalException" => crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError::InternalException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_exception::de_internal_exception_json_err(_response_body, output) + .map_err(crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "InvalidRequestException" => crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError::InvalidRequestException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InvalidRequestExceptionBuilder::default(); + output = crate::protocol_serde::shape_invalid_request_exception::de_invalid_request_exception_json_err(_response_body, output) + .map_err(crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_location_fsx_ontap_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapOutput, + crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::update_location_fsx_ontap::builders::UpdateLocationFsxOntapOutputBuilder::default(); + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_update_location_fsx_ontap_input( + input: &crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapInput, +) -> 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_update_location_fsx_ontap_input::ser_update_location_fsx_ontap_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} diff --git a/sdk/datasync/src/protocol_serde/shape_update_location_fsx_ontap_input.rs b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_ontap_input.rs new file mode 100644 index 000000000000..5334a1570010 --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_ontap_input.rs @@ -0,0 +1,19 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_update_location_fsx_ontap_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::update_location_fsx_ontap::UpdateLocationFsxOntapInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.location_arn { + object.key("LocationArn").string(var_1.as_str()); + } + if let Some(var_2) = &input.protocol { + #[allow(unused_mut)] + let mut object_3 = object.key("Protocol").start_object(); + crate::protocol_serde::shape_fsx_update_protocol::ser_fsx_update_protocol(&mut object_3, var_2)?; + object_3.finish(); + } + if let Some(var_4) = &input.subdirectory { + object.key("Subdirectory").string(var_4.as_str()); + } + Ok(()) +} diff --git a/sdk/datasync/src/protocol_serde/shape_update_location_fsx_open_zfs.rs b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_open_zfs.rs new file mode 100644 index 000000000000..de2f6b1c298d --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_open_zfs.rs @@ -0,0 +1,86 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_location_fsx_open_zfs_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput, + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError::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::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError::unhandled( + generic, + )) + } + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "InternalException" => crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError::InternalException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_exception::de_internal_exception_json_err(_response_body, output) + .map_err(crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "InvalidRequestException" => crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError::InvalidRequestException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InvalidRequestExceptionBuilder::default(); + output = crate::protocol_serde::shape_invalid_request_exception::de_invalid_request_exception_json_err(_response_body, output) + .map_err(crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_location_fsx_open_zfs_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsOutput, + crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::update_location_fsx_open_zfs::builders::UpdateLocationFsxOpenZfsOutputBuilder::default(); + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_update_location_fsx_open_zfs_input( + input: &crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsInput, +) -> 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_update_location_fsx_open_zfs_input::ser_update_location_fsx_open_zfs_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} diff --git a/sdk/datasync/src/protocol_serde/shape_update_location_fsx_open_zfs_input.rs b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_open_zfs_input.rs new file mode 100644 index 000000000000..369fcc8abd36 --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_open_zfs_input.rs @@ -0,0 +1,19 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_update_location_fsx_open_zfs_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::update_location_fsx_open_zfs::UpdateLocationFsxOpenZfsInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.location_arn { + object.key("LocationArn").string(var_1.as_str()); + } + if let Some(var_2) = &input.protocol { + #[allow(unused_mut)] + let mut object_3 = object.key("Protocol").start_object(); + crate::protocol_serde::shape_fsx_protocol::ser_fsx_protocol(&mut object_3, var_2)?; + object_3.finish(); + } + if let Some(var_4) = &input.subdirectory { + object.key("Subdirectory").string(var_4.as_str()); + } + Ok(()) +} diff --git a/sdk/datasync/src/protocol_serde/shape_update_location_fsx_windows.rs b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_windows.rs new file mode 100644 index 000000000000..b6ff2bb4bd31 --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_windows.rs @@ -0,0 +1,86 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_location_fsx_windows_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsOutput, + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError::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::update_location_fsx_windows::UpdateLocationFsxWindowsError::unhandled( + generic, + )) + } + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "InternalException" => crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError::InternalException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_exception::de_internal_exception_json_err(_response_body, output) + .map_err(crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "InvalidRequestException" => crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError::InvalidRequestException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InvalidRequestExceptionBuilder::default(); + output = crate::protocol_serde::shape_invalid_request_exception::de_invalid_request_exception_json_err(_response_body, output) + .map_err(crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_location_fsx_windows_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsOutput, + crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::update_location_fsx_windows::builders::UpdateLocationFsxWindowsOutputBuilder::default(); + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_update_location_fsx_windows_input( + input: &crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsInput, +) -> 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_update_location_fsx_windows_input::ser_update_location_fsx_windows_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} diff --git a/sdk/datasync/src/protocol_serde/shape_update_location_fsx_windows_input.rs b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_windows_input.rs new file mode 100644 index 000000000000..b4985ece4cf0 --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_update_location_fsx_windows_input.rs @@ -0,0 +1,22 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_update_location_fsx_windows_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::update_location_fsx_windows::UpdateLocationFsxWindowsInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.location_arn { + object.key("LocationArn").string(var_1.as_str()); + } + if let Some(var_2) = &input.subdirectory { + object.key("Subdirectory").string(var_2.as_str()); + } + if let Some(var_3) = &input.domain { + object.key("Domain").string(var_3.as_str()); + } + if let Some(var_4) = &input.user { + object.key("User").string(var_4.as_str()); + } + if let Some(var_5) = &input.password { + object.key("Password").string(var_5.as_str()); + } + Ok(()) +} diff --git a/sdk/datasync/src/protocol_serde/shape_update_location_s3.rs b/sdk/datasync/src/protocol_serde/shape_update_location_s3.rs new file mode 100644 index 000000000000..93a66db5afd9 --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_update_location_s3.rs @@ -0,0 +1,76 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_location_s3_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::update_location_s3::UpdateLocationS3Error::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::update_location_s3::UpdateLocationS3Error::unhandled(generic)), + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "InternalException" => crate::operation::update_location_s3::UpdateLocationS3Error::InternalException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_exception::de_internal_exception_json_err(_response_body, output) + .map_err(crate::operation::update_location_s3::UpdateLocationS3Error::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "InvalidRequestException" => crate::operation::update_location_s3::UpdateLocationS3Error::InvalidRequestException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InvalidRequestExceptionBuilder::default(); + output = crate::protocol_serde::shape_invalid_request_exception::de_invalid_request_exception_json_err(_response_body, output) + .map_err(crate::operation::update_location_s3::UpdateLocationS3Error::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::update_location_s3::UpdateLocationS3Error::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_location_s3_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::update_location_s3::builders::UpdateLocationS3OutputBuilder::default(); + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_update_location_s3_input( + input: &crate::operation::update_location_s3::UpdateLocationS3Input, +) -> 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_update_location_s3_input::ser_update_location_s3_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} diff --git a/sdk/datasync/src/protocol_serde/shape_update_location_s3_input.rs b/sdk/datasync/src/protocol_serde/shape_update_location_s3_input.rs new file mode 100644 index 000000000000..c10ebb9629bb --- /dev/null +++ b/sdk/datasync/src/protocol_serde/shape_update_location_s3_input.rs @@ -0,0 +1,22 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_update_location_s3_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::update_location_s3::UpdateLocationS3Input, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.location_arn { + object.key("LocationArn").string(var_1.as_str()); + } + if let Some(var_2) = &input.subdirectory { + object.key("Subdirectory").string(var_2.as_str()); + } + if let Some(var_3) = &input.s3_storage_class { + object.key("S3StorageClass").string(var_3.as_str()); + } + if let Some(var_4) = &input.s3_config { + #[allow(unused_mut)] + let mut object_5 = object.key("S3Config").start_object(); + crate::protocol_serde::shape_s3_config::ser_s3_config(&mut object_5, var_4)?; + object_5.finish(); + } + Ok(()) +} diff --git a/sdk/datasync/src/types.rs b/sdk/datasync/src/types.rs index 5ea222564376..371ec4192df1 100644 --- a/sdk/datasync/src/types.rs +++ b/sdk/datasync/src/types.rs @@ -71,6 +71,10 @@ pub use crate::types::_smb_mount_options::SmbMountOptions; pub use crate::types::_smb_version::SmbVersion; +pub use crate::types::_s3_config::S3Config; + +pub use crate::types::_s3_storage_class::S3StorageClass; + pub use crate::types::_object_storage_server_protocol::ObjectStorageServerProtocol; pub use crate::types::_nfs_mount_options::NfsMountOptions; @@ -89,6 +93,18 @@ pub use crate::types::_hdfs_rpc_protection::HdfsRpcProtection; pub use crate::types::_hdfs_name_node::HdfsNameNode; +pub use crate::types::_fsx_protocol::FsxProtocol; + +pub use crate::types::_fsx_protocol_smb::FsxProtocolSmb; + +pub use crate::types::_fsx_protocol_nfs::FsxProtocolNfs; + +pub use crate::types::_fsx_update_protocol::FsxUpdateProtocol; + +pub use crate::types::_fsx_update_protocol_smb::FsxUpdateProtocolSmb; + +pub use crate::types::_efs_in_transit_encryption::EfsInTransitEncryption; + pub use crate::types::_azure_access_tier::AzureAccessTier; pub use crate::types::_azure_blob_type::AzureBlobType; @@ -181,18 +197,6 @@ pub use crate::types::_storage_system_connectivity_status::StorageSystemConnecti pub use crate::types::_discovery_system_type::DiscoverySystemType; -pub use crate::types::_s3_config::S3Config; - -pub use crate::types::_s3_storage_class::S3StorageClass; - -pub use crate::types::_fsx_protocol::FsxProtocol; - -pub use crate::types::_fsx_protocol_smb::FsxProtocolSmb; - -pub use crate::types::_fsx_protocol_nfs::FsxProtocolNfs; - -pub use crate::types::_efs_in_transit_encryption::EfsInTransitEncryption; - pub use crate::types::_ec2_config::Ec2Config; pub use crate::types::_private_link_config::PrivateLinkConfig; @@ -245,6 +249,10 @@ mod _fsx_protocol_nfs; mod _fsx_protocol_smb; +mod _fsx_update_protocol; + +mod _fsx_update_protocol_smb; + mod _gid; mod _hdfs_authentication_type; diff --git a/sdk/datasync/src/types/_fsx_protocol_nfs.rs b/sdk/datasync/src/types/_fsx_protocol_nfs.rs index cd614731bf58..9c1bab14f427 100644 --- a/sdk/datasync/src/types/_fsx_protocol_nfs.rs +++ b/sdk/datasync/src/types/_fsx_protocol_nfs.rs @@ -1,6 +1,6 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -///

    Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your Amazon FSx for OpenZFS or Amazon FSx for NetApp ONTAP file system.

    +///

    Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).

    #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct FsxProtocolNfs { diff --git a/sdk/datasync/src/types/_fsx_protocol_smb.rs b/sdk/datasync/src/types/_fsx_protocol_smb.rs index ba53beb4aad2..14a70782db3c 100644 --- a/sdk/datasync/src/types/_fsx_protocol_smb.rs +++ b/sdk/datasync/src/types/_fsx_protocol_smb.rs @@ -1,11 +1,12 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -///

    Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your Amazon FSx for NetApp ONTAP file system. For more information, see Accessing FSx for ONTAP file systems.

    +///

    Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your Amazon FSx for NetApp ONTAP file system's storage virtual machine (SVM). For more information, see Providing DataSync access to FSx for ONTAP file systems.

    #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq)] pub struct FsxProtocolSmb { - ///

    Specifies the fully qualified domain name (FQDN) of the Microsoft Active Directory that your storage virtual machine (SVM) belongs to.

    + ///

    Specifies the name of the Windows domain that your storage virtual machine (SVM) belongs to.

    ///

    If you have multiple domains in your environment, configuring this setting makes sure that DataSync connects to the right SVM.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right SVM.

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

    Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.

    pub mount_options: ::std::option::Option, @@ -16,8 +17,9 @@ pub struct FsxProtocolSmb { pub user: ::std::string::String, } impl FsxProtocolSmb { - ///

    Specifies the fully qualified domain name (FQDN) of the Microsoft Active Directory that your storage virtual machine (SVM) belongs to.

    + ///

    Specifies the name of the Windows domain that your storage virtual machine (SVM) belongs to.

    ///

    If you have multiple domains in your environment, configuring this setting makes sure that DataSync connects to the right SVM.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right SVM.

    pub fn domain(&self) -> ::std::option::Option<&str> { self.domain.as_deref() } @@ -64,20 +66,23 @@ pub struct FsxProtocolSmbBuilder { pub(crate) user: ::std::option::Option<::std::string::String>, } impl FsxProtocolSmbBuilder { - ///

    Specifies the fully qualified domain name (FQDN) of the Microsoft Active Directory that your storage virtual machine (SVM) belongs to.

    + ///

    Specifies the name of the Windows domain that your storage virtual machine (SVM) belongs to.

    ///

    If you have multiple domains in your environment, configuring this setting makes sure that DataSync connects to the right SVM.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right SVM.

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

    Specifies the fully qualified domain name (FQDN) of the Microsoft Active Directory that your storage virtual machine (SVM) belongs to.

    + ///

    Specifies the name of the Windows domain that your storage virtual machine (SVM) belongs to.

    ///

    If you have multiple domains in your environment, configuring this setting makes sure that DataSync connects to the right SVM.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right SVM.

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

    Specifies the fully qualified domain name (FQDN) of the Microsoft Active Directory that your storage virtual machine (SVM) belongs to.

    + ///

    Specifies the name of the Windows domain that your storage virtual machine (SVM) belongs to.

    ///

    If you have multiple domains in your environment, configuring this setting makes sure that DataSync connects to the right SVM.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right SVM.

    pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> { &self.domain } diff --git a/sdk/datasync/src/types/_fsx_update_protocol.rs b/sdk/datasync/src/types/_fsx_update_protocol.rs new file mode 100644 index 000000000000..c6bc8f94aeb1 --- /dev/null +++ b/sdk/datasync/src/types/_fsx_update_protocol.rs @@ -0,0 +1,74 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

    +///

    You can't update the Network File System (NFS) protocol configuration for FSx for ONTAP locations. DataSync currently only supports NFS version 3 with this location type.

    +///
    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct FsxUpdateProtocol { + ///

    Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).

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

    Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's storage virtual machine (SVM).

    + pub smb: ::std::option::Option, +} +impl FsxUpdateProtocol { + ///

    Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).

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

    Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's storage virtual machine (SVM).

    + pub fn smb(&self) -> ::std::option::Option<&crate::types::FsxUpdateProtocolSmb> { + self.smb.as_ref() + } +} +impl FsxUpdateProtocol { + /// Creates a new builder-style object to manufacture [`FsxUpdateProtocol`](crate::types::FsxUpdateProtocol). + pub fn builder() -> crate::types::builders::FsxUpdateProtocolBuilder { + crate::types::builders::FsxUpdateProtocolBuilder::default() + } +} + +/// A builder for [`FsxUpdateProtocol`](crate::types::FsxUpdateProtocol). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct FsxUpdateProtocolBuilder { + pub(crate) nfs: ::std::option::Option, + pub(crate) smb: ::std::option::Option, +} +impl FsxUpdateProtocolBuilder { + ///

    Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).

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

    Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).

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

    Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).

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

    Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's storage virtual machine (SVM).

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

    Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's storage virtual machine (SVM).

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

    Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's storage virtual machine (SVM).

    + pub fn get_smb(&self) -> &::std::option::Option { + &self.smb + } + /// Consumes the builder and constructs a [`FsxUpdateProtocol`](crate::types::FsxUpdateProtocol). + pub fn build(self) -> crate::types::FsxUpdateProtocol { + crate::types::FsxUpdateProtocol { + nfs: self.nfs, + smb: self.smb, + } + } +} diff --git a/sdk/datasync/src/types/_fsx_update_protocol_smb.rs b/sdk/datasync/src/types/_fsx_update_protocol_smb.rs new file mode 100644 index 000000000000..3689f7201b0a --- /dev/null +++ b/sdk/datasync/src/types/_fsx_update_protocol_smb.rs @@ -0,0 +1,146 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your Amazon FSx for NetApp ONTAP file system's storage virtual machine (SVM). For more information, see Providing DataSync access to FSx for ONTAP file systems.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq)] +pub struct FsxUpdateProtocolSmb { + ///

    Specifies the name of the Windows domain that your storage virtual machine (SVM) belongs to.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right SVM.

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

    Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.

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

    Specifies the password of a user who has permission to access your SVM.

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

    Specifies a user that can mount and access the files, folders, and metadata in your SVM.

    + ///

    For information about choosing a user with the right level of access for your transfer, see Using the SMB protocol.

    + pub user: ::std::option::Option<::std::string::String>, +} +impl FsxUpdateProtocolSmb { + ///

    Specifies the name of the Windows domain that your storage virtual machine (SVM) belongs to.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right SVM.

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

    Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.

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

    Specifies the password of a user who has permission to access your SVM.

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

    Specifies a user that can mount and access the files, folders, and metadata in your SVM.

    + ///

    For information about choosing a user with the right level of access for your transfer, see Using the SMB protocol.

    + pub fn user(&self) -> ::std::option::Option<&str> { + self.user.as_deref() + } +} +impl ::std::fmt::Debug for FsxUpdateProtocolSmb { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("FsxUpdateProtocolSmb"); + formatter.field("domain", &self.domain); + formatter.field("mount_options", &self.mount_options); + formatter.field("password", &"*** Sensitive Data Redacted ***"); + formatter.field("user", &self.user); + formatter.finish() + } +} +impl FsxUpdateProtocolSmb { + /// Creates a new builder-style object to manufacture [`FsxUpdateProtocolSmb`](crate::types::FsxUpdateProtocolSmb). + pub fn builder() -> crate::types::builders::FsxUpdateProtocolSmbBuilder { + crate::types::builders::FsxUpdateProtocolSmbBuilder::default() + } +} + +/// A builder for [`FsxUpdateProtocolSmb`](crate::types::FsxUpdateProtocolSmb). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)] +#[non_exhaustive] +pub struct FsxUpdateProtocolSmbBuilder { + pub(crate) domain: ::std::option::Option<::std::string::String>, + pub(crate) mount_options: ::std::option::Option, + pub(crate) password: ::std::option::Option<::std::string::String>, + pub(crate) user: ::std::option::Option<::std::string::String>, +} +impl FsxUpdateProtocolSmbBuilder { + ///

    Specifies the name of the Windows domain that your storage virtual machine (SVM) belongs to.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right SVM.

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

    Specifies the name of the Windows domain that your storage virtual machine (SVM) belongs to.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right SVM.

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

    Specifies the name of the Windows domain that your storage virtual machine (SVM) belongs to.

    + ///

    If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right SVM.

    + pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> { + &self.domain + } + ///

    Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.

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

    Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.

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

    Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.

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

    Specifies the password of a user who has permission to access your SVM.

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

    Specifies the password of a user who has permission to access your SVM.

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

    Specifies the password of a user who has permission to access your SVM.

    + pub fn get_password(&self) -> &::std::option::Option<::std::string::String> { + &self.password + } + ///

    Specifies a user that can mount and access the files, folders, and metadata in your SVM.

    + ///

    For information about choosing a user with the right level of access for your transfer, see Using the SMB protocol.

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

    Specifies a user that can mount and access the files, folders, and metadata in your SVM.

    + ///

    For information about choosing a user with the right level of access for your transfer, see Using the SMB protocol.

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

    Specifies a user that can mount and access the files, folders, and metadata in your SVM.

    + ///

    For information about choosing a user with the right level of access for your transfer, see Using the SMB protocol.

    + pub fn get_user(&self) -> &::std::option::Option<::std::string::String> { + &self.user + } + /// Consumes the builder and constructs a [`FsxUpdateProtocolSmb`](crate::types::FsxUpdateProtocolSmb). + pub fn build(self) -> crate::types::FsxUpdateProtocolSmb { + crate::types::FsxUpdateProtocolSmb { + domain: self.domain, + mount_options: self.mount_options, + password: self.password, + user: self.user, + } + } +} +impl ::std::fmt::Debug for FsxUpdateProtocolSmbBuilder { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("FsxUpdateProtocolSmbBuilder"); + formatter.field("domain", &self.domain); + formatter.field("mount_options", &self.mount_options); + formatter.field("password", &"*** Sensitive Data Redacted ***"); + formatter.field("user", &self.user); + formatter.finish() + } +} diff --git a/sdk/datasync/src/types/_s3_config.rs b/sdk/datasync/src/types/_s3_config.rs index 7034f562f886..65559c9d92f1 100644 --- a/sdk/datasync/src/types/_s3_config.rs +++ b/sdk/datasync/src/types/_s3_config.rs @@ -1,7 +1,7 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. ///

    Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket.

    -///

    For more information, see Accessing S3 buckets.

    +///

    For more information, see Providing DataSync access to S3 buckets.

    #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct S3Config { diff --git a/sdk/datasync/src/types/builders.rs b/sdk/datasync/src/types/builders.rs index 6a344de0368f..ba9b77d78fdc 100644 --- a/sdk/datasync/src/types/builders.rs +++ b/sdk/datasync/src/types/builders.rs @@ -27,6 +27,8 @@ pub use crate::types::_discovery_server_configuration::DiscoveryServerConfigurat pub use crate::types::_smb_mount_options::SmbMountOptionsBuilder; +pub use crate::types::_s3_config::S3ConfigBuilder; + pub use crate::types::_nfs_mount_options::NfsMountOptionsBuilder; pub use crate::types::_on_prem_config::OnPremConfigBuilder; @@ -35,6 +37,16 @@ pub use crate::types::_qop_configuration::QopConfigurationBuilder; pub use crate::types::_hdfs_name_node::HdfsNameNodeBuilder; +pub use crate::types::_fsx_protocol::FsxProtocolBuilder; + +pub use crate::types::_fsx_protocol_smb::FsxProtocolSmbBuilder; + +pub use crate::types::_fsx_protocol_nfs::FsxProtocolNfsBuilder; + +pub use crate::types::_fsx_update_protocol::FsxUpdateProtocolBuilder; + +pub use crate::types::_fsx_update_protocol_smb::FsxUpdateProtocolSmbBuilder; + pub use crate::types::_azure_blob_sas_configuration::AzureBlobSasConfigurationBuilder; pub use crate::types::_tag_list_entry::TagListEntryBuilder; @@ -91,14 +103,6 @@ pub use crate::types::_throughput::ThroughputBuilder; pub use crate::types::_iops::IopsBuilder; -pub use crate::types::_s3_config::S3ConfigBuilder; - -pub use crate::types::_fsx_protocol::FsxProtocolBuilder; - -pub use crate::types::_fsx_protocol_smb::FsxProtocolSmbBuilder; - -pub use crate::types::_fsx_protocol_nfs::FsxProtocolNfsBuilder; - pub use crate::types::_ec2_config::Ec2ConfigBuilder; pub use crate::types::_private_link_config::PrivateLinkConfigBuilder; diff --git a/sdk/iot/Cargo.toml b/sdk/iot/Cargo.toml index 7890b8c7d387..7826a0bde079 100644 --- a/sdk/iot/Cargo.toml +++ b/sdk/iot/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-iot" -version = "1.58.0" +version = "1.59.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for AWS IoT" edition = "2021" diff --git a/sdk/iot/README.md b/sdk/iot/README.md index 59f0d0010ca8..b277345eee41 100644 --- a/sdk/iot/README.md +++ b/sdk/iot/README.md @@ -22,7 +22,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-iot = "1.58.0" +aws-sdk-iot = "1.59.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/iot/src/client.rs b/sdk/iot/src/client.rs index 927d70578bfa..176d42e86af3 100644 --- a/sdk/iot/src/client.rs +++ b/sdk/iot/src/client.rs @@ -453,6 +453,8 @@ mod get_registration_code; mod get_statistics; +mod get_thing_connectivity_data; + mod get_topic_rule; mod get_topic_rule_destination; diff --git a/sdk/iot/src/client/create_command.rs b/sdk/iot/src/client/create_command.rs index fde1d399ee4d..baa98b657ab0 100644 --- a/sdk/iot/src/client/create_command.rs +++ b/sdk/iot/src/client/create_command.rs @@ -9,7 +9,7 @@ impl super::Client { /// - [`description(impl Into)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::description) / [`set_description(Option)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_description):
    required: **false**

    A short text decription of the command.


    /// - [`payload(CommandPayload)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::payload) / [`set_payload(Option)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_payload):
    required: **false**

    The payload object for the command. You must specify this information when using the AWS-IoT namespace.

    You can upload a static payload file from your local storage that contains the instructions for the device to process. The payload file can use any format. To make sure that the device correctly interprets the payload, we recommend you to specify the payload content type.


    /// - [`mandatory_parameters(CommandParameter)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::mandatory_parameters) / [`set_mandatory_parameters(Option>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_mandatory_parameters):
    required: **false**

    A list of parameters that are required by the StartCommandExecution API. These parameters need to be specified only when using the AWS-IoT-FleetWise namespace. You can either specify them here or when running the command using the StartCommandExecution API.


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

    The IAM role that allows access to create the command.


    + /// - [`role_arn(impl Into)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::role_arn) / [`set_role_arn(Option)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_role_arn):
    required: **false**

    The IAM role that you must provide when using the AWS-IoT-FleetWise namespace. The role grants IoT Device Management the permission to access IoT FleetWise resources for generating the payload for the command. This field is not required when you use the AWS-IoT namespace.


    /// - [`tags(Tag)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_tags):
    required: **false**

    Name-value pairs that are used as metadata to manage a command.


    /// - On success, responds with [`CreateCommandOutput`](crate::operation::create_command::CreateCommandOutput) with field(s): /// - [`command_id(Option)`](crate::operation::create_command::CreateCommandOutput::command_id):

    The unique identifier for the command.

    diff --git a/sdk/iot/src/client/get_command.rs b/sdk/iot/src/client/get_command.rs index f12fca54828d..9c9275791ade 100644 --- a/sdk/iot/src/client/get_command.rs +++ b/sdk/iot/src/client/get_command.rs @@ -12,7 +12,7 @@ impl super::Client { /// - [`description(Option)`](crate::operation::get_command::GetCommandOutput::description):

    A short text description of the command.

    /// - [`mandatory_parameters(Option>)`](crate::operation::get_command::GetCommandOutput::mandatory_parameters):

    A list of parameters for the command created.

    /// - [`payload(Option)`](crate::operation::get_command::GetCommandOutput::payload):

    The payload object that you provided for the command.

    - /// - [`role_arn(Option)`](crate::operation::get_command::GetCommandOutput::role_arn):

    The IAM role that allows access to retrieve information about the command.

    + /// - [`role_arn(Option)`](crate::operation::get_command::GetCommandOutput::role_arn):

    The IAM role that you provided when creating the command with AWS-IoT-FleetWise as the namespace.

    /// - [`created_at(Option)`](crate::operation::get_command::GetCommandOutput::created_at):

    The timestamp, when the command was created.

    /// - [`last_updated_at(Option)`](crate::operation::get_command::GetCommandOutput::last_updated_at):

    The timestamp, when the command was last updated.

    /// - [`deprecated(Option)`](crate::operation::get_command::GetCommandOutput::deprecated):

    Indicates whether the command has been deprecated.

    diff --git a/sdk/iot/src/client/get_command_execution.rs b/sdk/iot/src/client/get_command_execution.rs index 19c7d015d9b5..aecf53010d86 100644 --- a/sdk/iot/src/client/get_command_execution.rs +++ b/sdk/iot/src/client/get_command_execution.rs @@ -19,7 +19,7 @@ impl super::Client { /// - [`last_updated_at(Option)`](crate::operation::get_command_execution::GetCommandExecutionOutput::last_updated_at):

    The timestamp, when the command execution was last updated.

    /// - [`started_at(Option)`](crate::operation::get_command_execution::GetCommandExecutionOutput::started_at):

    The timestamp, when the command execution was started.

    /// - [`completed_at(Option)`](crate::operation::get_command_execution::GetCommandExecutionOutput::completed_at):

    The timestamp, when the command execution was completed.

    - /// - [`time_to_live(Option)`](crate::operation::get_command_execution::GetCommandExecutionOutput::time_to_live):

    The time to live (TTL) parameter for the GetCommandExecution API.

    + /// - [`time_to_live(Option)`](crate::operation::get_command_execution::GetCommandExecutionOutput::time_to_live):

    The time to live (TTL) parameter that indicates the duration for which executions will be retained in your account. The default value is six months.

    /// - On failure, responds with [`SdkError`](crate::operation::get_command_execution::GetCommandExecutionError) pub fn get_command_execution(&self) -> crate::operation::get_command_execution::builders::GetCommandExecutionFluentBuilder { crate::operation::get_command_execution::builders::GetCommandExecutionFluentBuilder::new(self.handle.clone()) diff --git a/sdk/iot/src/client/get_thing_connectivity_data.rs b/sdk/iot/src/client/get_thing_connectivity_data.rs new file mode 100644 index 000000000000..3cf64693b51b --- /dev/null +++ b/sdk/iot/src/client/get_thing_connectivity_data.rs @@ -0,0 +1,16 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`GetThingConnectivityData`](crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`thing_name(impl Into)`](crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataFluentBuilder::thing_name) / [`set_thing_name(Option)`](crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataFluentBuilder::set_thing_name):
    required: **true**

    The name of your IoT thing.


    + /// - On success, responds with [`GetThingConnectivityDataOutput`](crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput) with field(s): + /// - [`thing_name(Option)`](crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput::thing_name):

    The name of your IoT thing.

    + /// - [`connected(Option)`](crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput::connected):

    A Boolean that indicates the connectivity status.

    + /// - [`timestamp(Option)`](crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput::timestamp):

    The timestamp of when the event occurred.

    + /// - [`disconnect_reason(Option)`](crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput::disconnect_reason):

    The reason why the client is disconnecting.

    + /// - On failure, responds with [`SdkError`](crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError) + pub fn get_thing_connectivity_data(&self) -> crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataFluentBuilder { + crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/iot/src/error_meta.rs b/sdk/iot/src/error_meta.rs index 73510f44bad0..2dab62e556f5 100644 --- a/sdk/iot/src/error_meta.rs +++ b/sdk/iot/src/error_meta.rs @@ -5102,6 +5102,51 @@ impl From for Error { } } } +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::get_thing_connectivity_data::GetThingConnectivityDataError) -> Self { + match err { + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::IndexNotReadyException(inner) => { + Error::IndexNotReadyException(inner) + } + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::InternalFailureException(inner) => { + Error::InternalFailureException(inner) + } + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::InvalidRequestException(inner) => { + Error::InvalidRequestException(inner) + } + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::ResourceNotFoundException(inner) => { + Error::ResourceNotFoundException(inner) + } + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::ServiceUnavailableException(inner) => { + Error::ServiceUnavailableException(inner) + } + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::ThrottlingException(inner) => { + Error::ThrottlingException(inner) + } + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::UnauthorizedException(inner) => { + Error::UnauthorizedException(inner) + } + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::Unhandled(inner) => Error::Unhandled(inner), + } + } +} impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error where R: Send + Sync + std::fmt::Debug + 'static, diff --git a/sdk/iot/src/lib.rs b/sdk/iot/src/lib.rs index b2fbcaced41f..a8aa758fd12d 100644 --- a/sdk/iot/src/lib.rs +++ b/sdk/iot/src/lib.rs @@ -39,7 +39,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-iot = "1.58.0" +//! aws-sdk-iot = "1.59.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/iot/src/operation.rs b/sdk/iot/src/operation.rs index a48725bd60cd..1ba210eb5735 100644 --- a/sdk/iot/src/operation.rs +++ b/sdk/iot/src/operation.rs @@ -436,6 +436,9 @@ pub mod get_registration_code; /// Types for the `GetStatistics` operation. pub mod get_statistics; +/// Types for the `GetThingConnectivityData` operation. +pub mod get_thing_connectivity_data; + /// Types for the `GetTopicRule` operation. pub mod get_topic_rule; diff --git a/sdk/iot/src/operation/create_command/_create_command_input.rs b/sdk/iot/src/operation/create_command/_create_command_input.rs index e5f91881a368..588ef53a4402 100644 --- a/sdk/iot/src/operation/create_command/_create_command_input.rs +++ b/sdk/iot/src/operation/create_command/_create_command_input.rs @@ -16,7 +16,7 @@ pub struct CreateCommandInput { pub payload: ::std::option::Option, ///

    A list of parameters that are required by the StartCommandExecution API. These parameters need to be specified only when using the AWS-IoT-FleetWise namespace. You can either specify them here or when running the command using the StartCommandExecution API.

    pub mandatory_parameters: ::std::option::Option<::std::vec::Vec>, - ///

    The IAM role that allows access to create the command.

    + ///

    The IAM role that you must provide when using the AWS-IoT-FleetWise namespace. The role grants IoT Device Management the permission to access IoT FleetWise resources for generating the payload for the command. This field is not required when you use the AWS-IoT namespace.

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

    Name-value pairs that are used as metadata to manage a command.

    pub tags: ::std::option::Option<::std::vec::Vec>, @@ -49,7 +49,7 @@ impl CreateCommandInput { pub fn mandatory_parameters(&self) -> &[crate::types::CommandParameter] { self.mandatory_parameters.as_deref().unwrap_or_default() } - ///

    The IAM role that allows access to create the command.

    + ///

    The IAM role that you must provide when using the AWS-IoT-FleetWise namespace. The role grants IoT Device Management the permission to access IoT FleetWise resources for generating the payload for the command. This field is not required when you use the AWS-IoT namespace.

    pub fn role_arn(&self) -> ::std::option::Option<&str> { self.role_arn.as_deref() } @@ -175,17 +175,17 @@ impl CreateCommandInputBuilder { pub fn get_mandatory_parameters(&self) -> &::std::option::Option<::std::vec::Vec> { &self.mandatory_parameters } - ///

    The IAM role that allows access to create the command.

    + ///

    The IAM role that you must provide when using the AWS-IoT-FleetWise namespace. The role grants IoT Device Management the permission to access IoT FleetWise resources for generating the payload for the command. This field is not required when you use the AWS-IoT namespace.

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

    The IAM role that allows access to create the command.

    + ///

    The IAM role that you must provide when using the AWS-IoT-FleetWise namespace. The role grants IoT Device Management the permission to access IoT FleetWise resources for generating the payload for the command. This field is not required when you use the AWS-IoT namespace.

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

    The IAM role that allows access to create the command.

    + ///

    The IAM role that you must provide when using the AWS-IoT-FleetWise namespace. The role grants IoT Device Management the permission to access IoT FleetWise resources for generating the payload for the command. This field is not required when you use the AWS-IoT namespace.

    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> { &self.role_arn } diff --git a/sdk/iot/src/operation/create_command/builders.rs b/sdk/iot/src/operation/create_command/builders.rs index 10922e0ea897..09d407fbc30b 100644 --- a/sdk/iot/src/operation/create_command/builders.rs +++ b/sdk/iot/src/operation/create_command/builders.rs @@ -200,17 +200,17 @@ impl CreateCommandFluentBuilder { pub fn get_mandatory_parameters(&self) -> &::std::option::Option<::std::vec::Vec> { self.inner.get_mandatory_parameters() } - ///

    The IAM role that allows access to create the command.

    + ///

    The IAM role that you must provide when using the AWS-IoT-FleetWise namespace. The role grants IoT Device Management the permission to access IoT FleetWise resources for generating the payload for the command. This field is not required when you use the AWS-IoT namespace.

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

    The IAM role that allows access to create the command.

    + ///

    The IAM role that you must provide when using the AWS-IoT-FleetWise namespace. The role grants IoT Device Management the permission to access IoT FleetWise resources for generating the payload for the command. This field is not required when you use the AWS-IoT namespace.

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

    The IAM role that allows access to create the command.

    + ///

    The IAM role that you must provide when using the AWS-IoT-FleetWise namespace. The role grants IoT Device Management the permission to access IoT FleetWise resources for generating the payload for the command. This field is not required when you use the AWS-IoT namespace.

    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_role_arn() } diff --git a/sdk/iot/src/operation/get_command/_get_command_output.rs b/sdk/iot/src/operation/get_command/_get_command_output.rs index 280e03aa63ab..a39be3c04d88 100644 --- a/sdk/iot/src/operation/get_command/_get_command_output.rs +++ b/sdk/iot/src/operation/get_command/_get_command_output.rs @@ -23,7 +23,7 @@ pub struct GetCommandOutput { pub mandatory_parameters: ::std::option::Option<::std::vec::Vec>, ///

    The payload object that you provided for the command.

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

    The IAM role that allows access to retrieve information about the command.

    + ///

    The IAM role that you provided when creating the command with AWS-IoT-FleetWise as the namespace.

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

    The timestamp, when the command was created.

    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>, @@ -72,7 +72,7 @@ impl GetCommandOutput { pub fn payload(&self) -> ::std::option::Option<&crate::types::CommandPayload> { self.payload.as_ref() } - ///

    The IAM role that allows access to retrieve information about the command.

    + ///

    The IAM role that you provided when creating the command with AWS-IoT-FleetWise as the namespace.

    pub fn role_arn(&self) -> ::std::option::Option<&str> { self.role_arn.as_deref() } @@ -246,17 +246,17 @@ impl GetCommandOutputBuilder { pub fn get_payload(&self) -> &::std::option::Option { &self.payload } - ///

    The IAM role that allows access to retrieve information about the command.

    + ///

    The IAM role that you provided when creating the command with AWS-IoT-FleetWise as the namespace.

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

    The IAM role that allows access to retrieve information about the command.

    + ///

    The IAM role that you provided when creating the command with AWS-IoT-FleetWise as the namespace.

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

    The IAM role that allows access to retrieve information about the command.

    + ///

    The IAM role that you provided when creating the command with AWS-IoT-FleetWise as the namespace.

    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> { &self.role_arn } diff --git a/sdk/iot/src/operation/get_command_execution/_get_command_execution_output.rs b/sdk/iot/src/operation/get_command_execution/_get_command_execution_output.rs index d0611d6e9264..8d39b8a46978 100644 --- a/sdk/iot/src/operation/get_command_execution/_get_command_execution_output.rs +++ b/sdk/iot/src/operation/get_command_execution/_get_command_execution_output.rs @@ -35,7 +35,7 @@ pub struct GetCommandExecutionOutput { pub started_at: ::std::option::Option<::aws_smithy_types::DateTime>, ///

    The timestamp, when the command execution was completed.

    pub completed_at: ::std::option::Option<::aws_smithy_types::DateTime>, - ///

    The time to live (TTL) parameter for the GetCommandExecution API.

    + ///

    The time to live (TTL) parameter that indicates the duration for which executions will be retained in your account. The default value is six months.

    pub time_to_live: ::std::option::Option<::aws_smithy_types::DateTime>, _request_id: Option, } @@ -96,7 +96,7 @@ impl GetCommandExecutionOutput { pub fn completed_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> { self.completed_at.as_ref() } - ///

    The time to live (TTL) parameter for the GetCommandExecution API.

    + ///

    The time to live (TTL) parameter that indicates the duration for which executions will be retained in your account. The default value is six months.

    pub fn time_to_live(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> { self.time_to_live.as_ref() } @@ -343,17 +343,17 @@ impl GetCommandExecutionOutputBuilder { pub fn get_completed_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.completed_at } - ///

    The time to live (TTL) parameter for the GetCommandExecution API.

    + ///

    The time to live (TTL) parameter that indicates the duration for which executions will be retained in your account. The default value is six months.

    pub fn time_to_live(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.time_to_live = ::std::option::Option::Some(input); self } - ///

    The time to live (TTL) parameter for the GetCommandExecution API.

    + ///

    The time to live (TTL) parameter that indicates the duration for which executions will be retained in your account. The default value is six months.

    pub fn set_time_to_live(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.time_to_live = input; self } - ///

    The time to live (TTL) parameter for the GetCommandExecution API.

    + ///

    The time to live (TTL) parameter that indicates the duration for which executions will be retained in your account. The default value is six months.

    pub fn get_time_to_live(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.time_to_live } diff --git a/sdk/iot/src/operation/get_thing_connectivity_data.rs b/sdk/iot/src/operation/get_thing_connectivity_data.rs new file mode 100644 index 000000000000..e57e27895a65 --- /dev/null +++ b/sdk/iot/src/operation/get_thing_connectivity_data.rs @@ -0,0 +1,422 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `GetThingConnectivityData`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetThingConnectivityData; +impl GetThingConnectivityData { + /// Creates a new `GetThingConnectivityData` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::get_thing_connectivity_data::GetThingConnectivityDataInput, + ) -> ::std::result::Result< + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError, + ::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::get_thing_connectivity_data::GetThingConnectivityDataInput, + 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("iot", "GetThingConnectivityData", 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 GetThingConnectivityData { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetThingConnectivityData"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + GetThingConnectivityDataRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + GetThingConnectivityDataResponseDeserializer, + )); + + 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::SensitiveOutput); + cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( + "GetThingConnectivityData", + "iot", + )); + 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("GetThingConnectivityData") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(GetThingConnectivityDataEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct GetThingConnectivityDataResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetThingConnectivityDataResponseDeserializer { + 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_get_thing_connectivity_data::de_get_thing_connectivity_data_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_get_thing_connectivity_data::de_get_thing_connectivity_data_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct GetThingConnectivityDataRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetThingConnectivityDataRequestSerializer { + #[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::get_thing_connectivity_data::GetThingConnectivityDataInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + let input_1 = &_input.thing_name; + let input_1 = input_1 + .as_ref() + .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("thing_name", "cannot be empty or unset"))?; + let thing_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default); + if thing_name.is_empty() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "thing_name", + "cannot be empty or unset", + )); + } + ::std::write!(output, "/things/{thingName}/connectivity-data", thingName = thing_name).expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::get_thing_connectivity_data::GetThingConnectivityDataInput, + 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 + }; + let body = ::aws_smithy_types::body::SdkBody::from(""); + + ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) + } +} +#[derive(Debug)] +struct GetThingConnectivityDataEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetThingConnectivityDataEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "GetThingConnectivityDataEndpointParamsInterceptor" + } + + 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 GetThingConnectivityDataInput")?; + + 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(()) + } +} + +// The get_* functions below are generated from JMESPath expressions in the +// operationContextParams trait. They target the operation's input shape. + +/// Error type for the `GetThingConnectivityDataError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum GetThingConnectivityDataError { + ///

    The index is not ready.

    + IndexNotReadyException(crate::types::error::IndexNotReadyException), + ///

    An unexpected error has occurred.

    + InternalFailureException(crate::types::error::InternalFailureException), + ///

    The request is not valid.

    + InvalidRequestException(crate::types::error::InvalidRequestException), + ///

    The specified resource does not exist.

    + ResourceNotFoundException(crate::types::error::ResourceNotFoundException), + ///

    The service is temporarily unavailable.

    + ServiceUnavailableException(crate::types::error::ServiceUnavailableException), + ///

    The rate exceeds the limit.

    + ThrottlingException(crate::types::error::ThrottlingException), + ///

    You are not authorized to perform this operation.

    + UnauthorizedException(crate::types::error::UnauthorizedException), + /// 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-GetThingConnectivityDataError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl GetThingConnectivityDataError { + /// Creates the `GetThingConnectivityDataError::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 `GetThingConnectivityDataError::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::IndexNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InternalFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InvalidRequestException(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::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::UnauthorizedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `GetThingConnectivityDataError::IndexNotReadyException`. + pub fn is_index_not_ready_exception(&self) -> bool { + matches!(self, Self::IndexNotReadyException(_)) + } + /// Returns `true` if the error kind is `GetThingConnectivityDataError::InternalFailureException`. + pub fn is_internal_failure_exception(&self) -> bool { + matches!(self, Self::InternalFailureException(_)) + } + /// Returns `true` if the error kind is `GetThingConnectivityDataError::InvalidRequestException`. + pub fn is_invalid_request_exception(&self) -> bool { + matches!(self, Self::InvalidRequestException(_)) + } + /// Returns `true` if the error kind is `GetThingConnectivityDataError::ResourceNotFoundException`. + pub fn is_resource_not_found_exception(&self) -> bool { + matches!(self, Self::ResourceNotFoundException(_)) + } + /// Returns `true` if the error kind is `GetThingConnectivityDataError::ServiceUnavailableException`. + pub fn is_service_unavailable_exception(&self) -> bool { + matches!(self, Self::ServiceUnavailableException(_)) + } + /// Returns `true` if the error kind is `GetThingConnectivityDataError::ThrottlingException`. + pub fn is_throttling_exception(&self) -> bool { + matches!(self, Self::ThrottlingException(_)) + } + /// Returns `true` if the error kind is `GetThingConnectivityDataError::UnauthorizedException`. + pub fn is_unauthorized_exception(&self) -> bool { + matches!(self, Self::UnauthorizedException(_)) + } +} +impl ::std::error::Error for GetThingConnectivityDataError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::IndexNotReadyException(_inner) => ::std::option::Option::Some(_inner), + Self::InternalFailureException(_inner) => ::std::option::Option::Some(_inner), + Self::InvalidRequestException(_inner) => ::std::option::Option::Some(_inner), + Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), + Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner), + Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), + Self::UnauthorizedException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for GetThingConnectivityDataError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::IndexNotReadyException(_inner) => _inner.fmt(f), + Self::InternalFailureException(_inner) => _inner.fmt(f), + Self::InvalidRequestException(_inner) => _inner.fmt(f), + Self::ResourceNotFoundException(_inner) => _inner.fmt(f), + Self::ServiceUnavailableException(_inner) => _inner.fmt(f), + Self::ThrottlingException(_inner) => _inner.fmt(f), + Self::UnauthorizedException(_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 GetThingConnectivityDataError { + 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 GetThingConnectivityDataError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::IndexNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InternalFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InvalidRequestException(_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::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::UnauthorizedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetThingConnectivityDataError { + 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::get_thing_connectivity_data::GetThingConnectivityDataError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::get_thing_connectivity_data::_get_thing_connectivity_data_output::GetThingConnectivityDataOutput; + +pub use crate::operation::get_thing_connectivity_data::_get_thing_connectivity_data_input::GetThingConnectivityDataInput; + +mod _get_thing_connectivity_data_input; + +mod _get_thing_connectivity_data_output; + +/// Builders +pub mod builders; diff --git a/sdk/iot/src/operation/get_thing_connectivity_data/_get_thing_connectivity_data_input.rs b/sdk/iot/src/operation/get_thing_connectivity_data/_get_thing_connectivity_data_input.rs new file mode 100644 index 000000000000..bb4220a5c10f --- /dev/null +++ b/sdk/iot/src/operation/get_thing_connectivity_data/_get_thing_connectivity_data_input.rs @@ -0,0 +1,67 @@ +// 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)] +pub struct GetThingConnectivityDataInput { + ///

    The name of your IoT thing.

    + pub thing_name: ::std::option::Option<::std::string::String>, +} +impl GetThingConnectivityDataInput { + ///

    The name of your IoT thing.

    + pub fn thing_name(&self) -> ::std::option::Option<&str> { + self.thing_name.as_deref() + } +} +impl ::std::fmt::Debug for GetThingConnectivityDataInput { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("GetThingConnectivityDataInput"); + formatter.field("thing_name", &"*** Sensitive Data Redacted ***"); + formatter.finish() + } +} +impl GetThingConnectivityDataInput { + /// Creates a new builder-style object to manufacture [`GetThingConnectivityDataInput`](crate::operation::get_thing_connectivity_data::GetThingConnectivityDataInput). + pub fn builder() -> crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataInputBuilder { + crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataInputBuilder::default() + } +} + +/// A builder for [`GetThingConnectivityDataInput`](crate::operation::get_thing_connectivity_data::GetThingConnectivityDataInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)] +#[non_exhaustive] +pub struct GetThingConnectivityDataInputBuilder { + pub(crate) thing_name: ::std::option::Option<::std::string::String>, +} +impl GetThingConnectivityDataInputBuilder { + ///

    The name of your IoT thing.

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

    The name of your IoT thing.

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

    The name of your IoT thing.

    + pub fn get_thing_name(&self) -> &::std::option::Option<::std::string::String> { + &self.thing_name + } + /// Consumes the builder and constructs a [`GetThingConnectivityDataInput`](crate::operation::get_thing_connectivity_data::GetThingConnectivityDataInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::operation::get_thing_connectivity_data::GetThingConnectivityDataInput { thing_name: self.thing_name }) + } +} +impl ::std::fmt::Debug for GetThingConnectivityDataInputBuilder { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("GetThingConnectivityDataInputBuilder"); + formatter.field("thing_name", &"*** Sensitive Data Redacted ***"); + formatter.finish() + } +} diff --git a/sdk/iot/src/operation/get_thing_connectivity_data/_get_thing_connectivity_data_output.rs b/sdk/iot/src/operation/get_thing_connectivity_data/_get_thing_connectivity_data_output.rs new file mode 100644 index 000000000000..863e96524cc9 --- /dev/null +++ b/sdk/iot/src/operation/get_thing_connectivity_data/_get_thing_connectivity_data_output.rs @@ -0,0 +1,154 @@ +// 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)] +pub struct GetThingConnectivityDataOutput { + ///

    The name of your IoT thing.

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

    A Boolean that indicates the connectivity status.

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

    The timestamp of when the event occurred.

    + pub timestamp: ::std::option::Option<::aws_smithy_types::DateTime>, + ///

    The reason why the client is disconnecting.

    + pub disconnect_reason: ::std::option::Option, + _request_id: Option, +} +impl GetThingConnectivityDataOutput { + ///

    The name of your IoT thing.

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

    A Boolean that indicates the connectivity status.

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

    The timestamp of when the event occurred.

    + pub fn timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> { + self.timestamp.as_ref() + } + ///

    The reason why the client is disconnecting.

    + pub fn disconnect_reason(&self) -> ::std::option::Option<&crate::types::DisconnectReasonValue> { + self.disconnect_reason.as_ref() + } +} +impl ::std::fmt::Debug for GetThingConnectivityDataOutput { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("GetThingConnectivityDataOutput"); + formatter.field("thing_name", &"*** Sensitive Data Redacted ***"); + formatter.field("connected", &self.connected); + formatter.field("timestamp", &self.timestamp); + formatter.field("disconnect_reason", &self.disconnect_reason); + formatter.field("_request_id", &self._request_id); + formatter.finish() + } +} +impl ::aws_types::request_id::RequestId for GetThingConnectivityDataOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl GetThingConnectivityDataOutput { + /// Creates a new builder-style object to manufacture [`GetThingConnectivityDataOutput`](crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput). + pub fn builder() -> crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataOutputBuilder { + crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataOutputBuilder::default() + } +} + +/// A builder for [`GetThingConnectivityDataOutput`](crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)] +#[non_exhaustive] +pub struct GetThingConnectivityDataOutputBuilder { + pub(crate) thing_name: ::std::option::Option<::std::string::String>, + pub(crate) connected: ::std::option::Option, + pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>, + pub(crate) disconnect_reason: ::std::option::Option, + _request_id: Option, +} +impl GetThingConnectivityDataOutputBuilder { + ///

    The name of your IoT thing.

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

    The name of your IoT thing.

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

    The name of your IoT thing.

    + pub fn get_thing_name(&self) -> &::std::option::Option<::std::string::String> { + &self.thing_name + } + ///

    A Boolean that indicates the connectivity status.

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

    A Boolean that indicates the connectivity status.

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

    A Boolean that indicates the connectivity status.

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

    The timestamp of when the event occurred.

    + pub fn timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self { + self.timestamp = ::std::option::Option::Some(input); + self + } + ///

    The timestamp of when the event occurred.

    + pub fn set_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { + self.timestamp = input; + self + } + ///

    The timestamp of when the event occurred.

    + pub fn get_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { + &self.timestamp + } + ///

    The reason why the client is disconnecting.

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

    The reason why the client is disconnecting.

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

    The reason why the client is disconnecting.

    + pub fn get_disconnect_reason(&self) -> &::std::option::Option { + &self.disconnect_reason + } + 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 [`GetThingConnectivityDataOutput`](crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput). + pub fn build(self) -> crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput { + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput { + thing_name: self.thing_name, + connected: self.connected, + timestamp: self.timestamp, + disconnect_reason: self.disconnect_reason, + _request_id: self._request_id, + } + } +} +impl ::std::fmt::Debug for GetThingConnectivityDataOutputBuilder { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("GetThingConnectivityDataOutputBuilder"); + formatter.field("thing_name", &"*** Sensitive Data Redacted ***"); + formatter.field("connected", &self.connected); + formatter.field("timestamp", &self.timestamp); + formatter.field("disconnect_reason", &self.disconnect_reason); + formatter.field("_request_id", &self._request_id); + formatter.finish() + } +} diff --git a/sdk/iot/src/operation/get_thing_connectivity_data/builders.rs b/sdk/iot/src/operation/get_thing_connectivity_data/builders.rs new file mode 100644 index 000000000000..bfff984defea --- /dev/null +++ b/sdk/iot/src/operation/get_thing_connectivity_data/builders.rs @@ -0,0 +1,125 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::get_thing_connectivity_data::_get_thing_connectivity_data_output::GetThingConnectivityDataOutputBuilder; + +pub use crate::operation::get_thing_connectivity_data::_get_thing_connectivity_data_input::GetThingConnectivityDataInputBuilder; + +impl crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.get_thing_connectivity_data(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetThingConnectivityData`. +/// +///

    Retrieves the live connectivity status per device.

    +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetThingConnectivityDataFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput, + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError, + > for GetThingConnectivityDataFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput, + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl GetThingConnectivityDataFluentBuilder { + /// Creates a new `GetThingConnectivityDataFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the GetThingConnectivityData as a reference. + pub fn as_input(&self) -> &crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataInputBuilder { + &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::get_thing_connectivity_data::GetThingConnectivityDataOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError, + ::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::get_thing_connectivity_data::GetThingConnectivityData::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::get_thing_connectivity_data::GetThingConnectivityData::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::get_thing_connectivity_data::GetThingConnectivityDataOutput, + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError, + 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 name of your IoT thing.

    + pub fn thing_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.thing_name(input.into()); + self + } + ///

    The name of your IoT thing.

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

    The name of your IoT thing.

    + pub fn get_thing_name(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_thing_name() + } +} diff --git a/sdk/iot/src/operation/list_command_executions/builders.rs b/sdk/iot/src/operation/list_command_executions/builders.rs index acc5d20254ef..06a415235d61 100644 --- a/sdk/iot/src/operation/list_command_executions/builders.rs +++ b/sdk/iot/src/operation/list_command_executions/builders.rs @@ -23,7 +23,13 @@ impl crate::operation::list_command_executions::builders::ListCommandExecutionsI /// Fluent builder constructing a request to `ListCommandExecutions`. /// ///

    List all command executions.

    -///

    You must provide only the startedTimeFilter or the completedTimeFilter information. If you provide both time filters, the API will generate an error. You can use this information to find command executions that started within a specific timeframe.

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

      You must provide only the startedTimeFilter or the completedTimeFilter information. If you provide both time filters, the API will generate an error. You can use this information to retrieve a list of command executions within a specific timeframe.

    • +///
    • +///

      You must provide only the commandArn or the thingArn information depending on whether you want to list executions for a specific command or an IoT thing. If you provide both fields, the API will generate an error.

    • +///
    +///

    For more information about considerations for using this API, see List command executions in your account (CLI).

    ///
    #[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct ListCommandExecutionsFluentBuilder { diff --git a/sdk/iot/src/protocol_serde.rs b/sdk/iot/src/protocol_serde.rs index dbabfe4268bc..a1627838125e 100644 --- a/sdk/iot/src/protocol_serde.rs +++ b/sdk/iot/src/protocol_serde.rs @@ -319,6 +319,8 @@ pub(crate) mod shape_get_registration_code; pub(crate) mod shape_get_statistics; +pub(crate) mod shape_get_thing_connectivity_data; + pub(crate) mod shape_get_topic_rule; pub(crate) mod shape_get_topic_rule_destination; diff --git a/sdk/iot/src/protocol_serde/shape_get_thing_connectivity_data.rs b/sdk/iot/src/protocol_serde/shape_get_thing_connectivity_data.rs new file mode 100644 index 000000000000..57345f73e62c --- /dev/null +++ b/sdk/iot/src/protocol_serde/shape_get_thing_connectivity_data.rs @@ -0,0 +1,209 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_get_thing_connectivity_data_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput, + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::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::get_thing_connectivity_data::GetThingConnectivityDataError::unhandled( + generic, + )) + } + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "IndexNotReadyException" => crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::IndexNotReadyException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::IndexNotReadyExceptionBuilder::default(); + output = crate::protocol_serde::shape_index_not_ready_exception::de_index_not_ready_exception_json_err(_response_body, output) + .map_err(crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "InternalFailureException" => crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::InternalFailureException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalFailureExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_failure_exception::de_internal_failure_exception_json_err(_response_body, output) + .map_err(crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "InvalidRequestException" => crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::InvalidRequestException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InvalidRequestExceptionBuilder::default(); + output = crate::protocol_serde::shape_invalid_request_exception::de_invalid_request_exception_json_err(_response_body, output) + .map_err(crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "ResourceNotFoundException" => crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::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::get_thing_connectivity_data::GetThingConnectivityDataError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "ServiceUnavailableException" => crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::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::get_thing_connectivity_data::GetThingConnectivityDataError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "ThrottlingException" => crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::ThrottlingException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); + output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) + .map_err(crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "UnauthorizedException" => crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::UnauthorizedException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::UnauthorizedExceptionBuilder::default(); + output = crate::protocol_serde::shape_unauthorized_exception::de_unauthorized_exception_json_err(_response_body, output) + .map_err(crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_get_thing_connectivity_data_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataOutput, + crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataOutputBuilder::default(); + output = crate::protocol_serde::shape_get_thing_connectivity_data::de_get_thing_connectivity_data(_response_body, output) + .map_err(crate::operation::get_thing_connectivity_data::GetThingConnectivityDataError::unhandled)?; + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub(crate) fn de_get_thing_connectivity_data( + value: &[u8], + mut builder: crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataOutputBuilder, +) -> Result< + crate::operation::get_thing_connectivity_data::builders::GetThingConnectivityDataOutputBuilder, + ::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() { + "connected" => { + builder = builder.set_connected(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?); + } + "disconnectReason" => { + builder = builder.set_disconnect_reason( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::DisconnectReasonValue::from(u.as_ref()))) + .transpose()?, + ); + } + "thingName" => { + builder = builder.set_thing_name( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "timestamp" => { + builder = builder.set_timestamp(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( + tokens.next(), + ::aws_smithy_types::date_time::Format::EpochSeconds, + )?); + } + _ => ::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/iot/src/types.rs b/sdk/iot/src/types.rs index 55de53bdab8b..25923d2ebacb 100644 --- a/sdk/iot/src/types.rs +++ b/sdk/iot/src/types.rs @@ -481,6 +481,8 @@ pub use crate::types::_http_url_destination_properties::HttpUrlDestinationProper pub use crate::types::_topic_rule::TopicRule; +pub use crate::types::_disconnect_reason_value::DisconnectReasonValue; + pub use crate::types::_statistics::Statistics; pub use crate::types::_percent_pair::PercentPair; @@ -829,6 +831,8 @@ mod _dimension_type; mod _dimension_value_operator; +mod _disconnect_reason_value; + mod _document_parameter; mod _domain_configuration_status; diff --git a/sdk/iot/src/types/_disconnect_reason_value.rs b/sdk/iot/src/types/_disconnect_reason_value.rs new file mode 100644 index 000000000000..42e4bac913f6 --- /dev/null +++ b/sdk/iot/src/types/_disconnect_reason_value.rs @@ -0,0 +1,197 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `DisconnectReasonValue`, 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 disconnectreasonvalue = unimplemented!(); +/// match disconnectreasonvalue { +/// DisconnectReasonValue::AuthError => { /* ... */ }, +/// DisconnectReasonValue::ClientError => { /* ... */ }, +/// DisconnectReasonValue::ClientInitiatedDisconnect => { /* ... */ }, +/// DisconnectReasonValue::ConnectionLost => { /* ... */ }, +/// DisconnectReasonValue::CustomauthTtlExpiration => { /* ... */ }, +/// DisconnectReasonValue::DuplicateClientid => { /* ... */ }, +/// DisconnectReasonValue::ForbiddenAccess => { /* ... */ }, +/// DisconnectReasonValue::MqttKeepAliveTimeout => { /* ... */ }, +/// DisconnectReasonValue::None => { /* ... */ }, +/// DisconnectReasonValue::ServerError => { /* ... */ }, +/// DisconnectReasonValue::ServerInitiatedDisconnect => { /* ... */ }, +/// DisconnectReasonValue::Throttled => { /* ... */ }, +/// DisconnectReasonValue::UnknownValue => { /* ... */ }, +/// DisconnectReasonValue::WebsocketTtlExpiration => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `disconnectreasonvalue` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `DisconnectReasonValue::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `DisconnectReasonValue::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 `DisconnectReasonValue::NewFeature` is defined. +/// Specifically, when `disconnectreasonvalue` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `DisconnectReasonValue::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. +/// +/// +/// _Note: `DisconnectReasonValue::Unknown` has been renamed to `::UnknownValue`._ +#[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 DisconnectReasonValue { + #[allow(missing_docs)] // documentation missing in model + AuthError, + #[allow(missing_docs)] // documentation missing in model + ClientError, + #[allow(missing_docs)] // documentation missing in model + ClientInitiatedDisconnect, + #[allow(missing_docs)] // documentation missing in model + ConnectionLost, + #[allow(missing_docs)] // documentation missing in model + CustomauthTtlExpiration, + #[allow(missing_docs)] // documentation missing in model + DuplicateClientid, + #[allow(missing_docs)] // documentation missing in model + ForbiddenAccess, + #[allow(missing_docs)] // documentation missing in model + MqttKeepAliveTimeout, + #[allow(missing_docs)] // documentation missing in model + None, + #[allow(missing_docs)] // documentation missing in model + ServerError, + #[allow(missing_docs)] // documentation missing in model + ServerInitiatedDisconnect, + #[allow(missing_docs)] // documentation missing in model + Throttled, + /// + /// _Note: `::Unknown` has been renamed to `::UnknownValue`._ + UnknownValue, + #[allow(missing_docs)] // documentation missing in model + WebsocketTtlExpiration, + /// `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 DisconnectReasonValue { + fn from(s: &str) -> Self { + match s { + "AUTH_ERROR" => DisconnectReasonValue::AuthError, + "CLIENT_ERROR" => DisconnectReasonValue::ClientError, + "CLIENT_INITIATED_DISCONNECT" => DisconnectReasonValue::ClientInitiatedDisconnect, + "CONNECTION_LOST" => DisconnectReasonValue::ConnectionLost, + "CUSTOMAUTH_TTL_EXPIRATION" => DisconnectReasonValue::CustomauthTtlExpiration, + "DUPLICATE_CLIENTID" => DisconnectReasonValue::DuplicateClientid, + "FORBIDDEN_ACCESS" => DisconnectReasonValue::ForbiddenAccess, + "MQTT_KEEP_ALIVE_TIMEOUT" => DisconnectReasonValue::MqttKeepAliveTimeout, + "NONE" => DisconnectReasonValue::None, + "SERVER_ERROR" => DisconnectReasonValue::ServerError, + "SERVER_INITIATED_DISCONNECT" => DisconnectReasonValue::ServerInitiatedDisconnect, + "THROTTLED" => DisconnectReasonValue::Throttled, + "UNKNOWN" => DisconnectReasonValue::UnknownValue, + "WEBSOCKET_TTL_EXPIRATION" => DisconnectReasonValue::WebsocketTtlExpiration, + other => DisconnectReasonValue::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for DisconnectReasonValue { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(DisconnectReasonValue::from(s)) + } +} +impl DisconnectReasonValue { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + DisconnectReasonValue::AuthError => "AUTH_ERROR", + DisconnectReasonValue::ClientError => "CLIENT_ERROR", + DisconnectReasonValue::ClientInitiatedDisconnect => "CLIENT_INITIATED_DISCONNECT", + DisconnectReasonValue::ConnectionLost => "CONNECTION_LOST", + DisconnectReasonValue::CustomauthTtlExpiration => "CUSTOMAUTH_TTL_EXPIRATION", + DisconnectReasonValue::DuplicateClientid => "DUPLICATE_CLIENTID", + DisconnectReasonValue::ForbiddenAccess => "FORBIDDEN_ACCESS", + DisconnectReasonValue::MqttKeepAliveTimeout => "MQTT_KEEP_ALIVE_TIMEOUT", + DisconnectReasonValue::None => "NONE", + DisconnectReasonValue::ServerError => "SERVER_ERROR", + DisconnectReasonValue::ServerInitiatedDisconnect => "SERVER_INITIATED_DISCONNECT", + DisconnectReasonValue::Throttled => "THROTTLED", + DisconnectReasonValue::UnknownValue => "UNKNOWN", + DisconnectReasonValue::WebsocketTtlExpiration => "WEBSOCKET_TTL_EXPIRATION", + DisconnectReasonValue::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &[ + "AUTH_ERROR", + "CLIENT_ERROR", + "CLIENT_INITIATED_DISCONNECT", + "CONNECTION_LOST", + "CUSTOMAUTH_TTL_EXPIRATION", + "DUPLICATE_CLIENTID", + "FORBIDDEN_ACCESS", + "MQTT_KEEP_ALIVE_TIMEOUT", + "NONE", + "SERVER_ERROR", + "SERVER_INITIATED_DISCONNECT", + "THROTTLED", + "UNKNOWN", + "WEBSOCKET_TTL_EXPIRATION", + ] + } +} +impl ::std::convert::AsRef for DisconnectReasonValue { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl DisconnectReasonValue { + /// 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 DisconnectReasonValue { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + DisconnectReasonValue::AuthError => write!(f, "AUTH_ERROR"), + DisconnectReasonValue::ClientError => write!(f, "CLIENT_ERROR"), + DisconnectReasonValue::ClientInitiatedDisconnect => write!(f, "CLIENT_INITIATED_DISCONNECT"), + DisconnectReasonValue::ConnectionLost => write!(f, "CONNECTION_LOST"), + DisconnectReasonValue::CustomauthTtlExpiration => write!(f, "CUSTOMAUTH_TTL_EXPIRATION"), + DisconnectReasonValue::DuplicateClientid => write!(f, "DUPLICATE_CLIENTID"), + DisconnectReasonValue::ForbiddenAccess => write!(f, "FORBIDDEN_ACCESS"), + DisconnectReasonValue::MqttKeepAliveTimeout => write!(f, "MQTT_KEEP_ALIVE_TIMEOUT"), + DisconnectReasonValue::None => write!(f, "NONE"), + DisconnectReasonValue::ServerError => write!(f, "SERVER_ERROR"), + DisconnectReasonValue::ServerInitiatedDisconnect => write!(f, "SERVER_INITIATED_DISCONNECT"), + DisconnectReasonValue::Throttled => write!(f, "THROTTLED"), + DisconnectReasonValue::UnknownValue => write!(f, "UNKNOWN"), + DisconnectReasonValue::WebsocketTtlExpiration => write!(f, "WEBSOCKET_TTL_EXPIRATION"), + DisconnectReasonValue::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/mwaa/Cargo.toml b/sdk/mwaa/Cargo.toml index 3b997e5fc7af..2b06725bbfca 100644 --- a/sdk/mwaa/Cargo.toml +++ b/sdk/mwaa/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-mwaa" -version = "1.56.0" +version = "1.56.1" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for AmazonMWAA" edition = "2021" diff --git a/sdk/mwaa/README.md b/sdk/mwaa/README.md index cc6fa9488b83..ad04aca71564 100644 --- a/sdk/mwaa/README.md +++ b/sdk/mwaa/README.md @@ -34,7 +34,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-mwaa = "1.56.0" +aws-sdk-mwaa = "1.56.1" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/mwaa/src/client/create_environment.rs b/sdk/mwaa/src/client/create_environment.rs index 34911a81b909..8deb40be1c70 100644 --- a/sdk/mwaa/src/client/create_environment.rs +++ b/sdk/mwaa/src/client/create_environment.rs @@ -18,7 +18,7 @@ impl super::Client { /// - [`environment_class(impl Into)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::environment_class) / [`set_environment_class(Option)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_environment_class):
    required: **false**

    The environment class type. Valid values: mw1.micro, mw1.small, mw1.medium, mw1.large, mw1.xlarge, and mw1.2xlarge. For more information, see Amazon MWAA environment class.


    /// - [`max_workers(i32)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::max_workers) / [`set_max_workers(Option)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_max_workers):
    required: **false**

    The maximum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the MaxWorkers field. For example, 20. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the one worker that is included with your environment, or the number you specify in MinWorkers.


    /// - [`kms_key(impl Into)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::kms_key) / [`set_kms_key(Option)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_kms_key):
    required: **false**

    The Amazon Web Services Key Management Service (KMS) key to encrypt the data in your environment. You can use an Amazon Web Services owned CMK, or a Customer managed CMK (advanced). For more information, see Create an Amazon MWAA environment.


    - /// - [`airflow_version(impl Into)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::airflow_version) / [`set_airflow_version(Option)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_airflow_version):
    required: **false**

    The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA).

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.


    + /// - [`airflow_version(impl Into)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::airflow_version) / [`set_airflow_version(Option)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_airflow_version):
    required: **false**

    The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA).

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.


    /// - [`logging_configuration(LoggingConfigurationInput)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::logging_configuration) / [`set_logging_configuration(Option)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_logging_configuration):
    required: **false**

    Defines the Apache Airflow logs to send to CloudWatch Logs.


    /// - [`weekly_maintenance_window_start(impl Into)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::weekly_maintenance_window_start) / [`set_weekly_maintenance_window_start(Option)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_weekly_maintenance_window_start):
    required: **false**

    The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time to start weekly maintenance updates of your environment in the following format: DAY:HH:MM. For example: TUE:03:30. You can specify a start time in 30 minute increments only.


    /// - [`tags(impl Into, impl Into)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_tags):
    required: **false**

    The key-value tag pairs you want to associate to your environment. For example, "Environment": "Staging". For more information, see Tagging Amazon Web Services resources.


    diff --git a/sdk/mwaa/src/client/update_environment.rs b/sdk/mwaa/src/client/update_environment.rs index 9f9033a54235..17476cbd1d22 100644 --- a/sdk/mwaa/src/client/update_environment.rs +++ b/sdk/mwaa/src/client/update_environment.rs @@ -5,7 +5,7 @@ impl super::Client { /// - The fluent builder is configurable: /// - [`name(impl Into)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::name) / [`set_name(Option)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_name):
    required: **true**

    The name of your Amazon MWAA environment. For example, MyMWAAEnvironment.


    /// - [`execution_role_arn(impl Into)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::execution_role_arn) / [`set_execution_role_arn(Option)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_execution_role_arn):
    required: **false**

    The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access Amazon Web Services resources in your environment. For example, arn:aws:iam::123456789:role/my-execution-role. For more information, see Amazon MWAA Execution role.


    - /// - [`airflow_version(impl Into)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::airflow_version) / [`set_airflow_version(Option)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_airflow_version):
    required: **false**

    The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.

    Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see Upgrading an Amazon MWAA environment.

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.


    + /// - [`airflow_version(impl Into)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::airflow_version) / [`set_airflow_version(Option)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_airflow_version):
    required: **false**

    The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.

    Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see Upgrading an Amazon MWAA environment.

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.


    /// - [`source_bucket_arn(impl Into)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::source_bucket_arn) / [`set_source_bucket_arn(Option)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_source_bucket_arn):
    required: **false**

    The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, arn:aws:s3:::my-airflow-bucket-unique-name. For more information, see Create an Amazon S3 bucket for Amazon MWAA.


    /// - [`dag_s3_path(impl Into)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::dag_s3_path) / [`set_dag_s3_path(Option)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_dag_s3_path):
    required: **false**

    The relative path to the DAGs folder on your Amazon S3 bucket. For example, dags. For more information, see Adding or updating DAGs.


    /// - [`plugins_s3_path(impl Into)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::plugins_s3_path) / [`set_plugins_s3_path(Option)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_plugins_s3_path):
    required: **false**

    The relative path to the plugins.zip file on your Amazon S3 bucket. For example, plugins.zip. If specified, then the plugins.zip version is required. For more information, see Installing custom plugins.


    diff --git a/sdk/mwaa/src/lib.rs b/sdk/mwaa/src/lib.rs index bc34f6e8e37b..09c439ad0bc7 100644 --- a/sdk/mwaa/src/lib.rs +++ b/sdk/mwaa/src/lib.rs @@ -51,7 +51,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-mwaa = "1.56.0" +//! aws-sdk-mwaa = "1.56.1" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/mwaa/src/operation/create_environment/_create_environment_input.rs b/sdk/mwaa/src/operation/create_environment/_create_environment_input.rs index 385e3ba4167e..86a28b0e159e 100644 --- a/sdk/mwaa/src/operation/create_environment/_create_environment_input.rs +++ b/sdk/mwaa/src/operation/create_environment/_create_environment_input.rs @@ -39,7 +39,7 @@ pub struct CreateEnvironmentInput { ///

    The Amazon Web Services Key Management Service (KMS) key to encrypt the data in your environment. You can use an Amazon Web Services owned CMK, or a Customer managed CMK (advanced). For more information, see Create an Amazon MWAA environment.

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

    The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA).

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

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

    Defines the Apache Airflow logs to send to CloudWatch Logs.

    pub logging_configuration: ::std::option::Option, @@ -134,7 +134,7 @@ impl CreateEnvironmentInput { self.kms_key.as_deref() } ///

    The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA).

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

    pub fn airflow_version(&self) -> ::std::option::Option<&str> { self.airflow_version.as_deref() } @@ -495,19 +495,19 @@ impl CreateEnvironmentInputBuilder { &self.kms_key } ///

    The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA).

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

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

    The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA).

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

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

    The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA).

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

    pub fn get_airflow_version(&self) -> &::std::option::Option<::std::string::String> { &self.airflow_version } diff --git a/sdk/mwaa/src/operation/create_environment/builders.rs b/sdk/mwaa/src/operation/create_environment/builders.rs index 0efbe2662536..7a6b49566237 100644 --- a/sdk/mwaa/src/operation/create_environment/builders.rs +++ b/sdk/mwaa/src/operation/create_environment/builders.rs @@ -345,19 +345,19 @@ impl CreateEnvironmentFluentBuilder { self.inner.get_kms_key() } ///

    The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA).

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

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

    The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA).

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

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

    The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA).

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

    pub fn get_airflow_version(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_airflow_version() } diff --git a/sdk/mwaa/src/operation/update_environment/_update_environment_input.rs b/sdk/mwaa/src/operation/update_environment/_update_environment_input.rs index f6070748b297..bfcc8b2f8bce 100644 --- a/sdk/mwaa/src/operation/update_environment/_update_environment_input.rs +++ b/sdk/mwaa/src/operation/update_environment/_update_environment_input.rs @@ -9,7 +9,7 @@ pub struct UpdateEnvironmentInput { pub execution_role_arn: ::std::option::Option<::std::string::String>, ///

    The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.

    ///

    Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see Upgrading an Amazon MWAA environment.

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

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

    The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, arn:aws:s3:::my-airflow-bucket-unique-name. For more information, see Create an Amazon S3 bucket for Amazon MWAA.

    pub source_bucket_arn: ::std::option::Option<::std::string::String>, @@ -67,7 +67,7 @@ impl UpdateEnvironmentInput { } ///

    The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.

    ///

    Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see Upgrading an Amazon MWAA environment.

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

    pub fn airflow_version(&self) -> ::std::option::Option<&str> { self.airflow_version.as_deref() } @@ -248,21 +248,21 @@ impl UpdateEnvironmentInputBuilder { } ///

    The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.

    ///

    Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see Upgrading an Amazon MWAA environment.

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

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

    The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.

    ///

    Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see Upgrading an Amazon MWAA environment.

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

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

    The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.

    ///

    Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see Upgrading an Amazon MWAA environment.

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

    pub fn get_airflow_version(&self) -> &::std::option::Option<::std::string::String> { &self.airflow_version } diff --git a/sdk/mwaa/src/operation/update_environment/builders.rs b/sdk/mwaa/src/operation/update_environment/builders.rs index 556cc86a5b32..d3c0149e1632 100644 --- a/sdk/mwaa/src/operation/update_environment/builders.rs +++ b/sdk/mwaa/src/operation/update_environment/builders.rs @@ -138,21 +138,21 @@ impl UpdateEnvironmentFluentBuilder { } ///

    The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.

    ///

    Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see Upgrading an Amazon MWAA environment.

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

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

    The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.

    ///

    Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see Upgrading an Amazon MWAA environment.

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

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

    The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.

    ///

    Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see Upgrading an Amazon MWAA environment.

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

    pub fn get_airflow_version(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_airflow_version() } diff --git a/sdk/mwaa/src/types/_environment.rs b/sdk/mwaa/src/types/_environment.rs index 20d380d163fd..908c536ee9d4 100644 --- a/sdk/mwaa/src/types/_environment.rs +++ b/sdk/mwaa/src/types/_environment.rs @@ -49,7 +49,7 @@ pub struct Environment { ///

    The KMS encryption key used to encrypt the data in your environment.

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

    The Apache Airflow version on your environment.

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

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

    The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, arn:aws:s3:::my-airflow-bucket-unique-name. For more information, see Create an Amazon S3 bucket for Amazon MWAA.

    pub source_bucket_arn: ::std::option::Option<::std::string::String>, @@ -176,7 +176,7 @@ impl Environment { self.kms_key.as_deref() } ///

    The Apache Airflow version on your environment.

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

    pub fn airflow_version(&self) -> ::std::option::Option<&str> { self.airflow_version.as_deref() } @@ -577,19 +577,19 @@ impl EnvironmentBuilder { &self.kms_key } ///

    The Apache Airflow version on your environment.

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

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

    The Apache Airflow version on your environment.

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

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

    The Apache Airflow version on your environment.

    - ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, and 2.10.1.

    + ///

    Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.

    pub fn get_airflow_version(&self) -> &::std::option::Option<::std::string::String> { &self.airflow_version } diff --git a/sdk/quicksight/Cargo.toml b/sdk/quicksight/Cargo.toml index f6b5b6f1f8fc..be3cb90cbdb5 100644 --- a/sdk/quicksight/Cargo.toml +++ b/sdk/quicksight/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-quicksight" -version = "1.67.0" +version = "1.68.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for Amazon QuickSight" edition = "2021" diff --git a/sdk/quicksight/README.md b/sdk/quicksight/README.md index f427fa0d15a7..6df9579cf36f 100644 --- a/sdk/quicksight/README.md +++ b/sdk/quicksight/README.md @@ -14,7 +14,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-quicksight = "1.67.0" +aws-sdk-quicksight = "1.68.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/quicksight/src/client/create_data_set.rs b/sdk/quicksight/src/client/create_data_set.rs index fe36be4496f2..b0275c6b80ee 100644 --- a/sdk/quicksight/src/client/create_data_set.rs +++ b/sdk/quicksight/src/client/create_data_set.rs @@ -19,6 +19,7 @@ impl super::Client { /// - [`data_set_usage_configuration(DataSetUsageConfiguration)`](crate::operation::create_data_set::builders::CreateDataSetFluentBuilder::data_set_usage_configuration) / [`set_data_set_usage_configuration(Option)`](crate::operation::create_data_set::builders::CreateDataSetFluentBuilder::set_data_set_usage_configuration):
    required: **false**

    The usage configuration to apply to child datasets that reference this dataset as a source.


    /// - [`dataset_parameters(DatasetParameter)`](crate::operation::create_data_set::builders::CreateDataSetFluentBuilder::dataset_parameters) / [`set_dataset_parameters(Option>)`](crate::operation::create_data_set::builders::CreateDataSetFluentBuilder::set_dataset_parameters):
    required: **false**

    The parameter declarations of the dataset.


    /// - [`folder_arns(impl Into)`](crate::operation::create_data_set::builders::CreateDataSetFluentBuilder::folder_arns) / [`set_folder_arns(Option>)`](crate::operation::create_data_set::builders::CreateDataSetFluentBuilder::set_folder_arns):
    required: **false**

    When you create the dataset, Amazon QuickSight adds the dataset to these folders.


    + /// - [`performance_configuration(PerformanceConfiguration)`](crate::operation::create_data_set::builders::CreateDataSetFluentBuilder::performance_configuration) / [`set_performance_configuration(Option)`](crate::operation::create_data_set::builders::CreateDataSetFluentBuilder::set_performance_configuration):
    required: **false**

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.


    /// - On success, responds with [`CreateDataSetOutput`](crate::operation::create_data_set::CreateDataSetOutput) with field(s): /// - [`arn(Option)`](crate::operation::create_data_set::CreateDataSetOutput::arn):

    The Amazon Resource Name (ARN) of the dataset.

    /// - [`data_set_id(Option)`](crate::operation::create_data_set::CreateDataSetOutput::data_set_id):

    The ID for the dataset that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    diff --git a/sdk/quicksight/src/client/update_data_set.rs b/sdk/quicksight/src/client/update_data_set.rs index 70ed2273fe91..a5532254819d 100644 --- a/sdk/quicksight/src/client/update_data_set.rs +++ b/sdk/quicksight/src/client/update_data_set.rs @@ -16,6 +16,7 @@ impl super::Client { /// - [`column_level_permission_rules(ColumnLevelPermissionRule)`](crate::operation::update_data_set::builders::UpdateDataSetFluentBuilder::column_level_permission_rules) / [`set_column_level_permission_rules(Option>)`](crate::operation::update_data_set::builders::UpdateDataSetFluentBuilder::set_column_level_permission_rules):
    required: **false**

    A set of one or more definitions of a ColumnLevelPermissionRule .


    /// - [`data_set_usage_configuration(DataSetUsageConfiguration)`](crate::operation::update_data_set::builders::UpdateDataSetFluentBuilder::data_set_usage_configuration) / [`set_data_set_usage_configuration(Option)`](crate::operation::update_data_set::builders::UpdateDataSetFluentBuilder::set_data_set_usage_configuration):
    required: **false**

    The usage configuration to apply to child datasets that reference this dataset as a source.


    /// - [`dataset_parameters(DatasetParameter)`](crate::operation::update_data_set::builders::UpdateDataSetFluentBuilder::dataset_parameters) / [`set_dataset_parameters(Option>)`](crate::operation::update_data_set::builders::UpdateDataSetFluentBuilder::set_dataset_parameters):
    required: **false**

    The parameter declarations of the dataset.


    + /// - [`performance_configuration(PerformanceConfiguration)`](crate::operation::update_data_set::builders::UpdateDataSetFluentBuilder::performance_configuration) / [`set_performance_configuration(Option)`](crate::operation::update_data_set::builders::UpdateDataSetFluentBuilder::set_performance_configuration):
    required: **false**

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.


    /// - On success, responds with [`UpdateDataSetOutput`](crate::operation::update_data_set::UpdateDataSetOutput) with field(s): /// - [`arn(Option)`](crate::operation::update_data_set::UpdateDataSetOutput::arn):

    The Amazon Resource Name (ARN) of the dataset.

    /// - [`data_set_id(Option)`](crate::operation::update_data_set::UpdateDataSetOutput::data_set_id):

    The ID for the dataset that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    diff --git a/sdk/quicksight/src/lib.rs b/sdk/quicksight/src/lib.rs index 5d905d278bd8..eed67dcd3955 100644 --- a/sdk/quicksight/src/lib.rs +++ b/sdk/quicksight/src/lib.rs @@ -31,7 +31,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-quicksight = "1.67.0" +//! aws-sdk-quicksight = "1.68.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/quicksight/src/operation/create_data_set/_create_data_set_input.rs b/sdk/quicksight/src/operation/create_data_set/_create_data_set_input.rs index 8400be60cd2e..073c123d27f0 100644 --- a/sdk/quicksight/src/operation/create_data_set/_create_data_set_input.rs +++ b/sdk/quicksight/src/operation/create_data_set/_create_data_set_input.rs @@ -35,6 +35,8 @@ pub struct CreateDataSetInput { pub dataset_parameters: ::std::option::Option<::std::vec::Vec>, ///

    When you create the dataset, Amazon QuickSight adds the dataset to these folders.

    pub folder_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>, + ///

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

    + pub performance_configuration: ::std::option::Option, } impl CreateDataSetInput { ///

    The Amazon Web Services account ID.

    @@ -113,6 +115,10 @@ impl CreateDataSetInput { pub fn folder_arns(&self) -> &[::std::string::String] { self.folder_arns.as_deref().unwrap_or_default() } + ///

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

    + pub fn performance_configuration(&self) -> ::std::option::Option<&crate::types::PerformanceConfiguration> { + self.performance_configuration.as_ref() + } } impl CreateDataSetInput { /// Creates a new builder-style object to manufacture [`CreateDataSetInput`](crate::operation::create_data_set::CreateDataSetInput). @@ -141,6 +147,7 @@ pub struct CreateDataSetInputBuilder { pub(crate) data_set_usage_configuration: ::std::option::Option, pub(crate) dataset_parameters: ::std::option::Option<::std::vec::Vec>, pub(crate) folder_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>, + pub(crate) performance_configuration: ::std::option::Option, } impl CreateDataSetInputBuilder { ///

    The Amazon Web Services account ID.

    @@ -440,6 +447,20 @@ impl CreateDataSetInputBuilder { pub fn get_folder_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { &self.folder_arns } + ///

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

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

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

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

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

    + pub fn get_performance_configuration(&self) -> &::std::option::Option { + &self.performance_configuration + } /// Consumes the builder and constructs a [`CreateDataSetInput`](crate::operation::create_data_set::CreateDataSetInput). pub fn build( self, @@ -461,6 +482,7 @@ impl CreateDataSetInputBuilder { data_set_usage_configuration: self.data_set_usage_configuration, dataset_parameters: self.dataset_parameters, folder_arns: self.folder_arns, + performance_configuration: self.performance_configuration, }) } } diff --git a/sdk/quicksight/src/operation/create_data_set/builders.rs b/sdk/quicksight/src/operation/create_data_set/builders.rs index 51975f122351..ebc4876d6801 100644 --- a/sdk/quicksight/src/operation/create_data_set/builders.rs +++ b/sdk/quicksight/src/operation/create_data_set/builders.rs @@ -392,4 +392,18 @@ impl CreateDataSetFluentBuilder { pub fn get_folder_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { self.inner.get_folder_arns() } + ///

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

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

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

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

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

    + pub fn get_performance_configuration(&self) -> &::std::option::Option { + self.inner.get_performance_configuration() + } } diff --git a/sdk/quicksight/src/operation/update_data_set/_update_data_set_input.rs b/sdk/quicksight/src/operation/update_data_set/_update_data_set_input.rs index 15a443e8678d..cf512d42284e 100644 --- a/sdk/quicksight/src/operation/update_data_set/_update_data_set_input.rs +++ b/sdk/quicksight/src/operation/update_data_set/_update_data_set_input.rs @@ -29,6 +29,8 @@ pub struct UpdateDataSetInput { pub data_set_usage_configuration: ::std::option::Option, ///

    The parameter declarations of the dataset.

    pub dataset_parameters: ::std::option::Option<::std::vec::Vec>, + ///

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

    + pub performance_configuration: ::std::option::Option, } impl UpdateDataSetInput { ///

    The Amazon Web Services account ID.

    @@ -89,6 +91,10 @@ impl UpdateDataSetInput { pub fn dataset_parameters(&self) -> &[crate::types::DatasetParameter] { self.dataset_parameters.as_deref().unwrap_or_default() } + ///

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

    + pub fn performance_configuration(&self) -> ::std::option::Option<&crate::types::PerformanceConfiguration> { + self.performance_configuration.as_ref() + } } impl UpdateDataSetInput { /// Creates a new builder-style object to manufacture [`UpdateDataSetInput`](crate::operation::update_data_set::UpdateDataSetInput). @@ -114,6 +120,7 @@ pub struct UpdateDataSetInputBuilder { pub(crate) column_level_permission_rules: ::std::option::Option<::std::vec::Vec>, pub(crate) data_set_usage_configuration: ::std::option::Option, pub(crate) dataset_parameters: ::std::option::Option<::std::vec::Vec>, + pub(crate) performance_configuration: ::std::option::Option, } impl UpdateDataSetInputBuilder { ///

    The Amazon Web Services account ID.

    @@ -353,6 +360,20 @@ impl UpdateDataSetInputBuilder { pub fn get_dataset_parameters(&self) -> &::std::option::Option<::std::vec::Vec> { &self.dataset_parameters } + ///

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

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

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

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

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

    + pub fn get_performance_configuration(&self) -> &::std::option::Option { + &self.performance_configuration + } /// Consumes the builder and constructs a [`UpdateDataSetInput`](crate::operation::update_data_set::UpdateDataSetInput). pub fn build( self, @@ -371,6 +392,7 @@ impl UpdateDataSetInputBuilder { column_level_permission_rules: self.column_level_permission_rules, data_set_usage_configuration: self.data_set_usage_configuration, dataset_parameters: self.dataset_parameters, + performance_configuration: self.performance_configuration, }) } } diff --git a/sdk/quicksight/src/operation/update_data_set/builders.rs b/sdk/quicksight/src/operation/update_data_set/builders.rs index e29e18b28d9f..d2efd0a09bf3 100644 --- a/sdk/quicksight/src/operation/update_data_set/builders.rs +++ b/sdk/quicksight/src/operation/update_data_set/builders.rs @@ -335,4 +335,18 @@ impl UpdateDataSetFluentBuilder { pub fn get_dataset_parameters(&self) -> &::std::option::Option<::std::vec::Vec> { self.inner.get_dataset_parameters() } + ///

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

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

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

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

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

    + pub fn get_performance_configuration(&self) -> &::std::option::Option { + self.inner.get_performance_configuration() + } } diff --git a/sdk/quicksight/src/protocol_serde.rs b/sdk/quicksight/src/protocol_serde.rs index f265835a139f..be83de38bda7 100644 --- a/sdk/quicksight/src/protocol_serde.rs +++ b/sdk/quicksight/src/protocol_serde.rs @@ -825,6 +825,8 @@ pub(crate) mod shape_namespaces; pub(crate) mod shape_parameters; +pub(crate) mod shape_performance_configuration; + pub(crate) mod shape_physical_table; pub(crate) mod shape_qa_result; @@ -1373,6 +1375,8 @@ pub(crate) mod shape_typography; pub(crate) mod shape_ui_color_palette; +pub(crate) mod shape_unique_key; + pub(crate) mod shape_visual_axis_sort_option; pub(crate) mod shape_visual_menu_option; @@ -1547,6 +1551,8 @@ pub(crate) mod shape_topic_named_entity; pub(crate) mod shape_topic_sort_clause; +pub(crate) mod shape_unique_key_list; + pub(crate) mod shape_untag_column_operation; pub(crate) mod shape_upload_settings; @@ -2039,6 +2045,8 @@ pub(crate) mod shape_topic_singular_filter_constant; pub(crate) mod shape_tree_map_configuration; +pub(crate) mod shape_unique_key_column_name_list; + pub(crate) mod shape_visual_custom_action; pub(crate) mod shape_visual_subtitle_label_options; diff --git a/sdk/quicksight/src/protocol_serde/shape_create_data_set_input.rs b/sdk/quicksight/src/protocol_serde/shape_create_data_set_input.rs index 99a8524a46b1..1dfc24732e56 100644 --- a/sdk/quicksight/src/protocol_serde/shape_create_data_set_input.rs +++ b/sdk/quicksight/src/protocol_serde/shape_create_data_set_input.rs @@ -89,54 +89,60 @@ pub fn ser_create_data_set_input_input( if let Some(var_30) = &input.name { object.key("Name").string(var_30.as_str()); } - if let Some(var_31) = &input.permissions { - let mut array_32 = object.key("Permissions").start_array(); - for item_33 in var_31 { + if let Some(var_31) = &input.performance_configuration { + #[allow(unused_mut)] + let mut object_32 = object.key("PerformanceConfiguration").start_object(); + crate::protocol_serde::shape_performance_configuration::ser_performance_configuration(&mut object_32, var_31)?; + object_32.finish(); + } + if let Some(var_33) = &input.permissions { + let mut array_34 = object.key("Permissions").start_array(); + for item_35 in var_33 { { #[allow(unused_mut)] - let mut object_34 = array_32.value().start_object(); - crate::protocol_serde::shape_resource_permission::ser_resource_permission(&mut object_34, item_33)?; - object_34.finish(); + let mut object_36 = array_34.value().start_object(); + crate::protocol_serde::shape_resource_permission::ser_resource_permission(&mut object_36, item_35)?; + object_36.finish(); } } - array_32.finish(); + array_34.finish(); } - if let Some(var_35) = &input.physical_table_map { + if let Some(var_37) = &input.physical_table_map { #[allow(unused_mut)] - let mut object_36 = object.key("PhysicalTableMap").start_object(); - for (key_37, value_38) in var_35 { + let mut object_38 = object.key("PhysicalTableMap").start_object(); + for (key_39, value_40) in var_37 { { #[allow(unused_mut)] - let mut object_39 = object_36.key(key_37.as_str()).start_object(); - crate::protocol_serde::shape_physical_table::ser_physical_table(&mut object_39, value_38)?; - object_39.finish(); + let mut object_41 = object_38.key(key_39.as_str()).start_object(); + crate::protocol_serde::shape_physical_table::ser_physical_table(&mut object_41, value_40)?; + object_41.finish(); } } - object_36.finish(); + object_38.finish(); } - if let Some(var_40) = &input.row_level_permission_data_set { + if let Some(var_42) = &input.row_level_permission_data_set { #[allow(unused_mut)] - let mut object_41 = object.key("RowLevelPermissionDataSet").start_object(); - crate::protocol_serde::shape_row_level_permission_data_set::ser_row_level_permission_data_set(&mut object_41, var_40)?; - object_41.finish(); + let mut object_43 = object.key("RowLevelPermissionDataSet").start_object(); + crate::protocol_serde::shape_row_level_permission_data_set::ser_row_level_permission_data_set(&mut object_43, var_42)?; + object_43.finish(); } - if let Some(var_42) = &input.row_level_permission_tag_configuration { + if let Some(var_44) = &input.row_level_permission_tag_configuration { #[allow(unused_mut)] - let mut object_43 = object.key("RowLevelPermissionTagConfiguration").start_object(); - crate::protocol_serde::shape_row_level_permission_tag_configuration::ser_row_level_permission_tag_configuration(&mut object_43, var_42)?; - object_43.finish(); + let mut object_45 = object.key("RowLevelPermissionTagConfiguration").start_object(); + crate::protocol_serde::shape_row_level_permission_tag_configuration::ser_row_level_permission_tag_configuration(&mut object_45, var_44)?; + object_45.finish(); } - if let Some(var_44) = &input.tags { - let mut array_45 = object.key("Tags").start_array(); - for item_46 in var_44 { + if let Some(var_46) = &input.tags { + let mut array_47 = object.key("Tags").start_array(); + for item_48 in var_46 { { #[allow(unused_mut)] - let mut object_47 = array_45.value().start_object(); - crate::protocol_serde::shape_tag::ser_tag(&mut object_47, item_46)?; - object_47.finish(); + let mut object_49 = array_47.value().start_object(); + crate::protocol_serde::shape_tag::ser_tag(&mut object_49, item_48)?; + object_49.finish(); } } - array_45.finish(); + array_47.finish(); } Ok(()) } diff --git a/sdk/quicksight/src/protocol_serde/shape_data_set.rs b/sdk/quicksight/src/protocol_serde/shape_data_set.rs index f4ac5811e569..6480ca0a3bcc 100644 --- a/sdk/quicksight/src/protocol_serde/shape_data_set.rs +++ b/sdk/quicksight/src/protocol_serde/shape_data_set.rs @@ -102,6 +102,11 @@ where builder = builder .set_dataset_parameters(crate::protocol_serde::shape_dataset_parameter_list::de_dataset_parameter_list(tokens)?); } + "PerformanceConfiguration" => { + builder = builder.set_performance_configuration( + crate::protocol_serde::shape_performance_configuration::de_performance_configuration(tokens)?, + ); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/quicksight/src/protocol_serde/shape_performance_configuration.rs b/sdk/quicksight/src/protocol_serde/shape_performance_configuration.rs new file mode 100644 index 000000000000..6781b08f58e6 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_performance_configuration.rs @@ -0,0 +1,55 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_performance_configuration( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::PerformanceConfiguration, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.unique_keys { + let mut array_2 = object.key("UniqueKeys").start_array(); + for item_3 in var_1 { + { + #[allow(unused_mut)] + let mut object_4 = array_2.value().start_object(); + crate::protocol_serde::shape_unique_key::ser_unique_key(&mut object_4, item_3)?; + object_4.finish(); + } + } + array_2.finish(); + } + Ok(()) +} + +pub(crate) fn de_performance_configuration<'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::PerformanceConfigurationBuilder::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() { + "UniqueKeys" => { + builder = builder.set_unique_keys(crate::protocol_serde::shape_unique_key_list::de_unique_key_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 + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_physical_table.rs b/sdk/quicksight/src/protocol_serde/shape_physical_table.rs index be212c5aa2a8..109bd64811f2 100644 --- a/sdk/quicksight/src/protocol_serde/shape_physical_table.rs +++ b/sdk/quicksight/src/protocol_serde/shape_physical_table.rs @@ -1,24 +1,24 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. pub fn ser_physical_table( - object_39: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + object_41: &mut ::aws_smithy_json::serialize::JsonObjectWriter, input: &crate::types::PhysicalTable, ) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { match input { crate::types::PhysicalTable::RelationalTable(inner) => { #[allow(unused_mut)] - let mut object_1 = object_39.key("RelationalTable").start_object(); + let mut object_1 = object_41.key("RelationalTable").start_object(); crate::protocol_serde::shape_relational_table::ser_relational_table(&mut object_1, inner)?; object_1.finish(); } crate::types::PhysicalTable::CustomSql(inner) => { #[allow(unused_mut)] - let mut object_2 = object_39.key("CustomSql").start_object(); + let mut object_2 = object_41.key("CustomSql").start_object(); crate::protocol_serde::shape_custom_sql::ser_custom_sql(&mut object_2, inner)?; object_2.finish(); } crate::types::PhysicalTable::S3Source(inner) => { #[allow(unused_mut)] - let mut object_3 = object_39.key("S3Source").start_object(); + let mut object_3 = object_41.key("S3Source").start_object(); crate::protocol_serde::shape_s3_source::ser_s3_source(&mut object_3, inner)?; object_3.finish(); } diff --git a/sdk/quicksight/src/protocol_serde/shape_unique_key.rs b/sdk/quicksight/src/protocol_serde/shape_unique_key.rs new file mode 100644 index 000000000000..36c0f5471274 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_unique_key.rs @@ -0,0 +1,56 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_unique_key( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::UniqueKey, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + { + let mut array_1 = object.key("ColumnNames").start_array(); + for item_2 in &input.column_names { + { + array_1.value().string(item_2.as_str()); + } + } + array_1.finish(); + } + Ok(()) +} + +pub(crate) fn de_unique_key<'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::UniqueKeyBuilder::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() { + "ColumnNames" => { + builder = builder.set_column_names( + crate::protocol_serde::shape_unique_key_column_name_list::de_unique_key_column_name_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 + ))) + } + } + } + Ok(Some(crate::serde_util::unique_key_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/quicksight/src/protocol_serde/shape_unique_key_column_name_list.rs b/sdk/quicksight/src/protocol_serde/shape_unique_key_column_name_list.rs new file mode 100644 index 000000000000..c7448b2b88c6 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_unique_key_column_name_list.rs @@ -0,0 +1,34 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_unique_key_column_name_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 = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?; + 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/quicksight/src/protocol_serde/shape_unique_key_list.rs b/sdk/quicksight/src/protocol_serde/shape_unique_key_list.rs new file mode 100644 index 000000000000..a25e9d84124d --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_unique_key_list.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_unique_key_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_unique_key::de_unique_key(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/quicksight/src/protocol_serde/shape_update_data_set_input.rs b/sdk/quicksight/src/protocol_serde/shape_update_data_set_input.rs index 8e7125a20de6..db112c80e35a 100644 --- a/sdk/quicksight/src/protocol_serde/shape_update_data_set_input.rs +++ b/sdk/quicksight/src/protocol_serde/shape_update_data_set_input.rs @@ -77,30 +77,36 @@ pub fn ser_update_data_set_input_input( if let Some(var_26) = &input.name { object.key("Name").string(var_26.as_str()); } - if let Some(var_27) = &input.physical_table_map { + if let Some(var_27) = &input.performance_configuration { #[allow(unused_mut)] - let mut object_28 = object.key("PhysicalTableMap").start_object(); - for (key_29, value_30) in var_27 { + let mut object_28 = object.key("PerformanceConfiguration").start_object(); + crate::protocol_serde::shape_performance_configuration::ser_performance_configuration(&mut object_28, var_27)?; + object_28.finish(); + } + if let Some(var_29) = &input.physical_table_map { + #[allow(unused_mut)] + let mut object_30 = object.key("PhysicalTableMap").start_object(); + for (key_31, value_32) in var_29 { { #[allow(unused_mut)] - let mut object_31 = object_28.key(key_29.as_str()).start_object(); - crate::protocol_serde::shape_physical_table::ser_physical_table(&mut object_31, value_30)?; - object_31.finish(); + let mut object_33 = object_30.key(key_31.as_str()).start_object(); + crate::protocol_serde::shape_physical_table::ser_physical_table(&mut object_33, value_32)?; + object_33.finish(); } } - object_28.finish(); + object_30.finish(); } - if let Some(var_32) = &input.row_level_permission_data_set { + if let Some(var_34) = &input.row_level_permission_data_set { #[allow(unused_mut)] - let mut object_33 = object.key("RowLevelPermissionDataSet").start_object(); - crate::protocol_serde::shape_row_level_permission_data_set::ser_row_level_permission_data_set(&mut object_33, var_32)?; - object_33.finish(); + let mut object_35 = object.key("RowLevelPermissionDataSet").start_object(); + crate::protocol_serde::shape_row_level_permission_data_set::ser_row_level_permission_data_set(&mut object_35, var_34)?; + object_35.finish(); } - if let Some(var_34) = &input.row_level_permission_tag_configuration { + if let Some(var_36) = &input.row_level_permission_tag_configuration { #[allow(unused_mut)] - let mut object_35 = object.key("RowLevelPermissionTagConfiguration").start_object(); - crate::protocol_serde::shape_row_level_permission_tag_configuration::ser_row_level_permission_tag_configuration(&mut object_35, var_34)?; - object_35.finish(); + let mut object_37 = object.key("RowLevelPermissionTagConfiguration").start_object(); + crate::protocol_serde::shape_row_level_permission_tag_configuration::ser_row_level_permission_tag_configuration(&mut object_37, var_36)?; + object_37.finish(); } Ok(()) } diff --git a/sdk/quicksight/src/serde_util.rs b/sdk/quicksight/src/serde_util.rs index 21db90415cdf..b5f0be96e678 100644 --- a/sdk/quicksight/src/serde_util.rs +++ b/sdk/quicksight/src/serde_util.rs @@ -1436,6 +1436,13 @@ pub(crate) fn string_parameter_declaration_correct_errors( builder } +pub(crate) fn unique_key_correct_errors(mut builder: crate::types::builders::UniqueKeyBuilder) -> crate::types::builders::UniqueKeyBuilder { + if builder.column_names.is_none() { + builder.column_names = Some(Default::default()) + } + builder +} + pub(crate) fn asset_bundle_import_job_data_source_credential_pair_correct_errors( mut builder: crate::types::builders::AssetBundleImportJobDataSourceCredentialPairBuilder, ) -> crate::types::builders::AssetBundleImportJobDataSourceCredentialPairBuilder { diff --git a/sdk/quicksight/src/types.rs b/sdk/quicksight/src/types.rs index bd5e47d2deaf..0017ed96c393 100644 --- a/sdk/quicksight/src/types.rs +++ b/sdk/quicksight/src/types.rs @@ -1597,6 +1597,10 @@ pub use crate::types::_athena_parameters::AthenaParameters; pub use crate::types::_amazon_elasticsearch_parameters::AmazonElasticsearchParameters; +pub use crate::types::_performance_configuration::PerformanceConfiguration; + +pub use crate::types::_unique_key::UniqueKey; + pub use crate::types::_dataset_parameter::DatasetParameter; pub use crate::types::_date_time_dataset_parameter::DateTimeDatasetParameter; @@ -3709,6 +3713,8 @@ mod _percentage_display_format_configuration; mod _percentile_aggregation; +mod _performance_configuration; + mod _period_over_period_computation; mod _period_to_date_computation; @@ -4471,6 +4477,8 @@ mod _unaggregated_field; mod _undefined_specified_value_type; +mod _unique_key; + mod _unique_values_computation; mod _untag_column_operation; diff --git a/sdk/quicksight/src/types/_data_set.rs b/sdk/quicksight/src/types/_data_set.rs index 0aade3ff31fc..912ac84737da 100644 --- a/sdk/quicksight/src/types/_data_set.rs +++ b/sdk/quicksight/src/types/_data_set.rs @@ -38,6 +38,8 @@ pub struct DataSet { pub data_set_usage_configuration: ::std::option::Option, ///

    The parameters that are declared in a dataset.

    pub dataset_parameters: ::std::option::Option<::std::vec::Vec>, + ///

    The performance optimization configuration of a dataset.

    + pub performance_configuration: ::std::option::Option, } impl DataSet { ///

    The Amazon Resource Name (ARN) of the resource.

    @@ -116,6 +118,10 @@ impl DataSet { pub fn dataset_parameters(&self) -> &[crate::types::DatasetParameter] { self.dataset_parameters.as_deref().unwrap_or_default() } + ///

    The performance optimization configuration of a dataset.

    + pub fn performance_configuration(&self) -> ::std::option::Option<&crate::types::PerformanceConfiguration> { + self.performance_configuration.as_ref() + } } impl DataSet { /// Creates a new builder-style object to manufacture [`DataSet`](crate::types::DataSet). @@ -145,6 +151,7 @@ pub struct DataSetBuilder { pub(crate) column_level_permission_rules: ::std::option::Option<::std::vec::Vec>, pub(crate) data_set_usage_configuration: ::std::option::Option, pub(crate) dataset_parameters: ::std::option::Option<::std::vec::Vec>, + pub(crate) performance_configuration: ::std::option::Option, } impl DataSetBuilder { ///

    The Amazon Resource Name (ARN) of the resource.

    @@ -442,6 +449,20 @@ impl DataSetBuilder { pub fn get_dataset_parameters(&self) -> &::std::option::Option<::std::vec::Vec> { &self.dataset_parameters } + ///

    The performance optimization configuration of a dataset.

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

    The performance optimization configuration of a dataset.

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

    The performance optimization configuration of a dataset.

    + pub fn get_performance_configuration(&self) -> &::std::option::Option { + &self.performance_configuration + } /// Consumes the builder and constructs a [`DataSet`](crate::types::DataSet). pub fn build(self) -> crate::types::DataSet { crate::types::DataSet { @@ -462,6 +483,7 @@ impl DataSetBuilder { column_level_permission_rules: self.column_level_permission_rules, data_set_usage_configuration: self.data_set_usage_configuration, dataset_parameters: self.dataset_parameters, + performance_configuration: self.performance_configuration, } } } diff --git a/sdk/quicksight/src/types/_performance_configuration.rs b/sdk/quicksight/src/types/_performance_configuration.rs new file mode 100644 index 000000000000..922706b7ac6f --- /dev/null +++ b/sdk/quicksight/src/types/_performance_configuration.rs @@ -0,0 +1,58 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct PerformanceConfiguration { + ///

    A UniqueKey configuration.

    + pub unique_keys: ::std::option::Option<::std::vec::Vec>, +} +impl PerformanceConfiguration { + ///

    A UniqueKey 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 `.unique_keys.is_none()`. + pub fn unique_keys(&self) -> &[crate::types::UniqueKey] { + self.unique_keys.as_deref().unwrap_or_default() + } +} +impl PerformanceConfiguration { + /// Creates a new builder-style object to manufacture [`PerformanceConfiguration`](crate::types::PerformanceConfiguration). + pub fn builder() -> crate::types::builders::PerformanceConfigurationBuilder { + crate::types::builders::PerformanceConfigurationBuilder::default() + } +} + +/// A builder for [`PerformanceConfiguration`](crate::types::PerformanceConfiguration). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct PerformanceConfigurationBuilder { + pub(crate) unique_keys: ::std::option::Option<::std::vec::Vec>, +} +impl PerformanceConfigurationBuilder { + /// Appends an item to `unique_keys`. + /// + /// To override the contents of this collection use [`set_unique_keys`](Self::set_unique_keys). + /// + ///

    A UniqueKey configuration.

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

    A UniqueKey configuration.

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

    A UniqueKey configuration.

    + pub fn get_unique_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.unique_keys + } + /// Consumes the builder and constructs a [`PerformanceConfiguration`](crate::types::PerformanceConfiguration). + pub fn build(self) -> crate::types::PerformanceConfiguration { + crate::types::PerformanceConfiguration { + unique_keys: self.unique_keys, + } + } +} diff --git a/sdk/quicksight/src/types/_unique_key.rs b/sdk/quicksight/src/types/_unique_key.rs new file mode 100644 index 000000000000..c1aa7f4763d6 --- /dev/null +++ b/sdk/quicksight/src/types/_unique_key.rs @@ -0,0 +1,64 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    A UniqueKey configuration that references a dataset column.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct UniqueKey { + ///

    The name of the column that is referenced in the UniqueKey configuration.

    + pub column_names: ::std::vec::Vec<::std::string::String>, +} +impl UniqueKey { + ///

    The name of the column that is referenced in the UniqueKey configuration.

    + pub fn column_names(&self) -> &[::std::string::String] { + use std::ops::Deref; + self.column_names.deref() + } +} +impl UniqueKey { + /// Creates a new builder-style object to manufacture [`UniqueKey`](crate::types::UniqueKey). + pub fn builder() -> crate::types::builders::UniqueKeyBuilder { + crate::types::builders::UniqueKeyBuilder::default() + } +} + +/// A builder for [`UniqueKey`](crate::types::UniqueKey). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UniqueKeyBuilder { + pub(crate) column_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl UniqueKeyBuilder { + /// Appends an item to `column_names`. + /// + /// To override the contents of this collection use [`set_column_names`](Self::set_column_names). + /// + ///

    The name of the column that is referenced in the UniqueKey configuration.

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

    The name of the column that is referenced in the UniqueKey configuration.

    + pub fn set_column_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.column_names = input; + self + } + ///

    The name of the column that is referenced in the UniqueKey configuration.

    + pub fn get_column_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.column_names + } + /// Consumes the builder and constructs a [`UniqueKey`](crate::types::UniqueKey). + /// This method will fail if any of the following fields are not set: + /// - [`column_names`](crate::types::builders::UniqueKeyBuilder::column_names) + pub fn build(self) -> ::std::result::Result { + ::std::result::Result::Ok(crate::types::UniqueKey { + column_names: self.column_names.ok_or_else(|| { + ::aws_smithy_types::error::operation::BuildError::missing_field( + "column_names", + "column_names was not specified but it is required when building UniqueKey", + ) + })?, + }) + } +} diff --git a/sdk/quicksight/src/types/builders.rs b/sdk/quicksight/src/types/builders.rs index 768d03f105dd..99cf7a5c666a 100644 --- a/sdk/quicksight/src/types/builders.rs +++ b/sdk/quicksight/src/types/builders.rs @@ -1271,6 +1271,10 @@ pub use crate::types::_athena_parameters::AthenaParametersBuilder; pub use crate::types::_amazon_elasticsearch_parameters::AmazonElasticsearchParametersBuilder; +pub use crate::types::_performance_configuration::PerformanceConfigurationBuilder; + +pub use crate::types::_unique_key::UniqueKeyBuilder; + pub use crate::types::_dataset_parameter::DatasetParameterBuilder; pub use crate::types::_date_time_dataset_parameter::DateTimeDatasetParameterBuilder; diff --git a/sdk/resiliencehub/Cargo.toml b/sdk/resiliencehub/Cargo.toml index 92ab501c8a59..659524cbe975 100644 --- a/sdk/resiliencehub/Cargo.toml +++ b/sdk/resiliencehub/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-resiliencehub" -version = "1.54.0" +version = "1.55.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for AWS Resilience Hub" edition = "2021" diff --git a/sdk/resiliencehub/README.md b/sdk/resiliencehub/README.md index cb6555d6fcf0..83a24cdb5c7e 100644 --- a/sdk/resiliencehub/README.md +++ b/sdk/resiliencehub/README.md @@ -14,7 +14,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-resiliencehub = "1.54.0" +aws-sdk-resiliencehub = "1.55.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/resiliencehub/src/lib.rs b/sdk/resiliencehub/src/lib.rs index 3c3b427f3138..f87f882ed948 100644 --- a/sdk/resiliencehub/src/lib.rs +++ b/sdk/resiliencehub/src/lib.rs @@ -31,7 +31,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-resiliencehub = "1.54.0" +//! aws-sdk-resiliencehub = "1.55.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/resiliencehub/src/protocol_serde.rs b/sdk/resiliencehub/src/protocol_serde.rs index 41c23226736c..96b47e00747c 100644 --- a/sdk/resiliencehub/src/protocol_serde.rs +++ b/sdk/resiliencehub/src/protocol_serde.rs @@ -481,6 +481,10 @@ pub(crate) mod shape_resource_error; pub(crate) mod shape_scoring_component_resiliency_score; +pub(crate) mod shape_alarm; + +pub(crate) mod shape_experiment; + pub(crate) mod shape_recommendation_compliance; pub(crate) mod shape_suggested_changes_list; diff --git a/sdk/resiliencehub/src/protocol_serde/shape_alarm.rs b/sdk/resiliencehub/src/protocol_serde/shape_alarm.rs new file mode 100644 index 000000000000..8025982f5884 --- /dev/null +++ b/sdk/resiliencehub/src/protocol_serde/shape_alarm.rs @@ -0,0 +1,47 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_alarm<'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::AlarmBuilder::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() { + "alarmArn" => { + builder = builder.set_alarm_arn( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "source" => { + builder = builder.set_source( + ::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(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/resiliencehub/src/protocol_serde/shape_batch_update_recommendation_status_successful_entry.rs b/sdk/resiliencehub/src/protocol_serde/shape_batch_update_recommendation_status_successful_entry.rs index ca60c6a77a2d..f65e00e77263 100644 --- a/sdk/resiliencehub/src/protocol_serde/shape_batch_update_recommendation_status_successful_entry.rs +++ b/sdk/resiliencehub/src/protocol_serde/shape_batch_update_recommendation_status_successful_entry.rs @@ -36,6 +36,13 @@ where "excluded" => { builder = builder.set_excluded(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?); } + "appComponentId" => { + builder = builder.set_app_component_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } "excludeReason" => { builder = builder.set_exclude_reason( ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? diff --git a/sdk/resiliencehub/src/protocol_serde/shape_experiment.rs b/sdk/resiliencehub/src/protocol_serde/shape_experiment.rs new file mode 100644 index 000000000000..f4c25184d1eb --- /dev/null +++ b/sdk/resiliencehub/src/protocol_serde/shape_experiment.rs @@ -0,0 +1,47 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_experiment<'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::ExperimentBuilder::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() { + "experimentArn" => { + builder = builder.set_experiment_arn( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "experimentTemplateId" => { + builder = builder.set_experiment_template_id( + ::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(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/resiliencehub/src/protocol_serde/shape_recommendation_item.rs b/sdk/resiliencehub/src/protocol_serde/shape_recommendation_item.rs index 951f7c4f9c27..aff855f005d9 100644 --- a/sdk/resiliencehub/src/protocol_serde/shape_recommendation_item.rs +++ b/sdk/resiliencehub/src/protocol_serde/shape_recommendation_item.rs @@ -48,6 +48,12 @@ where .transpose()?, ); } + "latestDiscoveredExperiment" => { + builder = builder.set_latest_discovered_experiment(crate::protocol_serde::shape_experiment::de_experiment(tokens)?); + } + "discoveredAlarm" => { + builder = builder.set_discovered_alarm(crate::protocol_serde::shape_alarm::de_alarm(tokens)?); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/resiliencehub/src/protocol_serde/shape_test_recommendation.rs b/sdk/resiliencehub/src/protocol_serde/shape_test_recommendation.rs index e0648b855728..5ea0ea5920a8 100644 --- a/sdk/resiliencehub/src/protocol_serde/shape_test_recommendation.rs +++ b/sdk/resiliencehub/src/protocol_serde/shape_test_recommendation.rs @@ -28,6 +28,13 @@ where .transpose()?, ); } + "appComponentId" => { + builder = builder.set_app_component_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } "appComponentName" => { builder = builder.set_app_component_name( ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? diff --git a/sdk/resiliencehub/src/protocol_serde/shape_update_recommendation_status_request_entry.rs b/sdk/resiliencehub/src/protocol_serde/shape_update_recommendation_status_request_entry.rs index e15c4a3376d3..a498f0470630 100644 --- a/sdk/resiliencehub/src/protocol_serde/shape_update_recommendation_status_request_entry.rs +++ b/sdk/resiliencehub/src/protocol_serde/shape_update_recommendation_status_request_entry.rs @@ -18,8 +18,11 @@ pub fn ser_update_recommendation_status_request_entry( { object.key("excluded").boolean(input.excluded); } - if let Some(var_3) = &input.exclude_reason { - object.key("excludeReason").string(var_3.as_str()); + if let Some(var_3) = &input.app_component_id { + object.key("appComponentId").string(var_3.as_str()); + } + if let Some(var_4) = &input.exclude_reason { + object.key("excludeReason").string(var_4.as_str()); } Ok(()) } diff --git a/sdk/resiliencehub/src/types.rs b/sdk/resiliencehub/src/types.rs index 7861a8745a59..cad08fe4b8c9 100644 --- a/sdk/resiliencehub/src/types.rs +++ b/sdk/resiliencehub/src/types.rs @@ -91,6 +91,10 @@ pub use crate::types::_recommendation_status::RecommendationStatus; pub use crate::types::_recommendation_item::RecommendationItem; +pub use crate::types::_alarm::Alarm; + +pub use crate::types::_experiment::Experiment; + pub use crate::types::_exclude_recommendation_reason::ExcludeRecommendationReason; pub use crate::types::_test_type::TestType; @@ -195,6 +199,8 @@ pub use crate::types::_accept_grouping_recommendation_entry::AcceptGroupingRecom mod _accept_grouping_recommendation_entry; +mod _alarm; + mod _alarm_recommendation; mod _alarm_type; @@ -279,6 +285,8 @@ mod _event_type; mod _exclude_recommendation_reason; +mod _experiment; + mod _failed_grouping_recommendation_entry; mod _failure_policy; diff --git a/sdk/resiliencehub/src/types/_alarm.rs b/sdk/resiliencehub/src/types/_alarm.rs new file mode 100644 index 000000000000..9931ed219f6c --- /dev/null +++ b/sdk/resiliencehub/src/types/_alarm.rs @@ -0,0 +1,72 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    Indicates the Amazon CloudWatch alarm detected while running an assessment.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct Alarm { + ///

    Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.

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

    Indicates the source of the Amazon CloudWatch alarm. That is, it indicates if the alarm was created using Resilience Hub recommendation (AwsResilienceHub), or if you had created the alarm in Amazon CloudWatch (Customer).

    + pub source: ::std::option::Option<::std::string::String>, +} +impl Alarm { + ///

    Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.

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

    Indicates the source of the Amazon CloudWatch alarm. That is, it indicates if the alarm was created using Resilience Hub recommendation (AwsResilienceHub), or if you had created the alarm in Amazon CloudWatch (Customer).

    + pub fn source(&self) -> ::std::option::Option<&str> { + self.source.as_deref() + } +} +impl Alarm { + /// Creates a new builder-style object to manufacture [`Alarm`](crate::types::Alarm). + pub fn builder() -> crate::types::builders::AlarmBuilder { + crate::types::builders::AlarmBuilder::default() + } +} + +/// A builder for [`Alarm`](crate::types::Alarm). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct AlarmBuilder { + pub(crate) alarm_arn: ::std::option::Option<::std::string::String>, + pub(crate) source: ::std::option::Option<::std::string::String>, +} +impl AlarmBuilder { + ///

    Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.

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

    Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.

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

    Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.

    + pub fn get_alarm_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.alarm_arn + } + ///

    Indicates the source of the Amazon CloudWatch alarm. That is, it indicates if the alarm was created using Resilience Hub recommendation (AwsResilienceHub), or if you had created the alarm in Amazon CloudWatch (Customer).

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

    Indicates the source of the Amazon CloudWatch alarm. That is, it indicates if the alarm was created using Resilience Hub recommendation (AwsResilienceHub), or if you had created the alarm in Amazon CloudWatch (Customer).

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

    Indicates the source of the Amazon CloudWatch alarm. That is, it indicates if the alarm was created using Resilience Hub recommendation (AwsResilienceHub), or if you had created the alarm in Amazon CloudWatch (Customer).

    + pub fn get_source(&self) -> &::std::option::Option<::std::string::String> { + &self.source + } + /// Consumes the builder and constructs a [`Alarm`](crate::types::Alarm). + pub fn build(self) -> crate::types::Alarm { + crate::types::Alarm { + alarm_arn: self.alarm_arn, + source: self.source, + } + } +} diff --git a/sdk/resiliencehub/src/types/_assessment_risk_recommendation.rs b/sdk/resiliencehub/src/types/_assessment_risk_recommendation.rs index a459ca4e3940..c2cc2ec06c3a 100644 --- a/sdk/resiliencehub/src/types/_assessment_risk_recommendation.rs +++ b/sdk/resiliencehub/src/types/_assessment_risk_recommendation.rs @@ -16,7 +16,7 @@ pub struct AssessmentRiskRecommendation { ///

    This property is available only in the US East (N. Virginia) Region.

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

    Indicates the Application Components (AppComponents) that were assessed as part of the assessnent and are associated with the identified risk and recommendation.

    + ///

    Indicates the Application Components (AppComponents) that were assessed as part of the assessment and are associated with the identified risk and recommendation.

    ///

    This property is available only in the US East (N. Virginia) Region.

    ///
    pub app_components: ::std::option::Option<::std::vec::Vec<::std::string::String>>, @@ -34,7 +34,7 @@ impl AssessmentRiskRecommendation { pub fn recommendation(&self) -> ::std::option::Option<&str> { self.recommendation.as_deref() } - ///

    Indicates the Application Components (AppComponents) that were assessed as part of the assessnent and are associated with the identified risk and recommendation.

    + ///

    Indicates the Application Components (AppComponents) that were assessed as part of the assessment and are associated with the identified risk and recommendation.

    ///

    This property is available only in the US East (N. Virginia) Region.

    ///
    /// @@ -103,7 +103,7 @@ impl AssessmentRiskRecommendationBuilder { /// /// To override the contents of this collection use [`set_app_components`](Self::set_app_components). /// - ///

    Indicates the Application Components (AppComponents) that were assessed as part of the assessnent and are associated with the identified risk and recommendation.

    + ///

    Indicates the Application Components (AppComponents) that were assessed as part of the assessment and are associated with the identified risk and recommendation.

    ///

    This property is available only in the US East (N. Virginia) Region.

    ///
    pub fn app_components(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { @@ -112,14 +112,14 @@ impl AssessmentRiskRecommendationBuilder { self.app_components = ::std::option::Option::Some(v); self } - ///

    Indicates the Application Components (AppComponents) that were assessed as part of the assessnent and are associated with the identified risk and recommendation.

    + ///

    Indicates the Application Components (AppComponents) that were assessed as part of the assessment and are associated with the identified risk and recommendation.

    ///

    This property is available only in the US East (N. Virginia) Region.

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

    Indicates the Application Components (AppComponents) that were assessed as part of the assessnent and are associated with the identified risk and recommendation.

    + ///

    Indicates the Application Components (AppComponents) that were assessed as part of the assessment and are associated with the identified risk and recommendation.

    ///

    This property is available only in the US East (N. Virginia) Region.

    ///
    pub fn get_app_components(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { diff --git a/sdk/resiliencehub/src/types/_batch_update_recommendation_status_successful_entry.rs b/sdk/resiliencehub/src/types/_batch_update_recommendation_status_successful_entry.rs index 1078442b1c31..a9cb47eef157 100644 --- a/sdk/resiliencehub/src/types/_batch_update_recommendation_status_successful_entry.rs +++ b/sdk/resiliencehub/src/types/_batch_update_recommendation_status_successful_entry.rs @@ -14,6 +14,8 @@ pub struct BatchUpdateRecommendationStatusSuccessfulEntry { pub item: ::std::option::Option, ///

    Indicates if the operational recommendation was successfully excluded.

    pub excluded: bool, + ///

    Indicates the identifier of an AppComponent.

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

    Indicates the reason for excluding an operational recommendation.

    pub exclude_reason: ::std::option::Option, } @@ -38,6 +40,10 @@ impl BatchUpdateRecommendationStatusSuccessfulEntry { pub fn excluded(&self) -> bool { self.excluded } + ///

    Indicates the identifier of an AppComponent.

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

    Indicates the reason for excluding an operational recommendation.

    pub fn exclude_reason(&self) -> ::std::option::Option<&crate::types::ExcludeRecommendationReason> { self.exclude_reason.as_ref() @@ -58,6 +64,7 @@ pub struct BatchUpdateRecommendationStatusSuccessfulEntryBuilder { pub(crate) reference_id: ::std::option::Option<::std::string::String>, pub(crate) item: ::std::option::Option, pub(crate) excluded: ::std::option::Option, + pub(crate) app_component_id: ::std::option::Option<::std::string::String>, pub(crate) exclude_reason: ::std::option::Option, } impl BatchUpdateRecommendationStatusSuccessfulEntryBuilder { @@ -126,6 +133,20 @@ impl BatchUpdateRecommendationStatusSuccessfulEntryBuilder { pub fn get_excluded(&self) -> &::std::option::Option { &self.excluded } + ///

    Indicates the identifier of an AppComponent.

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

    Indicates the identifier of an AppComponent.

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

    Indicates the identifier of an AppComponent.

    + pub fn get_app_component_id(&self) -> &::std::option::Option<::std::string::String> { + &self.app_component_id + } ///

    Indicates the reason for excluding an operational recommendation.

    pub fn exclude_reason(mut self, input: crate::types::ExcludeRecommendationReason) -> Self { self.exclude_reason = ::std::option::Option::Some(input); @@ -168,6 +189,7 @@ impl BatchUpdateRecommendationStatusSuccessfulEntryBuilder { "excluded was not specified but it is required when building BatchUpdateRecommendationStatusSuccessfulEntry", ) })?, + app_component_id: self.app_component_id, exclude_reason: self.exclude_reason, }) } diff --git a/sdk/resiliencehub/src/types/_experiment.rs b/sdk/resiliencehub/src/types/_experiment.rs new file mode 100644 index 000000000000..01dbc55693d9 --- /dev/null +++ b/sdk/resiliencehub/src/types/_experiment.rs @@ -0,0 +1,72 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    Indicates the FIS experiment detected while running an assessment.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct Experiment { + ///

    Amazon Resource Name (ARN) of the FIS experiment.

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

    Identifier of the FIS experiment template.

    + pub experiment_template_id: ::std::option::Option<::std::string::String>, +} +impl Experiment { + ///

    Amazon Resource Name (ARN) of the FIS experiment.

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

    Identifier of the FIS experiment template.

    + pub fn experiment_template_id(&self) -> ::std::option::Option<&str> { + self.experiment_template_id.as_deref() + } +} +impl Experiment { + /// Creates a new builder-style object to manufacture [`Experiment`](crate::types::Experiment). + pub fn builder() -> crate::types::builders::ExperimentBuilder { + crate::types::builders::ExperimentBuilder::default() + } +} + +/// A builder for [`Experiment`](crate::types::Experiment). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ExperimentBuilder { + pub(crate) experiment_arn: ::std::option::Option<::std::string::String>, + pub(crate) experiment_template_id: ::std::option::Option<::std::string::String>, +} +impl ExperimentBuilder { + ///

    Amazon Resource Name (ARN) of the FIS experiment.

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

    Amazon Resource Name (ARN) of the FIS experiment.

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

    Amazon Resource Name (ARN) of the FIS experiment.

    + pub fn get_experiment_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.experiment_arn + } + ///

    Identifier of the FIS experiment template.

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

    Identifier of the FIS experiment template.

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

    Identifier of the FIS experiment template.

    + pub fn get_experiment_template_id(&self) -> &::std::option::Option<::std::string::String> { + &self.experiment_template_id + } + /// Consumes the builder and constructs a [`Experiment`](crate::types::Experiment). + pub fn build(self) -> crate::types::Experiment { + crate::types::Experiment { + experiment_arn: self.experiment_arn, + experiment_template_id: self.experiment_template_id, + } + } +} diff --git a/sdk/resiliencehub/src/types/_permission_model.rs b/sdk/resiliencehub/src/types/_permission_model.rs index b96eaed865b5..e41ec96a85c6 100644 --- a/sdk/resiliencehub/src/types/_permission_model.rs +++ b/sdk/resiliencehub/src/types/_permission_model.rs @@ -6,7 +6,8 @@ pub struct PermissionModel { ///

    Defines how Resilience Hub scans your resources. It can scan for the resources by using a pre-existing role in your Amazon Web Services account, or by using the credentials of the current IAM user.

    pub r#type: crate::types::PermissionModelType, - ///

    Existing Amazon Web Services IAM role name in the primary Amazon Web Services account that will be assumed by Resilience Hub Service Principle to obtain a read-only access to your application resources while running an assessment.

    + ///

    Existing Amazon Web Services IAM role name in the primary Amazon Web Services account that will be assumed by Resilience Hub Service Principle to obtain a read-only access to your application resources while running an assessment.

    + ///

    If your IAM role includes a path, you must include the path in the invokerRoleName parameter. For example, if your IAM role's ARN is arn:aws:iam:123456789012:role/my-path/role-name, you should pass my-path/role-name.

    ///
      ///
    • ///

      You must have iam:passRole permission for this role while creating or updating the application.

    • @@ -30,7 +31,8 @@ impl PermissionModel { pub fn r#type(&self) -> &crate::types::PermissionModelType { &self.r#type } - ///

      Existing Amazon Web Services IAM role name in the primary Amazon Web Services account that will be assumed by Resilience Hub Service Principle to obtain a read-only access to your application resources while running an assessment.

      + ///

      Existing Amazon Web Services IAM role name in the primary Amazon Web Services account that will be assumed by Resilience Hub Service Principle to obtain a read-only access to your application resources while running an assessment.

      + ///

      If your IAM role includes a path, you must include the path in the invokerRoleName parameter. For example, if your IAM role's ARN is arn:aws:iam:123456789012:role/my-path/role-name, you should pass my-path/role-name.

      ///
        ///
      • ///

        You must have iam:passRole permission for this role while creating or updating the application.

      • @@ -86,7 +88,8 @@ impl PermissionModelBuilder { pub fn get_type(&self) -> &::std::option::Option { &self.r#type } - ///

        Existing Amazon Web Services IAM role name in the primary Amazon Web Services account that will be assumed by Resilience Hub Service Principle to obtain a read-only access to your application resources while running an assessment.

        + ///

        Existing Amazon Web Services IAM role name in the primary Amazon Web Services account that will be assumed by Resilience Hub Service Principle to obtain a read-only access to your application resources while running an assessment.

        + ///

        If your IAM role includes a path, you must include the path in the invokerRoleName parameter. For example, if your IAM role's ARN is arn:aws:iam:123456789012:role/my-path/role-name, you should pass my-path/role-name.

        ///
          ///
        • ///

          You must have iam:passRole permission for this role while creating or updating the application.

        • @@ -98,7 +101,8 @@ impl PermissionModelBuilder { self.invoker_role_name = ::std::option::Option::Some(input.into()); self } - ///

          Existing Amazon Web Services IAM role name in the primary Amazon Web Services account that will be assumed by Resilience Hub Service Principle to obtain a read-only access to your application resources while running an assessment.

          + ///

          Existing Amazon Web Services IAM role name in the primary Amazon Web Services account that will be assumed by Resilience Hub Service Principle to obtain a read-only access to your application resources while running an assessment.

          + ///

          If your IAM role includes a path, you must include the path in the invokerRoleName parameter. For example, if your IAM role's ARN is arn:aws:iam:123456789012:role/my-path/role-name, you should pass my-path/role-name.

          ///
            ///
          • ///

            You must have iam:passRole permission for this role while creating or updating the application.

          • @@ -110,7 +114,8 @@ impl PermissionModelBuilder { self.invoker_role_name = input; self } - ///

            Existing Amazon Web Services IAM role name in the primary Amazon Web Services account that will be assumed by Resilience Hub Service Principle to obtain a read-only access to your application resources while running an assessment.

            + ///

            Existing Amazon Web Services IAM role name in the primary Amazon Web Services account that will be assumed by Resilience Hub Service Principle to obtain a read-only access to your application resources while running an assessment.

            + ///

            If your IAM role includes a path, you must include the path in the invokerRoleName parameter. For example, if your IAM role's ARN is arn:aws:iam:123456789012:role/my-path/role-name, you should pass my-path/role-name.

            ///
              ///
            • ///

              You must have iam:passRole permission for this role while creating or updating the application.

            • diff --git a/sdk/resiliencehub/src/types/_recommendation_item.rs b/sdk/resiliencehub/src/types/_recommendation_item.rs index 23824e468887..4b158d01716d 100644 --- a/sdk/resiliencehub/src/types/_recommendation_item.rs +++ b/sdk/resiliencehub/src/types/_recommendation_item.rs @@ -16,6 +16,10 @@ pub struct RecommendationItem { pub excluded: ::std::option::Option, ///

              Indicates the reason for excluding an operational recommendation.

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

              Indicates the experiment created in FIS that was discovered by Resilience Hub, which matches the recommendation.

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

              Indicates the previously implemented Amazon CloudWatch alarm discovered by Resilience Hub.

              + pub discovered_alarm: ::std::option::Option, } impl RecommendationItem { ///

              Identifier of the resource.

              @@ -42,6 +46,14 @@ impl RecommendationItem { pub fn exclude_reason(&self) -> ::std::option::Option<&crate::types::ExcludeRecommendationReason> { self.exclude_reason.as_ref() } + ///

              Indicates the experiment created in FIS that was discovered by Resilience Hub, which matches the recommendation.

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

              Indicates the previously implemented Amazon CloudWatch alarm discovered by Resilience Hub.

              + pub fn discovered_alarm(&self) -> ::std::option::Option<&crate::types::Alarm> { + self.discovered_alarm.as_ref() + } } impl RecommendationItem { /// Creates a new builder-style object to manufacture [`RecommendationItem`](crate::types::RecommendationItem). @@ -60,6 +72,8 @@ pub struct RecommendationItemBuilder { pub(crate) already_implemented: ::std::option::Option, pub(crate) excluded: ::std::option::Option, pub(crate) exclude_reason: ::std::option::Option, + pub(crate) latest_discovered_experiment: ::std::option::Option, + pub(crate) discovered_alarm: ::std::option::Option, } impl RecommendationItemBuilder { ///

              Identifier of the resource.

              @@ -146,6 +160,34 @@ impl RecommendationItemBuilder { pub fn get_exclude_reason(&self) -> &::std::option::Option { &self.exclude_reason } + ///

              Indicates the experiment created in FIS that was discovered by Resilience Hub, which matches the recommendation.

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

              Indicates the experiment created in FIS that was discovered by Resilience Hub, which matches the recommendation.

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

              Indicates the experiment created in FIS that was discovered by Resilience Hub, which matches the recommendation.

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

              Indicates the previously implemented Amazon CloudWatch alarm discovered by Resilience Hub.

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

              Indicates the previously implemented Amazon CloudWatch alarm discovered by Resilience Hub.

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

              Indicates the previously implemented Amazon CloudWatch alarm discovered by Resilience Hub.

              + pub fn get_discovered_alarm(&self) -> &::std::option::Option { + &self.discovered_alarm + } /// Consumes the builder and constructs a [`RecommendationItem`](crate::types::RecommendationItem). pub fn build(self) -> crate::types::RecommendationItem { crate::types::RecommendationItem { @@ -155,6 +197,8 @@ impl RecommendationItemBuilder { already_implemented: self.already_implemented, excluded: self.excluded, exclude_reason: self.exclude_reason, + latest_discovered_experiment: self.latest_discovered_experiment, + discovered_alarm: self.discovered_alarm, } } } diff --git a/sdk/resiliencehub/src/types/_test_recommendation.rs b/sdk/resiliencehub/src/types/_test_recommendation.rs index f17a182852a4..ea0758ee4362 100644 --- a/sdk/resiliencehub/src/types/_test_recommendation.rs +++ b/sdk/resiliencehub/src/types/_test_recommendation.rs @@ -8,6 +8,8 @@ pub struct TestRecommendation { pub recommendation_id: ::std::option::Option<::std::string::String>, ///

              Reference identifier for the test recommendation.

              pub reference_id: ::std::string::String, + ///

              Indicates the identifier of the AppComponent.

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

              Name of the Application Component.

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

              Name of the test recommendation.

              @@ -39,6 +41,10 @@ impl TestRecommendation { use std::ops::Deref; self.reference_id.deref() } + ///

              Indicates the identifier of the AppComponent.

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

              Name of the Application Component.

              pub fn app_component_name(&self) -> ::std::option::Option<&str> { self.app_component_name.as_deref() @@ -97,6 +103,7 @@ impl TestRecommendation { pub struct TestRecommendationBuilder { pub(crate) recommendation_id: ::std::option::Option<::std::string::String>, pub(crate) reference_id: ::std::option::Option<::std::string::String>, + pub(crate) app_component_id: ::std::option::Option<::std::string::String>, pub(crate) app_component_name: ::std::option::Option<::std::string::String>, pub(crate) name: ::std::option::Option<::std::string::String>, pub(crate) intent: ::std::option::Option<::std::string::String>, @@ -138,6 +145,20 @@ impl TestRecommendationBuilder { pub fn get_reference_id(&self) -> &::std::option::Option<::std::string::String> { &self.reference_id } + ///

              Indicates the identifier of the AppComponent.

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

              Indicates the identifier of the AppComponent.

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

              Indicates the identifier of the AppComponent.

              + pub fn get_app_component_id(&self) -> &::std::option::Option<::std::string::String> { + &self.app_component_id + } ///

              Name of the Application Component.

              pub fn app_component_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.app_component_name = ::std::option::Option::Some(input.into()); @@ -302,6 +323,7 @@ impl TestRecommendationBuilder { "reference_id was not specified but it is required when building TestRecommendation", ) })?, + app_component_id: self.app_component_id, app_component_name: self.app_component_name, name: self.name, intent: self.intent, diff --git a/sdk/resiliencehub/src/types/_update_recommendation_status_request_entry.rs b/sdk/resiliencehub/src/types/_update_recommendation_status_request_entry.rs index c7a0b4938c41..cbae82d352ba 100644 --- a/sdk/resiliencehub/src/types/_update_recommendation_status_request_entry.rs +++ b/sdk/resiliencehub/src/types/_update_recommendation_status_request_entry.rs @@ -14,6 +14,8 @@ pub struct UpdateRecommendationStatusRequestEntry { pub item: ::std::option::Option, ///

              Indicates if the operational recommendation needs to be excluded. If set to True, the operational recommendation will be excluded.

              pub excluded: bool, + ///

              Indicates the identifier of the AppComponent.

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

              Indicates the reason for excluding an operational recommendation.

              pub exclude_reason: ::std::option::Option, } @@ -38,6 +40,10 @@ impl UpdateRecommendationStatusRequestEntry { pub fn excluded(&self) -> bool { self.excluded } + ///

              Indicates the identifier of the AppComponent.

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

              Indicates the reason for excluding an operational recommendation.

              pub fn exclude_reason(&self) -> ::std::option::Option<&crate::types::ExcludeRecommendationReason> { self.exclude_reason.as_ref() @@ -58,6 +64,7 @@ pub struct UpdateRecommendationStatusRequestEntryBuilder { pub(crate) reference_id: ::std::option::Option<::std::string::String>, pub(crate) item: ::std::option::Option, pub(crate) excluded: ::std::option::Option, + pub(crate) app_component_id: ::std::option::Option<::std::string::String>, pub(crate) exclude_reason: ::std::option::Option, } impl UpdateRecommendationStatusRequestEntryBuilder { @@ -126,6 +133,20 @@ impl UpdateRecommendationStatusRequestEntryBuilder { pub fn get_excluded(&self) -> &::std::option::Option { &self.excluded } + ///

              Indicates the identifier of the AppComponent.

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

              Indicates the identifier of the AppComponent.

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

              Indicates the identifier of the AppComponent.

              + pub fn get_app_component_id(&self) -> &::std::option::Option<::std::string::String> { + &self.app_component_id + } ///

              Indicates the reason for excluding an operational recommendation.

              pub fn exclude_reason(mut self, input: crate::types::ExcludeRecommendationReason) -> Self { self.exclude_reason = ::std::option::Option::Some(input); @@ -168,6 +189,7 @@ impl UpdateRecommendationStatusRequestEntryBuilder { "excluded was not specified but it is required when building UpdateRecommendationStatusRequestEntry", ) })?, + app_component_id: self.app_component_id, exclude_reason: self.exclude_reason, }) } diff --git a/sdk/resiliencehub/src/types/builders.rs b/sdk/resiliencehub/src/types/builders.rs index fdaca60c0112..bb3761b0b39a 100644 --- a/sdk/resiliencehub/src/types/builders.rs +++ b/sdk/resiliencehub/src/types/builders.rs @@ -45,6 +45,10 @@ pub use crate::types::_test_recommendation::TestRecommendationBuilder; pub use crate::types::_recommendation_item::RecommendationItemBuilder; +pub use crate::types::_alarm::AlarmBuilder; + +pub use crate::types::_experiment::ExperimentBuilder; + pub use crate::types::_sop_recommendation::SopRecommendationBuilder; pub use crate::types::_grouping_recommendation::GroupingRecommendationBuilder; diff --git a/sdk/transfer/Cargo.toml b/sdk/transfer/Cargo.toml index 63943d565119..5da4701f1188 100644 --- a/sdk/transfer/Cargo.toml +++ b/sdk/transfer/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-transfer" -version = "1.57.0" +version = "1.58.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for AWS Transfer Family" edition = "2021" diff --git a/sdk/transfer/README.md b/sdk/transfer/README.md index f00f080eafa7..1e804e6090b7 100644 --- a/sdk/transfer/README.md +++ b/sdk/transfer/README.md @@ -14,7 +14,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-transfer = "1.57.0" +aws-sdk-transfer = "1.58.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/transfer/src/client/create_agreement.rs b/sdk/transfer/src/client/create_agreement.rs index 5b2b328fa9c2..31ff3ac09f23 100644 --- a/sdk/transfer/src/client/create_agreement.rs +++ b/sdk/transfer/src/client/create_agreement.rs @@ -11,6 +11,8 @@ impl super::Client { /// - [`access_role(impl Into)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::access_role) / [`set_access_role(Option)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::set_access_role):
              required: **true**

              Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.

              For AS2 connectors

              With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the request parameter, SendFilePaths. We use the file’s parent directory (for example, for --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to provide read and write access to the parent directory of the file location used in the StartFileTransfer request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with StartFileTransfer.

              If you are using Basic authentication for your AS2 connector, the access role requires the secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the kms:Decrypt permission for that key.

              For SFTP connectors

              Make sure that the access role provides read and write access to the parent directory of the file location that's used in the StartFileTransfer request. Additionally, make sure that the role provides secretsmanager:GetSecretValue permission to Secrets Manager.


              /// - [`status(AgreementStatusType)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::status) / [`set_status(Option)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::set_status):
              required: **false**

              The status of the agreement. The agreement can be either ACTIVE or INACTIVE.


              /// - [`tags(Tag)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::set_tags):
              required: **false**

              Key-value pairs that can be used to group and search for agreements.


              + /// - [`preserve_filename(PreserveFilenameType)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::preserve_filename) / [`set_preserve_filename(Option)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::set_preserve_filename):
              required: **false**

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

              • ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.


              + /// - [`enforce_message_signing(EnforceMessageSigningType)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::enforce_message_signing) / [`set_enforce_message_signing(Option)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::set_enforce_message_signing):
              required: **false**

              Determines whether or not unsigned messages from your trading partners will be accepted.

              • ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.


              /// - On success, responds with [`CreateAgreementOutput`](crate::operation::create_agreement::CreateAgreementOutput) with field(s): /// - [`agreement_id(String)`](crate::operation::create_agreement::CreateAgreementOutput::agreement_id):

              The unique identifier for the agreement. Use this ID for deleting, or updating an agreement, as well as in any other API calls that require that you specify the agreement ID.

              /// - On failure, responds with [`SdkError`](crate::operation::create_agreement::CreateAgreementError) diff --git a/sdk/transfer/src/client/update_agreement.rs b/sdk/transfer/src/client/update_agreement.rs index c866518b3181..97c315383c72 100644 --- a/sdk/transfer/src/client/update_agreement.rs +++ b/sdk/transfer/src/client/update_agreement.rs @@ -11,6 +11,8 @@ impl super::Client { /// - [`partner_profile_id(impl Into)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::partner_profile_id) / [`set_partner_profile_id(Option)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::set_partner_profile_id):
              required: **false**

              A unique identifier for the partner profile. To change the partner profile identifier, provide a new value here.


              /// - [`base_directory(impl Into)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::base_directory) / [`set_base_directory(Option)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::set_base_directory):
              required: **false**

              To change the landing directory (folder) for files that are transferred, provide the bucket folder that you want to use; for example, /amzn-s3-demo-bucket/home/mydirectory .


              /// - [`access_role(impl Into)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::access_role) / [`set_access_role(Option)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::set_access_role):
              required: **false**

              Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.

              For AS2 connectors

              With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the request parameter, SendFilePaths. We use the file’s parent directory (for example, for --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to provide read and write access to the parent directory of the file location used in the StartFileTransfer request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with StartFileTransfer.

              If you are using Basic authentication for your AS2 connector, the access role requires the secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the kms:Decrypt permission for that key.

              For SFTP connectors

              Make sure that the access role provides read and write access to the parent directory of the file location that's used in the StartFileTransfer request. Additionally, make sure that the role provides secretsmanager:GetSecretValue permission to Secrets Manager.


              + /// - [`preserve_filename(PreserveFilenameType)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::preserve_filename) / [`set_preserve_filename(Option)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::set_preserve_filename):
              required: **false**

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

              • ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.


              + /// - [`enforce_message_signing(EnforceMessageSigningType)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::enforce_message_signing) / [`set_enforce_message_signing(Option)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::set_enforce_message_signing):
              required: **false**

              Determines whether or not unsigned messages from your trading partners will be accepted.

              • ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.


              /// - On success, responds with [`UpdateAgreementOutput`](crate::operation::update_agreement::UpdateAgreementOutput) with field(s): /// - [`agreement_id(String)`](crate::operation::update_agreement::UpdateAgreementOutput::agreement_id):

              A unique identifier for the agreement. This identifier is returned when you create an agreement.

              /// - On failure, responds with [`SdkError`](crate::operation::update_agreement::UpdateAgreementError) diff --git a/sdk/transfer/src/lib.rs b/sdk/transfer/src/lib.rs index 29e85faf84f4..f1b995c4aea6 100644 --- a/sdk/transfer/src/lib.rs +++ b/sdk/transfer/src/lib.rs @@ -31,7 +31,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-transfer = "1.57.0" +//! aws-sdk-transfer = "1.58.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/transfer/src/operation/create_agreement/_create_agreement_input.rs b/sdk/transfer/src/operation/create_agreement/_create_agreement_input.rs index 89c76b83be96..b56e006b8767 100644 --- a/sdk/transfer/src/operation/create_agreement/_create_agreement_input.rs +++ b/sdk/transfer/src/operation/create_agreement/_create_agreement_input.rs @@ -25,6 +25,22 @@ pub struct CreateAgreementInput { pub status: ::std::option::Option, ///

              Key-value pairs that can be used to group and search for agreements.

              pub tags: ::std::option::Option<::std::vec::Vec>, + ///

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

              • + ///
              + pub enforce_message_signing: ::std::option::Option, } impl CreateAgreementInput { ///

              A name or short description to identify the agreement.

              @@ -67,6 +83,26 @@ impl CreateAgreementInput { pub fn tags(&self) -> &[crate::types::Tag] { self.tags.as_deref().unwrap_or_default() } + ///

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

              • + ///
              + pub fn enforce_message_signing(&self) -> ::std::option::Option<&crate::types::EnforceMessageSigningType> { + self.enforce_message_signing.as_ref() + } } impl CreateAgreementInput { /// Creates a new builder-style object to manufacture [`CreateAgreementInput`](crate::operation::create_agreement::CreateAgreementInput). @@ -87,6 +123,8 @@ pub struct CreateAgreementInputBuilder { pub(crate) access_role: ::std::option::Option<::std::string::String>, pub(crate) status: ::std::option::Option, pub(crate) tags: ::std::option::Option<::std::vec::Vec>, + pub(crate) preserve_filename: ::std::option::Option, + pub(crate) enforce_message_signing: ::std::option::Option, } impl CreateAgreementInputBuilder { ///

              A name or short description to identify the agreement.

              @@ -230,6 +268,70 @@ impl CreateAgreementInputBuilder { pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { &self.tags } + ///

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

              • + ///
              + pub fn get_enforce_message_signing(&self) -> &::std::option::Option { + &self.enforce_message_signing + } /// Consumes the builder and constructs a [`CreateAgreementInput`](crate::operation::create_agreement::CreateAgreementInput). pub fn build( self, @@ -243,6 +345,8 @@ impl CreateAgreementInputBuilder { access_role: self.access_role, status: self.status, tags: self.tags, + preserve_filename: self.preserve_filename, + enforce_message_signing: self.enforce_message_signing, }) } } diff --git a/sdk/transfer/src/operation/create_agreement/builders.rs b/sdk/transfer/src/operation/create_agreement/builders.rs index 55decdaf49cb..25522bd2c853 100644 --- a/sdk/transfer/src/operation/create_agreement/builders.rs +++ b/sdk/transfer/src/operation/create_agreement/builders.rs @@ -244,4 +244,68 @@ impl CreateAgreementFluentBuilder { pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { self.inner.get_tags() } + ///

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

              • + ///
              + pub fn get_enforce_message_signing(&self) -> &::std::option::Option { + self.inner.get_enforce_message_signing() + } } diff --git a/sdk/transfer/src/operation/update_agreement/_update_agreement_input.rs b/sdk/transfer/src/operation/update_agreement/_update_agreement_input.rs index eab18fce1d0f..b49e1326911a 100644 --- a/sdk/transfer/src/operation/update_agreement/_update_agreement_input.rs +++ b/sdk/transfer/src/operation/update_agreement/_update_agreement_input.rs @@ -25,6 +25,22 @@ pub struct UpdateAgreementInput { ///

              For SFTP connectors

              ///

              Make sure that the access role provides read and write access to the parent directory of the file location that's used in the StartFileTransfer request. Additionally, make sure that the role provides secretsmanager:GetSecretValue permission to Secrets Manager.

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

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

              • + ///
              + pub enforce_message_signing: ::std::option::Option, } impl UpdateAgreementInput { ///

              A unique identifier for the agreement. This identifier is returned when you create an agreement.

              @@ -65,6 +81,26 @@ impl UpdateAgreementInput { pub fn access_role(&self) -> ::std::option::Option<&str> { self.access_role.as_deref() } + ///

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

              • + ///
              + pub fn enforce_message_signing(&self) -> ::std::option::Option<&crate::types::EnforceMessageSigningType> { + self.enforce_message_signing.as_ref() + } } impl UpdateAgreementInput { /// Creates a new builder-style object to manufacture [`UpdateAgreementInput`](crate::operation::update_agreement::UpdateAgreementInput). @@ -85,6 +121,8 @@ pub struct UpdateAgreementInputBuilder { pub(crate) partner_profile_id: ::std::option::Option<::std::string::String>, pub(crate) base_directory: ::std::option::Option<::std::string::String>, pub(crate) access_role: ::std::option::Option<::std::string::String>, + pub(crate) preserve_filename: ::std::option::Option, + pub(crate) enforce_message_signing: ::std::option::Option, } impl UpdateAgreementInputBuilder { ///

              A unique identifier for the agreement. This identifier is returned when you create an agreement.

              @@ -219,6 +257,70 @@ impl UpdateAgreementInputBuilder { pub fn get_access_role(&self) -> &::std::option::Option<::std::string::String> { &self.access_role } + ///

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

              • + ///
              + pub fn get_enforce_message_signing(&self) -> &::std::option::Option { + &self.enforce_message_signing + } /// Consumes the builder and constructs a [`UpdateAgreementInput`](crate::operation::update_agreement::UpdateAgreementInput). pub fn build( self, @@ -232,6 +334,8 @@ impl UpdateAgreementInputBuilder { partner_profile_id: self.partner_profile_id, base_directory: self.base_directory, access_role: self.access_role, + preserve_filename: self.preserve_filename, + enforce_message_signing: self.enforce_message_signing, }) } } diff --git a/sdk/transfer/src/operation/update_agreement/builders.rs b/sdk/transfer/src/operation/update_agreement/builders.rs index b8fea789f3d6..41ac38ce0242 100644 --- a/sdk/transfer/src/operation/update_agreement/builders.rs +++ b/sdk/transfer/src/operation/update_agreement/builders.rs @@ -238,4 +238,68 @@ impl UpdateAgreementFluentBuilder { pub fn get_access_role(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_access_role() } + ///

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

              • + ///
              + pub fn get_enforce_message_signing(&self) -> &::std::option::Option { + self.inner.get_enforce_message_signing() + } } diff --git a/sdk/transfer/src/protocol_serde/shape_as2_connector_config.rs b/sdk/transfer/src/protocol_serde/shape_as2_connector_config.rs index 91c3c6d0a027..68e766380eee 100644 --- a/sdk/transfer/src/protocol_serde/shape_as2_connector_config.rs +++ b/sdk/transfer/src/protocol_serde/shape_as2_connector_config.rs @@ -30,6 +30,9 @@ pub fn ser_as2_connector_config( if let Some(var_9) = &input.basic_auth_secret_id { object.key("BasicAuthSecretId").string(var_9.as_str()); } + if let Some(var_10) = &input.preserve_content_type { + object.key("PreserveContentType").string(var_10.as_str()); + } Ok(()) } @@ -111,6 +114,13 @@ where .transpose()?, ); } + "PreserveContentType" => { + builder = builder.set_preserve_content_type( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::PreserveContentType::from(u.as_ref()))) + .transpose()?, + ); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/transfer/src/protocol_serde/shape_create_agreement_input.rs b/sdk/transfer/src/protocol_serde/shape_create_agreement_input.rs index f77a1be6116d..b93a2a220feb 100644 --- a/sdk/transfer/src/protocol_serde/shape_create_agreement_input.rs +++ b/sdk/transfer/src/protocol_serde/shape_create_agreement_input.rs @@ -36,5 +36,11 @@ pub fn ser_create_agreement_input_input( } array_9.finish(); } + if let Some(var_12) = &input.preserve_filename { + object.key("PreserveFilename").string(var_12.as_str()); + } + if let Some(var_13) = &input.enforce_message_signing { + object.key("EnforceMessageSigning").string(var_13.as_str()); + } Ok(()) } diff --git a/sdk/transfer/src/protocol_serde/shape_described_agreement.rs b/sdk/transfer/src/protocol_serde/shape_described_agreement.rs index 54020ea35b0a..eb245f0b3dbe 100644 --- a/sdk/transfer/src/protocol_serde/shape_described_agreement.rs +++ b/sdk/transfer/src/protocol_serde/shape_described_agreement.rs @@ -80,6 +80,20 @@ where "Tags" => { builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens)?); } + "PreserveFilename" => { + builder = builder.set_preserve_filename( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::PreserveFilenameType::from(u.as_ref()))) + .transpose()?, + ); + } + "EnforceMessageSigning" => { + builder = builder.set_enforce_message_signing( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::EnforceMessageSigningType::from(u.as_ref()))) + .transpose()?, + ); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/transfer/src/protocol_serde/shape_update_agreement_input.rs b/sdk/transfer/src/protocol_serde/shape_update_agreement_input.rs index 48665338f08a..5e06b5834ad3 100644 --- a/sdk/transfer/src/protocol_serde/shape_update_agreement_input.rs +++ b/sdk/transfer/src/protocol_serde/shape_update_agreement_input.rs @@ -27,5 +27,11 @@ pub fn ser_update_agreement_input_input( if let Some(var_8) = &input.access_role { object.key("AccessRole").string(var_8.as_str()); } + if let Some(var_9) = &input.preserve_filename { + object.key("PreserveFilename").string(var_9.as_str()); + } + if let Some(var_10) = &input.enforce_message_signing { + object.key("EnforceMessageSigning").string(var_10.as_str()); + } Ok(()) } diff --git a/sdk/transfer/src/types.rs b/sdk/transfer/src/types.rs index be5092f9d73a..6dc7628e4989 100644 --- a/sdk/transfer/src/types.rs +++ b/sdk/transfer/src/types.rs @@ -111,6 +111,8 @@ pub use crate::types::_sftp_connector_config::SftpConnectorConfig; pub use crate::types::_as2_connector_config::As2ConnectorConfig; +pub use crate::types::_preserve_content_type::PreserveContentType; + pub use crate::types::_mdn_response::MdnResponse; pub use crate::types::_mdn_signing_alg::MdnSigningAlg; @@ -135,6 +137,10 @@ pub use crate::types::_certificate_usage_type::CertificateUsageType; pub use crate::types::_listed_certificate::ListedCertificate; +pub use crate::types::_enforce_message_signing_type::EnforceMessageSigningType; + +pub use crate::types::_preserve_filename_type::PreserveFilenameType; + pub use crate::types::_agreement_status_type::AgreementStatusType; pub use crate::types::_described_agreement::DescribedAgreement; @@ -255,6 +261,8 @@ mod _endpoint_details; mod _endpoint_type; +mod _enforce_message_signing_type; + mod _execution_error; mod _execution_error_type; @@ -313,6 +321,10 @@ mod _overwrite_existing; mod _posix_profile; +mod _preserve_content_type; + +mod _preserve_filename_type; + mod _profile_type; mod _protocol; diff --git a/sdk/transfer/src/types/_as2_connector_config.rs b/sdk/transfer/src/types/_as2_connector_config.rs index 90d52040c19c..fe101d0d08fd 100644 --- a/sdk/transfer/src/types/_as2_connector_config.rs +++ b/sdk/transfer/src/types/_as2_connector_config.rs @@ -50,6 +50,8 @@ pub struct As2ConnectorConfig { ///

              If you have previously enabled Basic authentication for a connector, you can disable it by using the UpdateConnector API call. For example, if you are using the CLI, you can run the following command to remove Basic authentication:

              ///

              update-connector --connector-id my-connector-id --as2-config 'BasicAuthSecretId=""'

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

              Allows you to use the Amazon S3 Content-Type that is associated with objects in S3 instead of having the content type mapped based on the file extension. This parameter is enabled by default when you create an AS2 connector from the console, but disabled by default when you create an AS2 connector by calling the API directly.

              + pub preserve_content_type: ::std::option::Option, } impl As2ConnectorConfig { ///

              A unique identifier for the AS2 local profile.

              @@ -116,6 +118,10 @@ impl As2ConnectorConfig { pub fn basic_auth_secret_id(&self) -> ::std::option::Option<&str> { self.basic_auth_secret_id.as_deref() } + ///

              Allows you to use the Amazon S3 Content-Type that is associated with objects in S3 instead of having the content type mapped based on the file extension. This parameter is enabled by default when you create an AS2 connector from the console, but disabled by default when you create an AS2 connector by calling the API directly.

              + pub fn preserve_content_type(&self) -> ::std::option::Option<&crate::types::PreserveContentType> { + self.preserve_content_type.as_ref() + } } impl As2ConnectorConfig { /// Creates a new builder-style object to manufacture [`As2ConnectorConfig`](crate::types::As2ConnectorConfig). @@ -137,6 +143,7 @@ pub struct As2ConnectorConfigBuilder { pub(crate) mdn_signing_algorithm: ::std::option::Option, pub(crate) mdn_response: ::std::option::Option, pub(crate) basic_auth_secret_id: ::std::option::Option<::std::string::String>, + pub(crate) preserve_content_type: ::std::option::Option, } impl As2ConnectorConfigBuilder { ///

              A unique identifier for the AS2 local profile.

              @@ -349,6 +356,20 @@ impl As2ConnectorConfigBuilder { pub fn get_basic_auth_secret_id(&self) -> &::std::option::Option<::std::string::String> { &self.basic_auth_secret_id } + ///

              Allows you to use the Amazon S3 Content-Type that is associated with objects in S3 instead of having the content type mapped based on the file extension. This parameter is enabled by default when you create an AS2 connector from the console, but disabled by default when you create an AS2 connector by calling the API directly.

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

              Allows you to use the Amazon S3 Content-Type that is associated with objects in S3 instead of having the content type mapped based on the file extension. This parameter is enabled by default when you create an AS2 connector from the console, but disabled by default when you create an AS2 connector by calling the API directly.

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

              Allows you to use the Amazon S3 Content-Type that is associated with objects in S3 instead of having the content type mapped based on the file extension. This parameter is enabled by default when you create an AS2 connector from the console, but disabled by default when you create an AS2 connector by calling the API directly.

              + pub fn get_preserve_content_type(&self) -> &::std::option::Option { + &self.preserve_content_type + } /// Consumes the builder and constructs a [`As2ConnectorConfig`](crate::types::As2ConnectorConfig). pub fn build(self) -> crate::types::As2ConnectorConfig { crate::types::As2ConnectorConfig { @@ -361,6 +382,7 @@ impl As2ConnectorConfigBuilder { mdn_signing_algorithm: self.mdn_signing_algorithm, mdn_response: self.mdn_response, basic_auth_secret_id: self.basic_auth_secret_id, + preserve_content_type: self.preserve_content_type, } } } diff --git a/sdk/transfer/src/types/_described_agreement.rs b/sdk/transfer/src/types/_described_agreement.rs index 37feb8d607b9..e7d24fee5dff 100644 --- a/sdk/transfer/src/types/_described_agreement.rs +++ b/sdk/transfer/src/types/_described_agreement.rs @@ -29,6 +29,22 @@ pub struct DescribedAgreement { pub access_role: ::std::option::Option<::std::string::String>, ///

              Key-value pairs that can be used to group and search for agreements.

              pub tags: ::std::option::Option<::std::vec::Vec>, + ///

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

              • + ///
              + pub enforce_message_signing: ::std::option::Option, } impl DescribedAgreement { ///

              The unique Amazon Resource Name (ARN) for the agreement.

              @@ -79,6 +95,26 @@ impl DescribedAgreement { pub fn tags(&self) -> &[crate::types::Tag] { self.tags.as_deref().unwrap_or_default() } + ///

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

              • + ///
              + pub fn enforce_message_signing(&self) -> ::std::option::Option<&crate::types::EnforceMessageSigningType> { + self.enforce_message_signing.as_ref() + } } impl DescribedAgreement { /// Creates a new builder-style object to manufacture [`DescribedAgreement`](crate::types::DescribedAgreement). @@ -101,6 +137,8 @@ pub struct DescribedAgreementBuilder { pub(crate) base_directory: ::std::option::Option<::std::string::String>, pub(crate) access_role: ::std::option::Option<::std::string::String>, pub(crate) tags: ::std::option::Option<::std::vec::Vec>, + pub(crate) preserve_filename: ::std::option::Option, + pub(crate) enforce_message_signing: ::std::option::Option, } impl DescribedAgreementBuilder { ///

              The unique Amazon Resource Name (ARN) for the agreement.

              @@ -265,6 +303,70 @@ impl DescribedAgreementBuilder { pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { &self.tags } + ///

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

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

                ENABLED: the filename provided by your trading parter is preserved when the file is saved.

              • + ///
              • + ///

                DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

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

              Determines whether or not unsigned messages from your trading partners will be accepted.

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

                ENABLED: Transfer Family rejects unsigned messages from your trading partner.

              • + ///
              • + ///

                DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

              • + ///
              + pub fn get_enforce_message_signing(&self) -> &::std::option::Option { + &self.enforce_message_signing + } /// Consumes the builder and constructs a [`DescribedAgreement`](crate::types::DescribedAgreement). /// This method will fail if any of the following fields are not set: /// - [`arn`](crate::types::builders::DescribedAgreementBuilder::arn) @@ -285,6 +387,8 @@ impl DescribedAgreementBuilder { base_directory: self.base_directory, access_role: self.access_role, tags: self.tags, + preserve_filename: self.preserve_filename, + enforce_message_signing: self.enforce_message_signing, }) } } diff --git a/sdk/transfer/src/types/_described_certificate.rs b/sdk/transfer/src/types/_described_certificate.rs index 6efdd1a6e8cf..a0e2db21d757 100644 --- a/sdk/transfer/src/types/_described_certificate.rs +++ b/sdk/transfer/src/types/_described_certificate.rs @@ -18,7 +18,7 @@ pub struct DescribedCertificate { ///

              TLS: For securing AS2 communications sent over HTTPS

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

            The certificate can be either ACTIVE, PENDING_ROTATION, or INACTIVE. PENDING_ROTATION means that this certificate will replace the current certificate when it expires.

            + ///

            Currently, the only available status is ACTIVE: all other values are reserved for future use.

            pub status: ::std::option::Option, ///

            The file name for the certificate.

            pub certificate: ::std::option::Option<::std::string::String>, @@ -63,7 +63,7 @@ impl DescribedCertificate { pub fn usage(&self) -> ::std::option::Option<&crate::types::CertificateUsageType> { self.usage.as_ref() } - ///

            The certificate can be either ACTIVE, PENDING_ROTATION, or INACTIVE. PENDING_ROTATION means that this certificate will replace the current certificate when it expires.

            + ///

            Currently, the only available status is ACTIVE: all other values are reserved for future use.

            pub fn status(&self) -> ::std::option::Option<&crate::types::CertificateStatusType> { self.status.as_ref() } @@ -224,17 +224,17 @@ impl DescribedCertificateBuilder { pub fn get_usage(&self) -> &::std::option::Option { &self.usage } - ///

            The certificate can be either ACTIVE, PENDING_ROTATION, or INACTIVE. PENDING_ROTATION means that this certificate will replace the current certificate when it expires.

            + ///

            Currently, the only available status is ACTIVE: all other values are reserved for future use.

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

            The certificate can be either ACTIVE, PENDING_ROTATION, or INACTIVE. PENDING_ROTATION means that this certificate will replace the current certificate when it expires.

            + ///

            Currently, the only available status is ACTIVE: all other values are reserved for future use.

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

            The certificate can be either ACTIVE, PENDING_ROTATION, or INACTIVE. PENDING_ROTATION means that this certificate will replace the current certificate when it expires.

            + ///

            Currently, the only available status is ACTIVE: all other values are reserved for future use.

            pub fn get_status(&self) -> &::std::option::Option { &self.status } diff --git a/sdk/transfer/src/types/_enforce_message_signing_type.rs b/sdk/transfer/src/types/_enforce_message_signing_type.rs new file mode 100644 index 000000000000..68a32ae65fa7 --- /dev/null +++ b/sdk/transfer/src/types/_enforce_message_signing_type.rs @@ -0,0 +1,108 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `EnforceMessageSigningType`, 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 enforcemessagesigningtype = unimplemented!(); +/// match enforcemessagesigningtype { +/// EnforceMessageSigningType::Disabled => { /* ... */ }, +/// EnforceMessageSigningType::Enabled => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `enforcemessagesigningtype` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `EnforceMessageSigningType::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `EnforceMessageSigningType::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 `EnforceMessageSigningType::NewFeature` is defined. +/// Specifically, when `enforcemessagesigningtype` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `EnforceMessageSigningType::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 EnforceMessageSigningType { + #[allow(missing_docs)] // documentation missing in model + Disabled, + #[allow(missing_docs)] // documentation missing in model + Enabled, + /// `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 EnforceMessageSigningType { + fn from(s: &str) -> Self { + match s { + "DISABLED" => EnforceMessageSigningType::Disabled, + "ENABLED" => EnforceMessageSigningType::Enabled, + other => EnforceMessageSigningType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for EnforceMessageSigningType { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(EnforceMessageSigningType::from(s)) + } +} +impl EnforceMessageSigningType { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + EnforceMessageSigningType::Disabled => "DISABLED", + EnforceMessageSigningType::Enabled => "ENABLED", + EnforceMessageSigningType::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &["DISABLED", "ENABLED"] + } +} +impl ::std::convert::AsRef for EnforceMessageSigningType { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl EnforceMessageSigningType { + /// 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 EnforceMessageSigningType { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + EnforceMessageSigningType::Disabled => write!(f, "DISABLED"), + EnforceMessageSigningType::Enabled => write!(f, "ENABLED"), + EnforceMessageSigningType::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/transfer/src/types/_preserve_content_type.rs b/sdk/transfer/src/types/_preserve_content_type.rs new file mode 100644 index 000000000000..a67b1fa3fb48 --- /dev/null +++ b/sdk/transfer/src/types/_preserve_content_type.rs @@ -0,0 +1,108 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `PreserveContentType`, 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 preservecontenttype = unimplemented!(); +/// match preservecontenttype { +/// PreserveContentType::Disabled => { /* ... */ }, +/// PreserveContentType::Enabled => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `preservecontenttype` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `PreserveContentType::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `PreserveContentType::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 `PreserveContentType::NewFeature` is defined. +/// Specifically, when `preservecontenttype` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `PreserveContentType::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 PreserveContentType { + #[allow(missing_docs)] // documentation missing in model + Disabled, + #[allow(missing_docs)] // documentation missing in model + Enabled, + /// `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 PreserveContentType { + fn from(s: &str) -> Self { + match s { + "DISABLED" => PreserveContentType::Disabled, + "ENABLED" => PreserveContentType::Enabled, + other => PreserveContentType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for PreserveContentType { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(PreserveContentType::from(s)) + } +} +impl PreserveContentType { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + PreserveContentType::Disabled => "DISABLED", + PreserveContentType::Enabled => "ENABLED", + PreserveContentType::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &["DISABLED", "ENABLED"] + } +} +impl ::std::convert::AsRef for PreserveContentType { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl PreserveContentType { + /// 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 PreserveContentType { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + PreserveContentType::Disabled => write!(f, "DISABLED"), + PreserveContentType::Enabled => write!(f, "ENABLED"), + PreserveContentType::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/transfer/src/types/_preserve_filename_type.rs b/sdk/transfer/src/types/_preserve_filename_type.rs new file mode 100644 index 000000000000..70cb02b63dc3 --- /dev/null +++ b/sdk/transfer/src/types/_preserve_filename_type.rs @@ -0,0 +1,108 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `PreserveFilenameType`, 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 preservefilenametype = unimplemented!(); +/// match preservefilenametype { +/// PreserveFilenameType::Disabled => { /* ... */ }, +/// PreserveFilenameType::Enabled => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `preservefilenametype` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `PreserveFilenameType::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `PreserveFilenameType::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 `PreserveFilenameType::NewFeature` is defined. +/// Specifically, when `preservefilenametype` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `PreserveFilenameType::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 PreserveFilenameType { + #[allow(missing_docs)] // documentation missing in model + Disabled, + #[allow(missing_docs)] // documentation missing in model + Enabled, + /// `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 PreserveFilenameType { + fn from(s: &str) -> Self { + match s { + "DISABLED" => PreserveFilenameType::Disabled, + "ENABLED" => PreserveFilenameType::Enabled, + other => PreserveFilenameType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for PreserveFilenameType { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(PreserveFilenameType::from(s)) + } +} +impl PreserveFilenameType { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + PreserveFilenameType::Disabled => "DISABLED", + PreserveFilenameType::Enabled => "ENABLED", + PreserveFilenameType::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &["DISABLED", "ENABLED"] + } +} +impl ::std::convert::AsRef for PreserveFilenameType { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl PreserveFilenameType { + /// 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 PreserveFilenameType { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + PreserveFilenameType::Disabled => write!(f, "DISABLED"), + PreserveFilenameType::Enabled => write!(f, "ENABLED"), + PreserveFilenameType::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/versions.toml b/versions.toml index 2d0d32e3aed5..069f23de734e 100644 --- a/versions.toml +++ b/versions.toml @@ -70,9 +70,9 @@ model_hash = '1a65e46926c2017d3e39b6960adb4b7a38ff994d0291eac999e4a4f5f56a7283' [crates.aws-sdk-amplify] category = 'AwsSdk' -version = '1.55.0' -source_hash = '0954951c5c9b229d3ac123598a7b11887b4cba553ac4c198774e7b584d256734' -model_hash = 'e0ee14861a04959579ee49ee7dce8a14f6e5effa111e687658c628b86eb6425d' +version = '1.56.0' +source_hash = '1cc7f40c871442cea2f5b4a6cb0dd612bde0d2eb8ef42781f6fc1643a6ee6b52' +model_hash = '0ed0efda94eec7881f3b3b110d2e9b24ee32639ec6debd44068c1fdf18aaa925' [crates.aws-sdk-amplifybackend] category = 'AwsSdk' @@ -328,9 +328,9 @@ model_hash = 'c5d0bbeaa9fc98e88cd3cda2df9625e3694bf667d3c20a5f41b01aa3f0bd4be7' [crates.aws-sdk-budgets] category = 'AwsSdk' -version = '1.52.0' -source_hash = '53f0143f6cd32c082b3401c0ed78a18b4243549dc84720deab464ffaf8dcec98' -model_hash = 'e64c9d6354c68486e82fa4fd6b954453f2ff2930ad504b135f35eb0ef4baf91e' +version = '1.53.0' +source_hash = '1cd613d94c37afd7aee79bca7ad345c44d2286dd4cd5a61f2180f80ba033ac9d' +model_hash = '2ef9a5c0f5d3c93104c1e4bbcf32c98ea5fe6e280f692bf5162b6f232fa87468' [crates.aws-sdk-chatbot] category = 'AwsSdk' @@ -592,9 +592,9 @@ model_hash = '6b8642245c4ecdf27c29946146abd9a3e235247d5483fed13fc6a6dbb77b55a8' [crates.aws-sdk-connect] category = 'AwsSdk' -version = '1.81.0' -source_hash = '3607502717f3090bf9da7d32330f063f010edf6218f02b3a6e6f92a86d497ffe' -model_hash = '6f6b0127fec1074b5c134b8d6cba4985c578eb5878898fb8adefb3adde645cc6' +version = '1.82.0' +source_hash = '81e08e74f0abdde8adf4a8524d78d63449edbd6010012bdfcafe1633f5382f0d' +model_hash = '9e0ca5472bbb4bc47d8b8da6232787be79e5bc7f179b346216fbc7d08832eb21' [crates.aws-sdk-connectcampaigns] category = 'AwsSdk' @@ -622,9 +622,9 @@ model_hash = 'd21e272c0bc0b4494ce7249d98d72a39a1cb27886f4ee2b3ef7802bda1e642fe' [crates.aws-sdk-connectparticipant] category = 'AwsSdk' -version = '1.52.0' -source_hash = '01c68898fadda3a9a4aeccd91fa903cac68cad144c6c4e2bdea57f7b7517cc63' -model_hash = 'd328bded4142e408e91902c3d2c913c331c3e62b83e9c122b939cbcde39204ca' +version = '1.53.0' +source_hash = '415564c250ada3fdbc5896676e8f4e7b35e542ae76b2078e8a88390c685fd00d' +model_hash = 'b8b5e2bf01c4dc04562c92a5950fa9d93b478b00273f83dd2168082304110e16' [crates.aws-sdk-controlcatalog] category = 'AwsSdk' @@ -688,9 +688,9 @@ model_hash = '481a634abb604c1cff5824bd15503ce726661dec63a755e44575bb41e20190d6' [crates.aws-sdk-datasync] category = 'AwsSdk' -version = '1.55.0' -source_hash = 'ef1dc9f27edf8803e6340006da0080b01708d76d367248cbb9713bff5d03bfbe' -model_hash = 'ba29525900cd3ee16aae39b35a3a1f76c9e84563dc0f38de98af135d525c349b' +version = '1.56.0' +source_hash = '14a10902edd15b8bafc5d0f74b14d773bfc0fc896e0a265d8f40e35d33ae5263' +model_hash = '0741fe1140a42670ab87103aafbd9bb7471b2e668cbb884ae181a5be0ca78828' [crates.aws-sdk-datazone] category = 'AwsSdk' @@ -1114,9 +1114,9 @@ model_hash = '5c3d7555fe8a22c7acdc7dcbbfa8f149c4a29f5e6c6ab25d89aecf93f3a6cfb9' [crates.aws-sdk-iot] category = 'AwsSdk' -version = '1.58.0' -source_hash = 'b237f7053ff72c460c6260b367b6e6b7c3438887c5dde07581d154183342f6fd' -model_hash = 'ea7c6f0018274345d9c73a69a5d6080c715d10ea5ec4d1dd3849db7aff47c33f' +version = '1.59.0' +source_hash = 'e0f9cf108edf291869c0cd373ac2e0b06dbcd822df3d07df526329b9f5db4b3a' +model_hash = '8c0c38e705f11ee5c04d981f20cdf6cfab9eaca1a76a85d0c938c1f9da8ce6fd' [crates.aws-sdk-iot1clickdevices] category = 'AwsSdk' @@ -1594,9 +1594,9 @@ model_hash = '1cd1e08bdab2e0bd55d6d6ea1e5d4e7ca54f6855513da0051007316cb9e923db' [crates.aws-sdk-mwaa] category = 'AwsSdk' -version = '1.56.0' -source_hash = 'f969973bf3eedd55b948ab4549b07cd9544323f9e76446862bafa3fc9daf7b16' -model_hash = '1b567cdc842e2fc74a42df5eff1ad6bdf06dc798cc1608e204a2304a5d086956' +version = '1.56.1' +source_hash = '5044820a93d62fc05d5fe22433ba61973540d1c92a4433b9f744d0895b13a621' +model_hash = '9d9a3b2282e4a79f2bc0b92b0a5f9f4622925149dc0446613461a691896f793e' [crates.aws-sdk-neptune] category = 'AwsSdk' @@ -1864,9 +1864,9 @@ model_hash = '27c9e9e5a0761cc6e79648630e51a0d6faf2ea5dea8826c722bcc5005fa36786' [crates.aws-sdk-quicksight] category = 'AwsSdk' -version = '1.67.0' -source_hash = 'ee438867d665833137ed018f5b48140efb0858e69a36c41acf509055d89b1361' -model_hash = '2972d24a038af33a573d7aa764e108a64bc68dbed6c684b42689463afa583cd1' +version = '1.68.0' +source_hash = '143c7882a7164be7c2c7cffcd5ec81a501f49d190d18e442f6893c2d5c7343c6' +model_hash = '76a15ee090a32d04c195a600984465663f6cf417d66046d3d1a535f14a2b0a7f' [crates.aws-sdk-ram] category = 'AwsSdk' @@ -1924,9 +1924,9 @@ model_hash = 'd45f45aa7a94560c0f7dd37685fc124f7a824a566e6f1f6329b30695c7289666' [crates.aws-sdk-resiliencehub] category = 'AwsSdk' -version = '1.54.0' -source_hash = 'c494e47268ada82eafa884bb05ffbffd0b4ead639504e3c6895c3dcae85354af' -model_hash = '239f314deb6ebf82902687858751b0d8707119c335b4238b6c5c61c40137500d' +version = '1.55.0' +source_hash = '0adf1dba24ca30c22332dfe40804cc9d4f9796a1d751557eeafedf29b037142b' +model_hash = 'cfff9aa838b536e58c8e4a9e33efdfb47400fbd99589092a1d6c78fd20971f58' [crates.aws-sdk-resourceexplorer2] category = 'AwsSdk' @@ -2356,9 +2356,9 @@ model_hash = '7f082a02d913a3d59f43d973f1cd1df3716c1696ccef1dd8728ae13277c36752' [crates.aws-sdk-transfer] category = 'AwsSdk' -version = '1.57.0' -source_hash = '6e329a9ce2c9aef936ea8f4747360ecc69dbdc9ba7b7f4fd350cc96ac4c97b5d' -model_hash = '9bf98c8b988d6e3b18b40079cee18dddbf82fe7ae4910d58e620ee51a23213e1' +version = '1.58.0' +source_hash = '843345988e9da9366b7ab9743854b66220ece28bcb91f5a9a954e7b86e191f6d' +model_hash = '54969775d9b487ba4c125231b7526fd30c21bcbe5c4994ec778afe9d493981f6' [crates.aws-sdk-translate] category = 'AwsSdk' @@ -2601,18 +2601,14 @@ source_hash = '296a471b189f14535e95c799b1748c38bfae91febeac58b5bf0365f011d77a67' category = 'AwsRuntime' version = '0.0.0' source_hash = '939e0cadde03612879ddff985f14af5bed503bfee939828ff0f8110898c98fbc' - -[release] -tag = 'release-2024-12-18.2' - [release.crates] -aws-sdk-account = '1.53.0' -aws-sdk-backup = '1.55.0' -aws-sdk-backupsearch = '1.0.0' -aws-sdk-batch = '1.60.0' -aws-sdk-cleanroomsml = '1.52.0' -aws-sdk-cloudfront = '1.57.0' -aws-sdk-codepipeline = '1.60.0' -aws-sdk-ecs = '1.59.0' -aws-sdk-m2 = '1.54.0' -aws-sdk-synthetics = '1.54.0' +aws-sdk-amplify = '1.56.0' +aws-sdk-budgets = '1.53.0' +aws-sdk-connect = '1.82.0' +aws-sdk-connectparticipant = '1.53.0' +aws-sdk-datasync = '1.56.0' +aws-sdk-iot = '1.59.0' +aws-sdk-mwaa = '1.56.1' +aws-sdk-quicksight = '1.68.0' +aws-sdk-resiliencehub = '1.55.0' +aws-sdk-transfer = '1.58.0'