diff --git a/.changelog/1490e092d1e5494c81a499acb54d453b.json b/.changelog/1490e092d1e5494c81a499acb54d453b.json new file mode 100644 index 00000000000..ae9aa6fbb2a --- /dev/null +++ b/.changelog/1490e092d1e5494c81a499acb54d453b.json @@ -0,0 +1,8 @@ +{ + "id": "1490e092-d1e5-494c-81a4-99acb54d453b", + "type": "documentation", + "description": "Minor update to documentation.", + "modules": [ + "service/chatbot" + ] +} \ No newline at end of file diff --git a/.changelog/7ea07c51545b4ef388ba5260bb2a8df9.json b/.changelog/7ea07c51545b4ef388ba5260bb2a8df9.json new file mode 100644 index 00000000000..f57043111c7 --- /dev/null +++ b/.changelog/7ea07c51545b4ef388ba5260bb2a8df9.json @@ -0,0 +1,8 @@ +{ + "id": "7ea07c51-545b-4ef3-88ba-5260bb2a8df9", + "type": "feature", + "description": "This release contains an endpoint addition", + "modules": [ + "service/organizations" + ] +} \ No newline at end of file diff --git a/.changelog/abe9966aa543443880fd14f5573a50e7.json b/.changelog/abe9966aa543443880fd14f5573a50e7.json new file mode 100644 index 00000000000..94f3ff5fb25 --- /dev/null +++ b/.changelog/abe9966aa543443880fd14f5573a50e7.json @@ -0,0 +1,8 @@ +{ + "id": "abe9966a-a543-4438-80fd-14f5573a50e7", + "type": "feature", + "description": "Adds support for providing custom headers within SendEmail and SendBulkEmail for SESv2.", + "modules": [ + "service/sesv2" + ] +} \ No newline at end of file diff --git a/.changelog/e9c7960c3e13455d9e351aafcc635312.json b/.changelog/e9c7960c3e13455d9e351aafcc635312.json new file mode 100644 index 00000000000..d2d1eb59aa4 --- /dev/null +++ b/.changelog/e9c7960c3e13455d9e351aafcc635312.json @@ -0,0 +1,8 @@ +{ + "id": "e9c7960c-3e13-455d-9e35-1aafcc635312", + "type": "documentation", + "description": "Documentation updates for Amazon API Gateway", + "modules": [ + "service/apigateway" + ] +} \ No newline at end of file diff --git a/service/apigateway/types/types.go b/service/apigateway/types/types.go index 53ece6698d9..ba26284976c 100644 --- a/service/apigateway/types/types.go +++ b/service/apigateway/types/types.go @@ -766,7 +766,9 @@ type MethodSetting struct { CachingEnabled bool // Specifies whether data trace logging is enabled for this method, which affects - // the log entries pushed to Amazon CloudWatch Logs. + // the log entries pushed to Amazon CloudWatch Logs. This can be useful to + // troubleshoot APIs, but can result in logging sensitive data. We recommend that + // you don't enable this option for production APIs. DataTraceEnabled bool // Specifies the logging level for this method, which affects the log entries diff --git a/service/chatbot/api_client.go b/service/chatbot/api_client.go index 215194975e3..0cd9e57a4ed 100644 --- a/service/chatbot/api_client.go +++ b/service/chatbot/api_client.go @@ -27,7 +27,7 @@ import ( const ServiceID = "chatbot" const ServiceAPIVersion = "2017-10-11" -// Client provides the API client to make operations call for chatbot. +// Client provides the API client to make operations call for AWS Chatbot. type Client struct { options Options } diff --git a/service/chatbot/doc.go b/service/chatbot/doc.go index 782ef2fe558..9505f47583a 100644 --- a/service/chatbot/doc.go +++ b/service/chatbot/doc.go @@ -1,7 +1,7 @@ // Code generated by smithy-go-codegen DO NOT EDIT. // Package chatbot provides the API client, operations, and parameter types for -// chatbot. +// AWS Chatbot. // // AWS Chatbot API package chatbot diff --git a/service/organizations/endpoints.go b/service/organizations/endpoints.go index 7653dc91892..579eedcbf90 100644 --- a/service/organizations/endpoints.go +++ b/service/organizations/endpoints.go @@ -516,6 +516,40 @@ func (r *resolver) ResolveEndpoint( } } } + if _PartitionResult.Name == "aws-iso" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://organizations.us-iso-east-1.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, "organizations") + smithyhttp.SetSigV4ASigningName(&sp, "organizations") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } if _UseFIPS == true { if _UseDualStack == true { if true == _PartitionResult.SupportsFIPS { diff --git a/service/organizations/endpoints_test.go b/service/organizations/endpoints_test.go index 3d08f912896..da3d9377118 100644 --- a/service/organizations/endpoints_test.go +++ b/service/organizations/endpoints_test.go @@ -839,8 +839,63 @@ func TestEndpointCase16(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 TestEndpointCase17(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://organizations.us-iso-east-1.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, "organizations") + smithyhttp.SetSigV4ASigningName(&sp, "organizations") + + 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 diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -860,7 +915,7 @@ func TestEndpointCase17(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -899,7 +954,7 @@ func TestEndpointCase18(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -919,7 +974,7 @@ func TestEndpointCase19(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -937,9 +992,25 @@ func TestEndpointCase20(t *testing.T) { uri, _ := url.Parse("https://organizations.us-iso-east-1.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, "organizations") + smithyhttp.SetSigV4ASigningName(&sp, "organizations") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -958,7 +1029,7 @@ func TestEndpointCase20(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -978,7 +1049,7 @@ func TestEndpointCase21(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -1017,7 +1088,7 @@ func TestEndpointCase22(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -1037,7 +1108,7 @@ func TestEndpointCase23(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -1076,7 +1147,7 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1116,7 +1187,7 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -1155,7 +1226,7 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -1176,7 +1247,7 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1197,7 +1268,7 @@ func TestEndpointCase28(t *testing.T) { } // Missing region -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{} resolver := NewDefaultEndpointResolverV2() diff --git a/service/sesv2/api_op_GetAccount.go b/service/sesv2/api_op_GetAccount.go index 7fb7b163925..7cfe7c3a08f 100644 --- a/service/sesv2/api_op_GetAccount.go +++ b/service/sesv2/api_op_GetAccount.go @@ -61,12 +61,10 @@ type GetAccountOutput struct { // Indicates whether or not your account has production access in the current // Amazon Web Services Region. If the value is false , then your account is in the // sandbox. When your account is in the sandbox, you can only send email to - // verified identities. Additionally, the maximum number of emails you can send in - // a 24-hour period (your sending quota) is 200, and the maximum number of emails - // you can send per second (your maximum sending rate) is 1. If the value is true , - // then your account has production access. When your account has production - // access, you can send email to any address. The sending quota and maximum sending - // rate for your account vary based on your specific use case. + // verified identities. If the value is true , then your account has production + // access. When your account has production access, you can send email to any + // address. The sending quota and maximum sending rate for your account vary based + // on your specific use case. ProductionAccessEnabled bool // An object that contains information about the per-day and per-second sending diff --git a/service/sesv2/api_op_PutAccountDetails.go b/service/sesv2/api_op_PutAccountDetails.go index ca723a19b14..843198e8447 100644 --- a/service/sesv2/api_op_PutAccountDetails.go +++ b/service/sesv2/api_op_PutAccountDetails.go @@ -56,12 +56,10 @@ type PutAccountDetailsInput struct { // Indicates whether or not your account should have production access in the // current Amazon Web Services Region. If the value is false , then your account is // in the sandbox. When your account is in the sandbox, you can only send email to - // verified identities. Additionally, the maximum number of emails you can send in - // a 24-hour period (your sending quota) is 200, and the maximum number of emails - // you can send per second (your maximum sending rate) is 1. If the value is true , - // then your account has production access. When your account has production - // access, you can send email to any address. The sending quota and maximum sending - // rate for your account vary based on your specific use case. + // verified identities. If the value is true , then your account has production + // access. When your account has production access, you can send email to any + // address. The sending quota and maximum sending rate for your account vary based + // on your specific use case. ProductionAccessEnabled *bool noSmithyDocumentSerde diff --git a/service/sesv2/api_op_SendEmail.go b/service/sesv2/api_op_SendEmail.go index 383b3c653eb..8207b8f6525 100644 --- a/service/sesv2/api_op_SendEmail.go +++ b/service/sesv2/api_op_SendEmail.go @@ -44,7 +44,7 @@ func (c *Client) SendEmail(ctx context.Context, params *SendEmailInput, optFns . type SendEmailInput struct { // An object that contains the body of the message. You can send either a Simple - // message Raw message or a template Message. + // message, Raw message, or a Templated message. // // This member is required. Content *types.EmailContent @@ -111,9 +111,9 @@ type SendEmailOutput struct { // A unique identifier for the message that is generated when the message is // accepted. It's possible for Amazon SES to accept a message without sending it. - // This can happen when the message that you're trying to send has an attachment - // contains a virus, or when you send a templated email that contains invalid - // personalization content, for example. + // For example, this can happen when the message that you're trying to send has an + // attachment that contains a virus, or when you send a templated email that + // contains invalid personalization content. MessageId *string // Metadata pertaining to the operation's result. diff --git a/service/sesv2/api_op_UpdateContact.go b/service/sesv2/api_op_UpdateContact.go index 37d0472568a..d393fba43b0 100644 --- a/service/sesv2/api_op_UpdateContact.go +++ b/service/sesv2/api_op_UpdateContact.go @@ -11,9 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates a contact's preferences for a list. It is not necessary to specify all -// existing topic preferences in the TopicPreferences object, just the ones that -// need updating. +// Updates a contact's preferences for a list. You must specify all existing topic +// preferences in the TopicPreferences object, not just the ones that need +// updating; otherwise, all your existing preferences will be removed. func (c *Client) UpdateContact(ctx context.Context, params *UpdateContactInput, optFns ...func(*Options)) (*UpdateContactOutput, error) { if params == nil { params = &UpdateContactInput{} diff --git a/service/sesv2/serializers.go b/service/sesv2/serializers.go index f5d9152d594..7f417e84e0d 100644 --- a/service/sesv2/serializers.go +++ b/service/sesv2/serializers.go @@ -8149,6 +8149,13 @@ func awsRestjson1_serializeDocumentMessage(v *types.Message, value smithyjson.Va } } + if v.Headers != nil { + ok := object.Key("Headers") + if err := awsRestjson1_serializeDocumentMessageHeaderList(v.Headers, ok); err != nil { + return err + } + } + if v.Subject != nil { ok := object.Key("Subject") if err := awsRestjson1_serializeDocumentContent(v.Subject, ok); err != nil { @@ -8159,6 +8166,36 @@ func awsRestjson1_serializeDocumentMessage(v *types.Message, value smithyjson.Va return nil } +func awsRestjson1_serializeDocumentMessageHeader(v *types.MessageHeader, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentMessageHeaderList(v []types.MessageHeader, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentMessageHeader(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentMessageInsightsDataSource(v *types.MessageInsightsDataSource, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -8472,6 +8509,13 @@ func awsRestjson1_serializeDocumentTemplate(v *types.Template, value smithyjson. object := value.Object() defer object.Close() + if v.Headers != nil { + ok := object.Key("Headers") + if err := awsRestjson1_serializeDocumentMessageHeaderList(v.Headers, ok); err != nil { + return err + } + } + if v.TemplateArn != nil { ok := object.Key("TemplateArn") ok.String(*v.TemplateArn) diff --git a/service/sesv2/types/types.go b/service/sesv2/types/types.go index d63b89fa570..64bd9790525 100644 --- a/service/sesv2/types/types.go +++ b/service/sesv2/types/types.go @@ -1369,6 +1369,31 @@ type Message struct { // This member is required. Subject *Content + // The list of message headers that will be added to the email message. + Headers []MessageHeader + + noSmithyDocumentSerde +} + +// Contains the name and value of a message header that you add to an email. +type MessageHeader struct { + + // The name of the message header. The message header name has to meet the + // following criteria: + // - Can contain any printable ASCII character (33 - 126) except for colon (:). + // - Can contain no more than 126 characters. + // + // This member is required. + Name *string + + // The value of the message header. The message header value has to meet the + // following criteria: + // - Can contain any printable ASCII character. + // - Can contain no more than 870 characters. + // + // This member is required. + Value *string + noSmithyDocumentSerde } @@ -1922,6 +1947,9 @@ type Tag struct { // and reuse in email messages that you send. type Template struct { + // The list of message headers that will be added to the email message. + Headers []MessageHeader + // The Amazon Resource Name (ARN) of the template. TemplateArn *string diff --git a/service/sesv2/validators.go b/service/sesv2/validators.go index 19bab89b0d4..5d7d10d870a 100644 --- a/service/sesv2/validators.go +++ b/service/sesv2/validators.go @@ -1876,6 +1876,23 @@ func validateBody(v *types.Body) error { } } +func validateBulkEmailContent(v *types.BulkEmailContent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BulkEmailContent"} + if v.Template != nil { + if err := validateTemplate(v.Template); err != nil { + invalidParams.AddNested("Template", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateBulkEmailEntry(v *types.BulkEmailEntry) error { if v == nil { return nil @@ -2018,6 +2035,11 @@ func validateEmailContent(v *types.EmailContent) error { invalidParams.AddNested("Raw", err.(smithy.InvalidParamsError)) } } + if v.Template != nil { + if err := validateTemplate(v.Template); err != nil { + invalidParams.AddNested("Template", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -2181,6 +2203,46 @@ func validateMessage(v *types.Message) error { invalidParams.AddNested("Body", err.(smithy.InvalidParamsError)) } } + if v.Headers != nil { + if err := validateMessageHeaderList(v.Headers); err != nil { + invalidParams.AddNested("Headers", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMessageHeader(v *types.MessageHeader) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MessageHeader"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMessageHeaderList(v []types.MessageHeader) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MessageHeaderList"} + for i := range v { + if err := validateMessageHeader(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -2348,6 +2410,23 @@ func validateTagList(v []types.Tag) error { } } +func validateTemplate(v *types.Template) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Template"} + if v.Headers != nil { + if err := validateMessageHeaderList(v.Headers); err != nil { + invalidParams.AddNested("Headers", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTopic(v *types.Topic) error { if v == nil { return nil @@ -3564,6 +3643,10 @@ func validateOpSendBulkEmailInput(v *SendBulkEmailInput) error { } if v.DefaultContent == nil { invalidParams.Add(smithy.NewErrParamRequired("DefaultContent")) + } else if v.DefaultContent != nil { + if err := validateBulkEmailContent(v.DefaultContent); err != nil { + invalidParams.AddNested("DefaultContent", err.(smithy.InvalidParamsError)) + } } if v.BulkEmailEntries == nil { invalidParams.Add(smithy.NewErrParamRequired("BulkEmailEntries"))