diff --git a/.changelog/13af4f0f097b45cab82b0cf34b43a8b3.json b/.changelog/13af4f0f097b45cab82b0cf34b43a8b3.json new file mode 100644 index 00000000000..4d15a3e9cdc --- /dev/null +++ b/.changelog/13af4f0f097b45cab82b0cf34b43a8b3.json @@ -0,0 +1,8 @@ +{ + "id": "13af4f0f-097b-45ca-b82b-0cf34b43a8b3", + "type": "feature", + "description": "This release adds support for the GetAuthenticationUrl and CancelParticipantAuthentication APIs used for customer authentication within Amazon Connect chats. There are also minor updates to the GetAttachment API.", + "modules": [ + "service/connectparticipant" + ] +} \ No newline at end of file diff --git a/.changelog/239e820fd89e4aceb07f1e4d404079ac.json b/.changelog/239e820fd89e4aceb07f1e4d404079ac.json new file mode 100644 index 00000000000..0df6b6bcec6 --- /dev/null +++ b/.changelog/239e820fd89e4aceb07f1e4d404079ac.json @@ -0,0 +1,8 @@ +{ + "id": "239e820f-d89e-4ace-b07f-1e4d404079ac", + "type": "documentation", + "description": "Added support for Apache Airflow version 2.10.3 to MWAA.", + "modules": [ + "service/mwaa" + ] +} \ No newline at end of file diff --git a/.changelog/43c13b22acd8423a9a326b337704798c.json b/.changelog/43c13b22acd8423a9a326b337704798c.json new file mode 100644 index 00000000000..98e1da65e2c --- /dev/null +++ b/.changelog/43c13b22acd8423a9a326b337704798c.json @@ -0,0 +1,8 @@ +{ + "id": "43c13b22-acd8-423a-9a32-6b337704798c", + "type": "feature", + "description": "Release connectivity status query API which is a dedicated high throughput(TPS) API to query a specific device's most recent connectivity state and metadata.", + "modules": [ + "service/iot" + ] +} \ No newline at end of file diff --git a/.changelog/57641aba4454469380fd0a78aec7f72a.json b/.changelog/57641aba4454469380fd0a78aec7f72a.json new file mode 100644 index 00000000000..4c69de27308 --- /dev/null +++ b/.changelog/57641aba4454469380fd0a78aec7f72a.json @@ -0,0 +1,8 @@ +{ + "id": "57641aba-4454-4693-80fd-0a78aec7f72a", + "type": "feature", + "description": "AWS Resilience Hub now automatically detects already configured CloudWatch alarms and FIS experiments as part of the assessment process and returns the discovered resources in the corresponding list API responses. It also allows you to include or exclude test recommendations for an AppComponent.", + "modules": [ + "service/resiliencehub" + ] +} \ No newline at end of file diff --git a/.changelog/77926b87da1b4d769deadd53fda8ea5d.json b/.changelog/77926b87da1b4d769deadd53fda8ea5d.json new file mode 100644 index 00000000000..ebf03eb2c19 --- /dev/null +++ b/.changelog/77926b87da1b4d769deadd53fda8ea5d.json @@ -0,0 +1,8 @@ +{ + "id": "77926b87-da1b-4d76-9dea-dd53fda8ea5d", + "type": "feature", + "description": "AWS DataSync introduces the ability to update attributes for in-cloud locations.", + "modules": [ + "service/datasync" + ] +} \ No newline at end of file diff --git a/.changelog/b667d103412a428d9c87055bb5d11aa3.json b/.changelog/b667d103412a428d9c87055bb5d11aa3.json new file mode 100644 index 00000000000..11dc660e558 --- /dev/null +++ b/.changelog/b667d103412a428d9c87055bb5d11aa3.json @@ -0,0 +1,8 @@ +{ + "id": "b667d103-412a-428d-9c87-055bb5d11aa3", + "type": "feature", + "description": "Added WAF Configuration to Amplify Apps", + "modules": [ + "service/amplify" + ] +} \ No newline at end of file diff --git a/.changelog/b8e3aa73d4f5448aba677f7df43ed7f1.json b/.changelog/b8e3aa73d4f5448aba677f7df43ed7f1.json new file mode 100644 index 00000000000..d0c85f723b9 --- /dev/null +++ b/.changelog/b8e3aa73d4f5448aba677f7df43ed7f1.json @@ -0,0 +1,8 @@ +{ + "id": "b8e3aa73-d4f5-448a-ba67-7f7df43ed7f1", + "type": "feature", + "description": "Releasing minor partition endpoint updates", + "modules": [ + "service/budgets" + ] +} \ No newline at end of file diff --git a/.changelog/b979e47afda94155af743915acd9a2e2.json b/.changelog/b979e47afda94155af743915acd9a2e2.json new file mode 100644 index 00000000000..652dad079f9 --- /dev/null +++ b/.changelog/b979e47afda94155af743915acd9a2e2.json @@ -0,0 +1,8 @@ +{ + "id": "b979e47a-fda9-4155-af74-3915acd9a2e2", + "type": "feature", + "description": "Add support for PerformanceConfiguration attribute to Dataset entity. Allow PerformanceConfiguration specification in CreateDataset and UpdateDataset APIs.", + "modules": [ + "service/quicksight" + ] +} \ No newline at end of file diff --git a/.changelog/f1d8a4b02f09495286df77e1d64a7906.json b/.changelog/f1d8a4b02f09495286df77e1d64a7906.json new file mode 100644 index 00000000000..62ddbb9b0ee --- /dev/null +++ b/.changelog/f1d8a4b02f09495286df77e1d64a7906.json @@ -0,0 +1,8 @@ +{ + "id": "f1d8a4b0-2f09-4952-86df-77e1d64a7906", + "type": "feature", + "description": "This release adds support for the UpdateParticipantAuthentication API used for customer authentication within Amazon Connect chats.", + "modules": [ + "service/connect" + ] +} \ No newline at end of file diff --git a/.changelog/fb030d218e8e4ef7a4b8c815baa6d2af.json b/.changelog/fb030d218e8e4ef7a4b8c815baa6d2af.json new file mode 100644 index 00000000000..5950185b64c --- /dev/null +++ b/.changelog/fb030d218e8e4ef7a4b8c815baa6d2af.json @@ -0,0 +1,8 @@ +{ + "id": "fb030d21-8e8e-4ef7-a4b8-c815baa6d2af", + "type": "feature", + "description": "Added AS2 agreement configurations to control filename preservation and message signing enforcement. Added AS2 connector configuration to preserve content type from S3 objects.", + "modules": [ + "service/transfer" + ] +} \ No newline at end of file diff --git a/service/amplify/deserializers.go b/service/amplify/deserializers.go index 8e60285c206..23e1862b2d2 100644 --- a/service/amplify/deserializers.go +++ b/service/amplify/deserializers.go @@ -6489,6 +6489,27 @@ func awsRestjson1_deserializeDocumentApp(v **types.App, value interface{}) error } } + case "wafConfiguration": + if err := awsRestjson1_deserializeDocumentWafConfiguration(&sv.WafConfiguration, value); err != nil { + return err + } + + case "webhookCreateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.WebhookCreateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected webhookCreateTime to be a JSON Number, got %T instead", value) + + } + } + default: _, _ = key, value @@ -8755,6 +8776,64 @@ func awsRestjson1_deserializeDocumentUnauthorizedException(v **types.Unauthorize return nil } +func awsRestjson1_deserializeDocumentWafConfiguration(v **types.WafConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.WafConfiguration + if *v == nil { + sv = &types.WafConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusReason to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + case "wafStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WafStatus to be of type string, got %T instead", value) + } + sv.WafStatus = types.WafStatus(jtv) + } + + case "webAclArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WebAclArn to be of type string, got %T instead", value) + } + sv.WebAclArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentWebhook(v **types.Webhook, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/amplify/types/enums.go b/service/amplify/types/enums.go index 9c46ba90273..bd51171bcad 100644 --- a/service/amplify/types/enums.go +++ b/service/amplify/types/enums.go @@ -79,6 +79,7 @@ type JobStatus string // Enum values for JobStatus const ( + JobStatusCreated JobStatus = "CREATED" JobStatusPending JobStatus = "PENDING" JobStatusProvisioning JobStatus = "PROVISIONING" JobStatusRunning JobStatus = "RUNNING" @@ -94,6 +95,7 @@ const ( // The ordering of this slice is not guaranteed to be stable across updates. func (JobStatus) Values() []JobStatus { return []JobStatus{ + "CREATED", "PENDING", "PROVISIONING", "RUNNING", @@ -241,3 +243,28 @@ func (UpdateStatus) Values() []UpdateStatus { "UPDATE_FAILED", } } + +type WafStatus string + +// Enum values for WafStatus +const ( + WafStatusAssociating WafStatus = "ASSOCIATING" + WafStatusAssociationFailed WafStatus = "ASSOCIATION_FAILED" + WafStatusAssociationSuccess WafStatus = "ASSOCIATION_SUCCESS" + WafStatusDisassociating WafStatus = "DISASSOCIATING" + WafStatusDisassociationFailed WafStatus = "DISASSOCIATION_FAILED" +) + +// Values returns all known values for WafStatus. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (WafStatus) Values() []WafStatus { + return []WafStatus{ + "ASSOCIATING", + "ASSOCIATION_FAILED", + "ASSOCIATION_SUCCESS", + "DISASSOCIATING", + "DISASSOCIATION_FAILED", + } +} diff --git a/service/amplify/types/types.go b/service/amplify/types/types.go index 80b770e3984..9dc58a6e728 100644 --- a/service/amplify/types/types.go +++ b/service/amplify/types/types.go @@ -21,7 +21,7 @@ type App struct { // This member is required. AppId *string - // Creates a date and time for the Amplify app. + // A timestamp of when Amplify created the application. // // This member is required. CreateTime *time.Time @@ -77,7 +77,7 @@ type App struct { // This member is required. Repository *string - // Updates the date and time for the Amplify app. + // A timestamp of when Amplify updated the application. // // This member is required. UpdateTime *time.Time @@ -132,6 +132,14 @@ type App struct { // The tag for the Amplify app. Tags map[string]string + // Describes the Firewall configuration for the Amplify app. Firewall support + // enables you to protect your hosted applications with a direct integration with + // WAF. + WafConfiguration *WafConfiguration + + // A timestamp of when Amplify created the webhook in your Git repository. + WebhookCreateTime *time.Time + noSmithyDocumentSerde } @@ -261,7 +269,7 @@ type Branch struct { // This member is required. BranchName *string - // The creation date and time for a branch that is part of an Amplify app. + // A timestamp of when Amplify created the branch. // // This member is required. CreateTime *time.Time @@ -326,7 +334,7 @@ type Branch struct { // This member is required. Ttl *string - // 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 member is required. UpdateTime *time.Time @@ -614,7 +622,7 @@ type JobSummary struct { // This member is required. CommitMessage *string - // The commit date and time for the job. + // The commit date and time for the job. // // This member is required. CommitTime *time.Time @@ -769,6 +777,27 @@ type SubDomainSetting struct { noSmithyDocumentSerde } +// 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. +// +// [Firewall support for hosted sites]: https://docs.aws.amazon.com/amplify/latest/userguide/WAF-integration.html +type WafConfiguration struct { + + // The reason for the current status of the Firewall configuration. + StatusReason *string + + // The status of the process to associate or disassociate a web ACL to an Amplify + // app. + WafStatus WafStatus + + // The Amazon Resource Name (ARN) for the web ACL associated with an Amplify app. + WebAclArn *string + + noSmithyDocumentSerde +} + // Describes a webhook that connects repository events to an Amplify app. type Webhook struct { @@ -777,7 +806,7 @@ type Webhook struct { // This member is required. BranchName *string - // The create date and time for a webhook. + // A timestamp of when Amplify created the webhook in your Git repository. // // This member is required. CreateTime *time.Time @@ -787,7 +816,7 @@ type Webhook struct { // This member is required. Description *string - // Updates the date and time for a webhook. + // A timestamp of when Amplify updated the webhook in your Git repository. // // This member is required. UpdateTime *time.Time diff --git a/service/budgets/endpoints.go b/service/budgets/endpoints.go index ad07416054a..9c54309c875 100644 --- a/service/budgets/endpoints.go +++ b/service/budgets/endpoints.go @@ -426,6 +426,74 @@ func (r *resolver) ResolveEndpoint( } } } + if _PartitionResult.Name == "aws-iso" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://budgets.c2s.ic.gov" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "budgets") + smithyhttp.SetSigV4ASigningName(&sp, "budgets") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if _PartitionResult.Name == "aws-iso-b" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://budgets.global.sc2s.sgov.gov" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "budgets") + smithyhttp.SetSigV4ASigningName(&sp, "budgets") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-isob-east-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } if _PartitionResult.Name == "aws-iso-e" { if _UseFIPS == false { if _UseDualStack == false { diff --git a/service/budgets/endpoints_test.go b/service/budgets/endpoints_test.go index f521a1895c6..dccd34fa0b1 100644 --- a/service/budgets/endpoints_test.go +++ b/service/budgets/endpoints_test.go @@ -598,8 +598,61 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region aws-iso-global with FIPS disabled and DualStack disabled func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("aws-iso-global"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://budgets.c2s.ic.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "budgets") + smithyhttp.SetSigV4ASigningName(&sp, "budgets") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -619,7 +672,7 @@ func TestEndpointCase14(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -656,7 +709,7 @@ func TestEndpointCase15(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -676,7 +729,7 @@ func TestEndpointCase16(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -691,12 +744,81 @@ func TestEndpointCase17(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://budgets.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://budgets.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "budgets") + smithyhttp.SetSigV4ASigningName(&sp, "budgets") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region aws-iso-b-global with FIPS disabled and DualStack disabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("aws-iso-b-global"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://budgets.global.sc2s.sgov.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "budgets") + smithyhttp.SetSigV4ASigningName(&sp, "budgets") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-isob-east-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -713,7 +835,7 @@ func TestEndpointCase17(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -733,7 +855,7 @@ func TestEndpointCase18(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -770,7 +892,7 @@ func TestEndpointCase19(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -790,7 +912,7 @@ func TestEndpointCase20(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -805,12 +927,28 @@ func TestEndpointCase21(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://budgets.us-isob-east-1.sc2s.sgov.gov") + uri, _ := url.Parse("https://budgets.global.sc2s.sgov.gov") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "budgets") + smithyhttp.SetSigV4ASigningName(&sp, "budgets") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-isob-east-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -827,7 +965,7 @@ func TestEndpointCase21(t *testing.T) { } // For region eu-isoe-west-1 with FIPS disabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-isoe-west-1"), UseFIPS: ptr.Bool(false), @@ -880,7 +1018,7 @@ func TestEndpointCase22(t *testing.T) { } // For region us-isof-south-1 with FIPS disabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isof-south-1"), UseFIPS: ptr.Bool(false), @@ -933,7 +1071,7 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -971,7 +1109,7 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -1008,7 +1146,7 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -1029,7 +1167,7 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1050,7 +1188,7 @@ func TestEndpointCase27(t *testing.T) { } // Missing region -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{} resolver := NewDefaultEndpointResolverV2() diff --git a/service/connect/api_op_CreatePushNotificationRegistration.go b/service/connect/api_op_CreatePushNotificationRegistration.go index 295703fe44d..fd567c7c84d 100644 --- a/service/connect/api_op_CreatePushNotificationRegistration.go +++ b/service/connect/api_op_CreatePushNotificationRegistration.go @@ -15,7 +15,7 @@ import ( // 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. // -// [Set up push notifications in Amazon Connect for mobile chat]: https://docs.aws.amazon.com/connect/latest/adminguide/set-up-push-notifications-for-mobile-chat.html +// [Set up push notifications in Amazon Connect for mobile chat]: https://docs.aws.amazon.com/connect/latest/adminguide/enable-push-notifications-for-mobile-chat.html func (c *Client) CreatePushNotificationRegistration(ctx context.Context, params *CreatePushNotificationRegistrationInput, optFns ...func(*Options)) (*CreatePushNotificationRegistrationOutput, error) { if params == nil { params = &CreatePushNotificationRegistrationInput{} diff --git a/service/connect/api_op_ListBots.go b/service/connect/api_op_ListBots.go index d6f9a223c28..0e3318541fc 100644 --- a/service/connect/api_op_ListBots.go +++ b/service/connect/api_op_ListBots.go @@ -14,7 +14,7 @@ import ( // 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 +// Amazon Lex bots currently associated with the instance. Use this API to return // both Amazon Lex V1 and V2 bots. func (c *Client) ListBots(ctx context.Context, params *ListBotsInput, optFns ...func(*Options)) (*ListBotsOutput, error) { if params == nil { diff --git a/service/connect/api_op_StartChatContact.go b/service/connect/api_op_StartChatContact.go index 9aa9a339b4c..9c59b2850cc 100644 --- a/service/connect/api_op_StartChatContact.go +++ b/service/connect/api_op_StartChatContact.go @@ -102,6 +102,10 @@ type StartChatContactInput struct { // [Making retries safe with idempotent APIs]: https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/ ClientToken *string + // The customer's identification number. For example, the CustomerId may be a + // customer number from your CRM. + CustomerId *string + // The initial message to be sent to the newly created chat. If you have a Lex bot // in your flow, the initial message is not delivered to the Lex bot. InitialMessage *types.ChatMessage diff --git a/service/connect/api_op_UpdateParticipantAuthentication.go b/service/connect/api_op_UpdateParticipantAuthentication.go new file mode 100644 index 00000000000..7e2b004c6a8 --- /dev/null +++ b/service/connect/api_op_UpdateParticipantAuthentication.go @@ -0,0 +1,184 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// 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. +func (c *Client) UpdateParticipantAuthentication(ctx context.Context, params *UpdateParticipantAuthenticationInput, optFns ...func(*Options)) (*UpdateParticipantAuthenticationOutput, error) { + if params == nil { + params = &UpdateParticipantAuthenticationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateParticipantAuthentication", params, optFns, c.addOperationUpdateParticipantAuthenticationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateParticipantAuthenticationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateParticipantAuthenticationInput struct { + + // The identifier of the Amazon Connect instance. You can [find the instance ID] in the Amazon Resource + // Name (ARN) of the instance. + // + // [find the instance ID]: https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html + // + // This member is required. + InstanceId *string + + // 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. + // + // [GetAuthenticationUrl]: https://docs.aws.amazon.com/connect/latest/APIReference/API_GetAuthenticationUrl.html + // + // This member is required. + State *string + + // The code query parameter provided by Cognito in the redirectUri . + Code *string + + // The error query parameter provided by Cognito in the redirectUri . + Error *string + + // The error_description parameter provided by Cognito in the redirectUri . + ErrorDescription *string + + noSmithyDocumentSerde +} + +type UpdateParticipantAuthenticationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateParticipantAuthenticationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateParticipantAuthentication{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateParticipantAuthentication{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateParticipantAuthentication"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateParticipantAuthenticationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateParticipantAuthentication(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateParticipantAuthentication(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateParticipantAuthentication", + } +} diff --git a/service/connect/deserializers.go b/service/connect/deserializers.go index c0647af10c4..119b9ecace6 100644 --- a/service/connect/deserializers.go +++ b/service/connect/deserializers.go @@ -38023,6 +38023,109 @@ func awsRestjson1_deserializeOpErrorUpdateInstanceStorageConfig(response *smithy } } +type awsRestjson1_deserializeOpUpdateParticipantAuthentication struct { +} + +func (*awsRestjson1_deserializeOpUpdateParticipantAuthentication) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateParticipantAuthentication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateParticipantAuthentication(response, &metadata) + } + output := &UpdateParticipantAuthenticationOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateParticipantAuthentication(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpUpdateParticipantRoleConfig struct { } @@ -45636,6 +45739,15 @@ func awsRestjson1_deserializeDocumentContact(v **types.Contact, value interface{ return err } + case "CustomerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CustomerId to be of type string, got %T instead", value) + } + sv.CustomerId = ptr.String(jtv) + } + case "CustomerVoiceActivity": if err := awsRestjson1_deserializeDocumentCustomerVoiceActivity(&sv.CustomerVoiceActivity, value); err != nil { return err diff --git a/service/connect/generated.json b/service/connect/generated.json index 0d7ffe3362a..37e0e63b369 100644 --- a/service/connect/generated.json +++ b/service/connect/generated.json @@ -255,6 +255,7 @@ "api_op_UpdateHoursOfOperationOverride.go", "api_op_UpdateInstanceAttribute.go", "api_op_UpdateInstanceStorageConfig.go", + "api_op_UpdateParticipantAuthentication.go", "api_op_UpdateParticipantRoleConfig.go", "api_op_UpdatePhoneNumber.go", "api_op_UpdatePhoneNumberMetadata.go", diff --git a/service/connect/serializers.go b/service/connect/serializers.go index a38aea6200c..62dda4559a7 100644 --- a/service/connect/serializers.go +++ b/service/connect/serializers.go @@ -19626,6 +19626,11 @@ func awsRestjson1_serializeOpDocumentStartChatContactInput(v *StartChatContactIn ok.String(*v.ContactFlowId) } + if v.CustomerId != nil { + ok := object.Key("CustomerId") + ok.String(*v.CustomerId) + } + if v.InitialMessage != nil { ok := object.Key("InitialMessage") if err := awsRestjson1_serializeDocumentChatMessage(v.InitialMessage, ok); err != nil { @@ -23935,6 +23940,107 @@ func awsRestjson1_serializeOpDocumentUpdateInstanceStorageConfigInput(v *UpdateI return nil } +type awsRestjson1_serializeOpUpdateParticipantAuthentication struct { +} + +func (*awsRestjson1_serializeOpUpdateParticipantAuthentication) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateParticipantAuthentication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateParticipantAuthenticationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact/update-participant-authentication") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateParticipantAuthenticationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateParticipantAuthenticationInput(v *UpdateParticipantAuthenticationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateParticipantAuthenticationInput(v *UpdateParticipantAuthenticationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Code != nil { + ok := object.Key("Code") + ok.String(*v.Code) + } + + if v.Error != nil { + ok := object.Key("Error") + ok.String(*v.Error) + } + + if v.ErrorDescription != nil { + ok := object.Key("ErrorDescription") + ok.String(*v.ErrorDescription) + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.State != nil { + ok := object.Key("State") + ok.String(*v.State) + } + + return nil +} + type awsRestjson1_serializeOpUpdateParticipantRoleConfig struct { } diff --git a/service/connect/snapshot/api_op_UpdateParticipantAuthentication.go.snap b/service/connect/snapshot/api_op_UpdateParticipantAuthentication.go.snap new file mode 100644 index 00000000000..ea3969fb97a --- /dev/null +++ b/service/connect/snapshot/api_op_UpdateParticipantAuthentication.go.snap @@ -0,0 +1,41 @@ +UpdateParticipantAuthentication + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/connect/snapshot_test.go b/service/connect/snapshot_test.go index 06f8a82bec0..846e0ef814d 100644 --- a/service/connect/snapshot_test.go +++ b/service/connect/snapshot_test.go @@ -3026,6 +3026,18 @@ func TestCheckSnapshot_UpdateInstanceStorageConfig(t *testing.T) { } } +func TestCheckSnapshot_UpdateParticipantAuthentication(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateParticipantAuthentication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateParticipantAuthentication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateParticipantRoleConfig(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateParticipantRoleConfig(context.Background(), nil, func(o *Options) { @@ -6373,6 +6385,18 @@ func TestUpdateSnapshot_UpdateInstanceStorageConfig(t *testing.T) { } } +func TestUpdateSnapshot_UpdateParticipantAuthentication(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateParticipantAuthentication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateParticipantAuthentication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateParticipantRoleConfig(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateParticipantRoleConfig(context.Background(), nil, func(o *Options) { diff --git a/service/connect/types/enums.go b/service/connect/types/enums.go index 8d9991252f1..57d1f272cd3 100644 --- a/service/connect/types/enums.go +++ b/service/connect/types/enums.go @@ -1097,6 +1097,7 @@ const ( InstanceAttributeTypeHighVolumeOutbound InstanceAttributeType = "HIGH_VOLUME_OUTBOUND" InstanceAttributeTypeEnhancedContactMonitoring InstanceAttributeType = "ENHANCED_CONTACT_MONITORING" InstanceAttributeTypeEnhancedChatMonitoring InstanceAttributeType = "ENHANCED_CHAT_MONITORING" + InstanceAttributeTypeMultiPartyChatConference InstanceAttributeType = "MULTI_PARTY_CHAT_CONFERENCE" ) // Values returns all known values for InstanceAttributeType. Note that this can @@ -1116,6 +1117,7 @@ func (InstanceAttributeType) Values() []InstanceAttributeType { "HIGH_VOLUME_OUTBOUND", "ENHANCED_CONTACT_MONITORING", "ENHANCED_CHAT_MONITORING", + "MULTI_PARTY_CHAT_CONFERENCE", } } @@ -1225,6 +1227,7 @@ const ( IntegrationTypeSesIdentity IntegrationType = "SES_IDENTITY" IntegrationTypeAnalyticsConnector IntegrationType = "ANALYTICS_CONNECTOR" IntegrationTypeCallTransferConnector IntegrationType = "CALL_TRANSFER_CONNECTOR" + IntegrationTypeCognitoUserPool IntegrationType = "COGNITO_USER_POOL" ) // Values returns all known values for IntegrationType. Note that this can be @@ -1246,6 +1249,7 @@ func (IntegrationType) Values() []IntegrationType { "SES_IDENTITY", "ANALYTICS_CONNECTOR", "CALL_TRANSFER_CONNECTOR", + "COGNITO_USER_POOL", } } diff --git a/service/connect/types/types.go b/service/connect/types/types.go index cf12cd7dba8..4e9d616586f 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -915,6 +915,13 @@ type Contact struct { // The customer or external third party participant endpoint. CustomerEndpoint *EndpointInfo + // 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. + CustomerId *string + // Information about customer’s voice activity. CustomerVoiceActivity *CustomerVoiceActivity @@ -7435,6 +7442,8 @@ type VocabularySummary struct { type VoiceRecordingConfiguration struct { // Identifies which IVR track is being recorded. + // + // One and only one of the track configurations should be presented in the request. IvrRecordingTrack IvrRecordingTrack // Identifies which track is being recorded. diff --git a/service/connect/validators.go b/service/connect/validators.go index 1d6a460ef3f..f466b6e3468 100644 --- a/service/connect/validators.go +++ b/service/connect/validators.go @@ -4890,6 +4890,26 @@ func (m *validateOpUpdateInstanceStorageConfig) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpUpdateParticipantAuthentication struct { +} + +func (*validateOpUpdateParticipantAuthentication) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateParticipantAuthentication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateParticipantAuthenticationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateParticipantAuthenticationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateParticipantRoleConfig struct { } @@ -6506,6 +6526,10 @@ func addOpUpdateInstanceStorageConfigValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpUpdateInstanceStorageConfig{}, middleware.After) } +func addOpUpdateParticipantAuthenticationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateParticipantAuthentication{}, middleware.After) +} + func addOpUpdateParticipantRoleConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateParticipantRoleConfig{}, middleware.After) } @@ -13486,6 +13510,24 @@ func validateOpUpdateInstanceStorageConfigInput(v *UpdateInstanceStorageConfigIn } } +func validateOpUpdateParticipantAuthenticationInput(v *UpdateParticipantAuthenticationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateParticipantAuthenticationInput"} + if v.State == nil { + invalidParams.Add(smithy.NewErrParamRequired("State")) + } + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateParticipantRoleConfigInput(v *UpdateParticipantRoleConfigInput) error { if v == nil { return nil diff --git a/service/connectparticipant/api_op_CancelParticipantAuthentication.go b/service/connectparticipant/api_op_CancelParticipantAuthentication.go new file mode 100644 index 00000000000..08a87ba1e87 --- /dev/null +++ b/service/connectparticipant/api_op_CancelParticipantAuthentication.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connectparticipant + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// 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. +func (c *Client) CancelParticipantAuthentication(ctx context.Context, params *CancelParticipantAuthenticationInput, optFns ...func(*Options)) (*CancelParticipantAuthenticationOutput, error) { + if params == nil { + params = &CancelParticipantAuthenticationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CancelParticipantAuthentication", params, optFns, c.addOperationCancelParticipantAuthenticationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CancelParticipantAuthenticationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CancelParticipantAuthenticationInput struct { + + // The authentication token associated with the participant's connection. + // + // This member is required. + ConnectionToken *string + + // The sessionId provided in the authenticationInitiated event. + // + // This member is required. + SessionId *string + + noSmithyDocumentSerde +} + +type CancelParticipantAuthenticationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCancelParticipantAuthenticationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCancelParticipantAuthentication{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCancelParticipantAuthentication{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CancelParticipantAuthentication"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpCancelParticipantAuthenticationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelParticipantAuthentication(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCancelParticipantAuthentication(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CancelParticipantAuthentication", + } +} diff --git a/service/connectparticipant/api_op_CompleteAttachmentUpload.go b/service/connectparticipant/api_op_CompleteAttachmentUpload.go index 1b4bf51e1cd..e73f2ee72c8 100644 --- a/service/connectparticipant/api_op_CompleteAttachmentUpload.go +++ b/service/connectparticipant/api_op_CompleteAttachmentUpload.go @@ -14,11 +14,14 @@ import ( // 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]. // // [Signature Version 4 authentication]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html +// [Amazon Connect Chat security best practices]: https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat func (c *Client) CompleteAttachmentUpload(ctx context.Context, params *CompleteAttachmentUploadInput, optFns ...func(*Options)) (*CompleteAttachmentUploadOutput, error) { if params == nil { params = &CompleteAttachmentUploadInput{} diff --git a/service/connectparticipant/api_op_CreateParticipantConnection.go b/service/connectparticipant/api_op_CreateParticipantConnection.go index 0ffe1921375..7a423ca8344 100644 --- a/service/connectparticipant/api_op_CreateParticipantConnection.go +++ b/service/connectparticipant/api_op_CreateParticipantConnection.go @@ -13,6 +13,8 @@ import ( // 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 @@ -46,6 +48,7 @@ import ( // [StartContactStreaming]: https://docs.aws.amazon.com/connect/latest/APIReference/API_StartContactStreaming.html // [Enable real-time chat message streaming]: https://docs.aws.amazon.com/connect/latest/adminguide/chat-message-streaming.html // [Signature Version 4 authentication]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html +// [Amazon Connect Chat security best practices]: https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat func (c *Client) CreateParticipantConnection(ctx context.Context, params *CreateParticipantConnectionInput, optFns ...func(*Options)) (*CreateParticipantConnectionOutput, error) { if params == nil { params = &CreateParticipantConnectionInput{} diff --git a/service/connectparticipant/api_op_DescribeView.go b/service/connectparticipant/api_op_DescribeView.go index 3c0fa577771..e27ef349f08 100644 --- a/service/connectparticipant/api_op_DescribeView.go +++ b/service/connectparticipant/api_op_DescribeView.go @@ -12,6 +12,10 @@ import ( ) // Retrieves the view for the specified view token. +// +// For security recommendations, see [Amazon Connect Chat security best practices]. +// +// [Amazon Connect Chat security best practices]: https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat func (c *Client) DescribeView(ctx context.Context, params *DescribeViewInput, optFns ...func(*Options)) (*DescribeViewOutput, error) { if params == nil { params = &DescribeViewInput{} diff --git a/service/connectparticipant/api_op_DisconnectParticipant.go b/service/connectparticipant/api_op_DisconnectParticipant.go index fac72e2ea85..88df24ef7c6 100644 --- a/service/connectparticipant/api_op_DisconnectParticipant.go +++ b/service/connectparticipant/api_op_DisconnectParticipant.go @@ -12,11 +12,14 @@ import ( // 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]. // // [Signature Version 4 authentication]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html +// [Amazon Connect Chat security best practices]: https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat func (c *Client) DisconnectParticipant(ctx context.Context, params *DisconnectParticipantInput, optFns ...func(*Options)) (*DisconnectParticipantOutput, error) { if params == nil { params = &DisconnectParticipantInput{} diff --git a/service/connectparticipant/api_op_GetAttachment.go b/service/connectparticipant/api_op_GetAttachment.go index 204fb4b5892..9d59761511b 100644 --- a/service/connectparticipant/api_op_GetAttachment.go +++ b/service/connectparticipant/api_op_GetAttachment.go @@ -13,11 +13,14 @@ import ( // 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]. // // [Signature Version 4 authentication]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html +// [Amazon Connect Chat security best practices]: https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat func (c *Client) GetAttachment(ctx context.Context, params *GetAttachmentInput, optFns ...func(*Options)) (*GetAttachmentOutput, error) { if params == nil { params = &GetAttachmentInput{} @@ -45,11 +48,20 @@ type GetAttachmentInput struct { // This member is required. ConnectionToken *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. + UrlExpiryInSeconds *int32 + noSmithyDocumentSerde } type GetAttachmentOutput struct { + // The size of the attachment in bytes. + // + // This member is required. + AttachmentSizeInBytes *int64 + // This is the pre-signed URL that can be used for uploading the file to Amazon S3 // when used in response to [StartAttachmentUpload]. // diff --git a/service/connectparticipant/api_op_GetAuthenticationUrl.go b/service/connectparticipant/api_op_GetAuthenticationUrl.go new file mode 100644 index 00000000000..b0442fce078 --- /dev/null +++ b/service/connectparticipant/api_op_GetAuthenticationUrl.go @@ -0,0 +1,180 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connectparticipant + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// 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. +// +// [Amazon Connect Chat security best practices]: https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat +func (c *Client) GetAuthenticationUrl(ctx context.Context, params *GetAuthenticationUrlInput, optFns ...func(*Options)) (*GetAuthenticationUrlOutput, error) { + if params == nil { + params = &GetAuthenticationUrlInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAuthenticationUrl", params, optFns, c.addOperationGetAuthenticationUrlMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAuthenticationUrlOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAuthenticationUrlInput struct { + + // The authentication token associated with the participant's connection. + // + // This member is required. + ConnectionToken *string + + // The URL where the customer will be redirected after Amazon Cognito authorizes + // the user. + // + // This member is required. + RedirectUri *string + + // The sessionId provided in the authenticationInitiated event. + // + // This member is required. + SessionId *string + + noSmithyDocumentSerde +} + +type GetAuthenticationUrlOutput struct { + + // 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. + AuthenticationUrl *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAuthenticationUrlMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAuthenticationUrl{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAuthenticationUrl{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetAuthenticationUrl"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetAuthenticationUrlValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAuthenticationUrl(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetAuthenticationUrl(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetAuthenticationUrl", + } +} diff --git a/service/connectparticipant/api_op_GetTranscript.go b/service/connectparticipant/api_op_GetTranscript.go index aaa9dffa6b1..3f731b5f3bb 100644 --- a/service/connectparticipant/api_op_GetTranscript.go +++ b/service/connectparticipant/api_op_GetTranscript.go @@ -15,6 +15,8 @@ import ( // 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: @@ -35,6 +37,7 @@ import ( // // [Enable persistent chat]: https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html // [Signature Version 4 authentication]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html +// [Amazon Connect Chat security best practices]: https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat func (c *Client) GetTranscript(ctx context.Context, params *GetTranscriptInput, optFns ...func(*Options)) (*GetTranscriptOutput, error) { if params == nil { params = &GetTranscriptInput{} diff --git a/service/connectparticipant/api_op_SendEvent.go b/service/connectparticipant/api_op_SendEvent.go index fc8522b7206..e1120c4723b 100644 --- a/service/connectparticipant/api_op_SendEvent.go +++ b/service/connectparticipant/api_op_SendEvent.go @@ -18,12 +18,15 @@ import ( // 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]. // // [CreateParticipantConnection]: https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html // [Signature Version 4 authentication]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html +// [Amazon Connect Chat security best practices]: https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat func (c *Client) SendEvent(ctx context.Context, params *SendEventInput, optFns ...func(*Options)) (*SendEventOutput, error) { if params == nil { params = &SendEventInput{} diff --git a/service/connectparticipant/api_op_SendMessage.go b/service/connectparticipant/api_op_SendMessage.go index 06d66cb4454..416ca15312e 100644 --- a/service/connectparticipant/api_op_SendMessage.go +++ b/service/connectparticipant/api_op_SendMessage.go @@ -12,11 +12,14 @@ import ( // 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]. // // [Signature Version 4 authentication]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html +// [Amazon Connect Chat security best practices]: https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat func (c *Client) SendMessage(ctx context.Context, params *SendMessageInput, optFns ...func(*Options)) (*SendMessageOutput, error) { if params == nil { params = &SendMessageInput{} diff --git a/service/connectparticipant/api_op_StartAttachmentUpload.go b/service/connectparticipant/api_op_StartAttachmentUpload.go index 1017f3fab02..327235a4853 100644 --- a/service/connectparticipant/api_op_StartAttachmentUpload.go +++ b/service/connectparticipant/api_op_StartAttachmentUpload.go @@ -14,11 +14,14 @@ import ( // 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]. // // [Signature Version 4 authentication]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html +// [Amazon Connect Chat security best practices]: https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat func (c *Client) StartAttachmentUpload(ctx context.Context, params *StartAttachmentUploadInput, optFns ...func(*Options)) (*StartAttachmentUploadOutput, error) { if params == nil { params = &StartAttachmentUploadInput{} @@ -76,7 +79,7 @@ type StartAttachmentUploadOutput struct { // A unique identifier for the attachment. AttachmentId *string - // Fields to be used while uploading the attachment. + // The headers to be provided while uploading the file to the URL. UploadMetadata *types.UploadMetadata // Metadata pertaining to the operation's result. diff --git a/service/connectparticipant/deserializers.go b/service/connectparticipant/deserializers.go index 87e1927ce4f..3aa23d46343 100644 --- a/service/connectparticipant/deserializers.go +++ b/service/connectparticipant/deserializers.go @@ -29,6 +29,103 @@ func deserializeS3Expires(v string) (*time.Time, error) { return &t, nil } +type awsRestjson1_deserializeOpCancelParticipantAuthentication struct { +} + +func (*awsRestjson1_deserializeOpCancelParticipantAuthentication) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCancelParticipantAuthentication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCancelParticipantAuthentication(response, &metadata) + } + output := &CancelParticipantAuthenticationOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCancelParticipantAuthentication(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpCompleteAttachmentUpload struct { } @@ -706,6 +803,19 @@ func awsRestjson1_deserializeOpDocumentGetAttachmentOutput(v **GetAttachmentOutp for key, value := range shape { switch key { + case "AttachmentSizeInBytes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected AttachmentSizeInBytes to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AttachmentSizeInBytes = ptr.Int64(i64) + } + case "Url": if value != nil { jtv, ok := value.(string) @@ -733,6 +843,171 @@ func awsRestjson1_deserializeOpDocumentGetAttachmentOutput(v **GetAttachmentOutp return nil } +type awsRestjson1_deserializeOpGetAuthenticationUrl struct { +} + +func (*awsRestjson1_deserializeOpGetAuthenticationUrl) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetAuthenticationUrl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetAuthenticationUrl(response, &metadata) + } + output := &GetAuthenticationUrlOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetAuthenticationUrlOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetAuthenticationUrl(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetAuthenticationUrlOutput(v **GetAuthenticationUrlOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetAuthenticationUrlOutput + if *v == nil { + sv = &GetAuthenticationUrlOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AuthenticationUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AuthenticationUrl to be of type string, got %T instead", value) + } + sv.AuthenticationUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetTranscript struct { } diff --git a/service/connectparticipant/doc.go b/service/connectparticipant/doc.go index a1ff0ded48b..9a7b3ff693d 100644 --- a/service/connectparticipant/doc.go +++ b/service/connectparticipant/doc.go @@ -3,6 +3,10 @@ // Package connectparticipant provides the API client, operations, and parameter // types for Amazon Connect Participant Service. // +// [Participant Service actions] +// +// [Participant Service data types] +// // 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 @@ -13,4 +17,7 @@ // 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. +// +// [Participant Service data types]: https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Participant_Service.html +// [Participant Service actions]: https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Participant_Service.html package connectparticipant diff --git a/service/connectparticipant/generated.json b/service/connectparticipant/generated.json index 9fda50a46d0..684f55ea870 100644 --- a/service/connectparticipant/generated.json +++ b/service/connectparticipant/generated.json @@ -8,11 +8,13 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_CancelParticipantAuthentication.go", "api_op_CompleteAttachmentUpload.go", "api_op_CreateParticipantConnection.go", "api_op_DescribeView.go", "api_op_DisconnectParticipant.go", "api_op_GetAttachment.go", + "api_op_GetAuthenticationUrl.go", "api_op_GetTranscript.go", "api_op_SendEvent.go", "api_op_SendMessage.go", diff --git a/service/connectparticipant/serializers.go b/service/connectparticipant/serializers.go index 3d73a3a65ec..6c6af439383 100644 --- a/service/connectparticipant/serializers.go +++ b/service/connectparticipant/serializers.go @@ -15,6 +15,96 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsRestjson1_serializeOpCancelParticipantAuthentication struct { +} + +func (*awsRestjson1_serializeOpCancelParticipantAuthentication) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCancelParticipantAuthentication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CancelParticipantAuthenticationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/participant/cancel-authentication") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCancelParticipantAuthenticationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCancelParticipantAuthenticationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCancelParticipantAuthenticationInput(v *CancelParticipantAuthenticationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ConnectionToken != nil { + locationName := "X-Amz-Bearer" + encoder.SetHeader(locationName).String(*v.ConnectionToken) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCancelParticipantAuthenticationInput(v *CancelParticipantAuthenticationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SessionId != nil { + ok := object.Key("SessionId") + ok.String(*v.SessionId) + } + + return nil +} + type awsRestjson1_serializeOpCompleteAttachmentUpload struct { } @@ -462,6 +552,106 @@ func awsRestjson1_serializeOpDocumentGetAttachmentInput(v *GetAttachmentInput, v ok.String(*v.AttachmentId) } + if v.UrlExpiryInSeconds != nil { + ok := object.Key("UrlExpiryInSeconds") + ok.Integer(*v.UrlExpiryInSeconds) + } + + return nil +} + +type awsRestjson1_serializeOpGetAuthenticationUrl struct { +} + +func (*awsRestjson1_serializeOpGetAuthenticationUrl) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetAuthenticationUrl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetAuthenticationUrlInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/participant/authentication-url") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetAuthenticationUrlInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetAuthenticationUrlInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetAuthenticationUrlInput(v *GetAuthenticationUrlInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ConnectionToken != nil { + locationName := "X-Amz-Bearer" + encoder.SetHeader(locationName).String(*v.ConnectionToken) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetAuthenticationUrlInput(v *GetAuthenticationUrlInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RedirectUri != nil { + ok := object.Key("RedirectUri") + ok.String(*v.RedirectUri) + } + + if v.SessionId != nil { + ok := object.Key("SessionId") + ok.String(*v.SessionId) + } + return nil } diff --git a/service/connectparticipant/snapshot/api_op_CancelParticipantAuthentication.go.snap b/service/connectparticipant/snapshot/api_op_CancelParticipantAuthentication.go.snap new file mode 100644 index 00000000000..d8149d69007 --- /dev/null +++ b/service/connectparticipant/snapshot/api_op_CancelParticipantAuthentication.go.snap @@ -0,0 +1,41 @@ +CancelParticipantAuthentication + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/connectparticipant/snapshot/api_op_GetAuthenticationUrl.go.snap b/service/connectparticipant/snapshot/api_op_GetAuthenticationUrl.go.snap new file mode 100644 index 00000000000..6795aeaf601 --- /dev/null +++ b/service/connectparticipant/snapshot/api_op_GetAuthenticationUrl.go.snap @@ -0,0 +1,41 @@ +GetAuthenticationUrl + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/connectparticipant/snapshot_test.go b/service/connectparticipant/snapshot_test.go index 43801bcd67e..83d1ee7e081 100644 --- a/service/connectparticipant/snapshot_test.go +++ b/service/connectparticipant/snapshot_test.go @@ -62,6 +62,18 @@ func testSnapshot(stack *middleware.Stack, operation string) error { } return snapshotOK{} } +func TestCheckSnapshot_CancelParticipantAuthentication(t *testing.T) { + svc := New(Options{}) + _, err := svc.CancelParticipantAuthentication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CancelParticipantAuthentication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CompleteAttachmentUpload(t *testing.T) { svc := New(Options{}) _, err := svc.CompleteAttachmentUpload(context.Background(), nil, func(o *Options) { @@ -122,6 +134,18 @@ func TestCheckSnapshot_GetAttachment(t *testing.T) { } } +func TestCheckSnapshot_GetAuthenticationUrl(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetAuthenticationUrl(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetAuthenticationUrl") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetTranscript(t *testing.T) { svc := New(Options{}) _, err := svc.GetTranscript(context.Background(), nil, func(o *Options) { @@ -169,6 +193,18 @@ func TestCheckSnapshot_StartAttachmentUpload(t *testing.T) { t.Fatal(err) } } +func TestUpdateSnapshot_CancelParticipantAuthentication(t *testing.T) { + svc := New(Options{}) + _, err := svc.CancelParticipantAuthentication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CancelParticipantAuthentication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CompleteAttachmentUpload(t *testing.T) { svc := New(Options{}) _, err := svc.CompleteAttachmentUpload(context.Background(), nil, func(o *Options) { @@ -229,6 +265,18 @@ func TestUpdateSnapshot_GetAttachment(t *testing.T) { } } +func TestUpdateSnapshot_GetAuthenticationUrl(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetAuthenticationUrl(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetAuthenticationUrl") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetTranscript(t *testing.T) { svc := New(Options{}) _, err := svc.GetTranscript(context.Background(), nil, func(o *Options) { diff --git a/service/connectparticipant/validators.go b/service/connectparticipant/validators.go index b6ccd07f487..4fb21313ba9 100644 --- a/service/connectparticipant/validators.go +++ b/service/connectparticipant/validators.go @@ -9,6 +9,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpCancelParticipantAuthentication struct { +} + +func (*validateOpCancelParticipantAuthentication) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCancelParticipantAuthentication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CancelParticipantAuthenticationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCancelParticipantAuthenticationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCompleteAttachmentUpload struct { } @@ -109,6 +129,26 @@ func (m *validateOpGetAttachment) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpGetAuthenticationUrl struct { +} + +func (*validateOpGetAuthenticationUrl) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAuthenticationUrl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAuthenticationUrlInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAuthenticationUrlInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetTranscript struct { } @@ -189,6 +229,10 @@ func (m *validateOpStartAttachmentUpload) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +func addOpCancelParticipantAuthenticationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCancelParticipantAuthentication{}, middleware.After) +} + func addOpCompleteAttachmentUploadValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCompleteAttachmentUpload{}, middleware.After) } @@ -209,6 +253,10 @@ func addOpGetAttachmentValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetAttachment{}, middleware.After) } +func addOpGetAuthenticationUrlValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAuthenticationUrl{}, middleware.After) +} + func addOpGetTranscriptValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetTranscript{}, middleware.After) } @@ -225,6 +273,24 @@ func addOpStartAttachmentUploadValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpStartAttachmentUpload{}, middleware.After) } +func validateOpCancelParticipantAuthenticationInput(v *CancelParticipantAuthenticationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelParticipantAuthenticationInput"} + if v.SessionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SessionId")) + } + if v.ConnectionToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectionToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCompleteAttachmentUploadInput(v *CompleteAttachmentUploadInput) error { if v == nil { return nil @@ -312,6 +378,27 @@ func validateOpGetAttachmentInput(v *GetAttachmentInput) error { } } +func validateOpGetAuthenticationUrlInput(v *GetAuthenticationUrlInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAuthenticationUrlInput"} + if v.SessionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SessionId")) + } + if v.RedirectUri == nil { + invalidParams.Add(smithy.NewErrParamRequired("RedirectUri")) + } + if v.ConnectionToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectionToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetTranscriptInput(v *GetTranscriptInput) error { if v == nil { return nil diff --git a/service/datasync/api_op_CreateLocationEfs.go b/service/datasync/api_op_CreateLocationEfs.go index 0e23a76f800..371082d18b0 100644 --- a/service/datasync/api_op_CreateLocationEfs.go +++ b/service/datasync/api_op_CreateLocationEfs.go @@ -72,8 +72,8 @@ type CreateLocationEfsInput struct { InTransitEncryption types.EfsInTransitEncryption // 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. + // 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 diff --git a/service/datasync/api_op_CreateLocationFsxLustre.go b/service/datasync/api_op_CreateLocationFsxLustre.go index 2e4b0786de6..6fed3dd033f 100644 --- a/service/datasync/api_op_CreateLocationFsxLustre.go +++ b/service/datasync/api_op_CreateLocationFsxLustre.go @@ -34,25 +34,34 @@ func (c *Client) CreateLocationFsxLustre(ctx context.Context, params *CreateLoca type CreateLocationFsxLustreInput struct { - // 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 member is required. FsxFilesystemArn *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]. + // + // [Amazon FSx for Lustre User Guide]: https://docs.aws.amazon.com/fsx/latest/LustreGuide/limit-access-security-groups.html // // This member is required. SecurityGroupArns []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 ( / ). Subdirectory *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 + // 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. Tags []types.TagListEntry @@ -61,8 +70,8 @@ type CreateLocationFsxLustreInput struct { type CreateLocationFsxLustreOutput struct { - // 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. LocationArn *string // Metadata pertaining to the operation's result. diff --git a/service/datasync/api_op_CreateLocationFsxOntap.go b/service/datasync/api_op_CreateLocationFsxOntap.go index addd6a609b5..cd96e078739 100644 --- a/service/datasync/api_op_CreateLocationFsxOntap.go +++ b/service/datasync/api_op_CreateLocationFsxOntap.go @@ -62,7 +62,8 @@ type CreateLocationFsxOntapInput struct { // This member is required. StorageVirtualMachineArn *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 diff --git a/service/datasync/api_op_CreateLocationFsxWindows.go b/service/datasync/api_op_CreateLocationFsxWindows.go index 0954238e04c..7f814ae256f 100644 --- a/service/datasync/api_op_CreateLocationFsxWindows.go +++ b/service/datasync/api_op_CreateLocationFsxWindows.go @@ -79,8 +79,8 @@ type CreateLocationFsxWindowsInput struct { // This member is required. User *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. diff --git a/service/datasync/api_op_CreateLocationNfs.go b/service/datasync/api_op_CreateLocationNfs.go index 40f5725a210..9d4b1bed7e3 100644 --- a/service/datasync/api_op_CreateLocationNfs.go +++ b/service/datasync/api_op_CreateLocationNfs.go @@ -16,10 +16,6 @@ import ( // // 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]. -// -// [Configuring transfers with Snowcone]: https://docs.aws.amazon.com/datasync/latest/userguide/nfs-on-snowcone.html // [accesses NFS file servers]: https://docs.aws.amazon.com/datasync/latest/userguide/create-nfs-location.html#accessing-nfs func (c *Client) CreateLocationNfs(ctx context.Context, params *CreateLocationNfsInput, optFns ...func(*Options)) (*CreateLocationNfsOutput, error) { if params == nil { diff --git a/service/datasync/api_op_CreateLocationS3.go b/service/datasync/api_op_CreateLocationS3.go index a2da3beb275..7f2009a2d06 100644 --- a/service/datasync/api_op_CreateLocationS3.go +++ b/service/datasync/api_op_CreateLocationS3.go @@ -58,9 +58,9 @@ type CreateLocationS3Input struct { // 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]. // - // [Accessing S3 buckets]: https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#create-s3-location-access + // [Providing DataSync access to S3 buckets]: https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#create-s3-location-access // // This member is required. S3Config *types.S3Config diff --git a/service/datasync/api_op_DescribeLocationS3.go b/service/datasync/api_op_DescribeLocationS3.go index 9856d4d768f..8fe7009227d 100644 --- a/service/datasync/api_op_DescribeLocationS3.go +++ b/service/datasync/api_op_DescribeLocationS3.go @@ -63,9 +63,9 @@ type DescribeLocationS3Output struct { // 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]. // - // [Accessing S3 buckets]: https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#create-s3-location-access + // [Providing DataSync access to S3 buckets]: https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#create-s3-location-access S3Config *types.S3Config // When Amazon S3 is a destination location, this is the storage class that you diff --git a/service/datasync/api_op_UpdateLocationAzureBlob.go b/service/datasync/api_op_UpdateLocationAzureBlob.go index 5cc19054f1a..805f09045a6 100644 --- a/service/datasync/api_op_UpdateLocationAzureBlob.go +++ b/service/datasync/api_op_UpdateLocationAzureBlob.go @@ -11,8 +11,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// 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]. +// +// [Configuring DataSync transfers with Azure Blob Storage]: https://docs.aws.amazon.com/datasync/latest/userguide/creating-azure-blob-location.html func (c *Client) UpdateLocationAzureBlob(ctx context.Context, params *UpdateLocationAzureBlobInput, optFns ...func(*Options)) (*UpdateLocationAzureBlobOutput, error) { if params == nil { params = &UpdateLocationAzureBlobInput{} diff --git a/service/datasync/api_op_UpdateLocationEfs.go b/service/datasync/api_op_UpdateLocationEfs.go new file mode 100644 index 00000000000..dd0d75815bb --- /dev/null +++ b/service/datasync/api_op_UpdateLocationEfs.go @@ -0,0 +1,193 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datasync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datasync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// 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]. +// +// [Configuring DataSync transfers with Amazon EFS]: https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html +func (c *Client) UpdateLocationEfs(ctx context.Context, params *UpdateLocationEfsInput, optFns ...func(*Options)) (*UpdateLocationEfsOutput, error) { + if params == nil { + params = &UpdateLocationEfsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateLocationEfs", params, optFns, c.addOperationUpdateLocationEfsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateLocationEfsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateLocationEfsInput struct { + + // Specifies the Amazon Resource Name (ARN) of the Amazon EFS transfer location + // that you're updating. + // + // This member is required. + LocationArn *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]. + // + // [Accessing restricted Amazon EFS file systems]: https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam + AccessPointArn *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]. + // + // [Creating a DataSync IAM role for Amazon EFS file system access]: https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam-role + FileSystemAccessRoleArn *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 . + InTransitEncryption types.EfsInTransitEncryption + + // 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]: https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html + Subdirectory *string + + noSmithyDocumentSerde +} + +type UpdateLocationEfsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateLocationEfsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateLocationEfs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateLocationEfs{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateLocationEfs"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateLocationEfsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLocationEfs(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateLocationEfs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateLocationEfs", + } +} diff --git a/service/datasync/api_op_UpdateLocationFsxLustre.go b/service/datasync/api_op_UpdateLocationFsxLustre.go new file mode 100644 index 00000000000..064d0ea9c8a --- /dev/null +++ b/service/datasync/api_op_UpdateLocationFsxLustre.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datasync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// 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]. +// +// [Configuring DataSync transfers with FSx for Lustre]: https://docs.aws.amazon.com/datasync/latest/userguide/create-lustre-location.html +func (c *Client) UpdateLocationFsxLustre(ctx context.Context, params *UpdateLocationFsxLustreInput, optFns ...func(*Options)) (*UpdateLocationFsxLustreOutput, error) { + if params == nil { + params = &UpdateLocationFsxLustreInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateLocationFsxLustre", params, optFns, c.addOperationUpdateLocationFsxLustreMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateLocationFsxLustreOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateLocationFsxLustreInput struct { + + // Specifies the Amazon Resource Name (ARN) of the FSx for Lustre transfer + // location that you're updating. + // + // This member is required. + LocationArn *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 ( / ). + Subdirectory *string + + noSmithyDocumentSerde +} + +type UpdateLocationFsxLustreOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateLocationFsxLustreMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateLocationFsxLustre{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateLocationFsxLustre{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateLocationFsxLustre"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateLocationFsxLustreValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLocationFsxLustre(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateLocationFsxLustre(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateLocationFsxLustre", + } +} diff --git a/service/datasync/api_op_UpdateLocationFsxOntap.go b/service/datasync/api_op_UpdateLocationFsxOntap.go new file mode 100644 index 00000000000..27cbece24de --- /dev/null +++ b/service/datasync/api_op_UpdateLocationFsxOntap.go @@ -0,0 +1,176 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datasync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datasync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// 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]. +// +// [Configuring DataSync transfers with FSx for ONTAP]: https://docs.aws.amazon.com/datasync/latest/userguide/create-ontap-location.html +func (c *Client) UpdateLocationFsxOntap(ctx context.Context, params *UpdateLocationFsxOntapInput, optFns ...func(*Options)) (*UpdateLocationFsxOntapOutput, error) { + if params == nil { + params = &UpdateLocationFsxOntapInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateLocationFsxOntap", params, optFns, c.addOperationUpdateLocationFsxOntapMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateLocationFsxOntapOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateLocationFsxOntapInput struct { + + // Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP transfer location + // that you're updating. + // + // This member is required. + LocationArn *string + + // Specifies the data transfer protocol that DataSync uses to access your Amazon + // FSx file system. + Protocol *types.FsxUpdateProtocol + + // 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. + // + // [Managing FSx for ONTAP storage virtual machines]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-svms.html + Subdirectory *string + + noSmithyDocumentSerde +} + +type UpdateLocationFsxOntapOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateLocationFsxOntapMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateLocationFsxOntap{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateLocationFsxOntap{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateLocationFsxOntap"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateLocationFsxOntapValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLocationFsxOntap(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateLocationFsxOntap(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateLocationFsxOntap", + } +} diff --git a/service/datasync/api_op_UpdateLocationFsxOpenZfs.go b/service/datasync/api_op_UpdateLocationFsxOpenZfs.go new file mode 100644 index 00000000000..f96b6ce4be0 --- /dev/null +++ b/service/datasync/api_op_UpdateLocationFsxOpenZfs.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datasync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datasync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// 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. +// +// [Configuring DataSync transfers with FSx for OpenZFS]: https://docs.aws.amazon.com/datasync/latest/userguide/create-openzfs-location.html +func (c *Client) UpdateLocationFsxOpenZfs(ctx context.Context, params *UpdateLocationFsxOpenZfsInput, optFns ...func(*Options)) (*UpdateLocationFsxOpenZfsOutput, error) { + if params == nil { + params = &UpdateLocationFsxOpenZfsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateLocationFsxOpenZfs", params, optFns, c.addOperationUpdateLocationFsxOpenZfsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateLocationFsxOpenZfsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateLocationFsxOpenZfsInput struct { + + // Specifies the Amazon Resource Name (ARN) of the FSx for OpenZFS transfer + // location that you're updating. + // + // This member is required. + LocationArn *string + + // Specifies the data transfer protocol that DataSync uses to access your Amazon + // FSx file system. + Protocol *types.FsxProtocol + + // 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). + Subdirectory *string + + noSmithyDocumentSerde +} + +type UpdateLocationFsxOpenZfsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateLocationFsxOpenZfsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateLocationFsxOpenZfs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateLocationFsxOpenZfs{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateLocationFsxOpenZfs"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateLocationFsxOpenZfsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLocationFsxOpenZfs(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateLocationFsxOpenZfs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateLocationFsxOpenZfs", + } +} diff --git a/service/datasync/api_op_UpdateLocationFsxWindows.go b/service/datasync/api_op_UpdateLocationFsxWindows.go new file mode 100644 index 00000000000..981bfc35483 --- /dev/null +++ b/service/datasync/api_op_UpdateLocationFsxWindows.go @@ -0,0 +1,184 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datasync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// 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]. +// +// [Configuring DataSync transfers with FSx for Windows File Server]: https://docs.aws.amazon.com/datasync/latest/userguide/create-fsx-location.html +func (c *Client) UpdateLocationFsxWindows(ctx context.Context, params *UpdateLocationFsxWindowsInput, optFns ...func(*Options)) (*UpdateLocationFsxWindowsOutput, error) { + if params == nil { + params = &UpdateLocationFsxWindowsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateLocationFsxWindows", params, optFns, c.addOperationUpdateLocationFsxWindowsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateLocationFsxWindowsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateLocationFsxWindowsInput struct { + + // Specifies the ARN of the FSx for Windows File Server transfer location that + // you're updating. + // + // This member is required. + LocationArn *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. + Domain *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. + Password *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). + Subdirectory *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. + // + // [required permissions]: https://docs.aws.amazon.com/datasync/latest/userguide/create-fsx-location.html#create-fsx-windows-location-permissions + User *string + + noSmithyDocumentSerde +} + +type UpdateLocationFsxWindowsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateLocationFsxWindowsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateLocationFsxWindows{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateLocationFsxWindows{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateLocationFsxWindows"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateLocationFsxWindowsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLocationFsxWindows(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateLocationFsxWindows(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateLocationFsxWindows", + } +} diff --git a/service/datasync/api_op_UpdateLocationHdfs.go b/service/datasync/api_op_UpdateLocationHdfs.go index 85f8311d287..b56763bdbb2 100644 --- a/service/datasync/api_op_UpdateLocationHdfs.go +++ b/service/datasync/api_op_UpdateLocationHdfs.go @@ -11,8 +11,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// 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]. +// +// [Configuring DataSync transfers with an HDFS cluster]: https://docs.aws.amazon.com/datasync/latest/userguide/create-hdfs-location.html func (c *Client) UpdateLocationHdfs(ctx context.Context, params *UpdateLocationHdfsInput, optFns ...func(*Options)) (*UpdateLocationHdfsOutput, error) { if params == nil { params = &UpdateLocationHdfsInput{} diff --git a/service/datasync/api_op_UpdateLocationNfs.go b/service/datasync/api_op_UpdateLocationNfs.go index 7d767bf84db..c6c08d4abbe 100644 --- a/service/datasync/api_op_UpdateLocationNfs.go +++ b/service/datasync/api_op_UpdateLocationNfs.go @@ -11,12 +11,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Modifies some configurations of the Network File System (NFS) transfer location -// that you're using with DataSync. +// 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 to or from an NFS file server]. +// For more information, see [Configuring transfers with an NFS file server]. // -// [Configuring transfers to or from an NFS file server]: https://docs.aws.amazon.com/datasync/latest/userguide/create-nfs-location.html +// [Configuring transfers with an NFS file server]: https://docs.aws.amazon.com/datasync/latest/userguide/create-nfs-location.html func (c *Client) UpdateLocationNfs(ctx context.Context, params *UpdateLocationNfsInput, optFns ...func(*Options)) (*UpdateLocationNfsOutput, error) { if params == nil { params = &UpdateLocationNfsInput{} diff --git a/service/datasync/api_op_UpdateLocationObjectStorage.go b/service/datasync/api_op_UpdateLocationObjectStorage.go index 92b05784c03..48eace52883 100644 --- a/service/datasync/api_op_UpdateLocationObjectStorage.go +++ b/service/datasync/api_op_UpdateLocationObjectStorage.go @@ -11,8 +11,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// 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]. +// +// [Configuring DataSync transfers with an object storage system]: https://docs.aws.amazon.com/datasync/latest/userguide/create-object-location.html func (c *Client) UpdateLocationObjectStorage(ctx context.Context, params *UpdateLocationObjectStorageInput, optFns ...func(*Options)) (*UpdateLocationObjectStorageOutput, error) { if params == nil { params = &UpdateLocationObjectStorageInput{} diff --git a/service/datasync/api_op_UpdateLocationS3.go b/service/datasync/api_op_UpdateLocationS3.go new file mode 100644 index 00000000000..48728a88c34 --- /dev/null +++ b/service/datasync/api_op_UpdateLocationS3.go @@ -0,0 +1,198 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datasync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datasync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// 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: +// +// [Storage class considerations with Amazon S3 locations] +// +// [Evaluating S3 request costs when using DataSync] +// +// [Storage class considerations with Amazon S3 locations]: https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#using-storage-classes +// [Evaluating S3 request costs when using DataSync]: https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#create-s3-location-s3-requests +func (c *Client) UpdateLocationS3(ctx context.Context, params *UpdateLocationS3Input, optFns ...func(*Options)) (*UpdateLocationS3Output, error) { + if params == nil { + params = &UpdateLocationS3Input{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateLocationS3", params, optFns, c.addOperationUpdateLocationS3Middlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateLocationS3Output) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateLocationS3Input struct { + + // Specifies the Amazon Resource Name (ARN) of the Amazon S3 transfer location + // that you're updating. + // + // This member is required. + LocationArn *string + + // 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]. + // + // [Providing DataSync access to S3 buckets]: https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#create-s3-location-access + S3Config *types.S3Config + + // 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]. + // + // [Storage class considerations with Amazon S3 transfers]: https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#using-storage-classes + S3StorageClass types.S3StorageClass + + // 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 + Subdirectory *string + + noSmithyDocumentSerde +} + +type UpdateLocationS3Output struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateLocationS3Middlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateLocationS3{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateLocationS3{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateLocationS3"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateLocationS3ValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLocationS3(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateLocationS3(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateLocationS3", + } +} diff --git a/service/datasync/api_op_UpdateLocationSmb.go b/service/datasync/api_op_UpdateLocationSmb.go index c9e084ec105..a5104ebffab 100644 --- a/service/datasync/api_op_UpdateLocationSmb.go +++ b/service/datasync/api_op_UpdateLocationSmb.go @@ -11,8 +11,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// 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]. +// +// [Configuring DataSync transfers with an SMB file server]: https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html func (c *Client) UpdateLocationSmb(ctx context.Context, params *UpdateLocationSmbInput, optFns ...func(*Options)) (*UpdateLocationSmbOutput, error) { if params == nil { params = &UpdateLocationSmbInput{} diff --git a/service/datasync/deserializers.go b/service/datasync/deserializers.go index a20d2ee3e61..85a05780589 100644 --- a/service/datasync/deserializers.go +++ b/service/datasync/deserializers.go @@ -6073,14 +6073,698 @@ func awsAwsjson11_deserializeOpErrorUpdateLocationAzureBlob(response *smithyhttp } } +type awsAwsjson11_deserializeOpUpdateLocationEfs struct { +} + +func (*awsAwsjson11_deserializeOpUpdateLocationEfs) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateLocationEfs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLocationEfs(response, &metadata) + } + output := &UpdateLocationEfsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateLocationEfsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateLocationEfs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalException", errorCode): + return awsAwsjson11_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateLocationFsxLustre struct { +} + +func (*awsAwsjson11_deserializeOpUpdateLocationFsxLustre) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateLocationFsxLustre) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLocationFsxLustre(response, &metadata) + } + output := &UpdateLocationFsxLustreOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateLocationFsxLustreOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateLocationFsxLustre(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalException", errorCode): + return awsAwsjson11_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateLocationFsxOntap struct { +} + +func (*awsAwsjson11_deserializeOpUpdateLocationFsxOntap) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateLocationFsxOntap) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLocationFsxOntap(response, &metadata) + } + output := &UpdateLocationFsxOntapOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateLocationFsxOntapOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateLocationFsxOntap(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalException", errorCode): + return awsAwsjson11_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateLocationFsxOpenZfs struct { +} + +func (*awsAwsjson11_deserializeOpUpdateLocationFsxOpenZfs) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateLocationFsxOpenZfs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLocationFsxOpenZfs(response, &metadata) + } + output := &UpdateLocationFsxOpenZfsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateLocationFsxOpenZfsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateLocationFsxOpenZfs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalException", errorCode): + return awsAwsjson11_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateLocationFsxWindows struct { +} + +func (*awsAwsjson11_deserializeOpUpdateLocationFsxWindows) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateLocationFsxWindows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLocationFsxWindows(response, &metadata) + } + output := &UpdateLocationFsxWindowsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateLocationFsxWindowsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateLocationFsxWindows(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalException", errorCode): + return awsAwsjson11_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpUpdateLocationHdfs struct { } -func (*awsAwsjson11_deserializeOpUpdateLocationHdfs) ID() string { +func (*awsAwsjson11_deserializeOpUpdateLocationHdfs) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateLocationHdfs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLocationHdfs(response, &metadata) + } + output := &UpdateLocationHdfsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateLocationHdfsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateLocationHdfs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalException", errorCode): + return awsAwsjson11_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateLocationNfs struct { +} + +func (*awsAwsjson11_deserializeOpUpdateLocationNfs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateLocationHdfs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateLocationNfs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6098,9 +6782,9 @@ func (m *awsAwsjson11_deserializeOpUpdateLocationHdfs) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLocationHdfs(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLocationNfs(response, &metadata) } - output := &UpdateLocationHdfsOutput{} + output := &UpdateLocationNfsOutput{} out.Result = output var buff [1024]byte @@ -6120,7 +6804,7 @@ func (m *awsAwsjson11_deserializeOpUpdateLocationHdfs) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateLocationHdfsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateLocationNfsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6134,7 +6818,7 @@ func (m *awsAwsjson11_deserializeOpUpdateLocationHdfs) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateLocationHdfs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateLocationNfs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6187,14 +6871,14 @@ func awsAwsjson11_deserializeOpErrorUpdateLocationHdfs(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpUpdateLocationNfs struct { +type awsAwsjson11_deserializeOpUpdateLocationObjectStorage struct { } -func (*awsAwsjson11_deserializeOpUpdateLocationNfs) ID() string { +func (*awsAwsjson11_deserializeOpUpdateLocationObjectStorage) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateLocationNfs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateLocationObjectStorage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6212,9 +6896,9 @@ func (m *awsAwsjson11_deserializeOpUpdateLocationNfs) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLocationNfs(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLocationObjectStorage(response, &metadata) } - output := &UpdateLocationNfsOutput{} + output := &UpdateLocationObjectStorageOutput{} out.Result = output var buff [1024]byte @@ -6234,7 +6918,7 @@ func (m *awsAwsjson11_deserializeOpUpdateLocationNfs) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateLocationNfsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateLocationObjectStorageOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6248,7 +6932,7 @@ func (m *awsAwsjson11_deserializeOpUpdateLocationNfs) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateLocationNfs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateLocationObjectStorage(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6301,14 +6985,14 @@ func awsAwsjson11_deserializeOpErrorUpdateLocationNfs(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpUpdateLocationObjectStorage struct { +type awsAwsjson11_deserializeOpUpdateLocationS3 struct { } -func (*awsAwsjson11_deserializeOpUpdateLocationObjectStorage) ID() string { +func (*awsAwsjson11_deserializeOpUpdateLocationS3) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateLocationObjectStorage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateLocationS3) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6326,9 +7010,9 @@ func (m *awsAwsjson11_deserializeOpUpdateLocationObjectStorage) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLocationObjectStorage(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLocationS3(response, &metadata) } - output := &UpdateLocationObjectStorageOutput{} + output := &UpdateLocationS3Output{} out.Result = output var buff [1024]byte @@ -6348,7 +7032,7 @@ func (m *awsAwsjson11_deserializeOpUpdateLocationObjectStorage) HandleDeserializ return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateLocationObjectStorageOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateLocationS3Output(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6362,7 +7046,7 @@ func (m *awsAwsjson11_deserializeOpUpdateLocationObjectStorage) HandleDeserializ return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateLocationObjectStorage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateLocationS3(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14807,6 +15491,161 @@ func awsAwsjson11_deserializeOpDocumentUpdateLocationAzureBlobOutput(v **UpdateL return nil } +func awsAwsjson11_deserializeOpDocumentUpdateLocationEfsOutput(v **UpdateLocationEfsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateLocationEfsOutput + if *v == nil { + sv = &UpdateLocationEfsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateLocationFsxLustreOutput(v **UpdateLocationFsxLustreOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateLocationFsxLustreOutput + if *v == nil { + sv = &UpdateLocationFsxLustreOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateLocationFsxOntapOutput(v **UpdateLocationFsxOntapOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateLocationFsxOntapOutput + if *v == nil { + sv = &UpdateLocationFsxOntapOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateLocationFsxOpenZfsOutput(v **UpdateLocationFsxOpenZfsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateLocationFsxOpenZfsOutput + if *v == nil { + sv = &UpdateLocationFsxOpenZfsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateLocationFsxWindowsOutput(v **UpdateLocationFsxWindowsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateLocationFsxWindowsOutput + if *v == nil { + sv = &UpdateLocationFsxWindowsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentUpdateLocationHdfsOutput(v **UpdateLocationHdfsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14900,6 +15739,37 @@ func awsAwsjson11_deserializeOpDocumentUpdateLocationObjectStorageOutput(v **Upd return nil } +func awsAwsjson11_deserializeOpDocumentUpdateLocationS3Output(v **UpdateLocationS3Output, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateLocationS3Output + if *v == nil { + sv = &UpdateLocationS3Output{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentUpdateLocationSmbOutput(v **UpdateLocationSmbOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/datasync/generated.json b/service/datasync/generated.json index 69e02523087..1c86a23a750 100644 --- a/service/datasync/generated.json +++ b/service/datasync/generated.json @@ -61,9 +61,15 @@ "api_op_UpdateAgent.go", "api_op_UpdateDiscoveryJob.go", "api_op_UpdateLocationAzureBlob.go", + "api_op_UpdateLocationEfs.go", + "api_op_UpdateLocationFsxLustre.go", + "api_op_UpdateLocationFsxOntap.go", + "api_op_UpdateLocationFsxOpenZfs.go", + "api_op_UpdateLocationFsxWindows.go", "api_op_UpdateLocationHdfs.go", "api_op_UpdateLocationNfs.go", "api_op_UpdateLocationObjectStorage.go", + "api_op_UpdateLocationS3.go", "api_op_UpdateLocationSmb.go", "api_op_UpdateStorageSystem.go", "api_op_UpdateTask.go", diff --git a/service/datasync/internal/endpoints/endpoints.go b/service/datasync/internal/endpoints/endpoints.go index 25a0a90809d..14d3db3c1de 100644 --- a/service/datasync/internal/endpoints/endpoints.go +++ b/service/datasync/internal/endpoints/endpoints.go @@ -142,39 +142,111 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "af-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "af-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.af-south-1.api.aws", + }, endpoints.EndpointKey{ Region: "ap-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.ap-east-1.api.aws", + }, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.ap-northeast-1.api.aws", + }, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.ap-northeast-2.api.aws", + }, endpoints.EndpointKey{ Region: "ap-northeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.ap-northeast-3.api.aws", + }, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.ap-south-1.api.aws", + }, endpoints.EndpointKey{ Region: "ap-south-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.ap-south-2.api.aws", + }, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.ap-southeast-1.api.aws", + }, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.ap-southeast-2.api.aws", + }, endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.ap-southeast-3.api.aws", + }, endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.ap-southeast-4.api.aws", + }, endpoints.EndpointKey{ Region: "ap-southeast-5", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.ap-southeast-5.api.aws", + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, @@ -184,6 +256,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "datasync-fips.ca-central-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "datasync-fips.ca-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.ca-central-1.api.aws", + }, endpoints.EndpointKey{ Region: "ca-west-1", }: endpoints.Endpoint{}, @@ -193,30 +277,90 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "datasync-fips.ca-west-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "datasync-fips.ca-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.ca-west-1.api.aws", + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.eu-central-1.api.aws", + }, endpoints.EndpointKey{ Region: "eu-central-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.eu-central-2.api.aws", + }, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-north-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.eu-north-1.api.aws", + }, endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.eu-south-1.api.aws", + }, endpoints.EndpointKey{ Region: "eu-south-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.eu-south-2.api.aws", + }, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.eu-west-1.api.aws", + }, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.eu-west-2.api.aws", + }, endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.eu-west-3.api.aws", + }, endpoints.EndpointKey{ Region: "fips-ca-central-1", }: endpoints.Endpoint{ @@ -274,15 +418,39 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "il-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "il-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.il-central-1.api.aws", + }, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.me-central-1.api.aws", + }, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.me-south-1.api.aws", + }, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "sa-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.sa-east-1.api.aws", + }, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, @@ -292,6 +460,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "datasync-fips.us-east-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "datasync-fips.us-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.us-east-1.api.aws", + }, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, @@ -301,6 +481,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "datasync-fips.us-east-2.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "datasync-fips.us-east-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.us-east-2.api.aws", + }, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{}, @@ -310,6 +502,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "datasync-fips.us-west-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "datasync-fips.us-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.us-west-1.api.aws", + }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, @@ -319,6 +523,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "datasync-fips.us-west-2.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "datasync-fips.us-west-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.us-west-2.api.aws", + }, }, }, { @@ -359,9 +575,21 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "cn-north-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-north-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.cn-north-1.api.amazonwebservices.com.cn", + }, endpoints.EndpointKey{ Region: "cn-northwest-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-northwest-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.cn-northwest-1.api.amazonwebservices.com.cn", + }, }, }, { @@ -548,6 +776,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "datasync-fips.us-gov-east-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "datasync-fips.us-gov-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.us-gov-east-1.api.aws", + }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{}, @@ -557,6 +797,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "datasync-fips.us-gov-west-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "datasync-fips.us-gov-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "datasync.us-gov-west-1.api.aws", + }, }, }, } diff --git a/service/datasync/serializers.go b/service/datasync/serializers.go index 35f1b15f2b7..2b858def885 100644 --- a/service/datasync/serializers.go +++ b/service/datasync/serializers.go @@ -3250,6 +3250,311 @@ func (m *awsAwsjson11_serializeOpUpdateLocationAzureBlob) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpUpdateLocationEfs struct { +} + +func (*awsAwsjson11_serializeOpUpdateLocationEfs) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateLocationEfs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateLocationEfsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("FmrsService.UpdateLocationEfs") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateLocationEfsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateLocationFsxLustre struct { +} + +func (*awsAwsjson11_serializeOpUpdateLocationFsxLustre) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateLocationFsxLustre) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateLocationFsxLustreInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("FmrsService.UpdateLocationFsxLustre") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateLocationFsxLustreInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateLocationFsxOntap struct { +} + +func (*awsAwsjson11_serializeOpUpdateLocationFsxOntap) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateLocationFsxOntap) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateLocationFsxOntapInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("FmrsService.UpdateLocationFsxOntap") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateLocationFsxOntapInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateLocationFsxOpenZfs struct { +} + +func (*awsAwsjson11_serializeOpUpdateLocationFsxOpenZfs) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateLocationFsxOpenZfs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateLocationFsxOpenZfsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("FmrsService.UpdateLocationFsxOpenZfs") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateLocationFsxOpenZfsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateLocationFsxWindows struct { +} + +func (*awsAwsjson11_serializeOpUpdateLocationFsxWindows) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateLocationFsxWindows) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateLocationFsxWindowsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("FmrsService.UpdateLocationFsxWindows") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateLocationFsxWindowsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpUpdateLocationHdfs struct { } @@ -3433,6 +3738,67 @@ func (m *awsAwsjson11_serializeOpUpdateLocationObjectStorage) HandleSerialize(ct return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpUpdateLocationS3 struct { +} + +func (*awsAwsjson11_serializeOpUpdateLocationS3) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateLocationS3) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateLocationS3Input) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("FmrsService.UpdateLocationS3") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateLocationS3Input(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpUpdateLocationSmb struct { } @@ -3890,6 +4256,56 @@ func awsAwsjson11_serializeDocumentFsxProtocolSmb(v *types.FsxProtocolSmb, value return nil } +func awsAwsjson11_serializeDocumentFsxUpdateProtocol(v *types.FsxUpdateProtocol, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NFS != nil { + ok := object.Key("NFS") + if err := awsAwsjson11_serializeDocumentFsxProtocolNfs(v.NFS, ok); err != nil { + return err + } + } + + if v.SMB != nil { + ok := object.Key("SMB") + if err := awsAwsjson11_serializeDocumentFsxUpdateProtocolSmb(v.SMB, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentFsxUpdateProtocolSmb(v *types.FsxUpdateProtocolSmb, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Domain != nil { + ok := object.Key("Domain") + ok.String(*v.Domain) + } + + if v.MountOptions != nil { + ok := object.Key("MountOptions") + if err := awsAwsjson11_serializeDocumentSmbMountOptions(v.MountOptions, ok); err != nil { + return err + } + } + + if v.Password != nil { + ok := object.Key("Password") + ok.String(*v.Password) + } + + if v.User != nil { + ok := object.Key("User") + ok.String(*v.User) + } + + return nil +} + func awsAwsjson11_serializeDocumentHdfsNameNode(v *types.HdfsNameNode, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5860,6 +6276,135 @@ func awsAwsjson11_serializeOpDocumentUpdateLocationAzureBlobInput(v *UpdateLocat return nil } +func awsAwsjson11_serializeOpDocumentUpdateLocationEfsInput(v *UpdateLocationEfsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessPointArn != nil { + ok := object.Key("AccessPointArn") + ok.String(*v.AccessPointArn) + } + + if v.FileSystemAccessRoleArn != nil { + ok := object.Key("FileSystemAccessRoleArn") + ok.String(*v.FileSystemAccessRoleArn) + } + + if len(v.InTransitEncryption) > 0 { + ok := object.Key("InTransitEncryption") + ok.String(string(v.InTransitEncryption)) + } + + if v.LocationArn != nil { + ok := object.Key("LocationArn") + ok.String(*v.LocationArn) + } + + if v.Subdirectory != nil { + ok := object.Key("Subdirectory") + ok.String(*v.Subdirectory) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateLocationFsxLustreInput(v *UpdateLocationFsxLustreInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LocationArn != nil { + ok := object.Key("LocationArn") + ok.String(*v.LocationArn) + } + + if v.Subdirectory != nil { + ok := object.Key("Subdirectory") + ok.String(*v.Subdirectory) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateLocationFsxOntapInput(v *UpdateLocationFsxOntapInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LocationArn != nil { + ok := object.Key("LocationArn") + ok.String(*v.LocationArn) + } + + if v.Protocol != nil { + ok := object.Key("Protocol") + if err := awsAwsjson11_serializeDocumentFsxUpdateProtocol(v.Protocol, ok); err != nil { + return err + } + } + + if v.Subdirectory != nil { + ok := object.Key("Subdirectory") + ok.String(*v.Subdirectory) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateLocationFsxOpenZfsInput(v *UpdateLocationFsxOpenZfsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LocationArn != nil { + ok := object.Key("LocationArn") + ok.String(*v.LocationArn) + } + + if v.Protocol != nil { + ok := object.Key("Protocol") + if err := awsAwsjson11_serializeDocumentFsxProtocol(v.Protocol, ok); err != nil { + return err + } + } + + if v.Subdirectory != nil { + ok := object.Key("Subdirectory") + ok.String(*v.Subdirectory) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateLocationFsxWindowsInput(v *UpdateLocationFsxWindowsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Domain != nil { + ok := object.Key("Domain") + ok.String(*v.Domain) + } + + if v.LocationArn != nil { + ok := object.Key("LocationArn") + ok.String(*v.LocationArn) + } + + if v.Password != nil { + ok := object.Key("Password") + ok.String(*v.Password) + } + + if v.Subdirectory != nil { + ok := object.Key("Subdirectory") + ok.String(*v.Subdirectory) + } + + if v.User != nil { + ok := object.Key("User") + ok.String(*v.User) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentUpdateLocationHdfsInput(v *UpdateLocationHdfsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6018,6 +6563,35 @@ func awsAwsjson11_serializeOpDocumentUpdateLocationObjectStorageInput(v *UpdateL return nil } +func awsAwsjson11_serializeOpDocumentUpdateLocationS3Input(v *UpdateLocationS3Input, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LocationArn != nil { + ok := object.Key("LocationArn") + ok.String(*v.LocationArn) + } + + if v.S3Config != nil { + ok := object.Key("S3Config") + if err := awsAwsjson11_serializeDocumentS3Config(v.S3Config, ok); err != nil { + return err + } + } + + if len(v.S3StorageClass) > 0 { + ok := object.Key("S3StorageClass") + ok.String(string(v.S3StorageClass)) + } + + if v.Subdirectory != nil { + ok := object.Key("Subdirectory") + ok.String(*v.Subdirectory) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentUpdateLocationSmbInput(v *UpdateLocationSmbInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/datasync/snapshot/api_op_UpdateLocationEfs.go.snap b/service/datasync/snapshot/api_op_UpdateLocationEfs.go.snap new file mode 100644 index 00000000000..5d2a076ca23 --- /dev/null +++ b/service/datasync/snapshot/api_op_UpdateLocationEfs.go.snap @@ -0,0 +1,41 @@ +UpdateLocationEfs + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datasync/snapshot/api_op_UpdateLocationFsxLustre.go.snap b/service/datasync/snapshot/api_op_UpdateLocationFsxLustre.go.snap new file mode 100644 index 00000000000..67818cdf6e2 --- /dev/null +++ b/service/datasync/snapshot/api_op_UpdateLocationFsxLustre.go.snap @@ -0,0 +1,41 @@ +UpdateLocationFsxLustre + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datasync/snapshot/api_op_UpdateLocationFsxOntap.go.snap b/service/datasync/snapshot/api_op_UpdateLocationFsxOntap.go.snap new file mode 100644 index 00000000000..5331b8f068b --- /dev/null +++ b/service/datasync/snapshot/api_op_UpdateLocationFsxOntap.go.snap @@ -0,0 +1,41 @@ +UpdateLocationFsxOntap + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datasync/snapshot/api_op_UpdateLocationFsxOpenZfs.go.snap b/service/datasync/snapshot/api_op_UpdateLocationFsxOpenZfs.go.snap new file mode 100644 index 00000000000..f73de51cb3d --- /dev/null +++ b/service/datasync/snapshot/api_op_UpdateLocationFsxOpenZfs.go.snap @@ -0,0 +1,41 @@ +UpdateLocationFsxOpenZfs + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datasync/snapshot/api_op_UpdateLocationFsxWindows.go.snap b/service/datasync/snapshot/api_op_UpdateLocationFsxWindows.go.snap new file mode 100644 index 00000000000..2bd8fd1418e --- /dev/null +++ b/service/datasync/snapshot/api_op_UpdateLocationFsxWindows.go.snap @@ -0,0 +1,41 @@ +UpdateLocationFsxWindows + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datasync/snapshot/api_op_UpdateLocationS3.go.snap b/service/datasync/snapshot/api_op_UpdateLocationS3.go.snap new file mode 100644 index 00000000000..04acf231226 --- /dev/null +++ b/service/datasync/snapshot/api_op_UpdateLocationS3.go.snap @@ -0,0 +1,41 @@ +UpdateLocationS3 + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datasync/snapshot_test.go b/service/datasync/snapshot_test.go index 06e010cb17c..4b2c00ec4a7 100644 --- a/service/datasync/snapshot_test.go +++ b/service/datasync/snapshot_test.go @@ -698,6 +698,66 @@ func TestCheckSnapshot_UpdateLocationAzureBlob(t *testing.T) { } } +func TestCheckSnapshot_UpdateLocationEfs(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateLocationEfs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateLocationEfs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateLocationFsxLustre(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateLocationFsxLustre(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateLocationFsxLustre") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateLocationFsxOntap(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateLocationFsxOntap(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateLocationFsxOntap") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateLocationFsxOpenZfs(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateLocationFsxOpenZfs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateLocationFsxOpenZfs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateLocationFsxWindows(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateLocationFsxWindows(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateLocationFsxWindows") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateLocationHdfs(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateLocationHdfs(context.Background(), nil, func(o *Options) { @@ -734,6 +794,18 @@ func TestCheckSnapshot_UpdateLocationObjectStorage(t *testing.T) { } } +func TestCheckSnapshot_UpdateLocationS3(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateLocationS3(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateLocationS3") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateLocationSmb(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateLocationSmb(context.Background(), nil, func(o *Options) { @@ -1417,6 +1489,66 @@ func TestUpdateSnapshot_UpdateLocationAzureBlob(t *testing.T) { } } +func TestUpdateSnapshot_UpdateLocationEfs(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateLocationEfs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateLocationEfs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateLocationFsxLustre(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateLocationFsxLustre(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateLocationFsxLustre") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateLocationFsxOntap(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateLocationFsxOntap(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateLocationFsxOntap") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateLocationFsxOpenZfs(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateLocationFsxOpenZfs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateLocationFsxOpenZfs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateLocationFsxWindows(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateLocationFsxWindows(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateLocationFsxWindows") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateLocationHdfs(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateLocationHdfs(context.Background(), nil, func(o *Options) { @@ -1453,6 +1585,18 @@ func TestUpdateSnapshot_UpdateLocationObjectStorage(t *testing.T) { } } +func TestUpdateSnapshot_UpdateLocationS3(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateLocationS3(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateLocationS3") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateLocationSmb(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateLocationSmb(context.Background(), nil, func(o *Options) { diff --git a/service/datasync/types/types.go b/service/datasync/types/types.go index 7f739da807b..3e79414d1a3 100644 --- a/service/datasync/types/types.go +++ b/service/datasync/types/types.go @@ -194,8 +194,8 @@ type FsxProtocol struct { } // 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. +// uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's +// storage virtual machine (SVM). type FsxProtocolNfs struct { // Specifies how DataSync can access a location using the NFS protocol. @@ -205,10 +205,10 @@ type FsxProtocolNfs struct { } // 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]. +// 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]. // -// [Accessing FSx for ONTAP file systems]: https://docs.aws.amazon.com/datasync/latest/userguide/create-ontap-location.html#create-ontap-location-access +// [Providing DataSync access to FSx for ONTAP file systems]: https://docs.aws.amazon.com/datasync/latest/userguide/create-ontap-location.html#create-ontap-location-access type FsxProtocolSmb struct { // Specifies the password of a user who has permission to access your SVM. @@ -227,17 +227,73 @@ type FsxProtocolSmb struct { // This member is required. User *string - // 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. + Domain *string + + // Specifies the version of the Server Message Block (SMB) protocol that DataSync + // uses to access an SMB file server. + MountOptions *SmbMountOptions + + noSmithyDocumentSerde +} + +// 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. +type FsxUpdateProtocol struct { + + // 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). + NFS *FsxProtocolNfs + + // Specifies the Server Message Block (SMB) protocol configuration that DataSync + // uses to access your FSx for ONTAP file system's storage virtual machine (SVM). + SMB *FsxUpdateProtocolSmb + + noSmithyDocumentSerde +} + +// 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]. +// +// [Providing DataSync access to FSx for ONTAP file systems]: https://docs.aws.amazon.com/datasync/latest/userguide/create-ontap-location.html#create-ontap-location-access +type FsxUpdateProtocolSmb struct { + + // 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. Domain *string // Specifies the version of the Server Message Block (SMB) protocol that DataSync // uses to access an SMB file server. MountOptions *SmbMountOptions + // Specifies the password of a user who has permission to access your SVM. + Password *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]. + // + // [Using the SMB protocol]: https://docs.aws.amazon.com/datasync/latest/userguide/create-ontap-location.html#create-ontap-location-smb + User *string + noSmithyDocumentSerde } @@ -1143,9 +1199,9 @@ type ResourceMetrics struct { // 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]. // -// [Accessing S3 buckets]: https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#create-s3-location-access +// [Providing DataSync access to S3 buckets]: https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#create-s3-location-access type S3Config struct { // Specifies the ARN of the IAM role that DataSync uses to access your S3 bucket. diff --git a/service/datasync/validators.go b/service/datasync/validators.go index 9e66480f7fc..53d0e584ed0 100644 --- a/service/datasync/validators.go +++ b/service/datasync/validators.go @@ -990,6 +990,106 @@ func (m *validateOpUpdateLocationAzureBlob) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpUpdateLocationEfs struct { +} + +func (*validateOpUpdateLocationEfs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLocationEfs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLocationEfsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLocationEfsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateLocationFsxLustre struct { +} + +func (*validateOpUpdateLocationFsxLustre) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLocationFsxLustre) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLocationFsxLustreInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLocationFsxLustreInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateLocationFsxOntap struct { +} + +func (*validateOpUpdateLocationFsxOntap) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLocationFsxOntap) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLocationFsxOntapInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLocationFsxOntapInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateLocationFsxOpenZfs struct { +} + +func (*validateOpUpdateLocationFsxOpenZfs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLocationFsxOpenZfs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLocationFsxOpenZfsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLocationFsxOpenZfsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateLocationFsxWindows struct { +} + +func (*validateOpUpdateLocationFsxWindows) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLocationFsxWindows) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLocationFsxWindowsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLocationFsxWindowsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateLocationHdfs struct { } @@ -1050,6 +1150,26 @@ func (m *validateOpUpdateLocationObjectStorage) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpUpdateLocationS3 struct { +} + +func (*validateOpUpdateLocationS3) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLocationS3) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLocationS3Input) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLocationS3Input(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateLocationSmb struct { } @@ -1326,6 +1446,26 @@ func addOpUpdateLocationAzureBlobValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpUpdateLocationAzureBlob{}, middleware.After) } +func addOpUpdateLocationEfsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLocationEfs{}, middleware.After) +} + +func addOpUpdateLocationFsxLustreValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLocationFsxLustre{}, middleware.After) +} + +func addOpUpdateLocationFsxOntapValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLocationFsxOntap{}, middleware.After) +} + +func addOpUpdateLocationFsxOpenZfsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLocationFsxOpenZfs{}, middleware.After) +} + +func addOpUpdateLocationFsxWindowsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLocationFsxWindows{}, middleware.After) +} + func addOpUpdateLocationHdfsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateLocationHdfs{}, middleware.After) } @@ -1338,6 +1478,10 @@ func addOpUpdateLocationObjectStorageValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpUpdateLocationObjectStorage{}, middleware.After) } +func addOpUpdateLocationS3ValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLocationS3{}, middleware.After) +} + func addOpUpdateLocationSmbValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateLocationSmb{}, middleware.After) } @@ -2753,6 +2897,86 @@ func validateOpUpdateLocationAzureBlobInput(v *UpdateLocationAzureBlobInput) err } } +func validateOpUpdateLocationEfsInput(v *UpdateLocationEfsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLocationEfsInput"} + if v.LocationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LocationArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateLocationFsxLustreInput(v *UpdateLocationFsxLustreInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLocationFsxLustreInput"} + if v.LocationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LocationArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateLocationFsxOntapInput(v *UpdateLocationFsxOntapInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLocationFsxOntapInput"} + if v.LocationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LocationArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateLocationFsxOpenZfsInput(v *UpdateLocationFsxOpenZfsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLocationFsxOpenZfsInput"} + if v.LocationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LocationArn")) + } + if v.Protocol != nil { + if err := validateFsxProtocol(v.Protocol); err != nil { + invalidParams.AddNested("Protocol", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateLocationFsxWindowsInput(v *UpdateLocationFsxWindowsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLocationFsxWindowsInput"} + if v.LocationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LocationArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateLocationHdfsInput(v *UpdateLocationHdfsInput) error { if v == nil { return nil @@ -2808,6 +3032,26 @@ func validateOpUpdateLocationObjectStorageInput(v *UpdateLocationObjectStorageIn } } +func validateOpUpdateLocationS3Input(v *UpdateLocationS3Input) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLocationS3Input"} + if v.LocationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LocationArn")) + } + if v.S3Config != nil { + if err := validateS3Config(v.S3Config); err != nil { + invalidParams.AddNested("S3Config", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateLocationSmbInput(v *UpdateLocationSmbInput) error { if v == nil { return nil diff --git a/service/iot/api_op_CreateCommand.go b/service/iot/api_op_CreateCommand.go index f04616e1bfd..9b9892a2640 100644 --- a/service/iot/api_op_CreateCommand.go +++ b/service/iot/api_op_CreateCommand.go @@ -62,7 +62,10 @@ type CreateCommandInput struct { // specify the payload content type. Payload *types.CommandPayload - // 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. RoleArn *string // Name-value pairs that are used as metadata to manage a command. diff --git a/service/iot/api_op_GetCommand.go b/service/iot/api_op_GetCommand.go index a035fb5b47a..33f5e788be6 100644 --- a/service/iot/api_op_GetCommand.go +++ b/service/iot/api_op_GetCommand.go @@ -74,7 +74,8 @@ type GetCommandOutput struct { // Indicates whether the command is being deleted. PendingDeletion *bool - // 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. RoleArn *string // Metadata pertaining to the operation's result. diff --git a/service/iot/api_op_GetCommandExecution.go b/service/iot/api_op_GetCommandExecution.go index ac798f7fb3e..393c3072a54 100644 --- a/service/iot/api_op_GetCommandExecution.go +++ b/service/iot/api_op_GetCommandExecution.go @@ -104,7 +104,8 @@ type GetCommandExecutionOutput struct { // is being performed. TargetArn *string - // 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. TimeToLive *time.Time // Metadata pertaining to the operation's result. diff --git a/service/iot/api_op_GetThingConnectivityData.go b/service/iot/api_op_GetThingConnectivityData.go new file mode 100644 index 00000000000..b92fe445293 --- /dev/null +++ b/service/iot/api_op_GetThingConnectivityData.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iot + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iot/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves the live connectivity status per device. +func (c *Client) GetThingConnectivityData(ctx context.Context, params *GetThingConnectivityDataInput, optFns ...func(*Options)) (*GetThingConnectivityDataOutput, error) { + if params == nil { + params = &GetThingConnectivityDataInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetThingConnectivityData", params, optFns, c.addOperationGetThingConnectivityDataMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetThingConnectivityDataOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetThingConnectivityDataInput struct { + + // The name of your IoT thing. + // + // This member is required. + ThingName *string + + noSmithyDocumentSerde +} + +type GetThingConnectivityDataOutput struct { + + // A Boolean that indicates the connectivity status. + Connected *bool + + // The reason why the client is disconnecting. + DisconnectReason types.DisconnectReasonValue + + // The name of your IoT thing. + ThingName *string + + // The timestamp of when the event occurred. + Timestamp *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetThingConnectivityDataMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetThingConnectivityData{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetThingConnectivityData{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetThingConnectivityData"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetThingConnectivityDataValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetThingConnectivityData(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetThingConnectivityData(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetThingConnectivityData", + } +} diff --git a/service/iot/api_op_ListCommandExecutions.go b/service/iot/api_op_ListCommandExecutions.go index a7a45dbd9b2..cf64f91f461 100644 --- a/service/iot/api_op_ListCommandExecutions.go +++ b/service/iot/api_op_ListCommandExecutions.go @@ -13,10 +13,18 @@ import ( // 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)]. +// +// [List command executions in your account (CLI)]: https://docs.aws.amazon.com/iot/latest/developerguide/iot-remote-command-execution-start-monitor.html#iot-remote-command-execution-list-cli func (c *Client) ListCommandExecutions(ctx context.Context, params *ListCommandExecutionsInput, optFns ...func(*Options)) (*ListCommandExecutionsOutput, error) { if params == nil { params = &ListCommandExecutionsInput{} diff --git a/service/iot/deserializers.go b/service/iot/deserializers.go index 208f0ca3f6d..56938f0c524 100644 --- a/service/iot/deserializers.go +++ b/service/iot/deserializers.go @@ -23133,6 +23133,214 @@ func awsRestjson1_deserializeOpDocumentGetStatisticsOutput(v **GetStatisticsOutp return nil } +type awsRestjson1_deserializeOpGetThingConnectivityData struct { +} + +func (*awsRestjson1_deserializeOpGetThingConnectivityData) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetThingConnectivityData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetThingConnectivityData(response, &metadata) + } + output := &GetThingConnectivityDataOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetThingConnectivityDataOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetThingConnectivityData(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("IndexNotReadyException", errorCode): + return awsRestjson1_deserializeErrorIndexNotReadyException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetThingConnectivityDataOutput(v **GetThingConnectivityDataOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetThingConnectivityDataOutput + if *v == nil { + sv = &GetThingConnectivityDataOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "connected": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Connected = ptr.Bool(jtv) + } + + case "disconnectReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DisconnectReasonValue to be of type string, got %T instead", value) + } + sv.DisconnectReason = types.DisconnectReasonValue(jtv) + } + + case "thingName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectivityApiThingName to be of type string, got %T instead", value) + } + sv.ThingName = ptr.String(jtv) + } + + case "timestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Timestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetTopicRule struct { } diff --git a/service/iot/generated.json b/service/iot/generated.json index b6427d91c0f..18bda9868d7 100644 --- a/service/iot/generated.json +++ b/service/iot/generated.json @@ -153,6 +153,7 @@ "api_op_GetPolicyVersion.go", "api_op_GetRegistrationCode.go", "api_op_GetStatistics.go", + "api_op_GetThingConnectivityData.go", "api_op_GetTopicRule.go", "api_op_GetTopicRuleDestination.go", "api_op_GetV2LoggingOptions.go", diff --git a/service/iot/serializers.go b/service/iot/serializers.go index 56e1a365473..b5a52d443b6 100644 --- a/service/iot/serializers.go +++ b/service/iot/serializers.go @@ -12276,6 +12276,77 @@ func awsRestjson1_serializeOpDocumentGetStatisticsInput(v *GetStatisticsInput, v return nil } +type awsRestjson1_serializeOpGetThingConnectivityData struct { +} + +func (*awsRestjson1_serializeOpGetThingConnectivityData) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetThingConnectivityData) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetThingConnectivityDataInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/things/{thingName}/connectivity-data") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetThingConnectivityDataInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetThingConnectivityDataInput(v *GetThingConnectivityDataInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ThingName == nil || len(*v.ThingName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member thingName must not be empty")} + } + if v.ThingName != nil { + if err := encoder.SetURI("thingName").String(*v.ThingName); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetTopicRule struct { } diff --git a/service/iot/snapshot/api_op_GetThingConnectivityData.go.snap b/service/iot/snapshot/api_op_GetThingConnectivityData.go.snap new file mode 100644 index 00000000000..6456540b229 --- /dev/null +++ b/service/iot/snapshot/api_op_GetThingConnectivityData.go.snap @@ -0,0 +1,41 @@ +GetThingConnectivityData + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/iot/snapshot_test.go b/service/iot/snapshot_test.go index a58d274958a..866a8999d33 100644 --- a/service/iot/snapshot_test.go +++ b/service/iot/snapshot_test.go @@ -1802,6 +1802,18 @@ func TestCheckSnapshot_GetStatistics(t *testing.T) { } } +func TestCheckSnapshot_GetThingConnectivityData(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetThingConnectivityData(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetThingConnectivityData") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetTopicRule(t *testing.T) { svc := New(Options{}) _, err := svc.GetTopicRule(context.Background(), nil, func(o *Options) { @@ -5029,6 +5041,18 @@ func TestUpdateSnapshot_GetStatistics(t *testing.T) { } } +func TestUpdateSnapshot_GetThingConnectivityData(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetThingConnectivityData(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetThingConnectivityData") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetTopicRule(t *testing.T) { svc := New(Options{}) _, err := svc.GetTopicRule(context.Background(), nil, func(o *Options) { diff --git a/service/iot/types/enums.go b/service/iot/types/enums.go index de96224adb7..9ae0f3db2f0 100644 --- a/service/iot/types/enums.go +++ b/service/iot/types/enums.go @@ -840,6 +840,49 @@ func (DimensionValueOperator) Values() []DimensionValueOperator { } } +type DisconnectReasonValue string + +// Enum values for DisconnectReasonValue +const ( + DisconnectReasonValueAuthError DisconnectReasonValue = "AUTH_ERROR" + DisconnectReasonValueClientInitiatedDisconnect DisconnectReasonValue = "CLIENT_INITIATED_DISCONNECT" + DisconnectReasonValueClientError DisconnectReasonValue = "CLIENT_ERROR" + DisconnectReasonValueConnectionLost DisconnectReasonValue = "CONNECTION_LOST" + DisconnectReasonValueDuplicateClientid DisconnectReasonValue = "DUPLICATE_CLIENTID" + DisconnectReasonValueForbiddenAccess DisconnectReasonValue = "FORBIDDEN_ACCESS" + DisconnectReasonValueMqttKeepAliveTimeout DisconnectReasonValue = "MQTT_KEEP_ALIVE_TIMEOUT" + DisconnectReasonValueServerError DisconnectReasonValue = "SERVER_ERROR" + DisconnectReasonValueServerInitiatedDisconnect DisconnectReasonValue = "SERVER_INITIATED_DISCONNECT" + DisconnectReasonValueThrottled DisconnectReasonValue = "THROTTLED" + DisconnectReasonValueWebsocketTtlExpiration DisconnectReasonValue = "WEBSOCKET_TTL_EXPIRATION" + DisconnectReasonValueCustomauthTtlExpiration DisconnectReasonValue = "CUSTOMAUTH_TTL_EXPIRATION" + DisconnectReasonValueUnknown DisconnectReasonValue = "UNKNOWN" + DisconnectReasonValueNone DisconnectReasonValue = "NONE" +) + +// Values returns all known values for DisconnectReasonValue. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DisconnectReasonValue) Values() []DisconnectReasonValue { + return []DisconnectReasonValue{ + "AUTH_ERROR", + "CLIENT_INITIATED_DISCONNECT", + "CLIENT_ERROR", + "CONNECTION_LOST", + "DUPLICATE_CLIENTID", + "FORBIDDEN_ACCESS", + "MQTT_KEEP_ALIVE_TIMEOUT", + "SERVER_ERROR", + "SERVER_INITIATED_DISCONNECT", + "THROTTLED", + "WEBSOCKET_TTL_EXPIRATION", + "CUSTOMAUTH_TTL_EXPIRATION", + "UNKNOWN", + "NONE", + } +} + type DomainConfigurationStatus string // Enum values for DomainConfigurationStatus diff --git a/service/iot/validators.go b/service/iot/validators.go index 84c2d361735..e84b2793c9e 100644 --- a/service/iot/validators.go +++ b/service/iot/validators.go @@ -2590,6 +2590,26 @@ func (m *validateOpGetStatistics) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpGetThingConnectivityData struct { +} + +func (*validateOpGetThingConnectivityData) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetThingConnectivityData) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetThingConnectivityDataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetThingConnectivityDataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetTopicRuleDestination struct { } @@ -4706,6 +4726,10 @@ func addOpGetStatisticsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetStatistics{}, middleware.After) } +func addOpGetThingConnectivityDataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetThingConnectivityData{}, middleware.After) +} + func addOpGetTopicRuleDestinationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetTopicRuleDestination{}, middleware.After) } @@ -9218,6 +9242,21 @@ func validateOpGetStatisticsInput(v *GetStatisticsInput) error { } } +func validateOpGetThingConnectivityDataInput(v *GetThingConnectivityDataInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetThingConnectivityDataInput"} + if v.ThingName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ThingName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetTopicRuleDestinationInput(v *GetTopicRuleDestinationInput) error { if v == nil { return nil diff --git a/service/kafka/internal/endpoints/endpoints.go b/service/kafka/internal/endpoints/endpoints.go index 3d9ac29bbe0..f3abb9b1213 100644 --- a/service/kafka/internal/endpoints/endpoints.go +++ b/service/kafka/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/mwaa/api_op_CreateEnvironment.go b/service/mwaa/api_op_CreateEnvironment.go index 9209c429716..9f4b2ee219e 100644 --- a/service/mwaa/api_op_CreateEnvironment.go +++ b/service/mwaa/api_op_CreateEnvironment.go @@ -87,7 +87,7 @@ type CreateEnvironmentInput struct { // 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 . + // 2.9.2 , 2.10.1 , and 2.10.3 . // // [Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA)]: https://docs.aws.amazon.com/mwaa/latest/userguide/airflow-versions.html AirflowVersion *string diff --git a/service/mwaa/api_op_UpdateEnvironment.go b/service/mwaa/api_op_UpdateEnvironment.go index b1bb592133b..ed1b03f36a6 100644 --- a/service/mwaa/api_op_UpdateEnvironment.go +++ b/service/mwaa/api_op_UpdateEnvironment.go @@ -48,7 +48,7 @@ type UpdateEnvironmentInput struct { // 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 . + // 2.9.2 , 2.10.1 , and 2.10.3 . // // [Upgrading an Amazon MWAA environment]: https://docs.aws.amazon.com/mwaa/latest/userguide/upgrading-environment.html AirflowVersion *string diff --git a/service/mwaa/types/types.go b/service/mwaa/types/types.go index 22e5111d4a4..ecd73012b7e 100644 --- a/service/mwaa/types/types.go +++ b/service/mwaa/types/types.go @@ -39,7 +39,7 @@ type Environment struct { // 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 . + // 2.9.2 , 2.10.1 , and 2.10.3 . AirflowVersion *string // The Amazon Resource Name (ARN) of the Amazon MWAA environment. diff --git a/service/quicksight/api_op_CreateDataSet.go b/service/quicksight/api_op_CreateDataSet.go index 8239889bdf0..db475933f70 100644 --- a/service/quicksight/api_op_CreateDataSet.go +++ b/service/quicksight/api_op_CreateDataSet.go @@ -83,6 +83,10 @@ type CreateDataSetInput struct { // tables. LogicalTableMap map[string]types.LogicalTable + // The configuration for the performance optimization of the dataset that contains + // a UniqueKey configuration. + PerformanceConfiguration *types.PerformanceConfiguration + // A list of resource permissions on the dataset. Permissions []types.ResourcePermission diff --git a/service/quicksight/api_op_UpdateDataSet.go b/service/quicksight/api_op_UpdateDataSet.go index 042a442a1a8..08c675ac5f3 100644 --- a/service/quicksight/api_op_UpdateDataSet.go +++ b/service/quicksight/api_op_UpdateDataSet.go @@ -79,6 +79,10 @@ type UpdateDataSetInput struct { // tables. LogicalTableMap map[string]types.LogicalTable + // The configuration for the performance optimization of the dataset that contains + // a UniqueKey configuration. + PerformanceConfiguration *types.PerformanceConfiguration + // The row-level security configuration for the data you want to create. RowLevelPermissionDataSet *types.RowLevelPermissionDataSet diff --git a/service/quicksight/deserializers.go b/service/quicksight/deserializers.go index ab433204c4a..8325619093a 100644 --- a/service/quicksight/deserializers.go +++ b/service/quicksight/deserializers.go @@ -58820,6 +58820,11 @@ func awsRestjson1_deserializeDocumentDataSet(v **types.DataSet, value interface{ return err } + case "PerformanceConfiguration": + if err := awsRestjson1_deserializeDocumentPerformanceConfiguration(&sv.PerformanceConfiguration, value); err != nil { + return err + } + case "PhysicalTableMap": if err := awsRestjson1_deserializeDocumentPhysicalTableMap(&sv.PhysicalTableMap, value); err != nil { return err @@ -81249,6 +81254,42 @@ func awsRestjson1_deserializeDocumentPercentVisibleRange(v **types.PercentVisibl return nil } +func awsRestjson1_deserializeDocumentPerformanceConfiguration(v **types.PerformanceConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PerformanceConfiguration + if *v == nil { + sv = &types.PerformanceConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "UniqueKeys": + if err := awsRestjson1_deserializeDocumentUniqueKeyList(&sv.UniqueKeys, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentPeriodOverPeriodComputation(v **types.PeriodOverPeriodComputation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -100857,6 +100898,112 @@ func awsRestjson1_deserializeDocumentUnaggregatedFieldList(v *[]types.Unaggregat return nil } +func awsRestjson1_deserializeDocumentUniqueKey(v **types.UniqueKey, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UniqueKey + if *v == nil { + sv = &types.UniqueKey{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ColumnNames": + if err := awsRestjson1_deserializeDocumentUniqueKeyColumnNameList(&sv.ColumnNames, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUniqueKeyColumnNameList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ColumnName to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentUniqueKeyList(v *[]types.UniqueKey, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.UniqueKey + if *v == nil { + cv = []types.UniqueKey{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UniqueKey + destAddr := &col + if err := awsRestjson1_deserializeDocumentUniqueKey(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentUniqueValuesComputation(v **types.UniqueValuesComputation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/quicksight/serializers.go b/service/quicksight/serializers.go index a9387a5a325..4e9eaef8336 100644 --- a/service/quicksight/serializers.go +++ b/service/quicksight/serializers.go @@ -1325,6 +1325,13 @@ func awsRestjson1_serializeOpDocumentCreateDataSetInput(v *CreateDataSetInput, v ok.String(*v.Name) } + if v.PerformanceConfiguration != nil { + ok := object.Key("PerformanceConfiguration") + if err := awsRestjson1_serializeDocumentPerformanceConfiguration(v.PerformanceConfiguration, ok); err != nil { + return err + } + } + if v.Permissions != nil { ok := object.Key("Permissions") if err := awsRestjson1_serializeDocumentResourcePermissionList(v.Permissions, ok); err != nil { @@ -17080,6 +17087,13 @@ func awsRestjson1_serializeOpDocumentUpdateDataSetInput(v *UpdateDataSetInput, v ok.String(*v.Name) } + if v.PerformanceConfiguration != nil { + ok := object.Key("PerformanceConfiguration") + if err := awsRestjson1_serializeDocumentPerformanceConfiguration(v.PerformanceConfiguration, ok); err != nil { + return err + } + } + if v.PhysicalTableMap != nil { ok := object.Key("PhysicalTableMap") if err := awsRestjson1_serializeDocumentPhysicalTableMap(v.PhysicalTableMap, ok); err != nil { @@ -36464,6 +36478,20 @@ func awsRestjson1_serializeDocumentPercentVisibleRange(v *types.PercentVisibleRa return nil } +func awsRestjson1_serializeDocumentPerformanceConfiguration(v *types.PerformanceConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.UniqueKeys != nil { + ok := object.Key("UniqueKeys") + if err := awsRestjson1_serializeDocumentUniqueKeyList(v.UniqueKeys, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentPeriodOverPeriodComputation(v *types.PeriodOverPeriodComputation, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -44835,6 +44863,44 @@ func awsRestjson1_serializeDocumentUnaggregatedFieldList(v []types.UnaggregatedF return nil } +func awsRestjson1_serializeDocumentUniqueKey(v *types.UniqueKey, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ColumnNames != nil { + ok := object.Key("ColumnNames") + if err := awsRestjson1_serializeDocumentUniqueKeyColumnNameList(v.ColumnNames, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentUniqueKeyColumnNameList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentUniqueKeyList(v []types.UniqueKey, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentUniqueKey(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentUniqueValuesComputation(v *types.UniqueValuesComputation, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/quicksight/types/types.go b/service/quicksight/types/types.go index eb85b5dddca..4c8c777cef5 100644 --- a/service/quicksight/types/types.go +++ b/service/quicksight/types/types.go @@ -4597,6 +4597,9 @@ type DataSet struct { // templates, analyses, and dashboards. OutputColumns []OutputColumn + // The performance optimization configuration of a dataset. + PerformanceConfiguration *PerformanceConfiguration + // Declares the physical tables that are available in the underlying data sources. PhysicalTableMap map[string]PhysicalTable @@ -11327,6 +11330,16 @@ type PercentVisibleRange struct { noSmithyDocumentSerde } +// The configuration for the performance optimization of the dataset that contains +// a UniqueKey configuration. +type PerformanceConfiguration struct { + + // A UniqueKey configuration. + UniqueKeys []UniqueKey + + noSmithyDocumentSerde +} + // The period over period computation configuration. type PeriodOverPeriodComputation struct { @@ -17286,6 +17299,17 @@ type UnaggregatedField struct { noSmithyDocumentSerde } +// A UniqueKey configuration that references a dataset column. +type UniqueKey struct { + + // The name of the column that is referenced in the UniqueKey configuration. + // + // This member is required. + ColumnNames []string + + noSmithyDocumentSerde +} + // The unique values computation configuration. type UniqueValuesComputation struct { diff --git a/service/quicksight/validators.go b/service/quicksight/validators.go index f37dbff2f39..67b465f0e37 100644 --- a/service/quicksight/validators.go +++ b/service/quicksight/validators.go @@ -15035,6 +15035,23 @@ func validatePercentageDisplayFormatConfiguration(v *types.PercentageDisplayForm } } +func validatePerformanceConfiguration(v *types.PerformanceConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PerformanceConfiguration"} + if v.UniqueKeys != nil { + if err := validateUniqueKeyList(v.UniqueKeys); err != nil { + invalidParams.AddNested("UniqueKeys", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validatePeriodOverPeriodComputation(v *types.PeriodOverPeriodComputation) error { if v == nil { return nil @@ -20039,6 +20056,38 @@ func validateUnaggregatedFieldList(v []types.UnaggregatedField) error { } } +func validateUniqueKey(v *types.UniqueKey) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UniqueKey"} + if v.ColumnNames == nil { + invalidParams.Add(smithy.NewErrParamRequired("ColumnNames")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateUniqueKeyList(v []types.UniqueKey) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UniqueKeyList"} + for i := range v { + if err := validateUniqueKey(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateUniqueValuesComputation(v *types.UniqueValuesComputation) error { if v == nil { return nil @@ -21057,6 +21106,11 @@ func validateOpCreateDataSetInput(v *CreateDataSetInput) error { invalidParams.AddNested("DatasetParameters", err.(smithy.InvalidParamsError)) } } + if v.PerformanceConfiguration != nil { + if err := validatePerformanceConfiguration(v.PerformanceConfiguration); err != nil { + invalidParams.AddNested("PerformanceConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -24561,6 +24615,11 @@ func validateOpUpdateDataSetInput(v *UpdateDataSetInput) error { invalidParams.AddNested("DatasetParameters", err.(smithy.InvalidParamsError)) } } + if v.PerformanceConfiguration != nil { + if err := validatePerformanceConfiguration(v.PerformanceConfiguration); err != nil { + invalidParams.AddNested("PerformanceConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/resiliencehub/deserializers.go b/service/resiliencehub/deserializers.go index 3917d92ed2b..c2bab0685aa 100644 --- a/service/resiliencehub/deserializers.go +++ b/service/resiliencehub/deserializers.go @@ -11520,6 +11520,55 @@ func awsRestjson1_deserializeDocumentAdditionalInfoValueList(v *[]string, value return nil } +func awsRestjson1_deserializeDocumentAlarm(v **types.Alarm, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Alarm + if *v == nil { + sv = &types.Alarm{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "alarmArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AlarmArn = ptr.String(jtv) + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAlarmRecommendation(v **types.AlarmRecommendation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13373,6 +13422,15 @@ func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusSuccessfulEn for key, value := range shape { switch key { + case "appComponentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName255 to be of type string, got %T instead", value) + } + sv.AppComponentId = ptr.String(jtv) + } + case "entryId": if value != nil { jtv, ok := value.(string) @@ -14535,6 +14593,55 @@ func awsRestjson1_deserializeDocumentEventSubscriptionList(v *[]types.EventSubsc return nil } +func awsRestjson1_deserializeDocumentExperiment(v **types.Experiment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Experiment + if *v == nil { + sv = &types.Experiment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "experimentArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + } + sv.ExperimentArn = ptr.String(jtv) + } + + case "experimentTemplateId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + } + sv.ExperimentTemplateId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentFailedGroupingRecommendationEntries(v *[]types.FailedGroupingRecommendationEntry, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15586,6 +15693,11 @@ func awsRestjson1_deserializeDocumentRecommendationItem(v **types.Recommendation sv.AlreadyImplemented = ptr.Bool(jtv) } + case "discoveredAlarm": + if err := awsRestjson1_deserializeDocumentAlarm(&sv.DiscoveredAlarm, value); err != nil { + return err + } + case "excluded": if value != nil { jtv, ok := value.(bool) @@ -15604,6 +15716,11 @@ func awsRestjson1_deserializeDocumentRecommendationItem(v **types.Recommendation sv.ExcludeReason = types.ExcludeRecommendationReason(jtv) } + case "latestDiscoveredExperiment": + if err := awsRestjson1_deserializeDocumentExperiment(&sv.LatestDiscoveredExperiment, value); err != nil { + return err + } + case "resourceId": if value != nil { jtv, ok := value.(string) @@ -17261,6 +17378,15 @@ func awsRestjson1_deserializeDocumentTestRecommendation(v **types.TestRecommenda for key, value := range shape { switch key { + case "appComponentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName255 to be of type string, got %T instead", value) + } + sv.AppComponentId = ptr.String(jtv) + } + case "appComponentName": if value != nil { jtv, ok := value.(string) diff --git a/service/resiliencehub/serializers.go b/service/resiliencehub/serializers.go index 07e2fd5d956..901b2678b50 100644 --- a/service/resiliencehub/serializers.go +++ b/service/resiliencehub/serializers.go @@ -6576,6 +6576,11 @@ func awsRestjson1_serializeDocumentUpdateRecommendationStatusRequestEntry(v *typ object := value.Object() defer object.Close() + if v.AppComponentId != nil { + ok := object.Key("appComponentId") + ok.String(*v.AppComponentId) + } + if v.EntryId != nil { ok := object.Key("entryId") ok.String(*v.EntryId) diff --git a/service/resiliencehub/types/types.go b/service/resiliencehub/types/types.go index 5ce2ff4f3ae..02957580222 100644 --- a/service/resiliencehub/types/types.go +++ b/service/resiliencehub/types/types.go @@ -19,6 +19,20 @@ type AcceptGroupingRecommendationEntry struct { noSmithyDocumentSerde } +// Indicates the Amazon CloudWatch alarm detected while running an assessment. +type Alarm struct { + + // Amazon Resource Name (ARN) of the Amazon CloudWatch alarm. + AlarmArn *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 ). + Source *string + + noSmithyDocumentSerde +} + // Defines a recommendation for a CloudWatch alarm. type AlarmRecommendation struct { @@ -483,7 +497,7 @@ type AppVersionSummary struct { type AssessmentRiskRecommendation struct { // Indicates the Application Components (AppComponents) that were assessed as part - // of the assessnent and are associated with the identified risk and + // of the assessment and are associated with the identified risk and // recommendation. // // This property is available only in the US East (N. Virginia) Region. @@ -564,6 +578,9 @@ type BatchUpdateRecommendationStatusSuccessfulEntry struct { // This member is required. ReferenceId *string + // Indicates the identifier of an AppComponent. + AppComponentId *string + // Indicates the reason for excluding an operational recommendation. ExcludeReason ExcludeRecommendationReason @@ -847,6 +864,18 @@ type EventSubscription struct { noSmithyDocumentSerde } +// Indicates the FIS experiment detected while running an assessment. +type Experiment struct { + + // Amazon Resource Name (ARN) of the FIS experiment. + ExperimentArn *string + + // Identifier of the FIS experiment template. + ExperimentTemplateId *string + + noSmithyDocumentSerde +} + // Indicates the accepted grouping recommendation whose implementation failed. type FailedGroupingRecommendationEntry struct { @@ -1051,6 +1080,11 @@ type PermissionModel struct { // 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. // @@ -1220,12 +1254,20 @@ type RecommendationItem struct { // Specifies if the recommendation has already been implemented. AlreadyImplemented *bool + // Indicates the previously implemented Amazon CloudWatch alarm discovered by + // Resilience Hub. + DiscoveredAlarm *Alarm + // Indicates the reason for excluding an operational recommendation. ExcludeReason ExcludeRecommendationReason // Indicates if an operational recommendation item is excluded. Excluded *bool + // Indicates the experiment created in FIS that was discovered by Resilience Hub, + // which matches the recommendation. + LatestDiscoveredExperiment *Experiment + // Identifier of the resource. ResourceId *string @@ -1635,6 +1677,9 @@ type TestRecommendation struct { // This member is required. ReferenceId *string + // Indicates the identifier of the AppComponent. + AppComponentId *string + // Name of the Application Component. AppComponentName *string @@ -1732,6 +1777,9 @@ type UpdateRecommendationStatusRequestEntry struct { // This member is required. ReferenceId *string + // Indicates the identifier of the AppComponent. + AppComponentId *string + // Indicates the reason for excluding an operational recommendation. ExcludeReason ExcludeRecommendationReason diff --git a/service/transfer/api_op_CreateAgreement.go b/service/transfer/api_op_CreateAgreement.go index a939d42bc32..e056d3d1f50 100644 --- a/service/transfer/api_op_CreateAgreement.go +++ b/service/transfer/api_op_CreateAgreement.go @@ -95,6 +95,28 @@ type CreateAgreementInput struct { // A name or short description to identify the agreement. Description *string + // 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. + EnforceMessageSigning types.EnforceMessageSigningType + + // 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]. + // + // [File names and locations]: https://docs.aws.amazon.com/transfer/latest/userguide/send-as2-messages.html#file-names-as2 + PreserveFilename types.PreserveFilenameType + // The status of the agreement. The agreement can be either ACTIVE or INACTIVE . Status types.AgreementStatusType diff --git a/service/transfer/api_op_UpdateAgreement.go b/service/transfer/api_op_UpdateAgreement.go index dacabc4a45a..0d24614b1a9 100644 --- a/service/transfer/api_op_UpdateAgreement.go +++ b/service/transfer/api_op_UpdateAgreement.go @@ -83,6 +83,16 @@ type UpdateAgreementInput struct { // agreement. Description *string + // 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. + EnforceMessageSigning types.EnforceMessageSigningType + // A unique identifier for the AS2 local profile. // // To change the local profile identifier, provide a new value here. @@ -92,6 +102,18 @@ type UpdateAgreementInput struct { // identifier, provide a new value here. PartnerProfileId *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]. + // + // [File names and locations]: https://docs.aws.amazon.com/transfer/latest/userguide/send-as2-messages.html#file-names-as2 + PreserveFilename types.PreserveFilenameType + // You can update the status for the agreement, either activating an inactive // agreement or the reverse. Status types.AgreementStatusType diff --git a/service/transfer/deserializers.go b/service/transfer/deserializers.go index 870d99a8b01..6662089bdd9 100644 --- a/service/transfer/deserializers.go +++ b/service/transfer/deserializers.go @@ -8618,6 +8618,15 @@ func awsAwsjson11_deserializeDocumentAs2ConnectorConfig(v **types.As2ConnectorCo sv.PartnerProfileId = ptr.String(jtv) } + case "PreserveContentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PreserveContentType to be of type string, got %T instead", value) + } + sv.PreserveContentType = types.PreserveContentType(jtv) + } + case "SigningAlgorithm": if value != nil { jtv, ok := value.(string) @@ -9257,6 +9266,15 @@ func awsAwsjson11_deserializeDocumentDescribedAgreement(v **types.DescribedAgree sv.Description = ptr.String(jtv) } + case "EnforceMessageSigning": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnforceMessageSigningType to be of type string, got %T instead", value) + } + sv.EnforceMessageSigning = types.EnforceMessageSigningType(jtv) + } + case "LocalProfileId": if value != nil { jtv, ok := value.(string) @@ -9275,6 +9293,15 @@ func awsAwsjson11_deserializeDocumentDescribedAgreement(v **types.DescribedAgree sv.PartnerProfileId = ptr.String(jtv) } + case "PreserveFilename": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PreserveFilenameType to be of type string, got %T instead", value) + } + sv.PreserveFilename = types.PreserveFilenameType(jtv) + } + case "ServerId": if value != nil { jtv, ok := value.(string) diff --git a/service/transfer/serializers.go b/service/transfer/serializers.go index fad6a98984d..16ca73b470d 100644 --- a/service/transfer/serializers.go +++ b/service/transfer/serializers.go @@ -4280,6 +4280,11 @@ func awsAwsjson11_serializeDocumentAs2ConnectorConfig(v *types.As2ConnectorConfi ok.String(*v.PartnerProfileId) } + if len(v.PreserveContentType) > 0 { + ok := object.Key("PreserveContentType") + ok.String(string(v.PreserveContentType)) + } + if len(v.SigningAlgorithm) > 0 { ok := object.Key("SigningAlgorithm") ok.String(string(v.SigningAlgorithm)) @@ -5108,6 +5113,11 @@ func awsAwsjson11_serializeOpDocumentCreateAgreementInput(v *CreateAgreementInpu ok.String(*v.Description) } + if len(v.EnforceMessageSigning) > 0 { + ok := object.Key("EnforceMessageSigning") + ok.String(string(v.EnforceMessageSigning)) + } + if v.LocalProfileId != nil { ok := object.Key("LocalProfileId") ok.String(*v.LocalProfileId) @@ -5118,6 +5128,11 @@ func awsAwsjson11_serializeOpDocumentCreateAgreementInput(v *CreateAgreementInpu ok.String(*v.PartnerProfileId) } + if len(v.PreserveFilename) > 0 { + ok := object.Key("PreserveFilename") + ok.String(string(v.PreserveFilename)) + } + if v.ServerId != nil { ok := object.Key("ServerId") ok.String(*v.ServerId) @@ -6463,6 +6478,11 @@ func awsAwsjson11_serializeOpDocumentUpdateAgreementInput(v *UpdateAgreementInpu ok.String(*v.Description) } + if len(v.EnforceMessageSigning) > 0 { + ok := object.Key("EnforceMessageSigning") + ok.String(string(v.EnforceMessageSigning)) + } + if v.LocalProfileId != nil { ok := object.Key("LocalProfileId") ok.String(*v.LocalProfileId) @@ -6473,6 +6493,11 @@ func awsAwsjson11_serializeOpDocumentUpdateAgreementInput(v *UpdateAgreementInpu ok.String(*v.PartnerProfileId) } + if len(v.PreserveFilename) > 0 { + ok := object.Key("PreserveFilename") + ok.String(string(v.PreserveFilename)) + } + if v.ServerId != nil { ok := object.Key("ServerId") ok.String(*v.ServerId) diff --git a/service/transfer/types/enums.go b/service/transfer/types/enums.go index eec1403b68a..45660cf0777 100644 --- a/service/transfer/types/enums.go +++ b/service/transfer/types/enums.go @@ -239,6 +239,25 @@ func (EndpointType) Values() []EndpointType { } } +type EnforceMessageSigningType string + +// Enum values for EnforceMessageSigningType +const ( + EnforceMessageSigningTypeEnabled EnforceMessageSigningType = "ENABLED" + EnforceMessageSigningTypeDisabled EnforceMessageSigningType = "DISABLED" +) + +// Values returns all known values for EnforceMessageSigningType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EnforceMessageSigningType) Values() []EnforceMessageSigningType { + return []EnforceMessageSigningType{ + "ENABLED", + "DISABLED", + } +} + type ExecutionErrorType string // Enum values for ExecutionErrorType @@ -419,6 +438,44 @@ func (OverwriteExisting) Values() []OverwriteExisting { } } +type PreserveContentType string + +// Enum values for PreserveContentType +const ( + PreserveContentTypeEnabled PreserveContentType = "ENABLED" + PreserveContentTypeDisabled PreserveContentType = "DISABLED" +) + +// Values returns all known values for PreserveContentType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PreserveContentType) Values() []PreserveContentType { + return []PreserveContentType{ + "ENABLED", + "DISABLED", + } +} + +type PreserveFilenameType string + +// Enum values for PreserveFilenameType +const ( + PreserveFilenameTypeEnabled PreserveFilenameType = "ENABLED" + PreserveFilenameTypeDisabled PreserveFilenameType = "DISABLED" +) + +// Values returns all known values for PreserveFilenameType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PreserveFilenameType) Values() []PreserveFilenameType { + return []PreserveFilenameType{ + "ENABLED", + "DISABLED", + } +} + type ProfileType string // Enum values for ProfileType diff --git a/service/transfer/types/types.go b/service/transfer/types/types.go index d2a88709dfb..ae86a4283f1 100644 --- a/service/transfer/types/types.go +++ b/service/transfer/types/types.go @@ -84,6 +84,13 @@ type As2ConnectorConfig struct { // A unique identifier for the partner profile for the connector. PartnerProfileId *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. + PreserveContentType PreserveContentType + // The algorithm that is used to sign the AS2 messages sent with the connector. SigningAlgorithm SigningAlg @@ -397,12 +404,34 @@ type DescribedAgreement struct { // The name or short description that's used to identify the agreement. Description *string + // 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. + EnforceMessageSigning EnforceMessageSigningType + // A unique identifier for the AS2 local profile. LocalProfileId *string // A unique identifier for the partner profile used in the agreement. PartnerProfileId *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]. + // + // [File names and locations]: https://docs.aws.amazon.com/transfer/latest/userguide/send-as2-messages.html#file-names-as2 + PreserveFilename PreserveFilenameType + // A system-assigned unique identifier for a server instance. This identifier // indicates the specific server that the agreement uses. ServerId *string @@ -452,9 +481,8 @@ type DescribedCertificate struct { // The serial number for the certificate. Serial *string - // 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. Status CertificateStatusType // Key-value pairs that can be used to group and search for certificates.