From 93e06ffe0b3a6aaa8c14675b219902838aaebb1e Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Mon, 18 Mar 2024 19:26:00 +0000 Subject: [PATCH] Regenerated Clients --- .../0d9371d2f1774d72a0c0e1e96046cd35.json | 8 + .../39a28a3ef69f412b8a4d37c9686fc309.json | 8 + .../3e1a793e19904bfca55dce6218864703.json | 8 + .../5eb7f1500c074b0d8ffac1b0eb51f602.json | 8 + .../8cd440fb2ae64450a937c4e80439ba39.json | 8 + .../a5171586a26e431e992e8b31e58e8a7e.json | 8 + .../athena/internal/endpoints/endpoints.go | 9 + service/cloudformation/api_op_CreateStack.go | 2 +- ...pi_op_ListStackSetAutoDeploymentTargets.go | 166 ++++++++ service/cloudformation/deserializers.go | 286 ++++++++++++++ service/cloudformation/generated.json | 1 + service/cloudformation/serializers.go | 91 +++++ service/cloudformation/snapshot_test.go | 24 ++ service/cloudformation/types/types.go | 20 + service/cloudformation/validators.go | 39 ++ service/kms/api_op_GetKeyPolicy.go | 10 +- service/kms/api_op_ImportKeyMaterial.go | 12 +- service/kms/api_op_PutKeyPolicy.go | 9 +- service/kms/api_op_RevokeGrant.go | 2 +- service/kms/deserializers.go | 9 + service/kms/validators.go | 6 - service/mediatailor/api_op_CreateChannel.go | 6 + service/mediatailor/api_op_CreateProgram.go | 6 + service/mediatailor/api_op_DescribeChannel.go | 3 + service/mediatailor/api_op_DescribeProgram.go | 3 + .../mediatailor/api_op_GetChannelSchedule.go | 3 + service/mediatailor/api_op_UpdateChannel.go | 6 + service/mediatailor/api_op_UpdateProgram.go | 6 + service/mediatailor/deserializers.go | 296 ++++++++++++++ service/mediatailor/serializers.go | 139 +++++++ service/mediatailor/types/enums.go | 6 +- service/mediatailor/types/types.go | 53 ++- service/mediatailor/validators.go | 107 +++-- service/rds/api_op_CreateIntegration.go | 15 + service/rds/api_op_DeleteIntegration.go | 7 + service/rds/api_op_ModifyIntegration.go | 191 +++++++++ service/rds/deserializers.go | 367 ++++++++++++++++++ service/rds/generated.json | 1 + service/rds/serializers.go | 101 +++++ service/rds/snapshot_test.go | 24 ++ service/rds/types/types.go | 7 + service/rds/validators.go | 39 ++ service/sso/internal/endpoints/endpoints.go | 8 + .../ssoadmin/internal/endpoints/endpoints.go | 3 + .../ssooidc/internal/endpoints/endpoints.go | 8 + .../internal/endpoints/endpoints.go | 29 ++ .../timestreamquery/api_op_PrepareQuery.go | 2 +- service/timestreamquery/endpoints.go | 2 +- service/timestreamquery/types/types.go | 3 +- 49 files changed, 2109 insertions(+), 66 deletions(-) create mode 100644 .changelog/0d9371d2f1774d72a0c0e1e96046cd35.json create mode 100644 .changelog/39a28a3ef69f412b8a4d37c9686fc309.json create mode 100644 .changelog/3e1a793e19904bfca55dce6218864703.json create mode 100644 .changelog/5eb7f1500c074b0d8ffac1b0eb51f602.json create mode 100644 .changelog/8cd440fb2ae64450a937c4e80439ba39.json create mode 100644 .changelog/a5171586a26e431e992e8b31e58e8a7e.json create mode 100644 service/cloudformation/api_op_ListStackSetAutoDeploymentTargets.go create mode 100644 service/rds/api_op_ModifyIntegration.go diff --git a/.changelog/0d9371d2f1774d72a0c0e1e96046cd35.json b/.changelog/0d9371d2f1774d72a0c0e1e96046cd35.json new file mode 100644 index 00000000000..886eb805936 --- /dev/null +++ b/.changelog/0d9371d2f1774d72a0c0e1e96046cd35.json @@ -0,0 +1,8 @@ +{ + "id": "0d9371d2-f177-4d72-a0c0-e1e96046cd35", + "type": "feature", + "description": "Adds the ability to use the default policy name by omitting the policyName parameter in calls to PutKeyPolicy and GetKeyPolicy", + "modules": [ + "service/kms" + ] +} \ No newline at end of file diff --git a/.changelog/39a28a3ef69f412b8a4d37c9686fc309.json b/.changelog/39a28a3ef69f412b8a4d37c9686fc309.json new file mode 100644 index 00000000000..2eac05eabc7 --- /dev/null +++ b/.changelog/39a28a3ef69f412b8a4d37c9686fc309.json @@ -0,0 +1,8 @@ +{ + "id": "39a28a3e-f69f-412b-8a4d-37c9686fc309", + "type": "feature", + "description": "This release supports for a new API ListStackSetAutoDeploymentTargets, which provider auto-deployment configuration as a describable resource. Customers can now view the specific combinations of regions and OUs that are being auto-deployed.", + "modules": [ + "service/cloudformation" + ] +} \ No newline at end of file diff --git a/.changelog/3e1a793e19904bfca55dce6218864703.json b/.changelog/3e1a793e19904bfca55dce6218864703.json new file mode 100644 index 00000000000..5165321bc69 --- /dev/null +++ b/.changelog/3e1a793e19904bfca55dce6218864703.json @@ -0,0 +1,8 @@ +{ + "id": "3e1a793e-1990-4bfc-a55d-ce6218864703", + "type": "feature", + "description": "This release adds support to allow customers to show different content within a channel depending on metadata associated with the viewer.", + "modules": [ + "service/mediatailor" + ] +} \ No newline at end of file diff --git a/.changelog/5eb7f1500c074b0d8ffac1b0eb51f602.json b/.changelog/5eb7f1500c074b0d8ffac1b0eb51f602.json new file mode 100644 index 00000000000..4e0d2c368e4 --- /dev/null +++ b/.changelog/5eb7f1500c074b0d8ffac1b0eb51f602.json @@ -0,0 +1,8 @@ +{ + "id": "5eb7f150-0c07-4b0d-8ffa-c1b0eb51f602", + "type": "documentation", + "description": "Documentation updates, March 2024", + "modules": [ + "service/timestreamquery" + ] +} \ No newline at end of file diff --git a/.changelog/8cd440fb2ae64450a937c4e80439ba39.json b/.changelog/8cd440fb2ae64450a937c4e80439ba39.json new file mode 100644 index 00000000000..44d9344d272 --- /dev/null +++ b/.changelog/8cd440fb2ae64450a937c4e80439ba39.json @@ -0,0 +1,8 @@ +{ + "id": "8cd440fb-2ae6-4450-a937-c4e80439ba39", + "type": "feature", + "description": "Fix two issues with response root node names.", + "modules": [ + "service/s3" + ] +} \ No newline at end of file diff --git a/.changelog/a5171586a26e431e992e8b31e58e8a7e.json b/.changelog/a5171586a26e431e992e8b31e58e8a7e.json new file mode 100644 index 00000000000..100fa670a1a --- /dev/null +++ b/.changelog/a5171586a26e431e992e8b31e58e8a7e.json @@ -0,0 +1,8 @@ +{ + "id": "a5171586-a26e-431e-992e-8b31e58e8a7e", + "type": "feature", + "description": "This release launches the ModifyIntegration API and support for data filtering for zero-ETL Integrations.", + "modules": [ + "service/rds" + ] +} \ No newline at end of file diff --git a/service/athena/internal/endpoints/endpoints.go b/service/athena/internal/endpoints/endpoints.go index c7787ce7ecf..511b3339a10 100644 --- a/service/athena/internal/endpoints/endpoints.go +++ b/service/athena/internal/endpoints/endpoints.go @@ -247,6 +247,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "athena.ca-central-1.api.aws", }, + endpoints.EndpointKey{ + Region: "ca-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "athena.ca-west-1.api.aws", + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, diff --git a/service/cloudformation/api_op_CreateStack.go b/service/cloudformation/api_op_CreateStack.go index 2193f42cf65..53824180234 100644 --- a/service/cloudformation/api_op_CreateStack.go +++ b/service/cloudformation/api_op_CreateStack.go @@ -55,7 +55,7 @@ type CreateStackInput struct { // an InsufficientCapabilities error. If your stack template contains these // resources, we recommend that you review all permissions associated with them and // edit their permissions if necessary. - // - AWS::IAM::AccessKey AWS::IAM::AccessKey (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) + // - AWS::IAM::AccessKey (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) // - AWS::IAM::Group (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) // - AWS::IAM::InstanceProfile (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) // - AWS::IAM::Policy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) diff --git a/service/cloudformation/api_op_ListStackSetAutoDeploymentTargets.go b/service/cloudformation/api_op_ListStackSetAutoDeploymentTargets.go new file mode 100644 index 00000000000..96512eb7b72 --- /dev/null +++ b/service/cloudformation/api_op_ListStackSetAutoDeploymentTargets.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudformation + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudformation/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns summary information about deployment targets for a stack set. +func (c *Client) ListStackSetAutoDeploymentTargets(ctx context.Context, params *ListStackSetAutoDeploymentTargetsInput, optFns ...func(*Options)) (*ListStackSetAutoDeploymentTargetsOutput, error) { + if params == nil { + params = &ListStackSetAutoDeploymentTargetsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListStackSetAutoDeploymentTargets", params, optFns, c.addOperationListStackSetAutoDeploymentTargetsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListStackSetAutoDeploymentTargetsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListStackSetAutoDeploymentTargetsInput struct { + + // The name or unique ID of the stack set that you want to get automatic + // deployment targets for. + // + // This member is required. + StackSetName *string + + // Specifies whether you are acting as an account administrator in the + // organization's management account or as a delegated administrator in a member + // account. By default, SELF is specified. Use SELF for StackSets with + // self-managed permissions. + // - If you are signed in to the management account, specify SELF . + // - If you are signed in to a delegated administrator account, specify + // DELEGATED_ADMIN . Your Amazon Web Services account must be registered as a + // delegated administrator in the management account. For more information, see + // Register a delegated administrator (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html) + // in the CloudFormation User Guide. + CallAs types.CallAs + + // The maximum number of results to be returned with a single call. If the number + // of available results exceeds this maximum, the response includes a NextToken + // value that you can assign to the NextToken request parameter to get the next + // set of results. + MaxResults *int32 + + // A string that identifies the next page of stack set deployment targets that you + // want to retrieve. + NextToken *string + + noSmithyDocumentSerde +} + +type ListStackSetAutoDeploymentTargetsOutput struct { + + // If the request doesn't return all the remaining results, NextToken is set to a + // token. To retrieve the next set of results, call + // ListStackSetAutoDeploymentTargets (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ListStackSetAutoDeploymentTargets.html) + // again and use that value for the NextToken parameter. If the request returns + // all results, NextToken is set to an empty string. + NextToken *string + + // An array of summaries of the deployment targets for the stack set. + Summaries []types.StackSetAutoDeploymentTargetSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListStackSetAutoDeploymentTargetsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListStackSetAutoDeploymentTargets{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListStackSetAutoDeploymentTargets{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListStackSetAutoDeploymentTargets"); 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 = 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 = addOpListStackSetAutoDeploymentTargetsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStackSetAutoDeploymentTargets(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 + } + return nil +} + +func newServiceMetadataMiddleware_opListStackSetAutoDeploymentTargets(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListStackSetAutoDeploymentTargets", + } +} diff --git a/service/cloudformation/deserializers.go b/service/cloudformation/deserializers.go index 32fcd84815c..3c59ccf4c10 100644 --- a/service/cloudformation/deserializers.go +++ b/service/cloudformation/deserializers.go @@ -6155,6 +6155,114 @@ func awsAwsquery_deserializeOpErrorListStacks(response *smithyhttp.Response, met } } +type awsAwsquery_deserializeOpListStackSetAutoDeploymentTargets struct { +} + +func (*awsAwsquery_deserializeOpListStackSetAutoDeploymentTargets) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListStackSetAutoDeploymentTargets) 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 + } + + 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, awsAwsquery_deserializeOpErrorListStackSetAutoDeploymentTargets(response, &metadata) + } + output := &ListStackSetAutoDeploymentTargetsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("ListStackSetAutoDeploymentTargetsResult") + 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 + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentListStackSetAutoDeploymentTargetsOutput(&output, 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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorListStackSetAutoDeploymentTargets(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("StackSetNotFoundException", errorCode): + return awsAwsquery_deserializeErrorStackSetNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpListStackSetOperationResults struct { } @@ -18541,6 +18649,129 @@ func awsAwsquery_deserializeDocumentStackSet(v **types.StackSet, decoder smithyx return nil } +func awsAwsquery_deserializeDocumentStackSetAutoDeploymentTargetSummaries(v *[]types.StackSetAutoDeploymentTargetSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.StackSetAutoDeploymentTargetSummary + if *v == nil { + sv = make([]types.StackSetAutoDeploymentTargetSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.StackSetAutoDeploymentTargetSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentStackSetAutoDeploymentTargetSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentStackSetAutoDeploymentTargetSummariesUnwrapped(v *[]types.StackSetAutoDeploymentTargetSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.StackSetAutoDeploymentTargetSummary + if *v == nil { + sv = make([]types.StackSetAutoDeploymentTargetSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.StackSetAutoDeploymentTargetSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentStackSetAutoDeploymentTargetSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentStackSetAutoDeploymentTargetSummary(v **types.StackSetAutoDeploymentTargetSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.StackSetAutoDeploymentTargetSummary + if *v == nil { + sv = &types.StackSetAutoDeploymentTargetSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OrganizationalUnitId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OrganizationalUnitId = ptr.String(xtv) + } + + case strings.EqualFold("Regions", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentRegionList(&sv.Regions, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentStackSetDriftDetectionDetails(v **types.StackSetDriftDetectionDetails, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -26005,6 +26236,61 @@ func awsAwsquery_deserializeOpDocumentListStackResourcesOutput(v **ListStackReso return nil } +func awsAwsquery_deserializeOpDocumentListStackSetAutoDeploymentTargetsOutput(v **ListStackSetAutoDeploymentTargetsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListStackSetAutoDeploymentTargetsOutput + if *v == nil { + sv = &ListStackSetAutoDeploymentTargetsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("NextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + + case strings.EqualFold("Summaries", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentStackSetAutoDeploymentTargetSummaries(&sv.Summaries, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentListStackSetOperationResultsOutput(v **ListStackSetOperationResultsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/cloudformation/generated.json b/service/cloudformation/generated.json index c2920d31fb8..48742990176 100644 --- a/service/cloudformation/generated.json +++ b/service/cloudformation/generated.json @@ -65,6 +65,7 @@ "api_op_ListStackInstanceResourceDrifts.go", "api_op_ListStackInstances.go", "api_op_ListStackResources.go", + "api_op_ListStackSetAutoDeploymentTargets.go", "api_op_ListStackSetOperationResults.go", "api_op_ListStackSetOperations.go", "api_op_ListStackSets.go", diff --git a/service/cloudformation/serializers.go b/service/cloudformation/serializers.go index d505fe08285..00579a6f198 100644 --- a/service/cloudformation/serializers.go +++ b/service/cloudformation/serializers.go @@ -3656,6 +3656,70 @@ func (m *awsAwsquery_serializeOpListStacks) HandleSerialize(ctx context.Context, return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpListStackSetAutoDeploymentTargets struct { +} + +func (*awsAwsquery_serializeOpListStackSetAutoDeploymentTargets) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListStackSetAutoDeploymentTargets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListStackSetAutoDeploymentTargetsInput) + _ = 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("ListStackSetAutoDeploymentTargets") + body.Key("Version").String("2010-05-15") + + if err := awsAwsquery_serializeOpDocumentListStackSetAutoDeploymentTargetsInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 + + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpListStackSetOperationResults struct { } @@ -7427,6 +7491,33 @@ func awsAwsquery_serializeOpDocumentListStackResourcesInput(v *ListStackResource return nil } +func awsAwsquery_serializeOpDocumentListStackSetAutoDeploymentTargetsInput(v *ListStackSetAutoDeploymentTargetsInput, value query.Value) error { + object := value.Object() + _ = object + + if len(v.CallAs) > 0 { + objectKey := object.Key("CallAs") + objectKey.String(string(v.CallAs)) + } + + if v.MaxResults != nil { + objectKey := object.Key("MaxResults") + objectKey.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + objectKey := object.Key("NextToken") + objectKey.String(*v.NextToken) + } + + if v.StackSetName != nil { + objectKey := object.Key("StackSetName") + objectKey.String(*v.StackSetName) + } + + return nil +} + func awsAwsquery_serializeOpDocumentListStackSetOperationResultsInput(v *ListStackSetOperationResultsInput, value query.Value) error { object := value.Object() _ = object diff --git a/service/cloudformation/snapshot_test.go b/service/cloudformation/snapshot_test.go index 3778b71af89..6261808d9d4 100644 --- a/service/cloudformation/snapshot_test.go +++ b/service/cloudformation/snapshot_test.go @@ -746,6 +746,18 @@ func TestCheckSnapshot_ListStacks(t *testing.T) { } } +func TestCheckSnapshot_ListStackSetAutoDeploymentTargets(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListStackSetAutoDeploymentTargets(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListStackSetAutoDeploymentTargets") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListStackSetOperationResults(t *testing.T) { svc := New(Options{}) _, err := svc.ListStackSetOperationResults(context.Background(), nil, func(o *Options) { @@ -1717,6 +1729,18 @@ func TestUpdateSnapshot_ListStacks(t *testing.T) { } } +func TestUpdateSnapshot_ListStackSetAutoDeploymentTargets(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListStackSetAutoDeploymentTargets(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListStackSetAutoDeploymentTargets") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListStackSetOperationResults(t *testing.T) { svc := New(Options{}) _, err := svc.ListStackSetOperationResults(context.Background(), nil, func(o *Options) { diff --git a/service/cloudformation/types/types.go b/service/cloudformation/types/types.go index 080f82b16b8..f46afa7a0dd 100644 --- a/service/cloudformation/types/types.go +++ b/service/cloudformation/types/types.go @@ -1265,6 +1265,11 @@ type StackInstanceComprehensiveStatus struct { // - FAILED : The operation in the specified account and Region failed. If the // stack set operation fails in enough accounts within a Region, the failure // tolerance for the stack set operation as a whole might be exceeded. + // - FAILED_IMPORT : The import of the stack instance in the specified account + // and Region failed and left the stack in an unstable state. Once the issues + // causing the failure are fixed, the import operation can be retried. If enough + // stack set operations fail in enough accounts within a Region, the failure + // tolerance for the stack set operation as a whole might be exceeded. // - INOPERABLE : A DeleteStackInstances operation has failed and left the stack // in an unstable state. Stacks in this state are excluded from further // UpdateStackSet operations. You might need to perform a DeleteStackInstances @@ -1817,6 +1822,21 @@ type StackSet struct { noSmithyDocumentSerde } +// One of the targets for the stack set. Returned by the +// ListStackSetAutoDeploymentTargets (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ListStackSetAutoDeploymentTargets.html) +// API operation. +type StackSetAutoDeploymentTargetSummary struct { + + // The organization root ID or organizational unit (OU) IDs where the stack set is + // targeted. + OrganizationalUnitId *string + + // The list of Regions targeted for this organization or OU. + Regions []string + + noSmithyDocumentSerde +} + // Detailed information about the drift status of the stack set. For stack sets, // contains information about the last completed drift operation performed on the // stack set. Information about drift operations in-progress isn't included. For diff --git a/service/cloudformation/validators.go b/service/cloudformation/validators.go index 787ad1457d4..79e54aa5d37 100644 --- a/service/cloudformation/validators.go +++ b/service/cloudformation/validators.go @@ -790,6 +790,26 @@ func (m *validateOpListStackResources) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpListStackSetAutoDeploymentTargets struct { +} + +func (*validateOpListStackSetAutoDeploymentTargets) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListStackSetAutoDeploymentTargets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListStackSetAutoDeploymentTargetsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListStackSetAutoDeploymentTargetsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListStackSetOperationResults struct { } @@ -1226,6 +1246,10 @@ func addOpListStackResourcesValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListStackResources{}, middleware.After) } +func addOpListStackSetAutoDeploymentTargetsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListStackSetAutoDeploymentTargets{}, middleware.After) +} + func addOpListStackSetOperationResultsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListStackSetOperationResults{}, middleware.After) } @@ -2160,6 +2184,21 @@ func validateOpListStackResourcesInput(v *ListStackResourcesInput) error { } } +func validateOpListStackSetAutoDeploymentTargetsInput(v *ListStackSetAutoDeploymentTargetsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListStackSetAutoDeploymentTargetsInput"} + if v.StackSetName == nil { + invalidParams.Add(smithy.NewErrParamRequired("StackSetName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListStackSetOperationResultsInput(v *ListStackSetOperationResultsInput) error { if v == nil { return nil diff --git a/service/kms/api_op_GetKeyPolicy.go b/service/kms/api_op_GetKeyPolicy.go index db42c646ac3..2ef4663d36f 100644 --- a/service/kms/api_op_GetKeyPolicy.go +++ b/service/kms/api_op_GetKeyPolicy.go @@ -44,10 +44,9 @@ type GetKeyPolicyInput struct { // This member is required. KeyId *string - // Specifies the name of the key policy. The only valid name is default . To get - // the names of key policies, use ListKeyPolicies . - // - // This member is required. + // Specifies the name of the key policy. If no policy name is specified, the + // default value is default . The only valid name is default . To get the names of + // key policies, use ListKeyPolicies . PolicyName *string noSmithyDocumentSerde @@ -58,6 +57,9 @@ type GetKeyPolicyOutput struct { // A key policy document in JSON format. Policy *string + // The name of the key policy. The only valid value is default . + PolicyName *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kms/api_op_ImportKeyMaterial.go b/service/kms/api_op_ImportKeyMaterial.go index 1a599c3d14b..f595a5c9e19 100644 --- a/service/kms/api_op_ImportKeyMaterial.go +++ b/service/kms/api_op_ImportKeyMaterial.go @@ -25,13 +25,11 @@ import ( // into that KMS key, but you cannot import different key material. You might // reimport key material to replace key material that expired or key material that // you deleted. You might also reimport key material to change the expiration model -// or expiration date of the key material. Before reimporting key material, if -// necessary, call DeleteImportedKeyMaterial to delete the current imported key -// material. Each time you import key material into KMS, you can determine whether -// ( ExpirationModel ) and when ( ValidTo ) the key material expires. To change the -// expiration of your key material, you must import it again, either by calling -// ImportKeyMaterial or using the import features of the KMS console. Before -// calling ImportKeyMaterial : +// or expiration date of the key material. Each time you import key material into +// KMS, you can determine whether ( ExpirationModel ) and when ( ValidTo ) the key +// material expires. To change the expiration of your key material, you must import +// it again, either by calling ImportKeyMaterial or using the import features of +// the KMS console. Before calling ImportKeyMaterial : // - Create or identify a KMS key with no key material. The KMS key must have an // Origin value of EXTERNAL , which indicates that the KMS key is designed for // imported key material. To create an new KMS key for imported key material, call diff --git a/service/kms/api_op_PutKeyPolicy.go b/service/kms/api_op_PutKeyPolicy.go index d03f494969f..4d9da0789f9 100644 --- a/service/kms/api_op_PutKeyPolicy.go +++ b/service/kms/api_op_PutKeyPolicy.go @@ -79,11 +79,6 @@ type PutKeyPolicyInput struct { // This member is required. Policy *string - // The name of the key policy. The only valid value is default . - // - // This member is required. - PolicyName *string - // Skips ("bypasses") the key policy lockout safety check. The default value is // false. Setting this value to true increases the risk that the KMS key becomes // unmanageable. Do not set this value to true indiscriminately. For more @@ -94,6 +89,10 @@ type PutKeyPolicyInput struct { // request on the KMS key. BypassPolicyLockoutSafetyCheck bool + // The name of the key policy. If no policy name is specified, the default value + // is default . The only valid value is default . + PolicyName *string + noSmithyDocumentSerde } diff --git a/service/kms/api_op_RevokeGrant.go b/service/kms/api_op_RevokeGrant.go index 2c3f013aef5..ca1a1eceb76 100644 --- a/service/kms/api_op_RevokeGrant.go +++ b/service/kms/api_op_RevokeGrant.go @@ -11,7 +11,7 @@ import ( ) // Deletes the specified grant. You revoke a grant to terminate the permissions -// that the grant allows. For more information, see Retiring and revoking grants (https://docs.aws.amazon.com/kms/latest/developerguide/managing-grants.html#grant-delete) +// that the grant allows. For more information, see Retiring and revoking grants (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete) // in the Key Management Service Developer Guide . When you create, retire, or // revoke a grant, there might be a brief delay, usually less than five minutes, // until the grant is available throughout KMS. This state is known as eventual diff --git a/service/kms/deserializers.go b/service/kms/deserializers.go index 573d41aeea4..b4bdc25e3cf 100644 --- a/service/kms/deserializers.go +++ b/service/kms/deserializers.go @@ -11790,6 +11790,15 @@ func awsAwsjson11_deserializeOpDocumentGetKeyPolicyOutput(v **GetKeyPolicyOutput sv.Policy = ptr.String(jtv) } + case "PolicyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyNameType to be of type string, got %T instead", value) + } + sv.PolicyName = ptr.String(jtv) + } + default: _, _ = key, value diff --git a/service/kms/validators.go b/service/kms/validators.go index 8f724d4b6af..9ca3bd5824a 100644 --- a/service/kms/validators.go +++ b/service/kms/validators.go @@ -1512,9 +1512,6 @@ func validateOpGetKeyPolicyInput(v *GetKeyPolicyInput) error { if v.KeyId == nil { invalidParams.Add(smithy.NewErrParamRequired("KeyId")) } - if v.PolicyName == nil { - invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1662,9 +1659,6 @@ func validateOpPutKeyPolicyInput(v *PutKeyPolicyInput) error { if v.KeyId == nil { invalidParams.Add(smithy.NewErrParamRequired("KeyId")) } - if v.PolicyName == nil { - invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) - } if v.Policy == nil { invalidParams.Add(smithy.NewErrParamRequired("Policy")) } diff --git a/service/mediatailor/api_op_CreateChannel.go b/service/mediatailor/api_op_CreateChannel.go index 949da369172..66fcde1f701 100644 --- a/service/mediatailor/api_op_CreateChannel.go +++ b/service/mediatailor/api_op_CreateChannel.go @@ -51,6 +51,9 @@ type CreateChannelInput struct { // This member is required. PlaybackMode types.PlaybackMode + // The list of audiences defined in channel. + Audiences []string + // The slate used to fill gaps between programs in the schedule. You must // configure filler slate if your channel uses the LINEAR PlaybackMode . // MediaTailor doesn't support filler slate for channels using the LOOP PlaybackMode @@ -77,6 +80,9 @@ type CreateChannelOutput struct { // The Amazon Resource Name (ARN) to assign to the channel. Arn *string + // The list of audiences defined in channel. + Audiences []string + // The name to assign to the channel. ChannelName *string diff --git a/service/mediatailor/api_op_CreateProgram.go b/service/mediatailor/api_op_CreateProgram.go index f66a67ab1db..fd3b0db480a 100644 --- a/service/mediatailor/api_op_CreateProgram.go +++ b/service/mediatailor/api_op_CreateProgram.go @@ -55,6 +55,9 @@ type CreateProgramInput struct { // The ad break configuration settings. AdBreaks []types.AdBreak + // The list of AudienceMedia defined in program. + AudienceMedia []types.AudienceMedia + // The name of the LiveSource for this Program. LiveSourceName *string @@ -72,6 +75,9 @@ type CreateProgramOutput struct { // The ARN to assign to the program. Arn *string + // The list of AudienceMedia defined in program. + AudienceMedia []types.AudienceMedia + // The name to assign to the channel for this program. ChannelName *string diff --git a/service/mediatailor/api_op_DescribeChannel.go b/service/mediatailor/api_op_DescribeChannel.go index 9eb570ed429..af412265418 100644 --- a/service/mediatailor/api_op_DescribeChannel.go +++ b/service/mediatailor/api_op_DescribeChannel.go @@ -50,6 +50,9 @@ type DescribeChannelOutput struct { // The ARN of the channel. Arn *string + // The list of audiences defined in channel. + Audiences []string + // The name of the channel. ChannelName *string diff --git a/service/mediatailor/api_op_DescribeProgram.go b/service/mediatailor/api_op_DescribeProgram.go index 508dd1e2f98..d14f1a4c3fc 100644 --- a/service/mediatailor/api_op_DescribeProgram.go +++ b/service/mediatailor/api_op_DescribeProgram.go @@ -53,6 +53,9 @@ type DescribeProgramOutput struct { // The ARN of the program. Arn *string + // The list of AudienceMedia defined in program. + AudienceMedia []types.AudienceMedia + // The name of the channel that the program belongs to. ChannelName *string diff --git a/service/mediatailor/api_op_GetChannelSchedule.go b/service/mediatailor/api_op_GetChannelSchedule.go index ec3150f9ab8..8e3f353305b 100644 --- a/service/mediatailor/api_op_GetChannelSchedule.go +++ b/service/mediatailor/api_op_GetChannelSchedule.go @@ -34,6 +34,9 @@ type GetChannelScheduleInput struct { // This member is required. ChannelName *string + // The single audience for GetChannelScheduleRequest. + Audience *string + // The duration in minutes of the channel schedule. DurationMinutes *string diff --git a/service/mediatailor/api_op_UpdateChannel.go b/service/mediatailor/api_op_UpdateChannel.go index 6abf5f93389..4351f3a927b 100644 --- a/service/mediatailor/api_op_UpdateChannel.go +++ b/service/mediatailor/api_op_UpdateChannel.go @@ -42,6 +42,9 @@ type UpdateChannelInput struct { // This member is required. Outputs []types.RequestOutputItem + // The list of audiences defined in channel. + Audiences []string + // The slate used to fill gaps between programs in the schedule. You must // configure filler slate if your channel uses the LINEAR PlaybackMode . // MediaTailor doesn't support filler slate for channels using the LOOP PlaybackMode @@ -59,6 +62,9 @@ type UpdateChannelOutput struct { // The Amazon Resource Name (ARN) associated with the channel. Arn *string + // The list of audiences defined in channel. + Audiences []string + // The name of the channel. ChannelName *string diff --git a/service/mediatailor/api_op_UpdateProgram.go b/service/mediatailor/api_op_UpdateProgram.go index 28eb7be6f21..668b68da4f3 100644 --- a/service/mediatailor/api_op_UpdateProgram.go +++ b/service/mediatailor/api_op_UpdateProgram.go @@ -48,6 +48,9 @@ type UpdateProgramInput struct { // The ad break configuration settings. AdBreaks []types.AdBreak + // The list of AudienceMedia defined in program. + AudienceMedia []types.AudienceMedia + noSmithyDocumentSerde } @@ -59,6 +62,9 @@ type UpdateProgramOutput struct { // The ARN to assign to the program. Arn *string + // The list of AudienceMedia defined in program. + AudienceMedia []types.AudienceMedia + // The name to assign to the channel for this program. ChannelName *string diff --git a/service/mediatailor/deserializers.go b/service/mediatailor/deserializers.go index 00939da64a3..d4dfeb60baa 100644 --- a/service/mediatailor/deserializers.go +++ b/service/mediatailor/deserializers.go @@ -473,6 +473,11 @@ func awsRestjson1_deserializeOpDocumentCreateChannelOutput(v **CreateChannelOutp sv.Arn = ptr.String(jtv) } + case "Audiences": + if err := awsRestjson1_deserializeDocumentAudiences(&sv.Audiences, value); err != nil { + return err + } + case "ChannelName": if value != nil { jtv, ok := value.(string) @@ -1107,6 +1112,11 @@ func awsRestjson1_deserializeOpDocumentCreateProgramOutput(v **CreateProgramOutp sv.Arn = ptr.String(jtv) } + case "AudienceMedia": + if err := awsRestjson1_deserializeDocument__listOfAudienceMedia(&sv.AudienceMedia, value); err != nil { + return err + } + case "ChannelName": if value != nil { jtv, ok := value.(string) @@ -2412,6 +2422,11 @@ func awsRestjson1_deserializeOpDocumentDescribeChannelOutput(v **DescribeChannel sv.Arn = ptr.String(jtv) } + case "Audiences": + if err := awsRestjson1_deserializeDocumentAudiences(&sv.Audiences, value); err != nil { + return err + } + case "ChannelName": if value != nil { jtv, ok := value.(string) @@ -2866,6 +2881,11 @@ func awsRestjson1_deserializeOpDocumentDescribeProgramOutput(v **DescribeProgram sv.Arn = ptr.String(jtv) } + case "AudienceMedia": + if err := awsRestjson1_deserializeDocument__listOfAudienceMedia(&sv.AudienceMedia, value); err != nil { + return err + } + case "ChannelName": if value != nil { jtv, ok := value.(string) @@ -6206,6 +6226,11 @@ func awsRestjson1_deserializeOpDocumentUpdateChannelOutput(v **UpdateChannelOutp sv.Arn = ptr.String(jtv) } + case "Audiences": + if err := awsRestjson1_deserializeDocumentAudiences(&sv.Audiences, value); err != nil { + return err + } + case "ChannelName": if value != nil { jtv, ok := value.(string) @@ -6655,6 +6680,11 @@ func awsRestjson1_deserializeOpDocumentUpdateProgramOutput(v **UpdateProgramOutp sv.Arn = ptr.String(jtv) } + case "AudienceMedia": + if err := awsRestjson1_deserializeDocument__listOfAudienceMedia(&sv.AudienceMedia, value); err != nil { + return err + } + case "ChannelName": if value != nil { jtv, ok := value.(string) @@ -7321,6 +7351,74 @@ func awsRestjson1_deserializeDocument__listOfAlert(v *[]types.Alert, value inter return nil } +func awsRestjson1_deserializeDocument__listOfAlternateMedia(v *[]types.AlternateMedia, 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.AlternateMedia + if *v == nil { + cv = []types.AlternateMedia{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AlternateMedia + destAddr := &col + if err := awsRestjson1_deserializeDocumentAlternateMedia(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfAudienceMedia(v *[]types.AudienceMedia, 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.AudienceMedia + if *v == nil { + cv = []types.AudienceMedia{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AudienceMedia + destAddr := &col + if err := awsRestjson1_deserializeDocumentAudienceMedia(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocument__listOfAvailMatchingCriteria(v *[]types.AvailMatchingCriteria, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8091,6 +8189,181 @@ func awsRestjson1_deserializeDocumentAlert(v **types.Alert, value interface{}) e return nil } +func awsRestjson1_deserializeDocumentAlternateMedia(v **types.AlternateMedia, 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.AlternateMedia + if *v == nil { + sv = &types.AlternateMedia{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AdBreaks": + if err := awsRestjson1_deserializeDocument__listOfAdBreak(&sv.AdBreaks, value); err != nil { + return err + } + + case "ClipRange": + if err := awsRestjson1_deserializeDocumentClipRange(&sv.ClipRange, value); err != nil { + return err + } + + case "DurationMillis": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DurationMillis = ptr.Int64(i64) + } + + case "LiveSourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.LiveSourceName = ptr.String(jtv) + } + + case "ScheduledStartTimeMillis": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ScheduledStartTimeMillis = ptr.Int64(i64) + } + + case "SourceLocationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.SourceLocationName = ptr.String(jtv) + } + + case "VodSourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.VodSourceName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAudienceMedia(v **types.AudienceMedia, 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.AudienceMedia + if *v == nil { + sv = &types.AudienceMedia{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AlternateMedia": + if err := awsRestjson1_deserializeDocument__listOfAlternateMedia(&sv.AlternateMedia, value); err != nil { + return err + } + + case "Audience": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Audience = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAudiences(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 String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentAvailMatchingCriteria(v **types.AvailMatchingCriteria, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8367,6 +8640,11 @@ func awsRestjson1_deserializeDocumentChannel(v **types.Channel, value interface{ sv.Arn = ptr.String(jtv) } + case "Audiences": + if err := awsRestjson1_deserializeDocumentAudiences(&sv.Audiences, value); err != nil { + return err + } + case "ChannelName": if value != nil { jtv, ok := value.(string) @@ -8499,6 +8777,19 @@ func awsRestjson1_deserializeDocumentClipRange(v **types.ClipRange, value interf sv.EndOffsetMillis = ptr.Int64(i64) } + case "StartOffsetMillis": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StartOffsetMillis = ptr.Int64(i64) + } + default: _, _ = key, value @@ -9917,6 +10208,11 @@ func awsRestjson1_deserializeDocumentScheduleEntry(v **types.ScheduleEntry, valu sv.Arn = ptr.String(jtv) } + case "Audiences": + if err := awsRestjson1_deserializeDocumentAudiences(&sv.Audiences, value); err != nil { + return err + } + case "ChannelName": if value != nil { jtv, ok := value.(string) diff --git a/service/mediatailor/serializers.go b/service/mediatailor/serializers.go index edbd23dccaa..27fce25fdd7 100644 --- a/service/mediatailor/serializers.go +++ b/service/mediatailor/serializers.go @@ -257,6 +257,13 @@ func awsRestjson1_serializeOpDocumentCreateChannelInput(v *CreateChannelInput, v object := value.Object() defer object.Close() + if v.Audiences != nil { + ok := object.Key("Audiences") + if err := awsRestjson1_serializeDocumentAudiences(v.Audiences, ok); err != nil { + return err + } + } + if v.FillerSlate != nil { ok := object.Key("FillerSlate") if err := awsRestjson1_serializeDocumentSlateSource(v.FillerSlate, ok); err != nil { @@ -611,6 +618,13 @@ func awsRestjson1_serializeOpDocumentCreateProgramInput(v *CreateProgramInput, v } } + if v.AudienceMedia != nil { + ok := object.Key("AudienceMedia") + if err := awsRestjson1_serializeDocument__listOfAudienceMedia(v.AudienceMedia, ok); err != nil { + return err + } + } + if v.LiveSourceName != nil { ok := object.Key("LiveSourceName") ok.String(*v.LiveSourceName) @@ -1886,6 +1900,10 @@ func awsRestjson1_serializeOpHttpBindingsGetChannelScheduleInput(v *GetChannelSc return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.Audience != nil { + encoder.SetQuery("audience").String(*v.Audience) + } + if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } @@ -3233,6 +3251,13 @@ func awsRestjson1_serializeOpDocumentUpdateChannelInput(v *UpdateChannelInput, v object := value.Object() defer object.Close() + if v.Audiences != nil { + ok := object.Key("Audiences") + if err := awsRestjson1_serializeDocumentAudiences(v.Audiences, ok); err != nil { + return err + } + } + if v.FillerSlate != nil { ok := object.Key("FillerSlate") if err := awsRestjson1_serializeDocumentSlateSource(v.FillerSlate, ok); err != nil { @@ -3452,6 +3477,13 @@ func awsRestjson1_serializeOpDocumentUpdateProgramInput(v *UpdateProgramInput, v } } + if v.AudienceMedia != nil { + ok := object.Key("AudienceMedia") + if err := awsRestjson1_serializeDocument__listOfAudienceMedia(v.AudienceMedia, ok); err != nil { + return err + } + } + if v.ScheduleConfiguration != nil { ok := object.Key("ScheduleConfiguration") if err := awsRestjson1_serializeDocumentUpdateProgramScheduleConfiguration(v.ScheduleConfiguration, ok); err != nil { @@ -3685,6 +3717,32 @@ func awsRestjson1_serializeDocument__listOfAdBreak(v []types.AdBreak, value smit return nil } +func awsRestjson1_serializeDocument__listOfAlternateMedia(v []types.AlternateMedia, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAlternateMedia(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocument__listOfAudienceMedia(v []types.AudienceMedia, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAudienceMedia(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocument__listOfAvailMatchingCriteria(v []types.AvailMatchingCriteria, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -3822,6 +3880,82 @@ func awsRestjson1_serializeDocumentAdMarkupTypes(v []types.AdMarkupType, value s return nil } +func awsRestjson1_serializeDocumentAlternateMedia(v *types.AlternateMedia, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdBreaks != nil { + ok := object.Key("AdBreaks") + if err := awsRestjson1_serializeDocument__listOfAdBreak(v.AdBreaks, ok); err != nil { + return err + } + } + + if v.ClipRange != nil { + ok := object.Key("ClipRange") + if err := awsRestjson1_serializeDocumentClipRange(v.ClipRange, ok); err != nil { + return err + } + } + + if v.DurationMillis != nil { + ok := object.Key("DurationMillis") + ok.Long(*v.DurationMillis) + } + + if v.LiveSourceName != nil { + ok := object.Key("LiveSourceName") + ok.String(*v.LiveSourceName) + } + + if v.ScheduledStartTimeMillis != nil { + ok := object.Key("ScheduledStartTimeMillis") + ok.Long(*v.ScheduledStartTimeMillis) + } + + if v.SourceLocationName != nil { + ok := object.Key("SourceLocationName") + ok.String(*v.SourceLocationName) + } + + if v.VodSourceName != nil { + ok := object.Key("VodSourceName") + ok.String(*v.VodSourceName) + } + + return nil +} + +func awsRestjson1_serializeDocumentAudienceMedia(v *types.AudienceMedia, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AlternateMedia != nil { + ok := object.Key("AlternateMedia") + if err := awsRestjson1_serializeDocument__listOfAlternateMedia(v.AlternateMedia, ok); err != nil { + return err + } + } + + if v.Audience != nil { + ok := object.Key("Audience") + ok.String(*v.Audience) + } + + return nil +} + +func awsRestjson1_serializeDocumentAudiences(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_serializeDocumentAvailMatchingCriteria(v *types.AvailMatchingCriteria, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3904,6 +4038,11 @@ func awsRestjson1_serializeDocumentClipRange(v *types.ClipRange, value smithyjso ok.Long(*v.EndOffsetMillis) } + if v.StartOffsetMillis != nil { + ok := object.Key("StartOffsetMillis") + ok.Long(*v.StartOffsetMillis) + } + return nil } diff --git a/service/mediatailor/types/enums.go b/service/mediatailor/types/enums.go index af1dc430754..75b57799f93 100644 --- a/service/mediatailor/types/enums.go +++ b/service/mediatailor/types/enums.go @@ -224,8 +224,9 @@ type ScheduleEntryType string // Enum values for ScheduleEntryType const ( - ScheduleEntryTypeProgram ScheduleEntryType = "PROGRAM" - ScheduleEntryTypeFillerSlate ScheduleEntryType = "FILLER_SLATE" + ScheduleEntryTypeProgram ScheduleEntryType = "PROGRAM" + ScheduleEntryTypeFillerSlate ScheduleEntryType = "FILLER_SLATE" + ScheduleEntryTypeAlternateMedia ScheduleEntryType = "ALTERNATE_MEDIA" ) // Values returns all known values for ScheduleEntryType. Note that this can be @@ -235,6 +236,7 @@ func (ScheduleEntryType) Values() []ScheduleEntryType { return []ScheduleEntryType{ "PROGRAM", "FILLER_SLATE", + "ALTERNATE_MEDIA", } } diff --git a/service/mediatailor/types/types.go b/service/mediatailor/types/types.go index 3dccd7ef51c..9caa72208d9 100644 --- a/service/mediatailor/types/types.go +++ b/service/mediatailor/types/types.go @@ -150,6 +150,47 @@ type Alert struct { noSmithyDocumentSerde } +// A playlist of media (VOD and/or live) to be played instead of the default media +// on a particular program. +type AlternateMedia struct { + + // Ad break configuration parameters defined in AlternateMedia. + AdBreaks []AdBreak + + // Clip range configuration for the VOD source associated with the program. + ClipRange *ClipRange + + // The duration of the alternateMedia in milliseconds. + DurationMillis *int64 + + // The name of the live source for alternateMedia. + LiveSourceName *string + + // The date and time that the alternateMedia is scheduled to start, in epoch + // milliseconds. + ScheduledStartTimeMillis *int64 + + // The name of the source location for alternateMedia. + SourceLocationName *string + + // The name of the VOD source for alternateMedia. + VodSourceName *string + + noSmithyDocumentSerde +} + +// An AudienceMedia object contains an Audience and a list of AlternateMedia. +type AudienceMedia struct { + + // The list of AlternateMedia defined in AudienceMedia. + AlternateMedia []AlternateMedia + + // The Audience defined in AudienceMedia. + Audience *string + + noSmithyDocumentSerde +} + // MediaTailor only places (consumes) prefetched ads if the ad break meets the // criteria defined by the dynamic variables. This gives you granular control over // which ad break to place the prefetched ads into. As an example, let's say that @@ -294,6 +335,9 @@ type Channel struct { // This member is required. Tier *string + // The list of audiences defined in channel. + Audiences []string + // The timestamp of when the channel was created. CreationTime *time.Time @@ -320,10 +364,12 @@ type ClipRange struct { // The end offset of the clip range, in milliseconds, starting from the beginning // of the VOD source associated with the program. - // - // This member is required. EndOffsetMillis *int64 + // The start offset of the clip range, in milliseconds. This offset truncates the + // start at the number of milliseconds into the duration of the VOD source. + StartOffsetMillis *int64 + noSmithyDocumentSerde } @@ -899,6 +945,9 @@ type ScheduleEntry struct { // The approximate time that the program will start playing. ApproximateStartTime *time.Time + // The list of audiences defined in ScheduleEntry. + Audiences []string + // The name of the live source used for the program. LiveSourceName *string diff --git a/service/mediatailor/validators.go b/service/mediatailor/validators.go index 94f926a68cc..76f33252f3d 100644 --- a/service/mediatailor/validators.go +++ b/service/mediatailor/validators.go @@ -1011,6 +1011,40 @@ func validate__listOfAdBreak(v []types.AdBreak) error { } } +func validate__listOfAlternateMedia(v []types.AlternateMedia) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListOfAlternateMedia"} + for i := range v { + if err := validateAlternateMedia(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validate__listOfAudienceMedia(v []types.AudienceMedia) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListOfAudienceMedia"} + for i := range v { + if err := validateAudienceMedia(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validate__listOfAvailMatchingCriteria(v []types.AvailMatchingCriteria) error { if v == nil { return nil @@ -1062,16 +1096,32 @@ func validateAdBreakMetadataList(v []types.KeyValuePair) error { } } -func validateAvailMatchingCriteria(v *types.AvailMatchingCriteria) error { +func validateAlternateMedia(v *types.AlternateMedia) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "AvailMatchingCriteria"} - if v.DynamicVariable == nil { - invalidParams.Add(smithy.NewErrParamRequired("DynamicVariable")) + invalidParams := smithy.InvalidParamsError{Context: "AlternateMedia"} + if v.AdBreaks != nil { + if err := validate__listOfAdBreak(v.AdBreaks); err != nil { + invalidParams.AddNested("AdBreaks", err.(smithy.InvalidParamsError)) + } } - if len(v.Operator) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Operator")) + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAudienceMedia(v *types.AudienceMedia) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AudienceMedia"} + if v.AlternateMedia != nil { + if err := validate__listOfAlternateMedia(v.AlternateMedia); err != nil { + invalidParams.AddNested("AlternateMedia", err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -1080,13 +1130,16 @@ func validateAvailMatchingCriteria(v *types.AvailMatchingCriteria) error { } } -func validateClipRange(v *types.ClipRange) error { +func validateAvailMatchingCriteria(v *types.AvailMatchingCriteria) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ClipRange"} - if v.EndOffsetMillis == nil { - invalidParams.Add(smithy.NewErrParamRequired("EndOffsetMillis")) + invalidParams := smithy.InvalidParamsError{Context: "AvailMatchingCriteria"} + if v.DynamicVariable == nil { + invalidParams.Add(smithy.NewErrParamRequired("DynamicVariable")) + } + if len(v.Operator) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Operator")) } if invalidParams.Len() > 0 { return invalidParams @@ -1248,11 +1301,6 @@ func validateScheduleConfiguration(v *types.ScheduleConfiguration) error { invalidParams.AddNested("Transition", err.(smithy.InvalidParamsError)) } } - if v.ClipRange != nil { - if err := validateClipRange(v.ClipRange); err != nil { - invalidParams.AddNested("ClipRange", err.(smithy.InvalidParamsError)) - } - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1293,23 +1341,6 @@ func validateTransition(v *types.Transition) error { } } -func validateUpdateProgramScheduleConfiguration(v *types.UpdateProgramScheduleConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateProgramScheduleConfiguration"} - if v.ClipRange != nil { - if err := validateClipRange(v.ClipRange); err != nil { - invalidParams.AddNested("ClipRange", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateOpConfigureLogsForChannelInput(v *ConfigureLogsForChannelInput) error { if v == nil { return nil @@ -1456,6 +1487,11 @@ func validateOpCreateProgramInput(v *CreateProgramInput) error { if v.SourceLocationName == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceLocationName")) } + if v.AudienceMedia != nil { + if err := validate__listOfAudienceMedia(v.AudienceMedia); err != nil { + invalidParams.AddNested("AudienceMedia", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -2033,9 +2069,10 @@ func validateOpUpdateProgramInput(v *UpdateProgramInput) error { } if v.ScheduleConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("ScheduleConfiguration")) - } else if v.ScheduleConfiguration != nil { - if err := validateUpdateProgramScheduleConfiguration(v.ScheduleConfiguration); err != nil { - invalidParams.AddNested("ScheduleConfiguration", err.(smithy.InvalidParamsError)) + } + if v.AudienceMedia != nil { + if err := validate__listOfAudienceMedia(v.AudienceMedia); err != nil { + invalidParams.AddNested("AudienceMedia", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { diff --git a/service/rds/api_op_CreateIntegration.go b/service/rds/api_op_CreateIntegration.go index 578db7f87c8..7b11622b1df 100644 --- a/service/rds/api_op_CreateIntegration.go +++ b/service/rds/api_op_CreateIntegration.go @@ -53,6 +53,14 @@ type CreateIntegrationInput struct { // include this parameter if you specify the KMSKeyId parameter. AdditionalEncryptionContext map[string]string + // Data filtering options for the integration. For more information, see Data + // filtering for Aurora zero-ETL integrations with Amazon Redshift (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.filtering.html) + // . Valid for: Integrations with Aurora MySQL source DB clusters only + DataFilter *string + + // A description of the integration. + Description *string + // The Amazon Web Services Key Management System (Amazon Web Services KMS) key // identifier for the key to use to encrypt the integration. If you don't specify // an encryption key, RDS uses a default Amazon Web Services owned key. @@ -76,6 +84,13 @@ type CreateIntegrationOutput struct { // The time when the integration was created, in Universal Coordinated Time (UTC). CreateTime *time.Time + // Data filters for the integration. These filters determine which tables from the + // source database are sent to the target Amazon Redshift data warehouse. + DataFilter *string + + // A description of the integration. + Description *string + // Any errors associated with the integration. Errors []types.IntegrationError diff --git a/service/rds/api_op_DeleteIntegration.go b/service/rds/api_op_DeleteIntegration.go index b3448ce4468..d212867bc38 100644 --- a/service/rds/api_op_DeleteIntegration.go +++ b/service/rds/api_op_DeleteIntegration.go @@ -49,6 +49,13 @@ type DeleteIntegrationOutput struct { // The time when the integration was created, in Universal Coordinated Time (UTC). CreateTime *time.Time + // Data filters for the integration. These filters determine which tables from the + // source database are sent to the target Amazon Redshift data warehouse. + DataFilter *string + + // A description of the integration. + Description *string + // Any errors associated with the integration. Errors []types.IntegrationError diff --git a/service/rds/api_op_ModifyIntegration.go b/service/rds/api_op_ModifyIntegration.go new file mode 100644 index 00000000000..79ecae720c7 --- /dev/null +++ b/service/rds/api_op_ModifyIntegration.go @@ -0,0 +1,191 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rds + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/rds/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Modifies a zero-ETL integration with Amazon Redshift. Currently, you can only +// modify integrations that have Aurora MySQL source DB clusters. Integrations with +// Aurora PostgreSQL and RDS sources currently don't support modifying the +// integration. +func (c *Client) ModifyIntegration(ctx context.Context, params *ModifyIntegrationInput, optFns ...func(*Options)) (*ModifyIntegrationOutput, error) { + if params == nil { + params = &ModifyIntegrationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ModifyIntegration", params, optFns, c.addOperationModifyIntegrationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ModifyIntegrationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ModifyIntegrationInput struct { + + // The unique identifier of the integration to modify. + // + // This member is required. + IntegrationIdentifier *string + + // A new data filter for the integration. For more information, see Data filtering + // for Aurora zero-ETL integrations with Amazon Redshift (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Zero_ETL_Filtering.html) + // . + DataFilter *string + + // A new description for the integration. + Description *string + + // A new name for the integration. + IntegrationName *string + + noSmithyDocumentSerde +} + +// A zero-ETL integration with Amazon Redshift. +type ModifyIntegrationOutput struct { + + // The encryption context for the integration. For more information, see + // Encryption context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context) + // in the Amazon Web Services Key Management Service Developer Guide. + AdditionalEncryptionContext map[string]string + + // The time when the integration was created, in Universal Coordinated Time (UTC). + CreateTime *time.Time + + // Data filters for the integration. These filters determine which tables from the + // source database are sent to the target Amazon Redshift data warehouse. + DataFilter *string + + // A description of the integration. + Description *string + + // Any errors associated with the integration. + Errors []types.IntegrationError + + // The ARN of the integration. + IntegrationArn *string + + // The name of the integration. + IntegrationName *string + + // The Amazon Web Services Key Management System (Amazon Web Services KMS) key + // identifier for the key used to to encrypt the integration. + KMSKeyId *string + + // The Amazon Resource Name (ARN) of the database used as the source for + // replication. + SourceArn *string + + // The current status of the integration. + Status types.IntegrationStatus + + // A list of tags. For more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. + Tags []types.Tag + + // The ARN of the Redshift data warehouse used as the target for replication. + TargetArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationModifyIntegrationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyIntegration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyIntegration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyIntegration"); 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 = 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 = addOpModifyIntegrationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyIntegration(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 + } + return nil +} + +func newServiceMetadataMiddleware_opModifyIntegration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ModifyIntegration", + } +} diff --git a/service/rds/deserializers.go b/service/rds/deserializers.go index b49fdf9f281..8497a49071d 100644 --- a/service/rds/deserializers.go +++ b/service/rds/deserializers.go @@ -14212,6 +14212,120 @@ func awsAwsquery_deserializeOpErrorModifyGlobalCluster(response *smithyhttp.Resp } } +type awsAwsquery_deserializeOpModifyIntegration struct { +} + +func (*awsAwsquery_deserializeOpModifyIntegration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpModifyIntegration) 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 + } + + 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, awsAwsquery_deserializeOpErrorModifyIntegration(response, &metadata) + } + output := &ModifyIntegrationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("ModifyIntegrationResult") + 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 + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentModifyIntegrationOutput(&output, 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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorModifyIntegration(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("IntegrationConflictOperationFault", errorCode): + return awsAwsquery_deserializeErrorIntegrationConflictOperationFault(response, errorBody) + + case strings.EqualFold("IntegrationNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorIntegrationNotFoundFault(response, errorBody) + + case strings.EqualFold("InvalidIntegrationStateFault", errorCode): + return awsAwsquery_deserializeErrorInvalidIntegrationStateFault(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpModifyOptionGroup struct { } @@ -42407,6 +42521,32 @@ func awsAwsquery_deserializeDocumentIntegration(v **types.Integration, decoder s sv.CreateTime = ptr.Time(t) } + case strings.EqualFold("DataFilter", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DataFilter = ptr.String(xtv) + } + + case strings.EqualFold("Description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + case strings.EqualFold("Errors", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentIntegrationErrorList(&sv.Errors, nodeDecoder); err != nil { @@ -56701,6 +56841,32 @@ func awsAwsquery_deserializeOpDocumentCreateIntegrationOutput(v **CreateIntegrat sv.CreateTime = ptr.Time(t) } + case strings.EqualFold("DataFilter", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DataFilter = ptr.String(xtv) + } + + case strings.EqualFold("Description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + case strings.EqualFold("Errors", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentIntegrationErrorList(&sv.Errors, nodeDecoder); err != nil { @@ -58115,6 +58281,32 @@ func awsAwsquery_deserializeOpDocumentDeleteIntegrationOutput(v **DeleteIntegrat sv.CreateTime = ptr.Time(t) } + case strings.EqualFold("DataFilter", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DataFilter = ptr.String(xtv) + } + + case strings.EqualFold("Description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + case strings.EqualFold("Errors", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentIntegrationErrorList(&sv.Errors, nodeDecoder); err != nil { @@ -62621,6 +62813,181 @@ func awsAwsquery_deserializeOpDocumentModifyGlobalClusterOutput(v **ModifyGlobal return nil } +func awsAwsquery_deserializeOpDocumentModifyIntegrationOutput(v **ModifyIntegrationOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ModifyIntegrationOutput + if *v == nil { + sv = &ModifyIntegrationOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AdditionalEncryptionContext", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentEncryptionContextMap(&sv.AdditionalEncryptionContext, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CreateTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.CreateTime = ptr.Time(t) + } + + case strings.EqualFold("DataFilter", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DataFilter = ptr.String(xtv) + } + + case strings.EqualFold("Description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + + case strings.EqualFold("Errors", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentIntegrationErrorList(&sv.Errors, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IntegrationArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IntegrationArn = ptr.String(xtv) + } + + case strings.EqualFold("IntegrationName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IntegrationName = ptr.String(xtv) + } + + case strings.EqualFold("KMSKeyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.KMSKeyId = ptr.String(xtv) + } + + case strings.EqualFold("SourceArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SourceArn = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = types.IntegrationStatus(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("TargetArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TargetArn = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentModifyOptionGroupOutput(v **ModifyOptionGroupOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/rds/generated.json b/service/rds/generated.json index e6d564a207f..8c918bdf7c7 100644 --- a/service/rds/generated.json +++ b/service/rds/generated.json @@ -141,6 +141,7 @@ "api_op_ModifyDBSubnetGroup.go", "api_op_ModifyEventSubscription.go", "api_op_ModifyGlobalCluster.go", + "api_op_ModifyIntegration.go", "api_op_ModifyOptionGroup.go", "api_op_ModifyTenantDatabase.go", "api_op_PromoteReadReplica.go", diff --git a/service/rds/serializers.go b/service/rds/serializers.go index c1094f12925..320b064a013 100644 --- a/service/rds/serializers.go +++ b/service/rds/serializers.go @@ -8078,6 +8078,70 @@ func (m *awsAwsquery_serializeOpModifyGlobalCluster) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpModifyIntegration struct { +} + +func (*awsAwsquery_serializeOpModifyIntegration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpModifyIntegration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ModifyIntegrationInput) + _ = 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("ModifyIntegration") + body.Key("Version").String("2014-10-31") + + if err := awsAwsquery_serializeOpDocumentModifyIntegrationInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 + + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpModifyOptionGroup struct { } @@ -12781,6 +12845,16 @@ func awsAwsquery_serializeOpDocumentCreateIntegrationInput(v *CreateIntegrationI } } + if v.DataFilter != nil { + objectKey := object.Key("DataFilter") + objectKey.String(*v.DataFilter) + } + + if v.Description != nil { + objectKey := object.Key("Description") + objectKey.String(*v.Description) + } + if v.IntegrationName != nil { objectKey := object.Key("IntegrationName") objectKey.String(*v.IntegrationName) @@ -15936,6 +16010,33 @@ func awsAwsquery_serializeOpDocumentModifyGlobalClusterInput(v *ModifyGlobalClus return nil } +func awsAwsquery_serializeOpDocumentModifyIntegrationInput(v *ModifyIntegrationInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DataFilter != nil { + objectKey := object.Key("DataFilter") + objectKey.String(*v.DataFilter) + } + + if v.Description != nil { + objectKey := object.Key("Description") + objectKey.String(*v.Description) + } + + if v.IntegrationIdentifier != nil { + objectKey := object.Key("IntegrationIdentifier") + objectKey.String(*v.IntegrationIdentifier) + } + + if v.IntegrationName != nil { + objectKey := object.Key("IntegrationName") + objectKey.String(*v.IntegrationName) + } + + return nil +} + func awsAwsquery_serializeOpDocumentModifyOptionGroupInput(v *ModifyOptionGroupInput, value query.Value) error { object := value.Object() _ = object diff --git a/service/rds/snapshot_test.go b/service/rds/snapshot_test.go index 4deed97a7de..ab8447d4a16 100644 --- a/service/rds/snapshot_test.go +++ b/service/rds/snapshot_test.go @@ -1574,6 +1574,18 @@ func TestCheckSnapshot_ModifyGlobalCluster(t *testing.T) { } } +func TestCheckSnapshot_ModifyIntegration(t *testing.T) { + svc := New(Options{}) + _, err := svc.ModifyIntegration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ModifyIntegration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ModifyOptionGroup(t *testing.T) { svc := New(Options{}) _, err := svc.ModifyOptionGroup(context.Background(), nil, func(o *Options) { @@ -3505,6 +3517,18 @@ func TestUpdateSnapshot_ModifyGlobalCluster(t *testing.T) { } } +func TestUpdateSnapshot_ModifyIntegration(t *testing.T) { + svc := New(Options{}) + _, err := svc.ModifyIntegration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ModifyIntegration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ModifyOptionGroup(t *testing.T) { svc := New(Options{}) _, err := svc.ModifyOptionGroup(context.Background(), nil, func(o *Options) { diff --git a/service/rds/types/types.go b/service/rds/types/types.go index 967b3144300..acb1bd86257 100644 --- a/service/rds/types/types.go +++ b/service/rds/types/types.go @@ -3069,6 +3069,13 @@ type Integration struct { // The time when the integration was created, in Universal Coordinated Time (UTC). CreateTime *time.Time + // Data filters for the integration. These filters determine which tables from the + // source database are sent to the target Amazon Redshift data warehouse. + DataFilter *string + + // A description of the integration. + Description *string + // Any errors associated with the integration. Errors []IntegrationError diff --git a/service/rds/validators.go b/service/rds/validators.go index 923bed22480..1e6432ecb3b 100644 --- a/service/rds/validators.go +++ b/service/rds/validators.go @@ -2410,6 +2410,26 @@ func (m *validateOpModifyEventSubscription) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpModifyIntegration struct { +} + +func (*validateOpModifyIntegration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpModifyIntegration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ModifyIntegrationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpModifyIntegrationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpModifyOptionGroup struct { } @@ -3570,6 +3590,10 @@ func addOpModifyEventSubscriptionValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpModifyEventSubscription{}, middleware.After) } +func addOpModifyIntegrationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpModifyIntegration{}, middleware.After) +} + func addOpModifyOptionGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyOptionGroup{}, middleware.After) } @@ -5910,6 +5934,21 @@ func validateOpModifyEventSubscriptionInput(v *ModifyEventSubscriptionInput) err } } +func validateOpModifyIntegrationInput(v *ModifyIntegrationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ModifyIntegrationInput"} + if v.IntegrationIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("IntegrationIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpModifyOptionGroupInput(v *ModifyOptionGroupInput) error { if v == nil { return nil diff --git a/service/sso/internal/endpoints/endpoints.go b/service/sso/internal/endpoints/endpoints.go index c8f7c09e46d..0a00b256e10 100644 --- a/service/sso/internal/endpoints/endpoints.go +++ b/service/sso/internal/endpoints/endpoints.go @@ -211,6 +211,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "ap-southeast-3", }, }, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{ + Hostname: "portal.sso.ap-southeast-4.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-4", + }, + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{ diff --git a/service/ssoadmin/internal/endpoints/endpoints.go b/service/ssoadmin/internal/endpoints/endpoints.go index 66ad76ddca6..0480794fe1a 100644 --- a/service/ssoadmin/internal/endpoints/endpoints.go +++ b/service/ssoadmin/internal/endpoints/endpoints.go @@ -166,6 +166,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/ssooidc/internal/endpoints/endpoints.go b/service/ssooidc/internal/endpoints/endpoints.go index cbd77fd291c..aa207253432 100644 --- a/service/ssooidc/internal/endpoints/endpoints.go +++ b/service/ssooidc/internal/endpoints/endpoints.go @@ -211,6 +211,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "ap-southeast-3", }, }, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{ + Hostname: "oidc.ap-southeast-4.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-4", + }, + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{ diff --git a/service/storagegateway/internal/endpoints/endpoints.go b/service/storagegateway/internal/endpoints/endpoints.go index 2a31e4dde1f..64c888b6750 100644 --- a/service/storagegateway/internal/endpoints/endpoints.go +++ b/service/storagegateway/internal/endpoints/endpoints.go @@ -384,6 +384,35 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips", + }: endpoints.Endpoint{ + Hostname: "storagegateway-fips.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-isob-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-isob-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isob-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "storagegateway-fips.us-isob-east-1.sc2s.sgov.gov", + }, + endpoints.EndpointKey{ + Region: "us-isob-east-1-fips", + }: endpoints.Endpoint{ + Hostname: "storagegateway-fips.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-isob-east-1", + }, + Deprecated: aws.TrueTernary, + }, + }, }, { ID: "aws-iso-e", diff --git a/service/timestreamquery/api_op_PrepareQuery.go b/service/timestreamquery/api_op_PrepareQuery.go index 28056e46e10..ae5441067c9 100644 --- a/service/timestreamquery/api_op_PrepareQuery.go +++ b/service/timestreamquery/api_op_PrepareQuery.go @@ -14,7 +14,7 @@ import ( // A synchronous operation that allows you to submit a query with parameters to be // stored by Timestream for later running. Timestream only supports using this -// operation with the PrepareQueryRequest$ValidateOnly set to true . +// operation with ValidateOnly set to true . func (c *Client) PrepareQuery(ctx context.Context, params *PrepareQueryInput, optFns ...func(*Options)) (*PrepareQueryOutput, error) { if params == nil { params = &PrepareQueryInput{} diff --git a/service/timestreamquery/endpoints.go b/service/timestreamquery/endpoints.go index a4b715145af..4a8284a19a8 100644 --- a/service/timestreamquery/endpoints.go +++ b/service/timestreamquery/endpoints.go @@ -373,7 +373,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://query.timestream-fips.") diff --git a/service/timestreamquery/types/types.go b/service/timestreamquery/types/types.go index 50f4487c873..ec89e66ddcb 100644 --- a/service/timestreamquery/types/types.go +++ b/service/timestreamquery/types/types.go @@ -586,7 +586,8 @@ type Type struct { RowColumnInfo []ColumnInfo // Indicates if the column is of type string, integer, Boolean, double, timestamp, - // date, time. + // date, time. For more information, see Supported data types (https://docs.aws.amazon.com/timestream/latest/developerguide/supported-data-types.html) + // . ScalarType ScalarType // Indicates if the column is a timeseries data type.