diff --git a/.changelog/0549ee2e8aae4e8c90029524f29a3476.json b/.changelog/0549ee2e8aae4e8c90029524f29a3476.json new file mode 100644 index 00000000000..320f93d4598 --- /dev/null +++ b/.changelog/0549ee2e8aae4e8c90029524f29a3476.json @@ -0,0 +1,8 @@ +{ + "id": "0549ee2e-8aae-4e8c-9002-9524f29a3476", + "type": "feature", + "description": "Amazon VPC IP Address Manager (IPAM) now supports Bring-Your-Own-IP (BYOIP) for IP addresses registered with any Internet Registry. This feature uses DNS TXT records to validate ownership of a public IP address range.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/12f7542d99a54b54ac78b02b38d6e855.json b/.changelog/12f7542d99a54b54ac78b02b38d6e855.json new file mode 100644 index 00000000000..dbe31edd427 --- /dev/null +++ b/.changelog/12f7542d99a54b54ac78b02b38d6e855.json @@ -0,0 +1,8 @@ +{ + "id": "12f7542d-99a5-4b54-ac78-b02b38d6e855", + "type": "documentation", + "description": "Documentation update for IVS Chat API Reference.", + "modules": [ + "service/ivschat" + ] +} \ No newline at end of file diff --git a/.changelog/3563967670554e8da18b7f844641523e.json b/.changelog/3563967670554e8da18b7f844641523e.json new file mode 100644 index 00000000000..43bf30b0419 --- /dev/null +++ b/.changelog/3563967670554e8da18b7f844641523e.json @@ -0,0 +1,8 @@ +{ + "id": "35639676-7055-4e8d-a18b-7f844641523e", + "type": "documentation", + "description": "Doc-only update for TimestreamQuery. Added guidance about the accepted valid value for the QueryPricingModel parameter.", + "modules": [ + "service/timestreamquery" + ] +} \ No newline at end of file diff --git a/.changelog/4573a543b970400c858302be1dfb8bf4.json b/.changelog/4573a543b970400c858302be1dfb8bf4.json new file mode 100644 index 00000000000..0b404a5deb9 --- /dev/null +++ b/.changelog/4573a543b970400c858302be1dfb8bf4.json @@ -0,0 +1,8 @@ +{ + "id": "4573a543-b970-400c-8583-02be1dfb8bf4", + "type": "feature", + "description": "AWS Elemental MediaLive now supports the SRT protocol via the new SRT Caller input type.", + "modules": [ + "service/medialive" + ] +} \ No newline at end of file diff --git a/.changelog/4e4640d99f2845c2ac076051f17ff17b.json b/.changelog/4e4640d99f2845c2ac076051f17ff17b.json new file mode 100644 index 00000000000..943a8fdcc4f --- /dev/null +++ b/.changelog/4e4640d99f2845c2ac076051f17ff17b.json @@ -0,0 +1,8 @@ +{ + "id": "4e4640d9-9f28-45c2-ac07-6051f17ff17b", + "type": "feature", + "description": "Set default endpoint for aws partition. Requests from all regions in aws partition will be forward to us-east-1 endpoint.", + "modules": [ + "service/taxsettings" + ] +} \ No newline at end of file diff --git a/.changelog/65511813fe2742e5aae039becebdab5e.json b/.changelog/65511813fe2742e5aae039becebdab5e.json new file mode 100644 index 00000000000..34ffb3d79ee --- /dev/null +++ b/.changelog/65511813fe2742e5aae039becebdab5e.json @@ -0,0 +1,8 @@ +{ + "id": "65511813-fe27-42e5-aae0-39becebdab5e", + "type": "feature", + "description": "Amazon Connect expands search API coverage for additional resources. Search for hierarchy groups by name, ID, tag, or other criteria (new endpoint). Search for agent statuses by name, ID, tag, or other criteria (new endpoint). Search for users by their assigned proficiencies (enhanced endpoint)", + "modules": [ + "service/connect" + ] +} \ No newline at end of file diff --git a/.changelog/7e18770b095e4f26a17278cf2c98e577.json b/.changelog/7e18770b095e4f26a17278cf2c98e577.json new file mode 100644 index 00000000000..ca491e6a290 --- /dev/null +++ b/.changelog/7e18770b095e4f26a17278cf2c98e577.json @@ -0,0 +1,8 @@ +{ + "id": "7e18770b-095e-4f26-a172-78cf2c98e577", + "type": "documentation", + "description": "Doc only update for Secrets Manager", + "modules": [ + "service/secretsmanager" + ] +} \ No newline at end of file diff --git a/.changelog/b72fae9dc9f44e4fbae6b64fe5e085f2.json b/.changelog/b72fae9dc9f44e4fbae6b64fe5e085f2.json new file mode 100644 index 00000000000..40d701de194 --- /dev/null +++ b/.changelog/b72fae9dc9f44e4fbae6b64fe5e085f2.json @@ -0,0 +1,8 @@ +{ + "id": "b72fae9d-c9f4-4e4f-bae6-b64fe5e085f2", + "type": "feature", + "description": "SageMaker Training supports R5, T3 and R5D instances family. And SageMaker Processing supports G5 and R5D instances family.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/d5b0206b977d4e49b7a437bc49c5b2c2.json b/.changelog/d5b0206b977d4e49b7a437bc49c5b2c2.json new file mode 100644 index 00000000000..34633ff1b33 --- /dev/null +++ b/.changelog/d5b0206b977d4e49b7a437bc49c5b2c2.json @@ -0,0 +1,8 @@ +{ + "id": "d5b0206b-977d-4e49-b7a4-37bc49c5b2c2", + "type": "documentation", + "description": "Updates Amazon RDS documentation to specify an eventual consistency model for DescribePendingMaintenanceActions.", + "modules": [ + "service/rds" + ] +} \ No newline at end of file diff --git a/.changelog/ee23f72e02754c3eb598e7cd0b4c290e.json b/.changelog/ee23f72e02754c3eb598e7cd0b4c290e.json new file mode 100644 index 00000000000..1b4d5ec524c --- /dev/null +++ b/.changelog/ee23f72e02754c3eb598e7cd0b4c290e.json @@ -0,0 +1,8 @@ +{ + "id": "ee23f72e-0275-4c3e-b598-e7cd0b4c290e", + "type": "feature", + "description": "This release 1) Add configurable buffering hints for Snowflake as destination. 2) Add ReadFromTimestamp for MSK As Source. Firehose will start reading data from MSK Cluster using offset associated with this timestamp. 3) Gated public beta release to add Apache Iceberg tables as destination.", + "modules": [ + "service/firehose" + ] +} \ No newline at end of file diff --git a/.changelog/f9414f298b274335a4984debd9c8da65.json b/.changelog/f9414f298b274335a4984debd9c8da65.json new file mode 100644 index 00000000000..8d7cc7a1184 --- /dev/null +++ b/.changelog/f9414f298b274335a4984debd9c8da65.json @@ -0,0 +1,8 @@ +{ + "id": "f9414f29-8b27-4335-a498-4debd9c8da65", + "type": "feature", + "description": "Fix broken waiters for the acm-pca client. Waiters broke in version 1.13.144 of the Boto3 SDK.", + "modules": [ + "service/acmpca" + ] +} \ No newline at end of file diff --git a/.changelog/f95520bbe18549ad9c60bf6adf0ae001.json b/.changelog/f95520bbe18549ad9c60bf6adf0ae001.json new file mode 100644 index 00000000000..b57fdfe7794 --- /dev/null +++ b/.changelog/f95520bbe18549ad9c60bf6adf0ae001.json @@ -0,0 +1,8 @@ +{ + "id": "f95520bb-e185-49ad-9c60-bf6adf0ae001", + "type": "documentation", + "description": "Documentation update for WorkSpaces Thin Client.", + "modules": [ + "service/workspacesthinclient" + ] +} \ No newline at end of file diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index b1d4bf9c247..856cde651a8 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.47" +const goModuleVersion = "1.14.9" diff --git a/service/acmpca/api_op_DescribeCertificateAuthorityAuditReport.go b/service/acmpca/api_op_DescribeCertificateAuthorityAuditReport.go index ffa2d3fa390..16671dbdefb 100644 --- a/service/acmpca/api_op_DescribeCertificateAuthorityAuditReport.go +++ b/service/acmpca/api_op_DescribeCertificateAuthorityAuditReport.go @@ -187,7 +187,7 @@ type AuditReportCreatedWaiterOptions struct { MinDelay time.Duration // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, AuditReportCreatedWaiter will use default max delay of 120 seconds. + // set to zero, AuditReportCreatedWaiter will use default max delay of 180 seconds. // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. MaxDelay time.Duration @@ -217,7 +217,7 @@ type AuditReportCreatedWaiter struct { func NewAuditReportCreatedWaiter(client DescribeCertificateAuthorityAuditReportAPIClient, optFns ...func(*AuditReportCreatedWaiterOptions)) *AuditReportCreatedWaiter { options := AuditReportCreatedWaiterOptions{} options.MinDelay = 3 * time.Second - options.MaxDelay = 120 * time.Second + options.MaxDelay = 180 * time.Second options.Retryable = auditReportCreatedStateRetryable for _, fn := range optFns { @@ -252,7 +252,7 @@ func (w *AuditReportCreatedWaiter) WaitForOutput(ctx context.Context, params *De } if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second + options.MaxDelay = 180 * time.Second } if options.MinDelay > options.MaxDelay { diff --git a/service/acmpca/api_op_GetCertificate.go b/service/acmpca/api_op_GetCertificate.go index ce446f0001d..25c697d69ad 100644 --- a/service/acmpca/api_op_GetCertificate.go +++ b/service/acmpca/api_op_GetCertificate.go @@ -188,7 +188,7 @@ type CertificateIssuedWaiterOptions struct { MinDelay time.Duration // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, CertificateIssuedWaiter will use default max delay of 120 seconds. + // set to zero, CertificateIssuedWaiter will use default max delay of 60 seconds. // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. MaxDelay time.Duration @@ -218,7 +218,7 @@ type CertificateIssuedWaiter struct { func NewCertificateIssuedWaiter(client GetCertificateAPIClient, optFns ...func(*CertificateIssuedWaiterOptions)) *CertificateIssuedWaiter { options := CertificateIssuedWaiterOptions{} options.MinDelay = 1 * time.Second - options.MaxDelay = 120 * time.Second + options.MaxDelay = 60 * time.Second options.Retryable = certificateIssuedStateRetryable for _, fn := range optFns { @@ -253,7 +253,7 @@ func (w *CertificateIssuedWaiter) WaitForOutput(ctx context.Context, params *Get } if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second + options.MaxDelay = 60 * time.Second } if options.MinDelay > options.MaxDelay { diff --git a/service/acmpca/api_op_GetCertificateAuthorityCsr.go b/service/acmpca/api_op_GetCertificateAuthorityCsr.go index cdf36225608..34aa0a8a9f6 100644 --- a/service/acmpca/api_op_GetCertificateAuthorityCsr.go +++ b/service/acmpca/api_op_GetCertificateAuthorityCsr.go @@ -177,7 +177,7 @@ type CertificateAuthorityCSRCreatedWaiterOptions struct { // MaxDelay is the maximum amount of time to delay between retries. If unset or // set to zero, CertificateAuthorityCSRCreatedWaiter will use default max delay of - // 120 seconds. Note that MaxDelay must resolve to value greater than or equal to + // 180 seconds. Note that MaxDelay must resolve to value greater than or equal to // the MinDelay. MaxDelay time.Duration @@ -209,7 +209,7 @@ type CertificateAuthorityCSRCreatedWaiter struct { func NewCertificateAuthorityCSRCreatedWaiter(client GetCertificateAuthorityCsrAPIClient, optFns ...func(*CertificateAuthorityCSRCreatedWaiterOptions)) *CertificateAuthorityCSRCreatedWaiter { options := CertificateAuthorityCSRCreatedWaiterOptions{} options.MinDelay = 3 * time.Second - options.MaxDelay = 120 * time.Second + options.MaxDelay = 180 * time.Second options.Retryable = certificateAuthorityCSRCreatedStateRetryable for _, fn := range optFns { @@ -244,7 +244,7 @@ func (w *CertificateAuthorityCSRCreatedWaiter) WaitForOutput(ctx context.Context } if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second + options.MaxDelay = 180 * time.Second } if options.MinDelay > options.MaxDelay { diff --git a/service/connect/api_op_GetMetricDataV2.go b/service/connect/api_op_GetMetricDataV2.go index a100bdb32dd..0a88c470dac 100644 --- a/service/connect/api_op_GetMetricDataV2.go +++ b/service/connect/api_op_GetMetricDataV2.go @@ -522,7 +522,7 @@ type GetMetricDataV2Input struct { // Threshold: For ThresholdValue , enter any whole number from 1 to 604800 // (inclusive), in seconds. For Comparison , you must enter LT (for "Less than"). // - // UI name: This metric is not available in Amazon Connect admin website. + // UI name: [Contacts removed from queue in X seconds] // // CONTACTS_RESOLVED_IN_X Unit: Count // @@ -926,6 +926,7 @@ type GetMetricDataV2Input struct { // [Average customer hold time]: https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html#average-customer-hold-time-historical // [Agent interaction and hold time]: https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html#agent-interaction-hold-time-historical // [Contacts hold customer disconnect]: https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html#contacts-hold-customer-disconnect-historical + // [Contacts removed from queue in X seconds]: https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html#contacts-removed-historical // [Contacts put on hold]: https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html#contacts-hold-customer-disconnect-historical // [Contacts hold agent disconnect]: https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html#contacts-hold-agent-disconnect-historical // [Contacts transferred out internal]: https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html#contacts-transferred-out-internal-historical diff --git a/service/connect/api_op_SearchAgentStatuses.go b/service/connect/api_op_SearchAgentStatuses.go new file mode 100644 index 00000000000..4efced3d0c4 --- /dev/null +++ b/service/connect/api_op_SearchAgentStatuses.go @@ -0,0 +1,256 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Searches AgentStatuses in an Amazon Connect instance, with optional filtering. +func (c *Client) SearchAgentStatuses(ctx context.Context, params *SearchAgentStatusesInput, optFns ...func(*Options)) (*SearchAgentStatusesOutput, error) { + if params == nil { + params = &SearchAgentStatusesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchAgentStatuses", params, optFns, c.addOperationSearchAgentStatusesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchAgentStatusesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchAgentStatusesInput struct { + + // The identifier of the Amazon Connect instance. You can find the instanceId in + // the ARN of the instance. + // + // This member is required. + InstanceId *string + + // The maximum number of results to return per page. + MaxResults *int32 + + // The token for the next set of results. Use the value returned in the previous + // response in the next request to retrieve the next set of results. + NextToken *string + + // The search criteria to be used to return agent statuses. + SearchCriteria *types.AgentStatusSearchCriteria + + // Filters to be applied to search results. + SearchFilter *types.AgentStatusSearchFilter + + noSmithyDocumentSerde +} + +type SearchAgentStatusesOutput struct { + + // The search criteria to be used to return agent statuses. + AgentStatuses []types.AgentStatus + + // The total number of agent statuses which matched your search query. + ApproximateTotalCount *int64 + + // If there are additional results, this is the token for the next set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSearchAgentStatusesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpSearchAgentStatuses{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSearchAgentStatuses{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SearchAgentStatuses"); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpSearchAgentStatusesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchAgentStatuses(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 +} + +// SearchAgentStatusesPaginatorOptions is the paginator options for +// SearchAgentStatuses +type SearchAgentStatusesPaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// SearchAgentStatusesPaginator is a paginator for SearchAgentStatuses +type SearchAgentStatusesPaginator struct { + options SearchAgentStatusesPaginatorOptions + client SearchAgentStatusesAPIClient + params *SearchAgentStatusesInput + nextToken *string + firstPage bool +} + +// NewSearchAgentStatusesPaginator returns a new SearchAgentStatusesPaginator +func NewSearchAgentStatusesPaginator(client SearchAgentStatusesAPIClient, params *SearchAgentStatusesInput, optFns ...func(*SearchAgentStatusesPaginatorOptions)) *SearchAgentStatusesPaginator { + if params == nil { + params = &SearchAgentStatusesInput{} + } + + options := SearchAgentStatusesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &SearchAgentStatusesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *SearchAgentStatusesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next SearchAgentStatuses page. +func (p *SearchAgentStatusesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchAgentStatusesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.SearchAgentStatuses(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// SearchAgentStatusesAPIClient is a client that implements the +// SearchAgentStatuses operation. +type SearchAgentStatusesAPIClient interface { + SearchAgentStatuses(context.Context, *SearchAgentStatusesInput, ...func(*Options)) (*SearchAgentStatusesOutput, error) +} + +var _ SearchAgentStatusesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opSearchAgentStatuses(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SearchAgentStatuses", + } +} diff --git a/service/connect/api_op_SearchResourceTags.go b/service/connect/api_op_SearchResourceTags.go index 6da89137ff1..830155f89d1 100644 --- a/service/connect/api_op_SearchResourceTags.go +++ b/service/connect/api_op_SearchResourceTags.go @@ -45,6 +45,24 @@ type SearchResourceTagsInput struct { // The list of resource types to be used to search tags from. If not provided or // if any empty list is provided, this API will search from all supported resource // types. + // + // Supported resource types + // + // - AGENT + // + // - ROUTING_PROFILE + // + // - STANDARD_QUEUE + // + // - SECURITY_PROFILE + // + // - OPERATING_HOURS + // + // - PROMPT + // + // - CONTACT_FLOW + // + // - FLOW_MODULE ResourceTypes []string // The search criteria to be used to return tags. diff --git a/service/connect/api_op_SearchUserHierarchyGroups.go b/service/connect/api_op_SearchUserHierarchyGroups.go new file mode 100644 index 00000000000..510e7565e68 --- /dev/null +++ b/service/connect/api_op_SearchUserHierarchyGroups.go @@ -0,0 +1,262 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Searches UserHierarchyGroups in an Amazon Connect instance, with optional +// filtering. +// +// The UserHierarchyGroup with "LevelId": "0" is the foundation for building +// levels on top of an instance. It is not user-definable, nor is it visible in the +// UI. +func (c *Client) SearchUserHierarchyGroups(ctx context.Context, params *SearchUserHierarchyGroupsInput, optFns ...func(*Options)) (*SearchUserHierarchyGroupsOutput, error) { + if params == nil { + params = &SearchUserHierarchyGroupsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchUserHierarchyGroups", params, optFns, c.addOperationSearchUserHierarchyGroupsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchUserHierarchyGroupsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchUserHierarchyGroupsInput struct { + + // The identifier of the Amazon Connect instance. You can find the instanceId in + // the ARN of the instance. + // + // This member is required. + InstanceId *string + + // The maximum number of results to return per page. + MaxResults *int32 + + // The token for the next set of results. Use the value returned in the previous + // response in the next request to retrieve the next set of results. + NextToken *string + + // The search criteria to be used to return UserHierarchyGroups. + SearchCriteria *types.UserHierarchyGroupSearchCriteria + + // Filters to be applied to search results. + SearchFilter *types.UserHierarchyGroupSearchFilter + + noSmithyDocumentSerde +} + +type SearchUserHierarchyGroupsOutput struct { + + // The total number of userHierarchyGroups which matched your search query. + ApproximateTotalCount *int64 + + // If there are additional results, this is the token for the next set of results. + NextToken *string + + // Information about the userHierarchyGroups. + UserHierarchyGroups []types.HierarchyGroup + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSearchUserHierarchyGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpSearchUserHierarchyGroups{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSearchUserHierarchyGroups{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SearchUserHierarchyGroups"); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpSearchUserHierarchyGroupsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchUserHierarchyGroups(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 +} + +// SearchUserHierarchyGroupsPaginatorOptions is the paginator options for +// SearchUserHierarchyGroups +type SearchUserHierarchyGroupsPaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// SearchUserHierarchyGroupsPaginator is a paginator for SearchUserHierarchyGroups +type SearchUserHierarchyGroupsPaginator struct { + options SearchUserHierarchyGroupsPaginatorOptions + client SearchUserHierarchyGroupsAPIClient + params *SearchUserHierarchyGroupsInput + nextToken *string + firstPage bool +} + +// NewSearchUserHierarchyGroupsPaginator returns a new +// SearchUserHierarchyGroupsPaginator +func NewSearchUserHierarchyGroupsPaginator(client SearchUserHierarchyGroupsAPIClient, params *SearchUserHierarchyGroupsInput, optFns ...func(*SearchUserHierarchyGroupsPaginatorOptions)) *SearchUserHierarchyGroupsPaginator { + if params == nil { + params = &SearchUserHierarchyGroupsInput{} + } + + options := SearchUserHierarchyGroupsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &SearchUserHierarchyGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *SearchUserHierarchyGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next SearchUserHierarchyGroups page. +func (p *SearchUserHierarchyGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchUserHierarchyGroupsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.SearchUserHierarchyGroups(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// SearchUserHierarchyGroupsAPIClient is a client that implements the +// SearchUserHierarchyGroups operation. +type SearchUserHierarchyGroupsAPIClient interface { + SearchUserHierarchyGroups(context.Context, *SearchUserHierarchyGroupsInput, ...func(*Options)) (*SearchUserHierarchyGroupsOutput, error) +} + +var _ SearchUserHierarchyGroupsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opSearchUserHierarchyGroups(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SearchUserHierarchyGroups", + } +} diff --git a/service/connect/deserializers.go b/service/connect/deserializers.go index 0f3e985334c..037b6d385f4 100644 --- a/service/connect/deserializers.go +++ b/service/connect/deserializers.go @@ -25906,6 +25906,187 @@ func awsRestjson1_deserializeOpErrorResumeContactRecording(response *smithyhttp. } } +type awsRestjson1_deserializeOpSearchAgentStatuses struct { +} + +func (*awsRestjson1_deserializeOpSearchAgentStatuses) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSearchAgentStatuses) 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, awsRestjson1_deserializeOpErrorSearchAgentStatuses(response, &metadata) + } + output := &SearchAgentStatusesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentSearchAgentStatusesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSearchAgentStatuses(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentSearchAgentStatusesOutput(v **SearchAgentStatusesOutput, 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 *SearchAgentStatusesOutput + if *v == nil { + sv = &SearchAgentStatusesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AgentStatuses": + if err := awsRestjson1_deserializeDocumentAgentStatusList(&sv.AgentStatuses, value); err != nil { + return err + } + + case "ApproximateTotalCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ApproximateTotalCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ApproximateTotalCount = ptr.Int64(i64) + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken2500 to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpSearchAvailablePhoneNumbers struct { } @@ -28052,6 +28233,187 @@ func awsRestjson1_deserializeOpDocumentSearchSecurityProfilesOutput(v **SearchSe return nil } +type awsRestjson1_deserializeOpSearchUserHierarchyGroups struct { +} + +func (*awsRestjson1_deserializeOpSearchUserHierarchyGroups) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSearchUserHierarchyGroups) 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, awsRestjson1_deserializeOpErrorSearchUserHierarchyGroups(response, &metadata) + } + output := &SearchUserHierarchyGroupsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentSearchUserHierarchyGroupsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSearchUserHierarchyGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentSearchUserHierarchyGroupsOutput(v **SearchUserHierarchyGroupsOutput, 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 *SearchUserHierarchyGroupsOutput + if *v == nil { + sv = &SearchUserHierarchyGroupsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApproximateTotalCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ApproximateTotalCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ApproximateTotalCount = ptr.Int64(i64) + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken2500 to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "UserHierarchyGroups": + if err := awsRestjson1_deserializeDocumentUserHierarchyGroupList(&sv.UserHierarchyGroups, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpSearchUsers struct { } @@ -37849,6 +38211,40 @@ func awsRestjson1_deserializeDocumentAgentStatus(v **types.AgentStatus, value in return nil } +func awsRestjson1_deserializeDocumentAgentStatusList(v *[]types.AgentStatus, 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.AgentStatus + if *v == nil { + cv = []types.AgentStatus{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AgentStatus + destAddr := &col + if err := awsRestjson1_deserializeDocumentAgentStatus(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentAgentStatusReference(v **types.AgentStatusReference, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -56415,6 +56811,40 @@ func awsRestjson1_deserializeDocumentUserDataList(v *[]types.UserData, value int return nil } +func awsRestjson1_deserializeDocumentUserHierarchyGroupList(v *[]types.HierarchyGroup, 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.HierarchyGroup + if *v == nil { + cv = []types.HierarchyGroup{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.HierarchyGroup + destAddr := &col + if err := awsRestjson1_deserializeDocumentHierarchyGroup(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentUserIdentityInfo(v **types.UserIdentityInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/connect/generated.json b/service/connect/generated.json index 5875897813b..011155b6ae6 100644 --- a/service/connect/generated.json +++ b/service/connect/generated.json @@ -181,6 +181,7 @@ "api_op_ReplicateInstance.go", "api_op_ResumeContact.go", "api_op_ResumeContactRecording.go", + "api_op_SearchAgentStatuses.go", "api_op_SearchAvailablePhoneNumbers.go", "api_op_SearchContactFlowModules.go", "api_op_SearchContactFlows.go", @@ -193,6 +194,7 @@ "api_op_SearchResourceTags.go", "api_op_SearchRoutingProfiles.go", "api_op_SearchSecurityProfiles.go", + "api_op_SearchUserHierarchyGroups.go", "api_op_SearchUsers.go", "api_op_SearchVocabularies.go", "api_op_SendChatIntegrationEvent.go", diff --git a/service/connect/serializers.go b/service/connect/serializers.go index 4f9bb128270..e950665fae4 100644 --- a/service/connect/serializers.go +++ b/service/connect/serializers.go @@ -14806,6 +14806,105 @@ func awsRestjson1_serializeOpDocumentResumeContactRecordingInput(v *ResumeContac return nil } +type awsRestjson1_serializeOpSearchAgentStatuses struct { +} + +func (*awsRestjson1_serializeOpSearchAgentStatuses) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchAgentStatuses) 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.(*SearchAgentStatusesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/search-agent-statuses") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSearchAgentStatusesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSearchAgentStatusesInput(v *SearchAgentStatusesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSearchAgentStatusesInput(v *SearchAgentStatusesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.SearchCriteria != nil { + ok := object.Key("SearchCriteria") + if err := awsRestjson1_serializeDocumentAgentStatusSearchCriteria(v.SearchCriteria, ok); err != nil { + return err + } + } + + if v.SearchFilter != nil { + ok := object.Key("SearchFilter") + if err := awsRestjson1_serializeDocumentAgentStatusSearchFilter(v.SearchFilter, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpSearchAvailablePhoneNumbers struct { } @@ -16000,6 +16099,105 @@ func awsRestjson1_serializeOpDocumentSearchSecurityProfilesInput(v *SearchSecuri return nil } +type awsRestjson1_serializeOpSearchUserHierarchyGroups struct { +} + +func (*awsRestjson1_serializeOpSearchUserHierarchyGroups) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchUserHierarchyGroups) 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.(*SearchUserHierarchyGroupsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/search-user-hierarchy-groups") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSearchUserHierarchyGroupsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSearchUserHierarchyGroupsInput(v *SearchUserHierarchyGroupsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSearchUserHierarchyGroupsInput(v *SearchUserHierarchyGroupsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.SearchCriteria != nil { + ok := object.Key("SearchCriteria") + if err := awsRestjson1_serializeDocumentUserHierarchyGroupSearchCriteria(v.SearchCriteria, ok); err != nil { + return err + } + } + + if v.SearchFilter != nil { + ok := object.Key("SearchFilter") + if err := awsRestjson1_serializeDocumentUserHierarchyGroupSearchFilter(v.SearchFilter, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpSearchUsers struct { } @@ -23044,6 +23242,61 @@ func awsRestjson1_serializeDocumentAgentsMinOneMaxHundred(v []string, value smit return nil } +func awsRestjson1_serializeDocumentAgentStatusSearchConditionList(v []types.AgentStatusSearchCriteria, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAgentStatusSearchCriteria(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentAgentStatusSearchCriteria(v *types.AgentStatusSearchCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AndConditions != nil { + ok := object.Key("AndConditions") + if err := awsRestjson1_serializeDocumentAgentStatusSearchConditionList(v.AndConditions, ok); err != nil { + return err + } + } + + if v.OrConditions != nil { + ok := object.Key("OrConditions") + if err := awsRestjson1_serializeDocumentAgentStatusSearchConditionList(v.OrConditions, ok); err != nil { + return err + } + } + + if v.StringCondition != nil { + ok := object.Key("StringCondition") + if err := awsRestjson1_serializeDocumentStringCondition(v.StringCondition, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAgentStatusSearchFilter(v *types.AgentStatusSearchFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AttributeFilter != nil { + ok := object.Key("AttributeFilter") + if err := awsRestjson1_serializeDocumentControlPlaneAttributeFilter(v.AttributeFilter, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentAllowedAccessControlTags(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -23298,6 +23551,67 @@ func awsRestjson1_serializeDocumentChatStreamingConfiguration(v *types.ChatStrea return nil } +func awsRestjson1_serializeDocumentCommonAttributeAndCondition(v *types.CommonAttributeAndCondition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TagConditions != nil { + ok := object.Key("TagConditions") + if err := awsRestjson1_serializeDocumentTagAndConditionList(v.TagConditions, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentCommonAttributeOrConditionList(v []types.CommonAttributeAndCondition, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentCommonAttributeAndCondition(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentCondition(v *types.Condition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NumberCondition != nil { + ok := object.Key("NumberCondition") + if err := awsRestjson1_serializeDocumentNumberCondition(v.NumberCondition, ok); err != nil { + return err + } + } + + if v.StringCondition != nil { + ok := object.Key("StringCondition") + if err := awsRestjson1_serializeDocumentStringCondition(v.StringCondition, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentConditions(v []types.Condition, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentCondition(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentContactAnalysis(v *types.ContactAnalysis, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -23545,6 +23859,34 @@ func awsRestjson1_serializeDocumentContactTagMap(v map[string]string, value smit return nil } +func awsRestjson1_serializeDocumentControlPlaneAttributeFilter(v *types.ControlPlaneAttributeFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AndCondition != nil { + ok := object.Key("AndCondition") + if err := awsRestjson1_serializeDocumentCommonAttributeAndCondition(v.AndCondition, ok); err != nil { + return err + } + } + + if v.OrConditions != nil { + ok := object.Key("OrConditions") + if err := awsRestjson1_serializeDocumentCommonAttributeOrConditionList(v.OrConditions, ok); err != nil { + return err + } + } + + if v.TagCondition != nil { + ok := object.Key("TagCondition") + if err := awsRestjson1_serializeDocumentTagCondition(v.TagCondition, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentControlPlaneTagFilter(v *types.ControlPlaneTagFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -24935,6 +25277,25 @@ func awsRestjson1_serializeDocumentLexV2Bot(v *types.LexV2Bot, value smithyjson. return nil } +func awsRestjson1_serializeDocumentListCondition(v *types.ListCondition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Conditions != nil { + ok := object.Key("Conditions") + if err := awsRestjson1_serializeDocumentConditions(v.Conditions, ok); err != nil { + return err + } + } + + if len(v.TargetListType) > 0 { + ok := object.Key("TargetListType") + ok.String(string(v.TargetListType)) + } + + return nil +} + func awsRestjson1_serializeDocumentMediaConcurrencies(v []types.MediaConcurrency, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -25115,6 +25476,33 @@ func awsRestjson1_serializeDocumentNotificationRecipientType(v *types.Notificati return nil } +func awsRestjson1_serializeDocumentNumberCondition(v *types.NumberCondition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ComparisonType) > 0 { + ok := object.Key("ComparisonType") + ok.String(string(v.ComparisonType)) + } + + if v.FieldName != nil { + ok := object.Key("FieldName") + ok.String(*v.FieldName) + } + + if v.MaxValue != nil { + ok := object.Key("MaxValue") + ok.Integer(*v.MaxValue) + } + + if v.MinValue != nil { + ok := object.Key("MinValue") + ok.Integer(*v.MinValue) + } + + return nil +} + func awsRestjson1_serializeDocumentNumericQuestionPropertyValueAutomation(v *types.NumericQuestionPropertyValueAutomation, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -26914,6 +27302,61 @@ func awsRestjson1_serializeDocumentUserDataHierarchyGroups(v []string, value smi return nil } +func awsRestjson1_serializeDocumentUserHierarchyGroupSearchConditionList(v []types.UserHierarchyGroupSearchCriteria, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentUserHierarchyGroupSearchCriteria(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentUserHierarchyGroupSearchCriteria(v *types.UserHierarchyGroupSearchCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AndConditions != nil { + ok := object.Key("AndConditions") + if err := awsRestjson1_serializeDocumentUserHierarchyGroupSearchConditionList(v.AndConditions, ok); err != nil { + return err + } + } + + if v.OrConditions != nil { + ok := object.Key("OrConditions") + if err := awsRestjson1_serializeDocumentUserHierarchyGroupSearchConditionList(v.OrConditions, ok); err != nil { + return err + } + } + + if v.StringCondition != nil { + ok := object.Key("StringCondition") + if err := awsRestjson1_serializeDocumentStringCondition(v.StringCondition, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentUserHierarchyGroupSearchFilter(v *types.UserHierarchyGroupSearchFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AttributeFilter != nil { + ok := object.Key("AttributeFilter") + if err := awsRestjson1_serializeDocumentControlPlaneAttributeFilter(v.AttributeFilter, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentUserIdentityInfo(v *types.UserIdentityInfo, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -27110,6 +27553,13 @@ func awsRestjson1_serializeDocumentUserSearchCriteria(v *types.UserSearchCriteri } } + if v.ListCondition != nil { + ok := object.Key("ListCondition") + if err := awsRestjson1_serializeDocumentListCondition(v.ListCondition, ok); err != nil { + return err + } + } + if v.OrConditions != nil { ok := object.Key("OrConditions") if err := awsRestjson1_serializeDocumentUserSearchConditionList(v.OrConditions, ok); err != nil { diff --git a/service/connect/snapshot/api_op_SearchAgentStatuses.go.snap b/service/connect/snapshot/api_op_SearchAgentStatuses.go.snap new file mode 100644 index 00000000000..816bdf0b95f --- /dev/null +++ b/service/connect/snapshot/api_op_SearchAgentStatuses.go.snap @@ -0,0 +1,36 @@ +SearchAgentStatuses + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/connect/snapshot/api_op_SearchUserHierarchyGroups.go.snap b/service/connect/snapshot/api_op_SearchUserHierarchyGroups.go.snap new file mode 100644 index 00000000000..53604bd7f17 --- /dev/null +++ b/service/connect/snapshot/api_op_SearchUserHierarchyGroups.go.snap @@ -0,0 +1,36 @@ +SearchUserHierarchyGroups + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/connect/snapshot_test.go b/service/connect/snapshot_test.go index 28a3562d5f6..4c8ecc33c7e 100644 --- a/service/connect/snapshot_test.go +++ b/service/connect/snapshot_test.go @@ -2138,6 +2138,18 @@ func TestCheckSnapshot_ResumeContactRecording(t *testing.T) { } } +func TestCheckSnapshot_SearchAgentStatuses(t *testing.T) { + svc := New(Options{}) + _, err := svc.SearchAgentStatuses(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "SearchAgentStatuses") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_SearchAvailablePhoneNumbers(t *testing.T) { svc := New(Options{}) _, err := svc.SearchAvailablePhoneNumbers(context.Background(), nil, func(o *Options) { @@ -2282,6 +2294,18 @@ func TestCheckSnapshot_SearchSecurityProfiles(t *testing.T) { } } +func TestCheckSnapshot_SearchUserHierarchyGroups(t *testing.T) { + svc := New(Options{}) + _, err := svc.SearchUserHierarchyGroups(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "SearchUserHierarchyGroups") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_SearchUsers(t *testing.T) { svc := New(Options{}) _, err := svc.SearchUsers(context.Background(), nil, func(o *Options) { @@ -5173,6 +5197,18 @@ func TestUpdateSnapshot_ResumeContactRecording(t *testing.T) { } } +func TestUpdateSnapshot_SearchAgentStatuses(t *testing.T) { + svc := New(Options{}) + _, err := svc.SearchAgentStatuses(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "SearchAgentStatuses") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_SearchAvailablePhoneNumbers(t *testing.T) { svc := New(Options{}) _, err := svc.SearchAvailablePhoneNumbers(context.Background(), nil, func(o *Options) { @@ -5317,6 +5353,18 @@ func TestUpdateSnapshot_SearchSecurityProfiles(t *testing.T) { } } +func TestUpdateSnapshot_SearchUserHierarchyGroups(t *testing.T) { + svc := New(Options{}) + _, err := svc.SearchUserHierarchyGroups(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "SearchUserHierarchyGroups") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_SearchUsers(t *testing.T) { svc := New(Options{}) _, err := svc.SearchUsers(context.Background(), nil, func(o *Options) { diff --git a/service/connect/types/enums.go b/service/connect/types/enums.go index 7cd58512596..ed50fd79522 100644 --- a/service/connect/types/enums.go +++ b/service/connect/types/enums.go @@ -1180,6 +1180,35 @@ func (NotificationDeliveryType) Values() []NotificationDeliveryType { } } +type NumberComparisonType string + +// Enum values for NumberComparisonType +const ( + NumberComparisonTypeGreaterOrEqual NumberComparisonType = "GREATER_OR_EQUAL" + NumberComparisonTypeGreater NumberComparisonType = "GREATER" + NumberComparisonTypeLesserOrEqual NumberComparisonType = "LESSER_OR_EQUAL" + NumberComparisonTypeLesser NumberComparisonType = "LESSER" + NumberComparisonTypeEqual NumberComparisonType = "EQUAL" + NumberComparisonTypeNotEqual NumberComparisonType = "NOT_EQUAL" + NumberComparisonTypeRange NumberComparisonType = "RANGE" +) + +// Values returns all known values for NumberComparisonType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (NumberComparisonType) Values() []NumberComparisonType { + return []NumberComparisonType{ + "GREATER_OR_EQUAL", + "GREATER", + "LESSER_OR_EQUAL", + "LESSER", + "EQUAL", + "NOT_EQUAL", + "RANGE", + } +} + type NumericQuestionPropertyAutomationLabel string // Enum values for NumericQuestionPropertyAutomationLabel @@ -2377,6 +2406,23 @@ func (StringComparisonType) Values() []StringComparisonType { } } +type TargetListType string + +// Enum values for TargetListType +const ( + TargetListTypeProficiencies TargetListType = "PROFICIENCIES" +) + +// Values returns all known values for TargetListType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (TargetListType) Values() []TargetListType { + return []TargetListType{ + "PROFICIENCIES", + } +} + type TaskTemplateFieldType string // Enum values for TaskTemplateFieldType diff --git a/service/connect/types/types.go b/service/connect/types/types.go index 3430c625964..60dad710e43 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -195,6 +195,43 @@ type AgentStatusReference struct { noSmithyDocumentSerde } +// The search criteria to be used to return agent statuses. +type AgentStatusSearchCriteria struct { + + // A leaf node condition which can be used to specify a string condition. + // + // The currently supported values for FieldName are name ,

 description , state , + // type , displayOrder ,
 and resourceID . + AndConditions []AgentStatusSearchCriteria + + // A list of conditions which would be applied together with an OR condition. + OrConditions []AgentStatusSearchCriteria + + // A leaf node condition which can be used to specify a string condition. + // + // The currently supported values for FieldName are name ,

 description , state , + // type , displayOrder ,
 and resourceID . + StringCondition *StringCondition + + noSmithyDocumentSerde +} + +// Filters to be applied to search results. +type AgentStatusSearchFilter struct { + + // An object that can be used to specify Tag conditions inside the SearchFilter . + // This accepts an OR of AND (List of List) input where: + // + // - The top level list specifies conditions that need to be applied with OR + // operator. + // + // - The inner list specifies conditions that need to be applied with AND + // operator. + AttributeFilter *ControlPlaneAttributeFilter + + noSmithyDocumentSerde +} + // Summary information for an agent status. type AgentStatusSummary struct { @@ -751,6 +788,30 @@ type ClaimedPhoneNumberSummary struct { noSmithyDocumentSerde } +// A list of conditions which would be applied together with an AND condition. +type CommonAttributeAndCondition struct { + + // A leaf node condition which can be used to specify a tag condition. + TagConditions []TagCondition + + noSmithyDocumentSerde +} + +// A leaf node condition which can be used to specify a ProficiencyName, +// ProficiencyValue and ProficiencyLimit. +type Condition struct { + + // A leaf node condition which can be used to specify a numeric condition. + NumberCondition *NumberCondition + + // A leaf node condition which can be used to specify a string condition. + // + // The currently supported values for FieldName are name and
 value . + StringCondition *StringCondition + + noSmithyDocumentSerde +} + // Information required to join the call. type ConnectionData struct { @@ -1024,8 +1085,6 @@ type ContactFlowModuleSearchCriteria struct { OrConditions []ContactFlowModuleSearchCriteria // A leaf node condition which can be used to specify a string condition. - // - // The currently supported values for FieldName are name and description . StringCondition *StringCondition noSmithyDocumentSerde @@ -1079,8 +1138,6 @@ type ContactFlowSearchCriteria struct { StatusCondition ContactFlowStatus // A leaf node condition which can be used to specify a string condition. - // - // The currently supported values for FieldName are name and description . StringCondition *StringCondition // The type of flow. @@ -1203,6 +1260,29 @@ type ContactSearchSummaryQueueInfo struct { noSmithyDocumentSerde } +// An object that can be used to specify Tag conditions inside the SearchFilter . +// This accepts an OR or AND (List of List) input where: +// +// - The top level list specifies conditions that need to be applied with OR +// operator. +// +// - The inner list specifies conditions that need to be applied with AND +// operator. +type ControlPlaneAttributeFilter struct { + + // A list of conditions which would be applied together with an AND condition. + AndCondition *CommonAttributeAndCondition + + // A list of conditions which would be applied together with an OR condition. + OrConditions []CommonAttributeAndCondition + + // A leaf node condition which can be used to specify a tag condition, for + // example, HAVE BPO = 123 . + TagCondition *TagCondition + + noSmithyDocumentSerde +} + // An object that can be used to specify Tag conditions inside the SearchFilter . // This accepts an OR of AND (List of List) input where: // @@ -3158,6 +3238,20 @@ type LexV2Bot struct { noSmithyDocumentSerde } +// A leaf node condition which can be used to specify a List condition to search +// users with attributes included in Lists like Proficiencies. +type ListCondition struct { + + // A list of Condition objects which would be applied together with an AND + // condition. + Conditions []Condition + + // The type of target list that will be used to filter the users. + TargetListType TargetListType + + noSmithyDocumentSerde +} + // Information about phone numbers that have been claimed to your Amazon Connect // instance or traffic distribution group. type ListPhoneNumbersSummary struct { @@ -3428,6 +3522,26 @@ type NotificationRecipientType struct { noSmithyDocumentSerde } +// A leaf node condition which can be used to specify a numeric condition. +// +// The currently supported value for FieldName is limit . +type NumberCondition struct { + + // The type of comparison to be made when evaluating the number condition. + ComparisonType NumberComparisonType + + // The name of the field in the number condition. + FieldName *string + + // The maxValue to be used while evaluating the number condition. + MaxValue *int32 + + // The minValue to be used while evaluating the number condition. + MinValue *int32 + + noSmithyDocumentSerde +} + // Information about a reference when the referenceType is NUMBER . Otherwise, null. type NumberReference struct { @@ -3712,8 +3826,6 @@ type PredefinedAttributeSearchCriteria struct { OrConditions []PredefinedAttributeSearchCriteria // A leaf node condition which can be used to specify a string condition. - // - // The currently supported values for FieldName are name and description . StringCondition *StringCondition noSmithyDocumentSerde @@ -5187,8 +5299,6 @@ type SecurityProfileSearchCriteria struct { OrConditions []SecurityProfileSearchCriteria // A leaf node condition which can be used to specify a string condition. - // - // The currently supported values for FieldName are name and description . StringCondition *StringCondition noSmithyDocumentSerde @@ -5384,8 +5494,6 @@ type Step struct { } // A leaf node condition which can be used to specify a string condition. -// -// The currently supported values for FieldName are name and description . type StringCondition struct { // The type of comparison to be made when evaluating the string condition. @@ -5977,6 +6085,40 @@ type UserDataFilters struct { noSmithyDocumentSerde } +// The search criteria to be used to return userHierarchyGroup. +type UserHierarchyGroupSearchCriteria struct { + + // A list of conditions which would be applied together with an AND condition. + AndConditions []UserHierarchyGroupSearchCriteria + + // A list of conditions which would be applied together with an OR condition. + OrConditions []UserHierarchyGroupSearchCriteria + + // A leaf node condition which can be used to specify a string condition. + // + // The currently supported values for FieldName are name ,

 parentId , levelId , + // and resourceID . + StringCondition *StringCondition + + noSmithyDocumentSerde +} + +// Filters to be applied to search results. +type UserHierarchyGroupSearchFilter struct { + + // An object that can be used to specify Tag conditions inside the SearchFilter. + // This accepts an OR or AND (List of List) input where: + // + // - The top level list specifies conditions that need to be applied with OR + // operator. + // + // - The inner list specifies conditions that need to be applied with AND + // operator. + AttributeFilter *ControlPlaneAttributeFilter + + noSmithyDocumentSerde +} + // Contains information about the identity of a user. // // For Amazon Connect instances that are created with the EXISTING_DIRECTORY @@ -6129,6 +6271,10 @@ type UserSearchCriteria struct { // A leaf node condition which can be used to specify a hierarchy group condition. HierarchyGroupCondition *HierarchyGroupCondition + // A leaf node condition which can be used to specify a List condition to search + // users with attributes included in Lists like Proficiencies. + ListCondition *ListCondition + // A list of conditions which would be applied together with an OR condition. OrConditions []UserSearchCriteria diff --git a/service/connect/validators.go b/service/connect/validators.go index 15ffc0022f9..911b3230266 100644 --- a/service/connect/validators.go +++ b/service/connect/validators.go @@ -3410,6 +3410,26 @@ func (m *validateOpResumeContactRecording) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpSearchAgentStatuses struct { +} + +func (*validateOpSearchAgentStatuses) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchAgentStatuses) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchAgentStatusesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchAgentStatusesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpSearchAvailablePhoneNumbers struct { } @@ -3650,6 +3670,26 @@ func (m *validateOpSearchSecurityProfiles) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpSearchUserHierarchyGroups struct { +} + +func (*validateOpSearchUserHierarchyGroups) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchUserHierarchyGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchUserHierarchyGroupsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchUserHierarchyGroupsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpSearchUsers struct { } @@ -5690,6 +5730,10 @@ func addOpResumeContactRecordingValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpResumeContactRecording{}, middleware.After) } +func addOpSearchAgentStatusesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchAgentStatuses{}, middleware.After) +} + func addOpSearchAvailablePhoneNumbersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSearchAvailablePhoneNumbers{}, middleware.After) } @@ -5738,6 +5782,10 @@ func addOpSearchSecurityProfilesValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpSearchSecurityProfiles{}, middleware.After) } +func addOpSearchUserHierarchyGroupsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchUserHierarchyGroups{}, middleware.After) +} + func addOpSearchUsersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSearchUsers{}, middleware.After) } @@ -10919,6 +10967,21 @@ func validateOpResumeContactRecordingInput(v *ResumeContactRecordingInput) error } } +func validateOpSearchAgentStatusesInput(v *SearchAgentStatusesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchAgentStatusesInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpSearchAvailablePhoneNumbersInput(v *SearchAvailablePhoneNumbersInput) error { if v == nil { return nil @@ -11119,6 +11182,21 @@ func validateOpSearchSecurityProfilesInput(v *SearchSecurityProfilesInput) error } } +func validateOpSearchUserHierarchyGroupsInput(v *SearchUserHierarchyGroupsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchUserHierarchyGroupsInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpSearchUsersInput(v *SearchUsersInput) error { if v == nil { return nil diff --git a/service/directconnect/internal/endpoints/endpoints.go b/service/directconnect/internal/endpoints/endpoints.go index 45ed398be05..6c9f3d45cf3 100644 --- a/service/directconnect/internal/endpoints/endpoints.go +++ b/service/directconnect/internal/endpoints/endpoints.go @@ -494,20 +494,40 @@ var defaultPartitions = endpoints.Partitions{ IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ - Region: "us-gov-east-1", + Region: "fips-us-gov-east-1", }: endpoints.Endpoint{ - Hostname: "directconnect.us-gov-east-1.amazonaws.com", + Hostname: "directconnect-fips.us-gov-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-east-1", }, + Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ - Region: "us-gov-west-1", + Region: "fips-us-gov-west-1", }: endpoints.Endpoint{ - Hostname: "directconnect.us-gov-west-1.amazonaws.com", + Hostname: "directconnect-fips.us-gov-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "directconnect-fips.us-gov-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "directconnect-fips.us-gov-west-1.amazonaws.com", }, }, }, diff --git a/service/ec2/api_op_CreateIpamExternalResourceVerificationToken.go b/service/ec2/api_op_CreateIpamExternalResourceVerificationToken.go new file mode 100644 index 00000000000..1eb4d83adb9 --- /dev/null +++ b/service/ec2/api_op_CreateIpamExternalResourceVerificationToken.go @@ -0,0 +1,197 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create a verification token. A verification token is an Amazon Web +// Services-generated random value that you can use to prove ownership of an +// external resource. For example, you can use a verification token to validate +// that you control a public IP address range when you bring an IP address range to +// Amazon Web Services (BYOIP). +func (c *Client) CreateIpamExternalResourceVerificationToken(ctx context.Context, params *CreateIpamExternalResourceVerificationTokenInput, optFns ...func(*Options)) (*CreateIpamExternalResourceVerificationTokenOutput, error) { + if params == nil { + params = &CreateIpamExternalResourceVerificationTokenInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateIpamExternalResourceVerificationToken", params, optFns, c.addOperationCreateIpamExternalResourceVerificationTokenMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateIpamExternalResourceVerificationTokenOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateIpamExternalResourceVerificationTokenInput struct { + + // The ID of the IPAM that will create the token. + // + // This member is required. + IpamId *string + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see [Ensuring idempotency]. + // + // [Ensuring idempotency]: https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html + ClientToken *string + + // A check for whether you have the required permissions for the action without + // actually making the request and provides an error response. If you have the + // required permissions, the error response is DryRunOperation . Otherwise, it is + // UnauthorizedOperation . + DryRun *bool + + // Token tags. + TagSpecifications []types.TagSpecification + + noSmithyDocumentSerde +} + +type CreateIpamExternalResourceVerificationTokenOutput struct { + + // The verification token. + IpamExternalResourceVerificationToken *types.IpamExternalResourceVerificationToken + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateIpamExternalResourceVerificationTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsEc2query_serializeOpCreateIpamExternalResourceVerificationToken{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateIpamExternalResourceVerificationToken{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateIpamExternalResourceVerificationToken"); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opCreateIpamExternalResourceVerificationTokenMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateIpamExternalResourceVerificationTokenValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateIpamExternalResourceVerificationToken(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 +} + +type idempotencyToken_initializeOpCreateIpamExternalResourceVerificationToken struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateIpamExternalResourceVerificationToken) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateIpamExternalResourceVerificationToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateIpamExternalResourceVerificationTokenInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateIpamExternalResourceVerificationTokenInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateIpamExternalResourceVerificationTokenMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateIpamExternalResourceVerificationToken{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateIpamExternalResourceVerificationToken(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateIpamExternalResourceVerificationToken", + } +} diff --git a/service/ec2/api_op_CreateIpamPool.go b/service/ec2/api_op_CreateIpamPool.go index 74ddb8fea57..426318c0881 100644 --- a/service/ec2/api_op_CreateIpamPool.go +++ b/service/ec2/api_op_CreateIpamPool.go @@ -104,13 +104,20 @@ type CreateIpamPoolInput struct { // UnauthorizedOperation . DryRun *bool - // In IPAM, the locale is the Amazon Web Services Region or, for IPAM IPv4 pools - // in the public scope, the network border group for an Amazon Web Services Local - // Zone where you want to make an IPAM pool available for allocations ([supported Local Zones] ). If you - // do not choose a locale, resources in Regions others than the IPAM's home region - // cannot use CIDRs from this pool. + // The locale for the pool should be one of the following: // - // Possible values: Any Amazon Web Services Region, such as us-east-1. + // - An Amazon Web Services Region where you want this IPAM pool to be available + // for allocations. + // + // - The network border group for an Amazon Web Services Local Zone where you + // want this IPAM pool to be available for allocations ([supported Local Zones] ). This option is only + // available for IPAM IPv4 pools in the public scope. + // + // If you do not choose a locale, resources in Regions others than the IPAM's home + // region cannot use CIDRs from this pool. + // + // Possible values: Any Amazon Web Services Region or supported Amazon Web + // Services Local Zone. // // [supported Local Zones]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html#byoip-zone-avail Locale *string diff --git a/service/ec2/api_op_DeleteIpamExternalResourceVerificationToken.go b/service/ec2/api_op_DeleteIpamExternalResourceVerificationToken.go new file mode 100644 index 00000000000..e81dc019f4c --- /dev/null +++ b/service/ec2/api_op_DeleteIpamExternalResourceVerificationToken.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete a verification token. A verification token is an Amazon Web +// Services-generated random value that you can use to prove ownership of an +// external resource. For example, you can use a verification token to validate +// that you control a public IP address range when you bring an IP address range to +// Amazon Web Services (BYOIP). +func (c *Client) DeleteIpamExternalResourceVerificationToken(ctx context.Context, params *DeleteIpamExternalResourceVerificationTokenInput, optFns ...func(*Options)) (*DeleteIpamExternalResourceVerificationTokenOutput, error) { + if params == nil { + params = &DeleteIpamExternalResourceVerificationTokenInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteIpamExternalResourceVerificationToken", params, optFns, c.addOperationDeleteIpamExternalResourceVerificationTokenMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteIpamExternalResourceVerificationTokenOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteIpamExternalResourceVerificationTokenInput struct { + + // The token ID. + // + // This member is required. + IpamExternalResourceVerificationTokenId *string + + // A check for whether you have the required permissions for the action without + // actually making the request and provides an error response. If you have the + // required permissions, the error response is DryRunOperation . Otherwise, it is + // UnauthorizedOperation . + DryRun *bool + + noSmithyDocumentSerde +} + +type DeleteIpamExternalResourceVerificationTokenOutput struct { + + // The verification token. + IpamExternalResourceVerificationToken *types.IpamExternalResourceVerificationToken + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteIpamExternalResourceVerificationTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteIpamExternalResourceVerificationToken{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteIpamExternalResourceVerificationToken{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteIpamExternalResourceVerificationToken"); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDeleteIpamExternalResourceVerificationTokenValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIpamExternalResourceVerificationToken(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_opDeleteIpamExternalResourceVerificationToken(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteIpamExternalResourceVerificationToken", + } +} diff --git a/service/ec2/api_op_DescribeIpamExternalResourceVerificationTokens.go b/service/ec2/api_op_DescribeIpamExternalResourceVerificationTokens.go new file mode 100644 index 00000000000..90c025473a8 --- /dev/null +++ b/service/ec2/api_op_DescribeIpamExternalResourceVerificationTokens.go @@ -0,0 +1,182 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describe verification tokens. A verification token is an Amazon Web +// Services-generated random value that you can use to prove ownership of an +// external resource. For example, you can use a verification token to validate +// that you control a public IP address range when you bring an IP address range to +// Amazon Web Services (BYOIP). +func (c *Client) DescribeIpamExternalResourceVerificationTokens(ctx context.Context, params *DescribeIpamExternalResourceVerificationTokensInput, optFns ...func(*Options)) (*DescribeIpamExternalResourceVerificationTokensOutput, error) { + if params == nil { + params = &DescribeIpamExternalResourceVerificationTokensInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeIpamExternalResourceVerificationTokens", params, optFns, c.addOperationDescribeIpamExternalResourceVerificationTokensMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeIpamExternalResourceVerificationTokensOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeIpamExternalResourceVerificationTokensInput struct { + + // A check for whether you have the required permissions for the action without + // actually making the request and provides an error response. If you have the + // required permissions, the error response is DryRunOperation . Otherwise, it is + // UnauthorizedOperation . + DryRun *bool + + // One or more filters for the request. For more information about filtering, see [Filtering CLI output]. + // + // Available filters: + // + // - ipam-arn + // + // - ipam-external-resource-verification-token-arn + // + // - ipam-external-resource-verification-token-id + // + // - ipam-id + // + // - ipam-region + // + // - state + // + // - status + // + // - token-name + // + // - token-value + // + // [Filtering CLI output]: https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-filter.html + Filters []types.Filter + + // Verification token IDs. + IpamExternalResourceVerificationTokenIds []string + + // The maximum number of tokens to return in one page of results. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeIpamExternalResourceVerificationTokensOutput struct { + + // Verification tokens. + IpamExternalResourceVerificationTokens []types.IpamExternalResourceVerificationToken + + // The token to use to retrieve the next page of results. This value is null when + // there are no more results to return. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeIpamExternalResourceVerificationTokensMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIpamExternalResourceVerificationTokens{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIpamExternalResourceVerificationTokens{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIpamExternalResourceVerificationTokens"); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpamExternalResourceVerificationTokens(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_opDescribeIpamExternalResourceVerificationTokens(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeIpamExternalResourceVerificationTokens", + } +} diff --git a/service/ec2/api_op_DescribePlacementGroups.go b/service/ec2/api_op_DescribePlacementGroups.go index 03cd6ceffd1..14aee7f2e88 100644 --- a/service/ec2/api_op_DescribePlacementGroups.go +++ b/service/ec2/api_op_DescribePlacementGroups.go @@ -11,8 +11,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Describes the specified placement groups or all of your placement groups. For -// more information, see [Placement groups]in the Amazon EC2 User Guide. +// Describes the specified placement groups or all of your placement groups. +// +// To describe a specific placement group that is shared with your account, you +// must specify the ID of the placement group using the GroupId parameter. +// Specifying the name of a shared placement group using the GroupNames parameter +// will result in an error. +// +// For more information, see [Placement groups] in the Amazon EC2 User Guide. // // [Placement groups]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html func (c *Client) DescribePlacementGroups(ctx context.Context, params *DescribePlacementGroupsInput, optFns ...func(*Options)) (*DescribePlacementGroupsOutput, error) { @@ -66,7 +72,12 @@ type DescribePlacementGroupsInput struct { // The names of the placement groups. // - // Default: Describes all your placement groups, or only those otherwise specified. + // Constraints: + // + // - You can specify a name only if the placement group is owned by your account. + // + // - If a placement group is shared with your account, specifying the name + // results in an error. You must use the GroupId parameter instead. GroupNames []string noSmithyDocumentSerde diff --git a/service/ec2/api_op_DescribeVolumesModifications.go b/service/ec2/api_op_DescribeVolumesModifications.go index ae8c7a4b5f7..7c54ba9e5ca 100644 --- a/service/ec2/api_op_DescribeVolumesModifications.go +++ b/service/ec2/api_op_DescribeVolumesModifications.go @@ -14,10 +14,6 @@ import ( // Describes the most recent volume modification request for the specified EBS // volumes. // -// If a volume has never been modified, some information in the output will be -// null. If a volume has been modified more than once, the output includes only the -// most recent modification request. -// // For more information, see [Monitor the progress of volume modifications] in the Amazon EBS User Guide. // // [Monitor the progress of volume modifications]: https://docs.aws.amazon.com/ebs/latest/userguide/monitoring-volume-modifications.html diff --git a/service/ec2/api_op_GetConsoleOutput.go b/service/ec2/api_op_GetConsoleOutput.go index cf44268611e..a23465082fc 100644 --- a/service/ec2/api_op_GetConsoleOutput.go +++ b/service/ec2/api_op_GetConsoleOutput.go @@ -16,15 +16,6 @@ import ( // displayed on a physical monitor attached to a computer. For Windows instances, // the instance console output includes the last three system event log errors. // -// By default, the console output returns buffered information that was posted -// shortly after an instance transition state (start, stop, reboot, or terminate). -// This information is available for at least one hour after the most recent post. -// Only the most recent 64 KB of console output is available. -// -// You can optionally retrieve the latest serial console output at any time during -// the instance lifecycle. This option is supported on instance types that use the -// Nitro hypervisor. -// // For more information, see [Instance console output] in the Amazon EC2 User Guide. // // [Instance console output]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html#instance-console-console-output diff --git a/service/ec2/api_op_ProvisionIpamPoolCidr.go b/service/ec2/api_op_ProvisionIpamPoolCidr.go index 0038ac67919..7f49f6497f5 100644 --- a/service/ec2/api_op_ProvisionIpamPoolCidr.go +++ b/service/ec2/api_op_ProvisionIpamPoolCidr.go @@ -46,7 +46,8 @@ type ProvisionIpamPoolCidrInput struct { Cidr *string // A signed document that proves that you are authorized to bring a specified IP - // address range to Amazon using BYOIP. This option applies to public pools only. + // address range to Amazon using BYOIP. This option only applies to IPv4 and IPv6 + // pools in the public scope. CidrAuthorizationContext *types.IpamCidrAuthorizationContext // A unique, case-sensitive identifier that you provide to ensure the idempotency @@ -61,12 +62,21 @@ type ProvisionIpamPoolCidrInput struct { // UnauthorizedOperation . DryRun *bool + // Verification token ID. This option only applies to IPv4 and IPv6 pools in the + // public scope. + IpamExternalResourceVerificationTokenId *string + // The netmask length of the CIDR you'd like to provision to a pool. Can be used // for provisioning Amazon-provided IPv6 CIDRs to top-level pools and for // provisioning CIDRs to pools with source pools. Cannot be used to provision BYOIP // CIDRs to top-level pools. Either "NetmaskLength" or "Cidr" is required. NetmaskLength *int32 + // The method for verifying control of a public IP address range. Defaults to + // remarks-x509 if not specified. This option only applies to IPv4 and IPv6 pools + // in the public scope. + VerificationMethod types.VerificationMethod + noSmithyDocumentSerde } diff --git a/service/ec2/deserializers.go b/service/ec2/deserializers.go index 6214ce086bc..10ad23f2c50 100644 --- a/service/ec2/deserializers.go +++ b/service/ec2/deserializers.go @@ -6857,6 +6857,97 @@ func awsEc2query_deserializeOpErrorCreateIpam(response *smithyhttp.Response, met } } +type awsEc2query_deserializeOpCreateIpamExternalResourceVerificationToken struct { +} + +func (*awsEc2query_deserializeOpCreateIpamExternalResourceVerificationToken) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpCreateIpamExternalResourceVerificationToken) 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, awsEc2query_deserializeOpErrorCreateIpamExternalResourceVerificationToken(response, &metadata) + } + output := &CreateIpamExternalResourceVerificationTokenOutput{} + 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) + err = awsEc2query_deserializeOpDocumentCreateIpamExternalResourceVerificationTokenOutput(&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 awsEc2query_deserializeOpErrorCreateIpamExternalResourceVerificationToken(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 := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsEc2query_deserializeOpCreateIpamPool struct { } @@ -13635,6 +13726,97 @@ func awsEc2query_deserializeOpErrorDeleteIpam(response *smithyhttp.Response, met } } +type awsEc2query_deserializeOpDeleteIpamExternalResourceVerificationToken struct { +} + +func (*awsEc2query_deserializeOpDeleteIpamExternalResourceVerificationToken) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpDeleteIpamExternalResourceVerificationToken) 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, awsEc2query_deserializeOpErrorDeleteIpamExternalResourceVerificationToken(response, &metadata) + } + output := &DeleteIpamExternalResourceVerificationTokenOutput{} + 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) + err = awsEc2query_deserializeOpDocumentDeleteIpamExternalResourceVerificationTokenOutput(&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 awsEc2query_deserializeOpErrorDeleteIpamExternalResourceVerificationToken(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 := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsEc2query_deserializeOpDeleteIpamPool struct { } @@ -24528,14 +24710,14 @@ func awsEc2query_deserializeOpErrorDescribeIpamByoasn(response *smithyhttp.Respo } } -type awsEc2query_deserializeOpDescribeIpamPools struct { +type awsEc2query_deserializeOpDescribeIpamExternalResourceVerificationTokens struct { } -func (*awsEc2query_deserializeOpDescribeIpamPools) ID() string { +func (*awsEc2query_deserializeOpDescribeIpamExternalResourceVerificationTokens) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDescribeIpamPools) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDescribeIpamExternalResourceVerificationTokens) 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) @@ -24549,9 +24731,9 @@ func (m *awsEc2query_deserializeOpDescribeIpamPools) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamPools(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamExternalResourceVerificationTokens(response, &metadata) } - output := &DescribeIpamPoolsOutput{} + output := &DescribeIpamExternalResourceVerificationTokensOutput{} out.Result = output var buff [1024]byte @@ -24572,7 +24754,7 @@ func (m *awsEc2query_deserializeOpDescribeIpamPools) HandleDeserialize(ctx conte } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIpamPoolsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDescribeIpamExternalResourceVerificationTokensOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24586,7 +24768,7 @@ func (m *awsEc2query_deserializeOpDescribeIpamPools) HandleDeserialize(ctx conte return out, metadata, err } -func awsEc2query_deserializeOpErrorDescribeIpamPools(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDescribeIpamExternalResourceVerificationTokens(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)} @@ -24619,14 +24801,14 @@ func awsEc2query_deserializeOpErrorDescribeIpamPools(response *smithyhttp.Respon } } -type awsEc2query_deserializeOpDescribeIpamResourceDiscoveries struct { +type awsEc2query_deserializeOpDescribeIpamPools struct { } -func (*awsEc2query_deserializeOpDescribeIpamResourceDiscoveries) ID() string { +func (*awsEc2query_deserializeOpDescribeIpamPools) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDescribeIpamResourceDiscoveries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDescribeIpamPools) 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) @@ -24640,9 +24822,9 @@ func (m *awsEc2query_deserializeOpDescribeIpamResourceDiscoveries) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveries(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamPools(response, &metadata) } - output := &DescribeIpamResourceDiscoveriesOutput{} + output := &DescribeIpamPoolsOutput{} out.Result = output var buff [1024]byte @@ -24663,7 +24845,7 @@ func (m *awsEc2query_deserializeOpDescribeIpamResourceDiscoveries) HandleDeseria } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIpamResourceDiscoveriesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDescribeIpamPoolsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24677,7 +24859,7 @@ func (m *awsEc2query_deserializeOpDescribeIpamResourceDiscoveries) HandleDeseria return out, metadata, err } -func awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveries(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDescribeIpamPools(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)} @@ -24710,14 +24892,14 @@ func awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveries(response *smi } } -type awsEc2query_deserializeOpDescribeIpamResourceDiscoveryAssociations struct { +type awsEc2query_deserializeOpDescribeIpamResourceDiscoveries struct { } -func (*awsEc2query_deserializeOpDescribeIpamResourceDiscoveryAssociations) ID() string { +func (*awsEc2query_deserializeOpDescribeIpamResourceDiscoveries) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDescribeIpamResourceDiscoveryAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDescribeIpamResourceDiscoveries) 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) @@ -24731,9 +24913,9 @@ func (m *awsEc2query_deserializeOpDescribeIpamResourceDiscoveryAssociations) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveryAssociations(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveries(response, &metadata) } - output := &DescribeIpamResourceDiscoveryAssociationsOutput{} + output := &DescribeIpamResourceDiscoveriesOutput{} out.Result = output var buff [1024]byte @@ -24754,7 +24936,7 @@ func (m *awsEc2query_deserializeOpDescribeIpamResourceDiscoveryAssociations) Han } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIpamResourceDiscoveryAssociationsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDescribeIpamResourceDiscoveriesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24768,7 +24950,7 @@ func (m *awsEc2query_deserializeOpDescribeIpamResourceDiscoveryAssociations) Han return out, metadata, err } -func awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveryAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveries(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)} @@ -24801,14 +24983,14 @@ func awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveryAssociations(res } } -type awsEc2query_deserializeOpDescribeIpams struct { +type awsEc2query_deserializeOpDescribeIpamResourceDiscoveryAssociations struct { } -func (*awsEc2query_deserializeOpDescribeIpams) ID() string { +func (*awsEc2query_deserializeOpDescribeIpamResourceDiscoveryAssociations) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDescribeIpams) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDescribeIpamResourceDiscoveryAssociations) 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) @@ -24822,9 +25004,9 @@ func (m *awsEc2query_deserializeOpDescribeIpams) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIpams(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveryAssociations(response, &metadata) } - output := &DescribeIpamsOutput{} + output := &DescribeIpamResourceDiscoveryAssociationsOutput{} out.Result = output var buff [1024]byte @@ -24845,7 +25027,7 @@ func (m *awsEc2query_deserializeOpDescribeIpams) HandleDeserialize(ctx context.C } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIpamsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDescribeIpamResourceDiscoveryAssociationsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24859,7 +25041,7 @@ func (m *awsEc2query_deserializeOpDescribeIpams) HandleDeserialize(ctx context.C return out, metadata, err } -func awsEc2query_deserializeOpErrorDescribeIpams(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveryAssociations(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)} @@ -24892,14 +25074,14 @@ func awsEc2query_deserializeOpErrorDescribeIpams(response *smithyhttp.Response, } } -type awsEc2query_deserializeOpDescribeIpamScopes struct { +type awsEc2query_deserializeOpDescribeIpams struct { } -func (*awsEc2query_deserializeOpDescribeIpamScopes) ID() string { +func (*awsEc2query_deserializeOpDescribeIpams) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDescribeIpamScopes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDescribeIpams) 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) @@ -24913,9 +25095,9 @@ func (m *awsEc2query_deserializeOpDescribeIpamScopes) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamScopes(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDescribeIpams(response, &metadata) } - output := &DescribeIpamScopesOutput{} + output := &DescribeIpamsOutput{} out.Result = output var buff [1024]byte @@ -24936,7 +25118,7 @@ func (m *awsEc2query_deserializeOpDescribeIpamScopes) HandleDeserialize(ctx cont } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIpamScopesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDescribeIpamsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24950,7 +25132,7 @@ func (m *awsEc2query_deserializeOpDescribeIpamScopes) HandleDeserialize(ctx cont return out, metadata, err } -func awsEc2query_deserializeOpErrorDescribeIpamScopes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDescribeIpams(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)} @@ -24983,14 +25165,14 @@ func awsEc2query_deserializeOpErrorDescribeIpamScopes(response *smithyhttp.Respo } } -type awsEc2query_deserializeOpDescribeIpv6Pools struct { +type awsEc2query_deserializeOpDescribeIpamScopes struct { } -func (*awsEc2query_deserializeOpDescribeIpv6Pools) ID() string { +func (*awsEc2query_deserializeOpDescribeIpamScopes) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDescribeIpv6Pools) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDescribeIpamScopes) 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) @@ -25004,9 +25186,9 @@ func (m *awsEc2query_deserializeOpDescribeIpv6Pools) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIpv6Pools(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamScopes(response, &metadata) } - output := &DescribeIpv6PoolsOutput{} + output := &DescribeIpamScopesOutput{} out.Result = output var buff [1024]byte @@ -25027,7 +25209,7 @@ func (m *awsEc2query_deserializeOpDescribeIpv6Pools) HandleDeserialize(ctx conte } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIpv6PoolsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDescribeIpamScopesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -25041,7 +25223,7 @@ func (m *awsEc2query_deserializeOpDescribeIpv6Pools) HandleDeserialize(ctx conte return out, metadata, err } -func awsEc2query_deserializeOpErrorDescribeIpv6Pools(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDescribeIpamScopes(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)} @@ -25074,14 +25256,14 @@ func awsEc2query_deserializeOpErrorDescribeIpv6Pools(response *smithyhttp.Respon } } -type awsEc2query_deserializeOpDescribeKeyPairs struct { +type awsEc2query_deserializeOpDescribeIpv6Pools struct { } -func (*awsEc2query_deserializeOpDescribeKeyPairs) ID() string { +func (*awsEc2query_deserializeOpDescribeIpv6Pools) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDescribeKeyPairs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDescribeIpv6Pools) 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) @@ -25095,9 +25277,9 @@ func (m *awsEc2query_deserializeOpDescribeKeyPairs) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeKeyPairs(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDescribeIpv6Pools(response, &metadata) } - output := &DescribeKeyPairsOutput{} + output := &DescribeIpv6PoolsOutput{} out.Result = output var buff [1024]byte @@ -25118,7 +25300,7 @@ func (m *awsEc2query_deserializeOpDescribeKeyPairs) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeKeyPairsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDescribeIpv6PoolsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -25132,7 +25314,98 @@ func (m *awsEc2query_deserializeOpDescribeKeyPairs) HandleDeserialize(ctx contex return out, metadata, err } -func awsEc2query_deserializeOpErrorDescribeKeyPairs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDescribeIpv6Pools(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 := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsEc2query_deserializeOpDescribeKeyPairs struct { +} + +func (*awsEc2query_deserializeOpDescribeKeyPairs) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpDescribeKeyPairs) 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, awsEc2query_deserializeOpErrorDescribeKeyPairs(response, &metadata) + } + output := &DescribeKeyPairsOutput{} + 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) + err = awsEc2query_deserializeOpDocumentDescribeKeyPairsOutput(&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 awsEc2query_deserializeOpErrorDescribeKeyPairs(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)} @@ -90073,6 +90346,250 @@ func awsEc2query_deserializeDocumentIpamDiscoveryFailureReason(v **types.IpamDis return nil } +func awsEc2query_deserializeDocumentIpamExternalResourceVerificationToken(v **types.IpamExternalResourceVerificationToken, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.IpamExternalResourceVerificationToken + if *v == nil { + sv = &types.IpamExternalResourceVerificationToken{} + } 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("ipamArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IpamArn = ptr.String(xtv) + } + + case strings.EqualFold("ipamExternalResourceVerificationTokenArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IpamExternalResourceVerificationTokenArn = ptr.String(xtv) + } + + case strings.EqualFold("ipamExternalResourceVerificationTokenId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IpamExternalResourceVerificationTokenId = ptr.String(xtv) + } + + case strings.EqualFold("ipamId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IpamId = ptr.String(xtv) + } + + case strings.EqualFold("ipamRegion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IpamRegion = ptr.String(xtv) + } + + case strings.EqualFold("notAfter", 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.NotAfter = ptr.Time(t) + } + + case strings.EqualFold("state", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.State = types.IpamExternalResourceVerificationTokenState(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.TokenState(xtv) + } + + case strings.EqualFold("tagSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("tokenName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TokenName = ptr.String(xtv) + } + + case strings.EqualFold("tokenValue", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TokenValue = 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 awsEc2query_deserializeDocumentIpamExternalResourceVerificationTokenSet(v *[]types.IpamExternalResourceVerificationToken, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.IpamExternalResourceVerificationToken + if *v == nil { + sv = make([]types.IpamExternalResourceVerificationToken, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.IpamExternalResourceVerificationToken + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentIpamExternalResourceVerificationToken(&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 awsEc2query_deserializeDocumentIpamExternalResourceVerificationTokenSetUnwrapped(v *[]types.IpamExternalResourceVerificationToken, decoder smithyxml.NodeDecoder) error { + var sv []types.IpamExternalResourceVerificationToken + if *v == nil { + sv = make([]types.IpamExternalResourceVerificationToken, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.IpamExternalResourceVerificationToken + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentIpamExternalResourceVerificationToken(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentIpamOperatingRegion(v **types.IpamOperatingRegion, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -143860,6 +144377,48 @@ func awsEc2query_deserializeOpDocumentCreateInternetGatewayOutput(v **CreateInte return nil } +func awsEc2query_deserializeOpDocumentCreateIpamExternalResourceVerificationTokenOutput(v **CreateIpamExternalResourceVerificationTokenOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateIpamExternalResourceVerificationTokenOutput + if *v == nil { + sv = &CreateIpamExternalResourceVerificationTokenOutput{} + } 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("ipamExternalResourceVerificationToken", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentIpamExternalResourceVerificationToken(&sv.IpamExternalResourceVerificationToken, 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 awsEc2query_deserializeOpDocumentCreateIpamOutput(v **CreateIpamOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -147545,6 +148104,48 @@ func awsEc2query_deserializeOpDocumentDeleteInstanceEventWindowOutput(v **Delete return nil } +func awsEc2query_deserializeOpDocumentDeleteIpamExternalResourceVerificationTokenOutput(v **DeleteIpamExternalResourceVerificationTokenOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DeleteIpamExternalResourceVerificationTokenOutput + if *v == nil { + sv = &DeleteIpamExternalResourceVerificationTokenOutput{} + } 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("ipamExternalResourceVerificationToken", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentIpamExternalResourceVerificationToken(&sv.IpamExternalResourceVerificationToken, 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 awsEc2query_deserializeOpDocumentDeleteIpamOutput(v **DeleteIpamOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -153062,6 +153663,61 @@ func awsEc2query_deserializeOpDocumentDescribeIpamByoasnOutput(v **DescribeIpamB return nil } +func awsEc2query_deserializeOpDocumentDescribeIpamExternalResourceVerificationTokensOutput(v **DescribeIpamExternalResourceVerificationTokensOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribeIpamExternalResourceVerificationTokensOutput + if *v == nil { + sv = &DescribeIpamExternalResourceVerificationTokensOutput{} + } 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("ipamExternalResourceVerificationTokenSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentIpamExternalResourceVerificationTokenSet(&sv.IpamExternalResourceVerificationTokens, nodeDecoder); err != nil { + return err + } + + 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) + } + + 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 awsEc2query_deserializeOpDocumentDescribeIpamPoolsOutput(v **DescribeIpamPoolsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ec2/generated.json b/service/ec2/generated.json index 2b480a17d33..98b5eda155d 100644 --- a/service/ec2/generated.json +++ b/service/ec2/generated.json @@ -88,6 +88,7 @@ "api_op_CreateInstanceExportTask.go", "api_op_CreateInternetGateway.go", "api_op_CreateIpam.go", + "api_op_CreateIpamExternalResourceVerificationToken.go", "api_op_CreateIpamPool.go", "api_op_CreateIpamResourceDiscovery.go", "api_op_CreateIpamScope.go", @@ -164,6 +165,7 @@ "api_op_DeleteInstanceEventWindow.go", "api_op_DeleteInternetGateway.go", "api_op_DeleteIpam.go", + "api_op_DeleteIpamExternalResourceVerificationToken.go", "api_op_DeleteIpamPool.go", "api_op_DeleteIpamResourceDiscovery.go", "api_op_DeleteIpamScope.go", @@ -288,6 +290,7 @@ "api_op_DescribeInstances.go", "api_op_DescribeInternetGateways.go", "api_op_DescribeIpamByoasn.go", + "api_op_DescribeIpamExternalResourceVerificationTokens.go", "api_op_DescribeIpamPools.go", "api_op_DescribeIpamResourceDiscoveries.go", "api_op_DescribeIpamResourceDiscoveryAssociations.go", diff --git a/service/ec2/serializers.go b/service/ec2/serializers.go index f6f83d444cf..da44893be8d 100644 --- a/service/ec2/serializers.go +++ b/service/ec2/serializers.go @@ -4881,6 +4881,70 @@ func (m *awsEc2query_serializeOpCreateIpam) HandleSerialize(ctx context.Context, return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpCreateIpamExternalResourceVerificationToken struct { +} + +func (*awsEc2query_serializeOpCreateIpamExternalResourceVerificationToken) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpCreateIpamExternalResourceVerificationToken) 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.(*CreateIpamExternalResourceVerificationTokenInput) + _ = 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("CreateIpamExternalResourceVerificationToken") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentCreateIpamExternalResourceVerificationTokenInput(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 awsEc2query_serializeOpCreateIpamPool struct { } @@ -9745,6 +9809,70 @@ func (m *awsEc2query_serializeOpDeleteIpam) HandleSerialize(ctx context.Context, return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpDeleteIpamExternalResourceVerificationToken struct { +} + +func (*awsEc2query_serializeOpDeleteIpamExternalResourceVerificationToken) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpDeleteIpamExternalResourceVerificationToken) 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.(*DeleteIpamExternalResourceVerificationTokenInput) + _ = 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("DeleteIpamExternalResourceVerificationToken") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentDeleteIpamExternalResourceVerificationTokenInput(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 awsEc2query_serializeOpDeleteIpamPool struct { } @@ -17681,6 +17809,70 @@ func (m *awsEc2query_serializeOpDescribeIpamByoasn) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpDescribeIpamExternalResourceVerificationTokens struct { +} + +func (*awsEc2query_serializeOpDescribeIpamExternalResourceVerificationTokens) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpDescribeIpamExternalResourceVerificationTokens) 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.(*DescribeIpamExternalResourceVerificationTokensInput) + _ = 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("DescribeIpamExternalResourceVerificationTokens") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentDescribeIpamExternalResourceVerificationTokensInput(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 awsEc2query_serializeOpDescribeIpamPools struct { } @@ -52271,6 +52463,35 @@ func awsEc2query_serializeOpDocumentCreateInternetGatewayInput(v *CreateInternet return nil } +func awsEc2query_serializeOpDocumentCreateIpamExternalResourceVerificationTokenInput(v *CreateIpamExternalResourceVerificationTokenInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ClientToken != nil { + objectKey := object.Key("ClientToken") + objectKey.String(*v.ClientToken) + } + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.IpamId != nil { + objectKey := object.Key("IpamId") + objectKey.String(*v.IpamId) + } + + if v.TagSpecifications != nil { + objectKey := object.FlatKey("TagSpecification") + if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { + return err + } + } + + return nil +} + func awsEc2query_serializeOpDocumentCreateIpamInput(v *CreateIpamInput, value query.Value) error { object := value.Object() _ = object @@ -55313,6 +55534,23 @@ func awsEc2query_serializeOpDocumentDeleteInternetGatewayInput(v *DeleteInternet return nil } +func awsEc2query_serializeOpDocumentDeleteIpamExternalResourceVerificationTokenInput(v *DeleteIpamExternalResourceVerificationTokenInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.IpamExternalResourceVerificationTokenId != nil { + objectKey := object.Key("IpamExternalResourceVerificationTokenId") + objectKey.String(*v.IpamExternalResourceVerificationTokenId) + } + + return nil +} + func awsEc2query_serializeOpDocumentDeleteIpamInput(v *DeleteIpamInput, value query.Value) error { object := value.Object() _ = object @@ -58470,6 +58708,42 @@ func awsEc2query_serializeOpDocumentDescribeIpamByoasnInput(v *DescribeIpamByoas return nil } +func awsEc2query_serializeOpDocumentDescribeIpamExternalResourceVerificationTokensInput(v *DescribeIpamExternalResourceVerificationTokensInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.Filters != nil { + objectKey := object.FlatKey("Filter") + if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { + return err + } + } + + if v.IpamExternalResourceVerificationTokenIds != nil { + objectKey := object.FlatKey("IpamExternalResourceVerificationTokenId") + if err := awsEc2query_serializeDocumentValueStringList(v.IpamExternalResourceVerificationTokenIds, objectKey); err != nil { + return err + } + } + + if v.MaxResults != nil { + objectKey := object.Key("MaxResults") + objectKey.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + objectKey := object.Key("NextToken") + objectKey.String(*v.NextToken) + } + + return nil +} + func awsEc2query_serializeOpDocumentDescribeIpamPoolsInput(v *DescribeIpamPoolsInput, value query.Value) error { object := value.Object() _ = object @@ -67528,6 +67802,11 @@ func awsEc2query_serializeOpDocumentProvisionIpamPoolCidrInput(v *ProvisionIpamP objectKey.Boolean(*v.DryRun) } + if v.IpamExternalResourceVerificationTokenId != nil { + objectKey := object.Key("IpamExternalResourceVerificationTokenId") + objectKey.String(*v.IpamExternalResourceVerificationTokenId) + } + if v.IpamPoolId != nil { objectKey := object.Key("IpamPoolId") objectKey.String(*v.IpamPoolId) @@ -67538,6 +67817,11 @@ func awsEc2query_serializeOpDocumentProvisionIpamPoolCidrInput(v *ProvisionIpamP objectKey.Integer(*v.NetmaskLength) } + if len(v.VerificationMethod) > 0 { + objectKey := object.Key("VerificationMethod") + objectKey.String(string(v.VerificationMethod)) + } + return nil } diff --git a/service/ec2/snapshot/api_op_CreateIpamExternalResourceVerificationToken.go.snap b/service/ec2/snapshot/api_op_CreateIpamExternalResourceVerificationToken.go.snap new file mode 100644 index 00000000000..38171f52183 --- /dev/null +++ b/service/ec2/snapshot/api_op_CreateIpamExternalResourceVerificationToken.go.snap @@ -0,0 +1,37 @@ +CreateIpamExternalResourceVerificationToken + Initialize stack step + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/ec2/snapshot/api_op_DeleteIpamExternalResourceVerificationToken.go.snap b/service/ec2/snapshot/api_op_DeleteIpamExternalResourceVerificationToken.go.snap new file mode 100644 index 00000000000..b0770633477 --- /dev/null +++ b/service/ec2/snapshot/api_op_DeleteIpamExternalResourceVerificationToken.go.snap @@ -0,0 +1,36 @@ +DeleteIpamExternalResourceVerificationToken + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/ec2/snapshot/api_op_DescribeIpamExternalResourceVerificationTokens.go.snap b/service/ec2/snapshot/api_op_DescribeIpamExternalResourceVerificationTokens.go.snap new file mode 100644 index 00000000000..5473c8cee36 --- /dev/null +++ b/service/ec2/snapshot/api_op_DescribeIpamExternalResourceVerificationTokens.go.snap @@ -0,0 +1,35 @@ +DescribeIpamExternalResourceVerificationTokens + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/ec2/snapshot_test.go b/service/ec2/snapshot_test.go index 641078c61c3..c1a3ef87b5c 100644 --- a/service/ec2/snapshot_test.go +++ b/service/ec2/snapshot_test.go @@ -974,6 +974,18 @@ func TestCheckSnapshot_CreateIpam(t *testing.T) { } } +func TestCheckSnapshot_CreateIpamExternalResourceVerificationToken(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateIpamExternalResourceVerificationToken(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateIpamExternalResourceVerificationToken") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateIpamPool(t *testing.T) { svc := New(Options{}) _, err := svc.CreateIpamPool(context.Background(), nil, func(o *Options) { @@ -1886,6 +1898,18 @@ func TestCheckSnapshot_DeleteIpam(t *testing.T) { } } +func TestCheckSnapshot_DeleteIpamExternalResourceVerificationToken(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteIpamExternalResourceVerificationToken(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteIpamExternalResourceVerificationToken") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteIpamPool(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteIpamPool(context.Background(), nil, func(o *Options) { @@ -3374,6 +3398,18 @@ func TestCheckSnapshot_DescribeIpamByoasn(t *testing.T) { } } +func TestCheckSnapshot_DescribeIpamExternalResourceVerificationTokens(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeIpamExternalResourceVerificationTokens(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeIpamExternalResourceVerificationTokens") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeIpamPools(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeIpamPools(context.Background(), nil, func(o *Options) { @@ -8437,6 +8473,18 @@ func TestUpdateSnapshot_CreateIpam(t *testing.T) { } } +func TestUpdateSnapshot_CreateIpamExternalResourceVerificationToken(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateIpamExternalResourceVerificationToken(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateIpamExternalResourceVerificationToken") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateIpamPool(t *testing.T) { svc := New(Options{}) _, err := svc.CreateIpamPool(context.Background(), nil, func(o *Options) { @@ -9349,6 +9397,18 @@ func TestUpdateSnapshot_DeleteIpam(t *testing.T) { } } +func TestUpdateSnapshot_DeleteIpamExternalResourceVerificationToken(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteIpamExternalResourceVerificationToken(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteIpamExternalResourceVerificationToken") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteIpamPool(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteIpamPool(context.Background(), nil, func(o *Options) { @@ -10837,6 +10897,18 @@ func TestUpdateSnapshot_DescribeIpamByoasn(t *testing.T) { } } +func TestUpdateSnapshot_DescribeIpamExternalResourceVerificationTokens(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeIpamExternalResourceVerificationTokens(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeIpamExternalResourceVerificationTokens") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeIpamPools(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeIpamPools(context.Background(), nil, func(o *Options) { diff --git a/service/ec2/types/enums.go b/service/ec2/types/enums.go index da9c4ea8e6c..232fff4df3b 100644 --- a/service/ec2/types/enums.go +++ b/service/ec2/types/enums.go @@ -4962,6 +4962,34 @@ func (IpamDiscoveryFailureCode) Values() []IpamDiscoveryFailureCode { } } +type IpamExternalResourceVerificationTokenState string + +// Enum values for IpamExternalResourceVerificationTokenState +const ( + IpamExternalResourceVerificationTokenStateCreateInProgress IpamExternalResourceVerificationTokenState = "create-in-progress" + IpamExternalResourceVerificationTokenStateCreateComplete IpamExternalResourceVerificationTokenState = "create-complete" + IpamExternalResourceVerificationTokenStateCreateFailed IpamExternalResourceVerificationTokenState = "create-failed" + IpamExternalResourceVerificationTokenStateDeleteInProgress IpamExternalResourceVerificationTokenState = "delete-in-progress" + IpamExternalResourceVerificationTokenStateDeleteComplete IpamExternalResourceVerificationTokenState = "delete-complete" + IpamExternalResourceVerificationTokenStateDeleteFailed IpamExternalResourceVerificationTokenState = "delete-failed" +) + +// Values returns all known values for IpamExternalResourceVerificationTokenState. +// Note that this can be expanded in the future, and so it is only as up to date as +// the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IpamExternalResourceVerificationTokenState) Values() []IpamExternalResourceVerificationTokenState { + return []IpamExternalResourceVerificationTokenState{ + "create-in-progress", + "create-complete", + "create-failed", + "delete-in-progress", + "delete-complete", + "delete-failed", + } +} + type IpamManagementState string // Enum values for IpamManagementState @@ -7019,6 +7047,7 @@ const ( ResourceTypeIpamResourceDiscovery ResourceType = "ipam-resource-discovery" ResourceTypeIpamResourceDiscoveryAssociation ResourceType = "ipam-resource-discovery-association" ResourceTypeInstanceConnectEndpoint ResourceType = "instance-connect-endpoint" + ResourceTypeIpamExternalResourceVerificationToken ResourceType = "ipam-external-resource-verification-token" ) // Values returns all known values for ResourceType. Note that this can be @@ -7114,6 +7143,7 @@ func (ResourceType) Values() []ResourceType { "ipam-resource-discovery", "ipam-resource-discovery-association", "instance-connect-endpoint", + "ipam-external-resource-verification-token", } } @@ -7953,6 +7983,25 @@ func (TieringOperationStatus) Values() []TieringOperationStatus { } } +type TokenState string + +// Enum values for TokenState +const ( + TokenStateValid TokenState = "valid" + TokenStateExpired TokenState = "expired" +) + +// Values returns all known values for TokenState. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (TokenState) Values() []TokenState { + return []TokenState{ + "valid", + "expired", + } +} + type TpmSupportValues string // Enum values for TpmSupportValues @@ -8642,6 +8691,25 @@ func (UserTrustProviderType) Values() []UserTrustProviderType { } } +type VerificationMethod string + +// Enum values for VerificationMethod +const ( + VerificationMethodRemarksX509 VerificationMethod = "remarks-x509" + VerificationMethodDnsToken VerificationMethod = "dns-token" +) + +// Values returns all known values for VerificationMethod. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (VerificationMethod) Values() []VerificationMethod { + return []VerificationMethod{ + "remarks-x509", + "dns-token", + } +} + type VerifiedAccessEndpointAttachmentType string // Enum values for VerifiedAccessEndpointAttachmentType diff --git a/service/ec2/types/types.go b/service/ec2/types/types.go index 70d9e0e89b0..4f3bdc14249 100644 --- a/service/ec2/types/types.go +++ b/service/ec2/types/types.go @@ -4750,7 +4750,13 @@ type FleetLaunchTemplateOverrides struct { // The ID of the subnet in which to launch the instances. SubnetId *string - // The number of units provided by the specified instance type. + // The number of units provided by the specified instance type. These are the same + // units that you chose to set the target capacity in terms of instances, or a + // performance characteristic such as vCPUs, memory, or I/O. + // + // If the target capacity divided by this value is not a whole number, Amazon EC2 + // rounds the number of instances to the next whole number. If this value is not + // specified, the default is 1. // // When specifying weights, the price used in the lowest-price and // price-capacity-optimized allocation strategies is per unit hour (where the @@ -4820,7 +4826,13 @@ type FleetLaunchTemplateOverridesRequest struct { // ID. SubnetId *string - // The number of units provided by the specified instance type. + // The number of units provided by the specified instance type. These are the same + // units that you chose to set the target capacity in terms of instances, or a + // performance characteristic such as vCPUs, memory, or I/O. + // + // If the target capacity divided by this value is not a whole number, Amazon EC2 + // rounds the number of instances to the next whole number. If this value is not + // specified, the default is 1. // // When specifying weights, the price used in the lowest-price and // price-capacity-optimized allocation strategies is per unit hour (where the @@ -8470,7 +8482,8 @@ type IpamDiscoveredResourceCidr struct { // The resource discovery ID. IpamResourceDiscoveryId *string - // For elastic IP addresses, this is the status of an attached network interface. + // For elastic network interfaces, this is the status of whether or not the + // elastic network interface is attached. NetworkInterfaceAttachmentStatus IpamNetworkInterfaceAttachmentStatus // The resource CIDR. @@ -8531,6 +8544,48 @@ type IpamDiscoveryFailureReason struct { noSmithyDocumentSerde } +// A verification token is an Amazon Web Services-generated random value that you +// can use to prove ownership of an external resource. For example, you can use a +// verification token to validate that you control a public IP address range when +// you bring an IP address range to Amazon Web Services (BYOIP). +type IpamExternalResourceVerificationToken struct { + + // ARN of the IPAM that created the token. + IpamArn *string + + // Token ARN. + IpamExternalResourceVerificationTokenArn *string + + // The ID of the token. + IpamExternalResourceVerificationTokenId *string + + // The ID of the IPAM that created the token. + IpamId *string + + // Region of the IPAM that created the token. + IpamRegion *string + + // Token expiration. + NotAfter *time.Time + + // Token state. + State IpamExternalResourceVerificationTokenState + + // Token status. + Status TokenState + + // Token tags. + Tags []Tag + + // Token name. + TokenName *string + + // Token value. + TokenValue *string + + noSmithyDocumentSerde +} + // The operating Regions for an IPAM. Operating Regions are Amazon Web Services // Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only // discovers and monitors resources in the Amazon Web Services Regions you select @@ -8624,12 +8679,19 @@ type IpamPool struct { // overlap or conflict. IpamScopeType IpamScopeType - // The locale of the IPAM pool. In IPAM, the locale is the Amazon Web Services - // Region or, for IPAM IPv4 pools in the public scope, the network border group for - // an Amazon Web Services Local Zone where you want to make an IPAM pool available - // for allocations ([supported Local Zones] ). If you choose an Amazon Web Services Region for locale that - // has not been configured as an operating Region for the IPAM, you'll get an - // error. + // The locale of the IPAM pool. + // + // The locale for the pool should be one of the following: + // + // - An Amazon Web Services Region where you want this IPAM pool to be available + // for allocations. + // + // - The network border group for an Amazon Web Services Local Zone where you + // want this IPAM pool to be available for allocations ([supported Local Zones] ). This option is only + // available for IPAM IPv4 pools in the public scope. + // + // If you choose an Amazon Web Services Region for locale that has not been + // configured as an operating Region for the IPAM, you'll get an error. // // [supported Local Zones]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html#byoip-zone-avail Locale *string @@ -10285,10 +10347,16 @@ type LaunchTemplateOverrides struct { // The ID of the subnet in which to launch the instances. SubnetId *string - // The number of units provided by the specified instance type. + // The number of units provided by the specified instance type. These are the same + // units that you chose to set the target capacity in terms of instances, or a + // performance characteristic such as vCPUs, memory, or I/O. // - // When specifying weights, the price used in the lowest-price and - // price-capacity-optimized allocation strategies is per unit hour (where the + // If the target capacity divided by this value is not a whole number, Amazon EC2 + // rounds the number of instances to the next whole number. If this value is not + // specified, the default is 1. + // + // When specifying weights, the price used in the lowestPrice and + // priceCapacityOptimized allocation strategies is per unit hour (where the // instance price is divided by the specified weight). However, if all the // specified weights are above the requested TargetCapacity , resulting in only 1 // instance being launched, the price used is per instance hour. @@ -15812,6 +15880,12 @@ type SpotFleetLaunchSpecification struct { // If the target capacity divided by this value is not a whole number, Amazon EC2 // rounds the number of instances to the next whole number. If this value is not // specified, the default is 1. + // + // When specifying weights, the price used in the lowestPrice and + // priceCapacityOptimized allocation strategies is per unit hour (where the + // instance price is divided by the specified weight). However, if all the + // specified weights are above the requested TargetCapacity , resulting in only 1 + // instance being launched, the price used is per instance hour. WeightedCapacity *float64 noSmithyDocumentSerde @@ -19282,15 +19356,12 @@ type VolumeDetail struct { } // Describes the modification status of an EBS volume. -// -// If the volume has never been modified, some element values will be null. type VolumeModification struct { // The modification completion or failure time. EndTime *time.Time - // The current modification state. The modification state is null for unmodified - // volumes. + // The current modification state. ModificationState VolumeModificationState // The original IOPS rate of the volume. diff --git a/service/ec2/validators.go b/service/ec2/validators.go index 7914ceaab83..377415e2b6a 100644 --- a/service/ec2/validators.go +++ b/service/ec2/validators.go @@ -1350,6 +1350,26 @@ func (m *validateOpCreateInstanceExportTask) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpCreateIpamExternalResourceVerificationToken struct { +} + +func (*validateOpCreateIpamExternalResourceVerificationToken) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateIpamExternalResourceVerificationToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateIpamExternalResourceVerificationTokenInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateIpamExternalResourceVerificationTokenInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateIpamPool struct { } @@ -2670,6 +2690,26 @@ func (m *validateOpDeleteInternetGateway) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpDeleteIpamExternalResourceVerificationToken struct { +} + +func (*validateOpDeleteIpamExternalResourceVerificationToken) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteIpamExternalResourceVerificationToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteIpamExternalResourceVerificationTokenInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteIpamExternalResourceVerificationTokenInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteIpam struct { } @@ -9018,6 +9058,10 @@ func addOpCreateInstanceExportTaskValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpCreateInstanceExportTask{}, middleware.After) } +func addOpCreateIpamExternalResourceVerificationTokenValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateIpamExternalResourceVerificationToken{}, middleware.After) +} + func addOpCreateIpamPoolValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateIpamPool{}, middleware.After) } @@ -9282,6 +9326,10 @@ func addOpDeleteInternetGatewayValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpDeleteInternetGateway{}, middleware.After) } +func addOpDeleteIpamExternalResourceVerificationTokenValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteIpamExternalResourceVerificationToken{}, middleware.After) +} + func addOpDeleteIpamValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteIpam{}, middleware.After) } @@ -12546,6 +12594,21 @@ func validateOpCreateInstanceExportTaskInput(v *CreateInstanceExportTaskInput) e } } +func validateOpCreateIpamExternalResourceVerificationTokenInput(v *CreateIpamExternalResourceVerificationTokenInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateIpamExternalResourceVerificationTokenInput"} + if v.IpamId == nil { + invalidParams.Add(smithy.NewErrParamRequired("IpamId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateIpamPoolInput(v *CreateIpamPoolInput) error { if v == nil { return nil @@ -13719,6 +13782,21 @@ func validateOpDeleteInternetGatewayInput(v *DeleteInternetGatewayInput) error { } } +func validateOpDeleteIpamExternalResourceVerificationTokenInput(v *DeleteIpamExternalResourceVerificationTokenInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteIpamExternalResourceVerificationTokenInput"} + if v.IpamExternalResourceVerificationTokenId == nil { + invalidParams.Add(smithy.NewErrParamRequired("IpamExternalResourceVerificationTokenId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteIpamInput(v *DeleteIpamInput) error { if v == nil { return nil diff --git a/service/emrcontainers/internal/endpoints/endpoints.go b/service/emrcontainers/internal/endpoints/endpoints.go index 5df9042b53e..e8712e3090b 100644 --- a/service/emrcontainers/internal/endpoints/endpoints.go +++ b/service/emrcontainers/internal/endpoints/endpoints.go @@ -178,6 +178,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, diff --git a/service/firehose/api_op_CreateDeliveryStream.go b/service/firehose/api_op_CreateDeliveryStream.go index f40617695b3..b928ae0f862 100644 --- a/service/firehose/api_op_CreateDeliveryStream.go +++ b/service/firehose/api_op_CreateDeliveryStream.go @@ -135,6 +135,11 @@ type CreateDeliveryStreamInput struct { // destination. You can specify only one destination. HttpEndpointDestinationConfiguration *types.HttpEndpointDestinationConfiguration + // Configure Apache Iceberg Tables destination. + // + // Amazon Data Firehose is in preview release and is subject to change. + IcebergDestinationConfiguration *types.IcebergDestinationConfiguration + // When a Kinesis data stream is used as the source for the delivery stream, a KinesisStreamSourceConfiguration // containing the Kinesis data stream Amazon Resource Name (ARN) and the role ARN // for the source stream. diff --git a/service/firehose/api_op_UpdateDestination.go b/service/firehose/api_op_UpdateDestination.go index 69483f89289..d1449009b45 100644 --- a/service/firehose/api_op_UpdateDestination.go +++ b/service/firehose/api_op_UpdateDestination.go @@ -94,6 +94,11 @@ type UpdateDestinationInput struct { // Describes an update to the specified HTTP endpoint destination. HttpEndpointDestinationUpdate *types.HttpEndpointDestinationUpdate + // Describes an update for a destination in Apache Iceberg Tables. + // + // Amazon Data Firehose is in preview release and is subject to change. + IcebergDestinationUpdate *types.IcebergDestinationUpdate + // Describes an update for a destination in Amazon Redshift. RedshiftDestinationUpdate *types.RedshiftDestinationUpdate diff --git a/service/firehose/deserializers.go b/service/firehose/deserializers.go index 524e3779841..dc31f446277 100644 --- a/service/firehose/deserializers.go +++ b/service/firehose/deserializers.go @@ -2214,6 +2214,46 @@ func awsAwsjson11_deserializeDocumentBufferingHints(v **types.BufferingHints, va return nil } +func awsAwsjson11_deserializeDocumentCatalogConfiguration(v **types.CatalogConfiguration, 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.CatalogConfiguration + if *v == nil { + sv = &types.CatalogConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CatalogARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GlueDataCatalogARN to be of type string, got %T instead", value) + } + sv.CatalogARN = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentCloudWatchLoggingOptions(v **types.CloudWatchLoggingOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2794,6 +2834,11 @@ func awsAwsjson11_deserializeDocumentDestinationDescription(v **types.Destinatio return err } + case "IcebergDestinationDescription": + if err := awsAwsjson11_deserializeDocumentIcebergDestinationDescription(&sv.IcebergDestinationDescription, value); err != nil { + return err + } + case "RedshiftDestinationDescription": if err := awsAwsjson11_deserializeDocumentRedshiftDestinationDescription(&sv.RedshiftDestinationDescription, value); err != nil { return err @@ -2857,6 +2902,103 @@ func awsAwsjson11_deserializeDocumentDestinationDescriptionList(v *[]types.Desti return nil } +func awsAwsjson11_deserializeDocumentDestinationTableConfiguration(v **types.DestinationTableConfiguration, 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.DestinationTableConfiguration + if *v == nil { + sv = &types.DestinationTableConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DestinationDatabaseName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyStringWithoutWhitespace to be of type string, got %T instead", value) + } + sv.DestinationDatabaseName = ptr.String(jtv) + } + + case "DestinationTableName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyStringWithoutWhitespace to be of type string, got %T instead", value) + } + sv.DestinationTableName = ptr.String(jtv) + } + + case "S3ErrorOutputPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorOutputPrefix to be of type string, got %T instead", value) + } + sv.S3ErrorOutputPrefix = ptr.String(jtv) + } + + case "UniqueKeys": + if err := awsAwsjson11_deserializeDocumentListOfNonEmptyStringsWithoutWhitespace(&sv.UniqueKeys, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDestinationTableConfigurationList(v *[]types.DestinationTableConfiguration, 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.DestinationTableConfiguration + if *v == nil { + cv = []types.DestinationTableConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DestinationTableConfiguration + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDestinationTableConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentDocumentIdOptions(v **types.DocumentIdOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3807,6 +3949,90 @@ func awsAwsjson11_deserializeDocumentHttpEndpointRetryOptions(v **types.HttpEndp return nil } +func awsAwsjson11_deserializeDocumentIcebergDestinationDescription(v **types.IcebergDestinationDescription, 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.IcebergDestinationDescription + if *v == nil { + sv = &types.IcebergDestinationDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BufferingHints": + if err := awsAwsjson11_deserializeDocumentBufferingHints(&sv.BufferingHints, value); err != nil { + return err + } + + case "CatalogConfiguration": + if err := awsAwsjson11_deserializeDocumentCatalogConfiguration(&sv.CatalogConfiguration, value); err != nil { + return err + } + + case "CloudWatchLoggingOptions": + if err := awsAwsjson11_deserializeDocumentCloudWatchLoggingOptions(&sv.CloudWatchLoggingOptions, value); err != nil { + return err + } + + case "DestinationTableConfigurationList": + if err := awsAwsjson11_deserializeDocumentDestinationTableConfigurationList(&sv.DestinationTableConfigurationList, value); err != nil { + return err + } + + case "ProcessingConfiguration": + if err := awsAwsjson11_deserializeDocumentProcessingConfiguration(&sv.ProcessingConfiguration, value); err != nil { + return err + } + + case "RetryOptions": + if err := awsAwsjson11_deserializeDocumentRetryOptions(&sv.RetryOptions, value); err != nil { + return err + } + + case "RoleARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleARN to be of type string, got %T instead", value) + } + sv.RoleARN = ptr.String(jtv) + } + + case "S3BackupMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IcebergS3BackupMode to be of type string, got %T instead", value) + } + sv.S3BackupMode = types.IcebergS3BackupMode(jtv) + } + + case "S3DestinationDescription": + if err := awsAwsjson11_deserializeDocumentS3DestinationDescription(&sv.S3DestinationDescription, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentInputFormatConfiguration(v **types.InputFormatConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4284,6 +4510,22 @@ func awsAwsjson11_deserializeDocumentMSKSourceDescription(v **types.MSKSourceDes sv.MSKClusterARN = ptr.String(jtv) } + case "ReadFromTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ReadFromTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ReadFromTimestamp to be a JSON Number, got %T instead", value) + + } + } + case "TopicName": if value != nil { jtv, ok := value.(string) @@ -5613,6 +5855,63 @@ func awsAwsjson11_deserializeDocumentServiceUnavailableException(v **types.Servi return nil } +func awsAwsjson11_deserializeDocumentSnowflakeBufferingHints(v **types.SnowflakeBufferingHints, 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.SnowflakeBufferingHints + if *v == nil { + sv = &types.SnowflakeBufferingHints{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "IntervalInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SnowflakeBufferingIntervalInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.IntervalInSeconds = ptr.Int32(int32(i64)) + } + + case "SizeInMBs": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SnowflakeBufferingSizeInMBs to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SizeInMBs = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentSnowflakeDestinationDescription(v **types.SnowflakeDestinationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5644,6 +5943,11 @@ func awsAwsjson11_deserializeDocumentSnowflakeDestinationDescription(v **types.S sv.AccountUrl = ptr.String(jtv) } + case "BufferingHints": + if err := awsAwsjson11_deserializeDocumentSnowflakeBufferingHints(&sv.BufferingHints, value); err != nil { + return err + } + case "CloudWatchLoggingOptions": if err := awsAwsjson11_deserializeDocumentCloudWatchLoggingOptions(&sv.CloudWatchLoggingOptions, value); err != nil { return err diff --git a/service/firehose/serializers.go b/service/firehose/serializers.go index 3e670083f9b..06f05f27496 100644 --- a/service/firehose/serializers.go +++ b/service/firehose/serializers.go @@ -11,6 +11,7 @@ import ( "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" "path" @@ -1063,6 +1064,18 @@ func awsAwsjson11_serializeDocumentBufferingHints(v *types.BufferingHints, value return nil } +func awsAwsjson11_serializeDocumentCatalogConfiguration(v *types.CatalogConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogARN != nil { + ok := object.Key("CatalogARN") + ok.String(*v.CatalogARN) + } + + return nil +} + func awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v *types.CloudWatchLoggingOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1189,6 +1202,48 @@ func awsAwsjson11_serializeDocumentDeserializer(v *types.Deserializer, value smi return nil } +func awsAwsjson11_serializeDocumentDestinationTableConfiguration(v *types.DestinationTableConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationDatabaseName != nil { + ok := object.Key("DestinationDatabaseName") + ok.String(*v.DestinationDatabaseName) + } + + if v.DestinationTableName != nil { + ok := object.Key("DestinationTableName") + ok.String(*v.DestinationTableName) + } + + if v.S3ErrorOutputPrefix != nil { + ok := object.Key("S3ErrorOutputPrefix") + ok.String(*v.S3ErrorOutputPrefix) + } + + if v.UniqueKeys != nil { + ok := object.Key("UniqueKeys") + if err := awsAwsjson11_serializeDocumentListOfNonEmptyStringsWithoutWhitespace(v.UniqueKeys, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentDestinationTableConfigurationList(v []types.DestinationTableConfiguration, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentDestinationTableConfiguration(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentDocumentIdOptions(v *types.DocumentIdOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1890,6 +1945,138 @@ func awsAwsjson11_serializeDocumentHttpEndpointRetryOptions(v *types.HttpEndpoin return nil } +func awsAwsjson11_serializeDocumentIcebergDestinationConfiguration(v *types.IcebergDestinationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BufferingHints != nil { + ok := object.Key("BufferingHints") + if err := awsAwsjson11_serializeDocumentBufferingHints(v.BufferingHints, ok); err != nil { + return err + } + } + + if v.CatalogConfiguration != nil { + ok := object.Key("CatalogConfiguration") + if err := awsAwsjson11_serializeDocumentCatalogConfiguration(v.CatalogConfiguration, ok); err != nil { + return err + } + } + + if v.CloudWatchLoggingOptions != nil { + ok := object.Key("CloudWatchLoggingOptions") + if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { + return err + } + } + + if v.DestinationTableConfigurationList != nil { + ok := object.Key("DestinationTableConfigurationList") + if err := awsAwsjson11_serializeDocumentDestinationTableConfigurationList(v.DestinationTableConfigurationList, ok); err != nil { + return err + } + } + + if v.ProcessingConfiguration != nil { + ok := object.Key("ProcessingConfiguration") + if err := awsAwsjson11_serializeDocumentProcessingConfiguration(v.ProcessingConfiguration, ok); err != nil { + return err + } + } + + if v.RetryOptions != nil { + ok := object.Key("RetryOptions") + if err := awsAwsjson11_serializeDocumentRetryOptions(v.RetryOptions, ok); err != nil { + return err + } + } + + if v.RoleARN != nil { + ok := object.Key("RoleARN") + ok.String(*v.RoleARN) + } + + if len(v.S3BackupMode) > 0 { + ok := object.Key("S3BackupMode") + ok.String(string(v.S3BackupMode)) + } + + if v.S3Configuration != nil { + ok := object.Key("S3Configuration") + if err := awsAwsjson11_serializeDocumentS3DestinationConfiguration(v.S3Configuration, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentIcebergDestinationUpdate(v *types.IcebergDestinationUpdate, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BufferingHints != nil { + ok := object.Key("BufferingHints") + if err := awsAwsjson11_serializeDocumentBufferingHints(v.BufferingHints, ok); err != nil { + return err + } + } + + if v.CatalogConfiguration != nil { + ok := object.Key("CatalogConfiguration") + if err := awsAwsjson11_serializeDocumentCatalogConfiguration(v.CatalogConfiguration, ok); err != nil { + return err + } + } + + if v.CloudWatchLoggingOptions != nil { + ok := object.Key("CloudWatchLoggingOptions") + if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { + return err + } + } + + if v.DestinationTableConfigurationList != nil { + ok := object.Key("DestinationTableConfigurationList") + if err := awsAwsjson11_serializeDocumentDestinationTableConfigurationList(v.DestinationTableConfigurationList, ok); err != nil { + return err + } + } + + if v.ProcessingConfiguration != nil { + ok := object.Key("ProcessingConfiguration") + if err := awsAwsjson11_serializeDocumentProcessingConfiguration(v.ProcessingConfiguration, ok); err != nil { + return err + } + } + + if v.RetryOptions != nil { + ok := object.Key("RetryOptions") + if err := awsAwsjson11_serializeDocumentRetryOptions(v.RetryOptions, ok); err != nil { + return err + } + } + + if v.RoleARN != nil { + ok := object.Key("RoleARN") + ok.String(*v.RoleARN) + } + + if len(v.S3BackupMode) > 0 { + ok := object.Key("S3BackupMode") + ok.String(string(v.S3BackupMode)) + } + + if v.S3Configuration != nil { + ok := object.Key("S3Configuration") + if err := awsAwsjson11_serializeDocumentS3DestinationConfiguration(v.S3Configuration, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentInputFormatConfiguration(v *types.InputFormatConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1971,6 +2158,11 @@ func awsAwsjson11_serializeDocumentMSKSourceConfiguration(v *types.MSKSourceConf ok.String(*v.MSKClusterARN) } + if v.ReadFromTimestamp != nil { + ok := object.Key("ReadFromTimestamp") + ok.Double(smithytime.FormatEpochSeconds(*v.ReadFromTimestamp)) + } + if v.TopicName != nil { ok := object.Key("TopicName") ok.String(*v.TopicName) @@ -2641,6 +2833,23 @@ func awsAwsjson11_serializeDocumentSerializer(v *types.Serializer, value smithyj return nil } +func awsAwsjson11_serializeDocumentSnowflakeBufferingHints(v *types.SnowflakeBufferingHints, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IntervalInSeconds != nil { + ok := object.Key("IntervalInSeconds") + ok.Integer(*v.IntervalInSeconds) + } + + if v.SizeInMBs != nil { + ok := object.Key("SizeInMBs") + ok.Integer(*v.SizeInMBs) + } + + return nil +} + func awsAwsjson11_serializeDocumentSnowflakeDestinationConfiguration(v *types.SnowflakeDestinationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2650,6 +2859,13 @@ func awsAwsjson11_serializeDocumentSnowflakeDestinationConfiguration(v *types.Sn ok.String(*v.AccountUrl) } + if v.BufferingHints != nil { + ok := object.Key("BufferingHints") + if err := awsAwsjson11_serializeDocumentSnowflakeBufferingHints(v.BufferingHints, ok); err != nil { + return err + } + } + if v.CloudWatchLoggingOptions != nil { ok := object.Key("CloudWatchLoggingOptions") if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { @@ -2766,6 +2982,13 @@ func awsAwsjson11_serializeDocumentSnowflakeDestinationUpdate(v *types.Snowflake ok.String(*v.AccountUrl) } + if v.BufferingHints != nil { + ok := object.Key("BufferingHints") + if err := awsAwsjson11_serializeDocumentSnowflakeBufferingHints(v.BufferingHints, ok); err != nil { + return err + } + } + if v.CloudWatchLoggingOptions != nil { ok := object.Key("CloudWatchLoggingOptions") if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { @@ -3218,6 +3441,13 @@ func awsAwsjson11_serializeOpDocumentCreateDeliveryStreamInput(v *CreateDelivery } } + if v.IcebergDestinationConfiguration != nil { + ok := object.Key("IcebergDestinationConfiguration") + if err := awsAwsjson11_serializeDocumentIcebergDestinationConfiguration(v.IcebergDestinationConfiguration, ok); err != nil { + return err + } + } + if v.KinesisStreamSourceConfiguration != nil { ok := object.Key("KinesisStreamSourceConfiguration") if err := awsAwsjson11_serializeDocumentKinesisStreamSourceConfiguration(v.KinesisStreamSourceConfiguration, ok); err != nil { @@ -3514,6 +3744,13 @@ func awsAwsjson11_serializeOpDocumentUpdateDestinationInput(v *UpdateDestination } } + if v.IcebergDestinationUpdate != nil { + ok := object.Key("IcebergDestinationUpdate") + if err := awsAwsjson11_serializeDocumentIcebergDestinationUpdate(v.IcebergDestinationUpdate, ok); err != nil { + return err + } + } + if v.RedshiftDestinationUpdate != nil { ok := object.Key("RedshiftDestinationUpdate") if err := awsAwsjson11_serializeDocumentRedshiftDestinationUpdate(v.RedshiftDestinationUpdate, ok); err != nil { diff --git a/service/firehose/types/enums.go b/service/firehose/types/enums.go index 284c80a9864..22269c3d5b2 100644 --- a/service/firehose/types/enums.go +++ b/service/firehose/types/enums.go @@ -352,6 +352,25 @@ func (HttpEndpointS3BackupMode) Values() []HttpEndpointS3BackupMode { } } +type IcebergS3BackupMode string + +// Enum values for IcebergS3BackupMode +const ( + IcebergS3BackupModeFailedDataOnly IcebergS3BackupMode = "FailedDataOnly" + IcebergS3BackupModeAllData IcebergS3BackupMode = "AllData" +) + +// Values returns all known values for IcebergS3BackupMode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IcebergS3BackupMode) Values() []IcebergS3BackupMode { + return []IcebergS3BackupMode{ + "FailedDataOnly", + "AllData", + } +} + type KeyType string // Enum values for KeyType diff --git a/service/firehose/types/types.go b/service/firehose/types/types.go index 90f0f806018..ff2c8a9fd00 100644 --- a/service/firehose/types/types.go +++ b/service/firehose/types/types.go @@ -427,6 +427,23 @@ type BufferingHints struct { noSmithyDocumentSerde } +// Describes the containers where the destination Apache Iceberg Tables are +// +// persisted. +// +// Amazon Data Firehose is in preview release and is subject to change. +type CatalogConfiguration struct { + + // Specifies the Glue catalog ARN indentifier of the destination Apache Iceberg + // Tables. You must specify the ARN in the format + // arn:aws:glue:region:account-id:catalog . + // + // Amazon Data Firehose is in preview release and is subject to change. + CatalogARN *string + + noSmithyDocumentSerde +} + // Describes the Amazon CloudWatch logging options for your delivery stream. type CloudWatchLoggingOptions struct { @@ -701,6 +718,11 @@ type DestinationDescription struct { // Describes the specified HTTP endpoint destination. HttpEndpointDestinationDescription *HttpEndpointDestinationDescription + // Describes a destination in Apache Iceberg Tables. + // + // Amazon Data Firehose is in preview release and is subject to change. + IcebergDestinationDescription *IcebergDestinationDescription + // The destination in Amazon Redshift. RedshiftDestinationDescription *RedshiftDestinationDescription @@ -716,6 +738,40 @@ type DestinationDescription struct { noSmithyDocumentSerde } +// Describes the configuration of a destination in Apache Iceberg Tables. +// +// Amazon Data Firehose is in preview release and is subject to change. +type DestinationTableConfiguration struct { + + // The name of the Apache Iceberg database. + // + // Amazon Data Firehose is in preview release and is subject to change. + // + // This member is required. + DestinationDatabaseName *string + + // Specifies the name of the Apache Iceberg Table. + // + // Amazon Data Firehose is in preview release and is subject to change. + // + // This member is required. + DestinationTableName *string + + // The table specific S3 error output prefix. All the errors that occurred while + // delivering to this table will be prefixed with this value in S3 destination. + // + // Amazon Data Firehose is in preview release and is subject to change. + S3ErrorOutputPrefix *string + + // A list of unique keys for a given Apache Iceberg table. Firehose will use + // these for running Create/Update/Delete operations on the given Iceberg table. + // + // Amazon Data Firehose is in preview release and is subject to change. + UniqueKeys []string + + noSmithyDocumentSerde +} + // Indicates the method for setting up document ID. The supported methods are // Firehose generated document ID and OpenSearch Service generated document ID. type DocumentIdOptions struct { @@ -1524,6 +1580,163 @@ type HttpEndpointRetryOptions struct { noSmithyDocumentSerde } +// Specifies the destination configure settings for Apache Iceberg Table. +// +// Amazon Data Firehose is in preview release and is subject to change. +type IcebergDestinationConfiguration struct { + + // Configuration describing where the destination Apache Iceberg Tables are + // persisted. + // + // Amazon Data Firehose is in preview release and is subject to change. + // + // This member is required. + CatalogConfiguration *CatalogConfiguration + + // The Amazon Resource Name (ARN) of the Apache Iceberg tables role. + // + // Amazon Data Firehose is in preview release and is subject to change. + // + // This member is required. + RoleARN *string + + // Describes the configuration of a destination in Amazon S3. + // + // This member is required. + S3Configuration *S3DestinationConfiguration + + // Describes hints for the buffering to perform before delivering data to the + // destination. These options are treated as hints, and therefore Firehose might + // choose to use different values when it is optimal. The SizeInMBs and + // IntervalInSeconds parameters are optional. However, if specify a value for one + // of them, you must also provide a value for the other. + BufferingHints *BufferingHints + + // Describes the Amazon CloudWatch logging options for your delivery stream. + CloudWatchLoggingOptions *CloudWatchLoggingOptions + + // Provides a list of DestinationTableConfigurations which Firehose uses to + // deliver data to Apache Iceberg tables. + // + // Amazon Data Firehose is in preview release and is subject to change. + DestinationTableConfigurationList []DestinationTableConfiguration + + // Describes a data processing configuration. + ProcessingConfiguration *ProcessingConfiguration + + // The retry behavior in case Firehose is unable to deliver data to an Amazon S3 + // prefix. + RetryOptions *RetryOptions + + // Describes how Firehose will backup records. Currently,Firehose only supports + // FailedDataOnly for preview. + // + // Amazon Data Firehose is in preview release and is subject to change. + S3BackupMode IcebergS3BackupMode + + noSmithyDocumentSerde +} + +// Describes a destination in Apache Iceberg Tables. +// +// Amazon Data Firehose is in preview release and is subject to change. +type IcebergDestinationDescription struct { + + // Describes hints for the buffering to perform before delivering data to the + // destination. These options are treated as hints, and therefore Firehose might + // choose to use different values when it is optimal. The SizeInMBs and + // IntervalInSeconds parameters are optional. However, if specify a value for one + // of them, you must also provide a value for the other. + BufferingHints *BufferingHints + + // Configuration describing where the destination Iceberg tables are persisted. + // + // Amazon Data Firehose is in preview release and is subject to change. + CatalogConfiguration *CatalogConfiguration + + // Describes the Amazon CloudWatch logging options for your delivery stream. + CloudWatchLoggingOptions *CloudWatchLoggingOptions + + // Provides a list of DestinationTableConfigurations which Firehose uses to + // deliver data to Apache Iceberg tables. + // + // Amazon Data Firehose is in preview release and is subject to change. + DestinationTableConfigurationList []DestinationTableConfiguration + + // Describes a data processing configuration. + ProcessingConfiguration *ProcessingConfiguration + + // The retry behavior in case Firehose is unable to deliver data to an Amazon S3 + // prefix. + RetryOptions *RetryOptions + + // The Amazon Resource Name (ARN) of the Apache Iceberg Tables role. + // + // Amazon Data Firehose is in preview release and is subject to change. + RoleARN *string + + // Describes how Firehose will backup records. Currently,Firehose only supports + // FailedDataOnly for preview. + // + // Amazon Data Firehose is in preview release and is subject to change. + S3BackupMode IcebergS3BackupMode + + // Describes a destination in Amazon S3. + S3DestinationDescription *S3DestinationDescription + + noSmithyDocumentSerde +} + +// Describes an update for a destination in Apache Iceberg Tables. +// +// Amazon Data Firehose is in preview release and is subject to change. +type IcebergDestinationUpdate struct { + + // Describes hints for the buffering to perform before delivering data to the + // destination. These options are treated as hints, and therefore Firehose might + // choose to use different values when it is optimal. The SizeInMBs and + // IntervalInSeconds parameters are optional. However, if specify a value for one + // of them, you must also provide a value for the other. + BufferingHints *BufferingHints + + // Configuration describing where the destination Iceberg tables are persisted. + // + // Amazon Data Firehose is in preview release and is subject to change. + CatalogConfiguration *CatalogConfiguration + + // Describes the Amazon CloudWatch logging options for your delivery stream. + CloudWatchLoggingOptions *CloudWatchLoggingOptions + + // Provides a list of DestinationTableConfigurations which Firehose uses to + // deliver data to Apache Iceberg tables. + // + // Amazon Data Firehose is in preview release and is subject to change. + DestinationTableConfigurationList []DestinationTableConfiguration + + // Describes a data processing configuration. + ProcessingConfiguration *ProcessingConfiguration + + // The retry behavior in case Firehose is unable to deliver data to an Amazon S3 + // prefix. + RetryOptions *RetryOptions + + // The Amazon Resource Name (ARN) of the Apache Iceberg Tables role. + // + // Amazon Data Firehose is in preview release and is subject to change. + RoleARN *string + + // Describes how Firehose will backup records. Currently,Firehose only supports + // FailedDataOnly for preview. + // + // Amazon Data Firehose is in preview release and is subject to change. + S3BackupMode IcebergS3BackupMode + + // Describes the configuration of a destination in Amazon S3. + S3Configuration *S3DestinationConfiguration + + noSmithyDocumentSerde +} + // Specifies the deserializer you want to use to convert the format of the input // data. This parameter is required if Enabled is set to true. type InputFormatConfiguration struct { @@ -1615,6 +1828,15 @@ type MSKSourceConfiguration struct { // This member is required. TopicName *string + // The start date and time in UTC for the offset position within your MSK topic + // from where Firehose begins to read. By default, this is set to timestamp when + // Firehose becomes Active. + // + // If you want to create a Firehose stream with Earliest start position from SDK + // or CLI, you need to set the ReadFromTimestamp parameter to Epoch + // (1970-01-01T00:00:00Z). + ReadFromTimestamp *time.Time + noSmithyDocumentSerde } @@ -1632,6 +1854,15 @@ type MSKSourceDescription struct { // The ARN of the Amazon MSK cluster. MSKClusterARN *string + // The start date and time in UTC for the offset position within your MSK topic + // from where Firehose begins to read. By default, this is set to timestamp when + // Firehose becomes Active. + // + // If you want to create a Firehose stream with Earliest start position from SDK + // or CLI, you need to set the ReadFromTimestampUTC parameter to Epoch + // (1970-01-01T00:00:00Z). + ReadFromTimestamp *time.Time + // The topic name within the Amazon MSK cluster. TopicName *string @@ -2300,6 +2531,22 @@ type Serializer struct { noSmithyDocumentSerde } +// Describes the buffering to perform before delivering data to the Snowflake +// +// destination. If you do not specify any value, Firehose uses the default values. +type SnowflakeBufferingHints struct { + + // Buffer incoming data for the specified period of time, in seconds, before + // delivering it to the destination. The default value is 0. + IntervalInSeconds *int32 + + // Buffer incoming data to the specified size, in MBs, before delivering it to + // the destination. The default value is 1. + SizeInMBs *int32 + + noSmithyDocumentSerde +} + // Configure Snowflake destination type SnowflakeDestinationConfiguration struct { @@ -2338,6 +2585,10 @@ type SnowflakeDestinationConfiguration struct { // This member is required. Table *string + // Describes the buffering to perform before delivering data to the Snowflake + // destination. If you do not specify any value, Firehose uses the default values. + BufferingHints *SnowflakeBufferingHints + // Describes the Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions @@ -2401,6 +2652,10 @@ type SnowflakeDestinationDescription struct { // [account identifier]: https://docs.snowflake.com/en/user-guide/admin-account-identifier AccountUrl *string + // Describes the buffering to perform before delivering data to the Snowflake + // destination. If you do not specify any value, Firehose uses the default values. + BufferingHints *SnowflakeBufferingHints + // Describes the Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions @@ -2470,6 +2725,10 @@ type SnowflakeDestinationUpdate struct { // [account identifier]: https://docs.snowflake.com/en/user-guide/admin-account-identifier AccountUrl *string + // Describes the buffering to perform before delivering data to the Snowflake + // destination. + BufferingHints *SnowflakeBufferingHints + // Describes the Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions diff --git a/service/firehose/validators.go b/service/firehose/validators.go index 1af8af7ef90..734fd863c67 100644 --- a/service/firehose/validators.go +++ b/service/firehose/validators.go @@ -446,6 +446,41 @@ func validateDeliveryStreamEncryptionConfigurationInput(v *types.DeliveryStreamE } } +func validateDestinationTableConfiguration(v *types.DestinationTableConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DestinationTableConfiguration"} + if v.DestinationTableName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationTableName")) + } + if v.DestinationDatabaseName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationDatabaseName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDestinationTableConfigurationList(v []types.DestinationTableConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DestinationTableConfigurationList"} + for i := range v { + if err := validateDestinationTableConfiguration(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateDocumentIdOptions(v *types.DocumentIdOptions) error { if v == nil { return nil @@ -750,6 +785,68 @@ func validateHttpEndpointRequestConfiguration(v *types.HttpEndpointRequestConfig } } +func validateIcebergDestinationConfiguration(v *types.IcebergDestinationConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IcebergDestinationConfiguration"} + if v.DestinationTableConfigurationList != nil { + if err := validateDestinationTableConfigurationList(v.DestinationTableConfigurationList); err != nil { + invalidParams.AddNested("DestinationTableConfigurationList", err.(smithy.InvalidParamsError)) + } + } + if v.ProcessingConfiguration != nil { + if err := validateProcessingConfiguration(v.ProcessingConfiguration); err != nil { + invalidParams.AddNested("ProcessingConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.RoleARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleARN")) + } + if v.CatalogConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("CatalogConfiguration")) + } + if v.S3Configuration == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Configuration")) + } else if v.S3Configuration != nil { + if err := validateS3DestinationConfiguration(v.S3Configuration); err != nil { + invalidParams.AddNested("S3Configuration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIcebergDestinationUpdate(v *types.IcebergDestinationUpdate) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IcebergDestinationUpdate"} + if v.DestinationTableConfigurationList != nil { + if err := validateDestinationTableConfigurationList(v.DestinationTableConfigurationList); err != nil { + invalidParams.AddNested("DestinationTableConfigurationList", err.(smithy.InvalidParamsError)) + } + } + if v.ProcessingConfiguration != nil { + if err := validateProcessingConfiguration(v.ProcessingConfiguration); err != nil { + invalidParams.AddNested("ProcessingConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.S3Configuration != nil { + if err := validateS3DestinationConfiguration(v.S3Configuration); err != nil { + invalidParams.AddNested("S3Configuration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateKinesisStreamSourceConfiguration(v *types.KinesisStreamSourceConfiguration) error { if v == nil { return nil @@ -1347,6 +1444,11 @@ func validateOpCreateDeliveryStreamInput(v *CreateDeliveryStreamInput) error { invalidParams.AddNested("SnowflakeDestinationConfiguration", err.(smithy.InvalidParamsError)) } } + if v.IcebergDestinationConfiguration != nil { + if err := validateIcebergDestinationConfiguration(v.IcebergDestinationConfiguration); err != nil { + invalidParams.AddNested("IcebergDestinationConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1577,6 +1679,11 @@ func validateOpUpdateDestinationInput(v *UpdateDestinationInput) error { invalidParams.AddNested("SnowflakeDestinationUpdate", err.(smithy.InvalidParamsError)) } } + if v.IcebergDestinationUpdate != nil { + if err := validateIcebergDestinationUpdate(v.IcebergDestinationUpdate); err != nil { + invalidParams.AddNested("IcebergDestinationUpdate", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/ivschat/doc.go b/service/ivschat/doc.go index 7fbfb34ace3..5cad2fa175e 100644 --- a/service/ivschat/doc.go +++ b/service/ivschat/doc.go @@ -13,6 +13,9 @@ // IVS Chat HTTPS service endpoints, see the Amazon IVS Chat information on the [Amazon IVS page]in // the AWS General Reference. // +// This document describes HTTP operations. There is a separate messaging API for +// managing Chat resources; see the [Amazon IVS Chat Messaging API Reference]. +// // Notes on terminology: // // - You create service applications using the Amazon IVS Chat API. We refer to @@ -21,13 +24,16 @@ // - You create front-end client applications (browser and Android/iOS apps) // using the Amazon IVS Chat Messaging API. We refer to these as clients. // -// Key Concepts +// # Resources +// +// The following resources are part of Amazon IVS Chat: // // - LoggingConfiguration — A configuration that allows customers to store and -// record sent messages in a chat room. +// record sent messages in a chat room. See the Logging Configuration endpoints for +// more information. // // - Room — The central Amazon IVS Chat resource through which clients connect -// to and exchange chat messages. +// to and exchange chat messages. See the Room endpoints for more information. // // # Tagging // @@ -90,91 +96,12 @@ // specify a resource unambiguously across all of AWS, such as in IAM policies and // API calls. For more information, see [Amazon Resource Names]in the AWS General Reference. // -// # Messaging Endpoints -// -// DeleteMessage -// - — Sends an event to a specific room which directs clients to delete a -// specific message; that is, unrender it from view and delete it from the client’s -// chat history. This event’s EventName is aws:DELETE_MESSAGE . This replicates -// the [DeleteMessage]WebSocket operation in the Amazon IVS Chat Messaging API. -// -// DisconnectUser -// - — Disconnects all connections using a specified user ID from a room. This -// replicates the [DisconnectUser]WebSocket operation in the Amazon IVS Chat Messaging API. -// -// SendEvent -// - — Sends an event to a room. Use this within your application’s business -// logic to send events to clients of a room; e.g., to notify clients to change the -// way the chat UI is rendered. -// -// # Chat Token Endpoint -// -// CreateChatToken -// - — Creates an encrypted token that is used by a chat participant to -// establish an individual WebSocket chat connection to a room. When the token is -// used to connect to chat, the connection is valid for the session duration -// specified in the request. The token becomes invalid at the token-expiration -// timestamp included in the response. -// -// # Room Endpoints -// -// CreateRoom -// - — Creates a room that allows clients to connect and pass messages. -// -// DeleteRoom -// - — Deletes the specified room. -// -// GetRoom -// - — Gets the specified room. -// -// ListRooms -// - — Gets summary information about all your rooms in the AWS region where the -// API request is processed. -// -// UpdateRoom -// - — Updates a room’s configuration. -// -// # Logging Configuration Endpoints -// -// CreateLoggingConfiguration -// - — Creates a logging configuration that allows clients to store and record -// sent messages. -// -// DeleteLoggingConfiguration -// - — Deletes the specified logging configuration. -// -// GetLoggingConfiguration -// - — Gets the specified logging configuration. -// -// ListLoggingConfigurations -// - — Gets summary information about all your logging configurations in the AWS -// region where the API request is processed. -// -// UpdateLoggingConfiguration -// - — Updates a specified logging configuration. -// -// # Tags Endpoints -// -// ListTagsForResource -// - — Gets information about AWS tags for the specified ARN. -// -// TagResource -// - — Adds or updates tags for the AWS resource with the specified ARN. -// -// UntagResource -// - — Removes tags from the resource with the specified ARN. -// -// All the above are HTTP operations. There is a separate messaging API for -// managing Chat resources; see the [Amazon IVS Chat Messaging API Reference]. -// -// [DisconnectUser]: https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/actions-disconnectuser-publish.html // [Amazon Resource Names]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html // [Amazon IVS page]: https://docs.aws.amazon.com/general/latest/gr/ivs.html // [Identity and Access Management]: https://docs.aws.amazon.com/ivs/latest/userguide/security-iam.html // [Amazon IVS Chat Messaging API]: https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/chat-messaging-api.html -// [DeleteMessage]: https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/actions-deletemessage-publish.html +// [Amazon IVS Chat Messaging API Reference]: https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/chat-messaging-api.html // [Access Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html // [Authenticating Requests (Amazon Web Services Signature Version 4)]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html -// [Amazon IVS Chat Messaging API Reference]: https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/chat-messaging-api.html package ivschat diff --git a/service/medialive/api_op_CreateInput.go b/service/medialive/api_op_CreateInput.go index ab3131d72cc..23cce75726a 100644 --- a/service/medialive/api_op_CreateInput.go +++ b/service/medialive/api_op_CreateInput.go @@ -61,6 +61,9 @@ type CreateInputInput struct { // Destinations empty. Sources []types.InputSourceRequest + // The settings associated with an SRT input. + SrtSettings *types.SrtSettingsRequest + // A collection of key-value pairs. Tags map[string]string diff --git a/service/medialive/api_op_DescribeInput.go b/service/medialive/api_op_DescribeInput.go index 27d8bb358c2..449ccdf904d 100644 --- a/service/medialive/api_op_DescribeInput.go +++ b/service/medialive/api_op_DescribeInput.go @@ -95,6 +95,9 @@ type DescribeInputOutput struct { // A list of the sources of the input (PULL-type). Sources []types.InputSource + // The settings associated with an SRT input. + SrtSettings *types.SrtSettings + // Placeholder documentation for InputState State types.InputState diff --git a/service/medialive/api_op_UpdateInput.go b/service/medialive/api_op_UpdateInput.go index 09ed6026022..c1363c1cb80 100644 --- a/service/medialive/api_op_UpdateInput.go +++ b/service/medialive/api_op_UpdateInput.go @@ -63,6 +63,9 @@ type UpdateInputInput struct { // Destinations empty. Sources []types.InputSourceRequest + // The settings associated with an SRT input. + SrtSettings *types.SrtSettingsRequest + noSmithyDocumentSerde } diff --git a/service/medialive/deserializers.go b/service/medialive/deserializers.go index b2ef35c5008..13a551fe1a0 100644 --- a/service/medialive/deserializers.go +++ b/service/medialive/deserializers.go @@ -6200,6 +6200,11 @@ func awsRestjson1_deserializeOpDocumentDescribeInputOutput(v **DescribeInputOutp return err } + case "srtSettings": + if err := awsRestjson1_deserializeDocumentSrtSettings(&sv.SrtSettings, value); err != nil { + return err + } + case "state": if value != nil { jtv, ok := value.(string) @@ -20096,6 +20101,40 @@ func awsRestjson1_deserializeDocument__listOfSignalMapSummary(v *[]types.SignalM return nil } +func awsRestjson1_deserializeDocument__listOfSrtCallerSource(v *[]types.SrtCallerSource, 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.SrtCallerSource + if *v == nil { + cv = []types.SrtCallerSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SrtCallerSource + destAddr := &col + if err := awsRestjson1_deserializeDocumentSrtCallerSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocument__listOfThumbnail(v *[]types.Thumbnail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -29106,6 +29145,11 @@ func awsRestjson1_deserializeDocumentInput(v **types.Input, value interface{}) e return err } + case "srtSettings": + if err := awsRestjson1_deserializeDocumentSrtSettings(&sv.SrtSettings, value); err != nil { + return err + } + case "state": if value != nil { jtv, ok := value.(string) @@ -37048,6 +37092,167 @@ func awsRestjson1_deserializeDocumentSmpteTtDestinationSettings(v **types.SmpteT return nil } +func awsRestjson1_deserializeDocumentSrtCallerDecryption(v **types.SrtCallerDecryption, 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.SrtCallerDecryption + if *v == nil { + sv = &types.SrtCallerDecryption{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "algorithm": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Algorithm to be of type string, got %T instead", value) + } + sv.Algorithm = types.Algorithm(jtv) + } + + case "passphraseSecretArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.PassphraseSecretArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSrtCallerSource(v **types.SrtCallerSource, 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.SrtCallerSource + if *v == nil { + sv = &types.SrtCallerSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "decryption": + if err := awsRestjson1_deserializeDocumentSrtCallerDecryption(&sv.Decryption, value); err != nil { + return err + } + + case "minimumLatency": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MinimumLatency = ptr.Int32(int32(i64)) + } + + case "srtListenerAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.SrtListenerAddress = ptr.String(jtv) + } + + case "srtListenerPort": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.SrtListenerPort = ptr.String(jtv) + } + + case "streamId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.StreamId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSrtSettings(v **types.SrtSettings, 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.SrtSettings + if *v == nil { + sv = &types.SrtSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "srtCallerSources": + if err := awsRestjson1_deserializeDocument__listOfSrtCallerSource(&sv.SrtCallerSources, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentStandardHlsSettings(v **types.StandardHlsSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/medialive/serializers.go b/service/medialive/serializers.go index 39c1177d6a9..094a0d93114 100644 --- a/service/medialive/serializers.go +++ b/service/medialive/serializers.go @@ -1284,6 +1284,13 @@ func awsRestjson1_serializeOpDocumentCreateInputInput(v *CreateInputInput, value } } + if v.SrtSettings != nil { + ok := object.Key("srtSettings") + if err := awsRestjson1_serializeDocumentSrtSettingsRequest(v.SrtSettings, ok); err != nil { + return err + } + } + if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { @@ -7012,6 +7019,13 @@ func awsRestjson1_serializeOpDocumentUpdateInputInput(v *UpdateInputInput, value } } + if v.SrtSettings != nil { + ok := object.Key("srtSettings") + if err := awsRestjson1_serializeDocumentSrtSettingsRequest(v.SrtSettings, ok); err != nil { + return err + } + } + return nil } @@ -7936,6 +7950,19 @@ func awsRestjson1_serializeDocument__listOfScte35Descriptor(v []types.Scte35Desc return nil } +func awsRestjson1_serializeDocument__listOfSrtCallerSourceRequest(v []types.SrtCallerSourceRequest, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentSrtCallerSourceRequest(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocument__listOfVideoDescription(v []types.VideoDescription, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -13889,6 +13916,71 @@ func awsRestjson1_serializeDocumentSmpteTtDestinationSettings(v *types.SmpteTtDe return nil } +func awsRestjson1_serializeDocumentSrtCallerDecryptionRequest(v *types.SrtCallerDecryptionRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Algorithm) > 0 { + ok := object.Key("algorithm") + ok.String(string(v.Algorithm)) + } + + if v.PassphraseSecretArn != nil { + ok := object.Key("passphraseSecretArn") + ok.String(*v.PassphraseSecretArn) + } + + return nil +} + +func awsRestjson1_serializeDocumentSrtCallerSourceRequest(v *types.SrtCallerSourceRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Decryption != nil { + ok := object.Key("decryption") + if err := awsRestjson1_serializeDocumentSrtCallerDecryptionRequest(v.Decryption, ok); err != nil { + return err + } + } + + if v.MinimumLatency != nil { + ok := object.Key("minimumLatency") + ok.Integer(*v.MinimumLatency) + } + + if v.SrtListenerAddress != nil { + ok := object.Key("srtListenerAddress") + ok.String(*v.SrtListenerAddress) + } + + if v.SrtListenerPort != nil { + ok := object.Key("srtListenerPort") + ok.String(*v.SrtListenerPort) + } + + if v.StreamId != nil { + ok := object.Key("streamId") + ok.String(*v.StreamId) + } + + return nil +} + +func awsRestjson1_serializeDocumentSrtSettingsRequest(v *types.SrtSettingsRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SrtCallerSources != nil { + ok := object.Key("srtCallerSources") + if err := awsRestjson1_serializeDocument__listOfSrtCallerSourceRequest(v.SrtCallerSources, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentStandardHlsSettings(v *types.StandardHlsSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/medialive/types/enums.go b/service/medialive/types/enums.go index a3686e0ae3e..c4cd2496067 100644 --- a/service/medialive/types/enums.go +++ b/service/medialive/types/enums.go @@ -334,6 +334,27 @@ func (AfdSignaling) Values() []AfdSignaling { } } +type Algorithm string + +// Enum values for Algorithm +const ( + AlgorithmAes128 Algorithm = "AES128" + AlgorithmAes192 Algorithm = "AES192" + AlgorithmAes256 Algorithm = "AES256" +) + +// Values returns all known values for Algorithm. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (Algorithm) Values() []Algorithm { + return []Algorithm{ + "AES128", + "AES192", + "AES256", + } +} + type AudioDescriptionAudioTypeControl string // Enum values for AudioDescriptionAudioTypeControl @@ -4114,6 +4135,7 @@ const ( InputTypeInputDevice InputType = "INPUT_DEVICE" InputTypeAwsCdi InputType = "AWS_CDI" InputTypeTsFile InputType = "TS_FILE" + InputTypeSrtCaller InputType = "SRT_CALLER" ) // Values returns all known values for InputType. Note that this can be expanded @@ -4132,6 +4154,7 @@ func (InputType) Values() []InputType { "INPUT_DEVICE", "AWS_CDI", "TS_FILE", + "SRT_CALLER", } } diff --git a/service/medialive/types/types.go b/service/medialive/types/types.go index e2c9abc296f..21f4dd837c6 100644 --- a/service/medialive/types/types.go +++ b/service/medialive/types/types.go @@ -1558,8 +1558,7 @@ type DvbTdtSettings struct { // Eac3 Atmos Settings type Eac3AtmosSettings struct { - // Average bitrate in bits/second. Valid bitrates depend on the coding mode. // * - // @affectsRightSizing true + // Average bitrate in bits/second. Valid bitrates depend on the coding mode. Bitrate *float64 // Dolby Digital Plus with Dolby Atmos coding mode. Determines number of channels. @@ -2249,7 +2248,18 @@ type H264Settings struct { // Entropy encoding mode. Use cabac (must be in Main or High profile) or cavlc. EntropyEncoding H264EntropyEncoding - // Optional filters that you can apply to an encode. + // Optional. Both filters reduce bandwidth by removing imperceptible details. You + // can enable one of the filters. We recommend that you try both filters and + // observe the results to decide which one to use. + // + // The Temporal Filter reduces bandwidth by removing imperceptible details in the + // content. It combines perceptual filtering and motion compensated temporal + // filtering (MCTF). It operates independently of the compression level. + // + // The Bandwidth Reduction filter is a perceptual filter located within the + // encoding loop. It adapts to the current compression level to filter + // imperceptible signals. This filter works only when the resolution is 1080p or + // lower. FilterSettings *H264FilterSettings // Four bit AFD value to write on all frames of video in the output stream. Only @@ -2530,7 +2540,18 @@ type H265Settings struct { // Color Space settings ColorSpaceSettings *H265ColorSpaceSettings - // Optional filters that you can apply to an encode. + // Optional. Both filters reduce bandwidth by removing imperceptible details. You + // can enable one of the filters. We recommend that you try both filters and + // observe the results to decide which one to use. + // + // The Temporal Filter reduces bandwidth by removing imperceptible details in the + // content. It combines perceptual filtering and motion compensated temporal + // filtering (MCTF). It operates independently of the compression level. + // + // The Bandwidth Reduction filter is a perceptual filter located within the + // encoding loop. It adapts to the current compression level to filter + // imperceptible signals. This filter works only when the resolution is 1080p or + // lower. FilterSettings *H265FilterSettings // Four bit AFD value to write on all frames of video in the output stream. Only @@ -3237,6 +3258,9 @@ type Input struct { // A list of the sources of the input (PULL-type). Sources []InputSource + // The settings associated with an SRT input. + SrtSettings *SrtSettings + // Placeholder documentation for InputState State InputState @@ -5959,6 +5983,115 @@ type SmpteTtDestinationSettings struct { noSmithyDocumentSerde } +// The decryption settings for the SRT caller source. Present only if the source +// has decryption enabled. +type SrtCallerDecryption struct { + + // The algorithm used to encrypt content. + Algorithm Algorithm + + // The ARN for the secret in Secrets Manager. Someone in your organization must + // create a secret and provide you with its ARN. The secret holds the passphrase + // that MediaLive uses to decrypt the source content. + PassphraseSecretArn *string + + noSmithyDocumentSerde +} + +// Complete these parameters only if the content is encrypted. +type SrtCallerDecryptionRequest struct { + + // The algorithm used to encrypt content. + Algorithm Algorithm + + // The ARN for the secret in Secrets Manager. Someone in your organization must + // create a secret and provide you with its ARN. This secret holds the passphrase + // that MediaLive will use to decrypt the source content. + PassphraseSecretArn *string + + noSmithyDocumentSerde +} + +// The configuration for a source that uses SRT as the connection protocol. In +// terms of establishing the connection, MediaLive is always caller and the +// upstream system is always the listener. In terms of transmission of the source +// content, MediaLive is always the receiver and the upstream system is always the +// sender. +type SrtCallerSource struct { + + // The decryption settings for the SRT caller source. Present only if the source + // has decryption enabled. + Decryption *SrtCallerDecryption + + // The preferred latency (in milliseconds) for implementing packet loss and + // recovery. Packet recovery is a key feature of SRT. + MinimumLatency *int32 + + // The IP address at the upstream system (the listener) that MediaLive (the + // caller) connects to. + SrtListenerAddress *string + + // The port at the upstream system (the listener) that MediaLive (the caller) + // connects to. + SrtListenerPort *string + + // The stream ID, if the upstream system uses this identifier. + StreamId *string + + noSmithyDocumentSerde +} + +// Configures the connection for a source that uses SRT as the connection +// protocol. In terms of establishing the connection, MediaLive is always the +// caller and the upstream system is always the listener. In terms of transmission +// of the source content, MediaLive is always the receiver and the upstream system +// is always the sender. +type SrtCallerSourceRequest struct { + + // Complete these parameters only if the content is encrypted. + Decryption *SrtCallerDecryptionRequest + + // The preferred latency (in milliseconds) for implementing packet loss and + // recovery. Packet recovery is a key feature of SRT. Obtain this value from the + // operator at the upstream system. + MinimumLatency *int32 + + // The IP address at the upstream system (the listener) that MediaLive (the + // caller) will connect to. + SrtListenerAddress *string + + // The port at the upstream system (the listener) that MediaLive (the caller) will + // connect to. + SrtListenerPort *string + + // This value is required if the upstream system uses this identifier because + // without it, the SRT handshake between MediaLive (the caller) and the upstream + // system (the listener) might fail. + StreamId *string + + noSmithyDocumentSerde +} + +// The configured sources for this SRT input. +type SrtSettings struct { + + // Placeholder documentation for __listOfSrtCallerSource + SrtCallerSources []SrtCallerSource + + noSmithyDocumentSerde +} + +// Configures the sources for this SRT input. For a single-pipeline input, include +// one srtCallerSource in the array. For a standard-pipeline input, include two +// srtCallerSource. +type SrtSettingsRequest struct { + + // Placeholder documentation for __listOfSrtCallerSourceRequest + SrtCallerSources []SrtCallerSourceRequest + + noSmithyDocumentSerde +} + // Standard Hls Settings type StandardHlsSettings struct { diff --git a/service/networkfirewall/internal/endpoints/endpoints.go b/service/networkfirewall/internal/endpoints/endpoints.go index 815e1008ca0..386c2cc1894 100644 --- a/service/networkfirewall/internal/endpoints/endpoints.go +++ b/service/networkfirewall/internal/endpoints/endpoints.go @@ -181,6 +181,9 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "network-firewall-fips.ca-central-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "ca-west-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, diff --git a/service/rds/api_op_CreateDBCluster.go b/service/rds/api_op_CreateDBCluster.go index e3b1796b812..09f79f15b51 100644 --- a/service/rds/api_op_CreateDBCluster.go +++ b/service/rds/api_op_CreateDBCluster.go @@ -714,12 +714,13 @@ type CreateDBClusterInput struct { // Specifies whether the DB cluster is publicly accessible. // - // When the DB cluster is publicly accessible, its Domain Name System (DNS) - // endpoint resolves to the private IP address from within the DB cluster's virtual - // private cloud (VPC). It resolves to the public IP address from outside of the DB - // cluster's VPC. Access to the DB cluster is ultimately controlled by the security - // group it uses. That public access isn't permitted if the security group assigned - // to the DB cluster doesn't permit it. + // When the DB cluster is publicly accessible and you connect from outside of the + // DB cluster's virtual private cloud (VPC), its Domain Name System (DNS) endpoint + // resolves to the public IP address. When you connect from within the same VPC as + // the DB cluster, the endpoint resolves to the private IP address. Access to the + // DB cluster is ultimately controlled by the security group it uses. That public + // access isn't permitted if the security group assigned to the DB cluster doesn't + // permit it. // // When the DB cluster isn't publicly accessible, it is an internal DB cluster // with a DNS name that resolves to a private IP address. diff --git a/service/rds/api_op_CreateDBInstance.go b/service/rds/api_op_CreateDBInstance.go index 6513108110e..e16d3a12632 100644 --- a/service/rds/api_op_CreateDBInstance.go +++ b/service/rds/api_op_CreateDBInstance.go @@ -1051,12 +1051,13 @@ type CreateDBInstanceInput struct { // Specifies whether the DB instance is publicly accessible. // - // When the DB instance is publicly accessible, its Domain Name System (DNS) - // endpoint resolves to the private IP address from within the DB instance's - // virtual private cloud (VPC). It resolves to the public IP address from outside - // of the DB instance's VPC. Access to the DB instance is ultimately controlled by - // the security group it uses. That public access is not permitted if the security - // group assigned to the DB instance doesn't permit it. + // When the DB instance is publicly accessible and you connect from outside of the + // DB instance's virtual private cloud (VPC), its Domain Name System (DNS) endpoint + // resolves to the public IP address. When you connect from within the same VPC as + // the DB instance, the endpoint resolves to the private IP address. Access to the + // DB instance is ultimately controlled by the security group it uses. That public + // access is not permitted if the security group assigned to the DB instance + // doesn't permit it. // // When the DB instance isn't publicly accessible, it is an internal DB instance // with a DNS name that resolves to a private IP address. diff --git a/service/rds/api_op_DeleteDBCluster.go b/service/rds/api_op_DeleteDBCluster.go index 944475347c3..97e6b8637d0 100644 --- a/service/rds/api_op_DeleteDBCluster.go +++ b/service/rds/api_op_DeleteDBCluster.go @@ -55,6 +55,11 @@ type DeleteDBClusterInput struct { // Specifies whether to remove automated backups immediately after the DB cluster // is deleted. This parameter isn't case-sensitive. The default is to remove // automated backups immediately after the DB cluster is deleted. + // + // You must delete automated backups for Amazon RDS Multi-AZ DB clusters. For more + // information about managing automated backups for RDS Multi-AZ DB clusters, see [Managing automated backups]. + // + // [Managing automated backups]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ManagingAutomatedBackups.html DeleteAutomatedBackups *bool // The DB cluster snapshot identifier of the new DB cluster snapshot created when diff --git a/service/rds/api_op_DescribeDBClusterParameters.go b/service/rds/api_op_DescribeDBClusterParameters.go index c0786c7d8a8..be44f10d363 100644 --- a/service/rds/api_op_DescribeDBClusterParameters.go +++ b/service/rds/api_op_DescribeDBClusterParameters.go @@ -67,7 +67,7 @@ type DescribeDBClusterParametersInput struct { // // Valid Values: // - // - customer + // - user // // - engine // diff --git a/service/rds/api_op_DescribePendingMaintenanceActions.go b/service/rds/api_op_DescribePendingMaintenanceActions.go index 92729fe8327..fc56a7b9634 100644 --- a/service/rds/api_op_DescribePendingMaintenanceActions.go +++ b/service/rds/api_op_DescribePendingMaintenanceActions.go @@ -13,6 +13,12 @@ import ( // Returns a list of resources (for example, DB instances) that have at least one // pending maintenance action. +// +// This API follows an eventual consistency model. This means that the result of +// the DescribePendingMaintenanceActions command might not be immediately visible +// to all subsequent RDS commands. Keep this in mind when you use +// DescribePendingMaintenanceActions immediately after using a previous API command +// such as ApplyPendingMaintenanceActions . func (c *Client) DescribePendingMaintenanceActions(ctx context.Context, params *DescribePendingMaintenanceActionsInput, optFns ...func(*Options)) (*DescribePendingMaintenanceActionsOutput, error) { if params == nil { params = &DescribePendingMaintenanceActionsInput{} diff --git a/service/rds/api_op_ModifyDBInstance.go b/service/rds/api_op_ModifyDBInstance.go index d2c74233449..77651ef1099 100644 --- a/service/rds/api_op_ModifyDBInstance.go +++ b/service/rds/api_op_ModifyDBInstance.go @@ -846,12 +846,13 @@ type ModifyDBInstanceInput struct { // Specifies whether the DB instance is publicly accessible. // - // When the DB cluster is publicly accessible, its Domain Name System (DNS) - // endpoint resolves to the private IP address from within the DB cluster's virtual - // private cloud (VPC). It resolves to the public IP address from outside of the DB - // cluster's VPC. Access to the DB cluster is ultimately controlled by the security - // group it uses. That public access isn't permitted if the security group assigned - // to the DB cluster doesn't permit it. + // When the DB instance is publicly accessible and you connect from outside of the + // DB instance's virtual private cloud (VPC), its Domain Name System (DNS) endpoint + // resolves to the public IP address. When you connect from within the same VPC as + // the DB instance, the endpoint resolves to the private IP address. Access to the + // DB instance is ultimately controlled by the security group it uses. That public + // access isn't permitted if the security group assigned to the DB instance doesn't + // permit it. // // When the DB instance isn't publicly accessible, it is an internal DB instance // with a DNS name that resolves to a private IP address. diff --git a/service/rds/types/types.go b/service/rds/types/types.go index 496a5febc12..cdab9f53769 100644 --- a/service/rds/types/types.go +++ b/service/rds/types/types.go @@ -867,12 +867,13 @@ type DBCluster struct { // Indicates whether the DB cluster is publicly accessible. // - // When the DB cluster is publicly accessible, its Domain Name System (DNS) - // endpoint resolves to the private IP address from within the DB cluster's virtual - // private cloud (VPC). It resolves to the public IP address from outside of the DB - // cluster's VPC. Access to the DB cluster is ultimately controlled by the security - // group it uses. That public access isn't permitted if the security group assigned - // to the DB cluster doesn't permit it. + // When the DB cluster is publicly accessible and you connect from outside of the + // DB cluster's virtual private cloud (VPC), its Domain Name System (DNS) endpoint + // resolves to the public IP address. When you connect from within the same VPC as + // the DB cluster, the endpoint resolves to the private IP address. Access to the + // DB cluster is ultimately controlled by the security group it uses. That public + // access isn't permitted if the security group assigned to the DB cluster doesn't + // permit it. // // When the DB cluster isn't publicly accessible, it is an internal DB cluster // with a DNS name that resolves to a private IP address. @@ -1933,12 +1934,13 @@ type DBInstance struct { // Indicates whether the DB instance is publicly accessible. // - // When the DB cluster is publicly accessible, its Domain Name System (DNS) - // endpoint resolves to the private IP address from within the DB cluster's virtual - // private cloud (VPC). It resolves to the public IP address from outside of the DB - // cluster's VPC. Access to the DB cluster is ultimately controlled by the security - // group it uses. That public access isn't permitted if the security group assigned - // to the DB cluster doesn't permit it. + // When the DB instance is publicly accessible and you connect from outside of the + // DB instance's virtual private cloud (VPC), its Domain Name System (DNS) endpoint + // resolves to the public IP address. When you connect from within the same VPC as + // the DB instance, the endpoint resolves to the private IP address. Access to the + // DB cluster is ultimately controlled by the security group it uses. That public + // access isn't permitted if the security group assigned to the DB cluster doesn't + // permit it. // // When the DB instance isn't publicly accessible, it is an internal DB instance // with a DNS name that resolves to a private IP address. diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index eb9ac8ccab4..f8e27c63e77 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -4983,6 +4983,22 @@ const ( ProcessingInstanceTypeMlG4dn8xlarge ProcessingInstanceType = "ml.g4dn.8xlarge" ProcessingInstanceTypeMlG4dn12xlarge ProcessingInstanceType = "ml.g4dn.12xlarge" ProcessingInstanceTypeMlG4dn16xlarge ProcessingInstanceType = "ml.g4dn.16xlarge" + ProcessingInstanceTypeMlG5Xlarge ProcessingInstanceType = "ml.g5.xlarge" + ProcessingInstanceTypeMlG52xlarge ProcessingInstanceType = "ml.g5.2xlarge" + ProcessingInstanceTypeMlG54xlarge ProcessingInstanceType = "ml.g5.4xlarge" + ProcessingInstanceTypeMlG58xlarge ProcessingInstanceType = "ml.g5.8xlarge" + ProcessingInstanceTypeMlG516xlarge ProcessingInstanceType = "ml.g5.16xlarge" + ProcessingInstanceTypeMlG512xlarge ProcessingInstanceType = "ml.g5.12xlarge" + ProcessingInstanceTypeMlG524xlarge ProcessingInstanceType = "ml.g5.24xlarge" + ProcessingInstanceTypeMlG548xlarge ProcessingInstanceType = "ml.g5.48xlarge" + ProcessingInstanceTypeMlR5dLarge ProcessingInstanceType = "ml.r5d.large" + ProcessingInstanceTypeMlR5dXlarge ProcessingInstanceType = "ml.r5d.xlarge" + ProcessingInstanceTypeMlR5d2xlarge ProcessingInstanceType = "ml.r5d.2xlarge" + ProcessingInstanceTypeMlR5d4xlarge ProcessingInstanceType = "ml.r5d.4xlarge" + ProcessingInstanceTypeMlR5d8xlarge ProcessingInstanceType = "ml.r5d.8xlarge" + ProcessingInstanceTypeMlR5d12xlarge ProcessingInstanceType = "ml.r5d.12xlarge" + ProcessingInstanceTypeMlR5d16xlarge ProcessingInstanceType = "ml.r5d.16xlarge" + ProcessingInstanceTypeMlR5d24xlarge ProcessingInstanceType = "ml.r5d.24xlarge" ) // Values returns all known values for ProcessingInstanceType. Note that this can @@ -5035,6 +5051,22 @@ func (ProcessingInstanceType) Values() []ProcessingInstanceType { "ml.g4dn.8xlarge", "ml.g4dn.12xlarge", "ml.g4dn.16xlarge", + "ml.g5.xlarge", + "ml.g5.2xlarge", + "ml.g5.4xlarge", + "ml.g5.8xlarge", + "ml.g5.16xlarge", + "ml.g5.12xlarge", + "ml.g5.24xlarge", + "ml.g5.48xlarge", + "ml.r5d.large", + "ml.r5d.xlarge", + "ml.r5d.2xlarge", + "ml.r5d.4xlarge", + "ml.r5d.8xlarge", + "ml.r5d.12xlarge", + "ml.r5d.16xlarge", + "ml.r5d.24xlarge", } } @@ -7225,6 +7257,26 @@ const ( TrainingInstanceTypeMlC6i16xlarge TrainingInstanceType = "ml.c6i.16xlarge" TrainingInstanceTypeMlC6i24xlarge TrainingInstanceType = "ml.c6i.24xlarge" TrainingInstanceTypeMlC6i32xlarge TrainingInstanceType = "ml.c6i.32xlarge" + TrainingInstanceTypeMlR5dLarge TrainingInstanceType = "ml.r5d.large" + TrainingInstanceTypeMlR5dXlarge TrainingInstanceType = "ml.r5d.xlarge" + TrainingInstanceTypeMlR5d2xlarge TrainingInstanceType = "ml.r5d.2xlarge" + TrainingInstanceTypeMlR5d4xlarge TrainingInstanceType = "ml.r5d.4xlarge" + TrainingInstanceTypeMlR5d8xlarge TrainingInstanceType = "ml.r5d.8xlarge" + TrainingInstanceTypeMlR5d12xlarge TrainingInstanceType = "ml.r5d.12xlarge" + TrainingInstanceTypeMlR5d16xlarge TrainingInstanceType = "ml.r5d.16xlarge" + TrainingInstanceTypeMlR5d24xlarge TrainingInstanceType = "ml.r5d.24xlarge" + TrainingInstanceTypeMlT3Medium TrainingInstanceType = "ml.t3.medium" + TrainingInstanceTypeMlT3Large TrainingInstanceType = "ml.t3.large" + TrainingInstanceTypeMlT3Xlarge TrainingInstanceType = "ml.t3.xlarge" + TrainingInstanceTypeMlT32xlarge TrainingInstanceType = "ml.t3.2xlarge" + TrainingInstanceTypeMlR5Large TrainingInstanceType = "ml.r5.large" + TrainingInstanceTypeMlR5Xlarge TrainingInstanceType = "ml.r5.xlarge" + TrainingInstanceTypeMlR52xlarge TrainingInstanceType = "ml.r5.2xlarge" + TrainingInstanceTypeMlR54xlarge TrainingInstanceType = "ml.r5.4xlarge" + TrainingInstanceTypeMlR58xlarge TrainingInstanceType = "ml.r5.8xlarge" + TrainingInstanceTypeMlR512xlarge TrainingInstanceType = "ml.r5.12xlarge" + TrainingInstanceTypeMlR516xlarge TrainingInstanceType = "ml.r5.16xlarge" + TrainingInstanceTypeMlR524xlarge TrainingInstanceType = "ml.r5.24xlarge" ) // Values returns all known values for TrainingInstanceType. Note that this can be @@ -7302,6 +7354,26 @@ func (TrainingInstanceType) Values() []TrainingInstanceType { "ml.c6i.16xlarge", "ml.c6i.24xlarge", "ml.c6i.32xlarge", + "ml.r5d.large", + "ml.r5d.xlarge", + "ml.r5d.2xlarge", + "ml.r5d.4xlarge", + "ml.r5d.8xlarge", + "ml.r5d.12xlarge", + "ml.r5d.16xlarge", + "ml.r5d.24xlarge", + "ml.t3.medium", + "ml.t3.large", + "ml.t3.xlarge", + "ml.t3.2xlarge", + "ml.r5.large", + "ml.r5.xlarge", + "ml.r5.2xlarge", + "ml.r5.4xlarge", + "ml.r5.8xlarge", + "ml.r5.12xlarge", + "ml.r5.16xlarge", + "ml.r5.24xlarge", } } diff --git a/service/secretsmanager/api_op_CreateSecret.go b/service/secretsmanager/api_op_CreateSecret.go index 92046999329..3e651091672 100644 --- a/service/secretsmanager/api_op_CreateSecret.go +++ b/service/secretsmanager/api_op_CreateSecret.go @@ -55,9 +55,14 @@ import ( // To encrypt the secret with a KMS key other than aws/secretsmanager , you need // kms:GenerateDataKey and kms:Decrypt permission to the key. // +// When you enter commands in a command shell, there is a risk of the command +// history being accessed or utilities having access to your command parameters. +// This is a concern if the command includes the value of a secret. Learn how to [Mitigate the risks of using command-line tools to store Secrets Manager secrets]. +// // [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html // [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html // [Secrets Manager secrets managed by other Amazon Web Services services]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html +// [Mitigate the risks of using command-line tools to store Secrets Manager secrets]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/security_cli-exposure-risks.html // [Create a secret]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_create-basic-secret.html // [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions // [JSON structure of a database secret]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_secret_json_structure.html diff --git a/service/secretsmanager/api_op_PutSecretValue.go b/service/secretsmanager/api_op_PutSecretValue.go index 91634a947d5..53b4fde8890 100644 --- a/service/secretsmanager/api_op_PutSecretValue.go +++ b/service/secretsmanager/api_op_PutSecretValue.go @@ -45,8 +45,13 @@ import ( // Required permissions: secretsmanager:PutSecretValue . For more information, see [IAM policy actions for Secrets Manager] // and [Authentication and access control in Secrets Manager]. // +// When you enter commands in a command shell, there is a risk of the command +// history being accessed or utilities having access to your command parameters. +// This is a concern if the command includes the value of a secret. Learn how to [Mitigate the risks of using command-line tools to store Secrets Manager secrets]. +// // [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html // [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html +// [Mitigate the risks of using command-line tools to store Secrets Manager secrets]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/security_cli-exposure-risks.html // [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions func (c *Client) PutSecretValue(ctx context.Context, params *PutSecretValueInput, optFns ...func(*Options)) (*PutSecretValueOutput, error) { if params == nil { diff --git a/service/secretsmanager/api_op_UpdateSecret.go b/service/secretsmanager/api_op_UpdateSecret.go index f8304c61183..58f3741767e 100644 --- a/service/secretsmanager/api_op_UpdateSecret.go +++ b/service/secretsmanager/api_op_UpdateSecret.go @@ -44,13 +44,18 @@ import ( // and [Authentication and access control in Secrets Manager]. If you use a customer managed key, you must also have kms:GenerateDataKey // , kms:Encrypt , and kms:Decrypt permissions on the key. If you change the KMS // key and you don't have kms:Encrypt permission to the new key, Secrets Manager -// does not re-ecrypt existing secret versions with the new key. For more +// does not re-encrypt existing secret versions with the new key. For more // information, see [Secret encryption and decryption]. // +// When you enter commands in a command shell, there is a risk of the command +// history being accessed or utilities having access to your command parameters. +// This is a concern if the command includes the value of a secret. Learn how to [Mitigate the risks of using command-line tools to store Secrets Manager secrets]. +// // [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html // [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html // [Secret encryption and decryption]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/security-encryption.html // [Secrets Manager secrets managed by other Amazon Web Services services]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html +// [Mitigate the risks of using command-line tools to store Secrets Manager secrets]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/security_cli-exposure-risks.html // [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions func (c *Client) UpdateSecret(ctx context.Context, params *UpdateSecretInput, optFns ...func(*Options)) (*UpdateSecretOutput, error) { if params == nil { @@ -105,7 +110,7 @@ type UpdateSecretInput struct { // The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt // new secret versions as well as any existing versions with the staging labels // AWSCURRENT , AWSPENDING , or AWSPREVIOUS . If you don't have kms:Encrypt - // permission to the new key, Secrets Manager does not re-ecrypt existing secret + // permission to the new key, Secrets Manager does not re-encrypt existing secret // versions with the new key. For more information about versions and staging // labels, see [Concepts: Version]. // diff --git a/service/sso/internal/endpoints/endpoints.go b/service/sso/internal/endpoints/endpoints.go index 2c3a77ce306..d522129e768 100644 --- a/service/sso/internal/endpoints/endpoints.go +++ b/service/sso/internal/endpoints/endpoints.go @@ -235,6 +235,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "ca-central-1", }, }, + endpoints.EndpointKey{ + Region: "ca-west-1", + }: endpoints.Endpoint{ + Hostname: "portal.sso.ca-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-west-1", + }, + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{ diff --git a/service/taxsettings/endpoints.go b/service/taxsettings/endpoints.go index 7f5cd940863..260732fcb84 100644 --- a/service/taxsettings/endpoints.go +++ b/service/taxsettings/endpoints.go @@ -12,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go-v2/internal/endpoints" "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" internalendpoints "github.com/aws/aws-sdk-go-v2/service/taxsettings/internal/endpoints" + smithy "github.com/aws/smithy-go" smithyauth "github.com/aws/smithy-go/auth" smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" @@ -226,14 +227,6 @@ func bindRegion(region string) *string { // EndpointParameters provides the parameters that influence how endpoints are // resolved. type EndpointParameters struct { - // The AWS region used to dispatch the request. - // - // Parameter is - // required. - // - // AWS::Region - Region *string - // When true, use the dual-stack endpoint. If the configured endpoint does not // support dual-stack, dispatching the request MAY return an error. // @@ -260,6 +253,14 @@ type EndpointParameters struct { // // SDK::Endpoint Endpoint *string + + // The AWS region used to dispatch the request. + // + // Parameter is + // required. + // + // AWS::Region + Region *string } // ValidateRequired validates required parameters are set. @@ -363,7 +364,7 @@ func (r *resolver) ResolveEndpoint( uriString := func() string { var out strings.Builder out.WriteString("https://tax-fips.") - out.WriteString(_Region) + out.WriteString(_PartitionResult.ImplicitGlobalRegion) out.WriteString(".") out.WriteString(_PartitionResult.DualStackDnsSuffix) return out.String() @@ -377,6 +378,20 @@ func (r *resolver) ResolveEndpoint( return smithyendpoints.Endpoint{ URI: *uri, Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, _PartitionResult.ImplicitGlobalRegion) + return sp + }(), + }, + }) + return out + }(), }, nil } } @@ -384,55 +399,87 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if _PartitionResult.SupportsFIPS == true { - uriString := func() string { - var out strings.Builder - out.WriteString("https://tax-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } + if _UseDualStack == false { + if _PartitionResult.SupportsFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://tax-fips.") + out.WriteString(_PartitionResult.ImplicitGlobalRegion) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, _PartitionResult.ImplicitGlobalRegion) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://tax.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } + if _UseFIPS == false { + if _UseDualStack == true { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://tax.") + out.WriteString(_PartitionResult.ImplicitGlobalRegion) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, _PartitionResult.ImplicitGlobalRegion) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } uriString := func() string { var out strings.Builder out.WriteString("https://tax.") - out.WriteString(_Region) + out.WriteString(_PartitionResult.ImplicitGlobalRegion) out.WriteString(".") out.WriteString(_PartitionResult.DnsSuffix) return out.String() @@ -446,6 +493,20 @@ func (r *resolver) ResolveEndpoint( return smithyendpoints.Endpoint{ URI: *uri, Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, _PartitionResult.ImplicitGlobalRegion) + return sp + }(), + }, + }) + return out + }(), }, nil } return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") @@ -460,10 +521,10 @@ type endpointParamsBinder interface { func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { params := &EndpointParameters{} - params.Region = bindRegion(options.Region) params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) params.Endpoint = options.BaseEndpoint + params.Region = bindRegion(options.Region) if b, ok := input.(endpointParamsBinder); ok { b.bindEndpointParams(params) diff --git a/service/taxsettings/endpoints_test.go b/service/taxsettings/endpoints_test.go index 7d0d790b5f5..70d43d08cc4 100644 --- a/service/taxsettings/endpoints_test.go +++ b/service/taxsettings/endpoints_test.go @@ -5,8 +5,10 @@ package taxsettings import ( "context" smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" "reflect" @@ -14,8 +16,83 @@ import ( "testing" ) -// For region us-east-1 with FIPS enabled and DualStack enabled +// For custom endpoint with region not set and fips disabled func TestEndpointCase0(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For custom endpoint with fips enabled +func TestEndpointCase1(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + UseFIPS: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: FIPS and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For custom endpoint with fips disabled and dualstack enabled +func TestEndpointCase2(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Dualstack and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -33,9 +110,22 @@ func TestEndpointCase0(t *testing.T) { uri, _ := url.Parse("https://tax-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -52,7 +142,7 @@ func TestEndpointCase0(t *testing.T) { } // For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase1(t *testing.T) { +func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -70,9 +160,22 @@ func TestEndpointCase1(t *testing.T) { uri, _ := url.Parse("https://tax-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -89,7 +192,7 @@ func TestEndpointCase1(t *testing.T) { } // For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase2(t *testing.T) { +func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -107,9 +210,22 @@ func TestEndpointCase2(t *testing.T) { uri, _ := url.Parse("https://tax.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -126,7 +242,7 @@ func TestEndpointCase2(t *testing.T) { } // For region us-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase3(t *testing.T) { +func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -144,9 +260,22 @@ func TestEndpointCase3(t *testing.T) { uri, _ := url.Parse("https://tax.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -162,10 +291,10 @@ func TestEndpointCase3(t *testing.T) { } } -// For region cn-north-1 with FIPS enabled and DualStack enabled -func TestEndpointCase4(t *testing.T) { +// For region cn-northwest-1 with FIPS enabled and DualStack enabled +func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), + Region: ptr.String("cn-northwest-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -178,12 +307,25 @@ func TestEndpointCase4(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tax-fips.cn-north-1.api.amazonwebservices.com.cn") + uri, _ := url.Parse("https://tax-fips.cn-northwest-1.api.amazonwebservices.com.cn") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "cn-northwest-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -199,10 +341,10 @@ func TestEndpointCase4(t *testing.T) { } } -// For region cn-north-1 with FIPS enabled and DualStack disabled -func TestEndpointCase5(t *testing.T) { +// For region cn-northwest-1 with FIPS enabled and DualStack disabled +func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), + Region: ptr.String("cn-northwest-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -215,12 +357,25 @@ func TestEndpointCase5(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tax-fips.cn-north-1.amazonaws.com.cn") + uri, _ := url.Parse("https://tax-fips.cn-northwest-1.amazonaws.com.cn") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "cn-northwest-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -236,10 +391,10 @@ func TestEndpointCase5(t *testing.T) { } } -// For region cn-north-1 with FIPS disabled and DualStack enabled -func TestEndpointCase6(t *testing.T) { +// For region cn-northwest-1 with FIPS disabled and DualStack enabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), + Region: ptr.String("cn-northwest-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -252,12 +407,25 @@ func TestEndpointCase6(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tax.cn-north-1.api.amazonwebservices.com.cn") + uri, _ := url.Parse("https://tax.cn-northwest-1.api.amazonwebservices.com.cn") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "cn-northwest-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -273,10 +441,10 @@ func TestEndpointCase6(t *testing.T) { } } -// For region cn-north-1 with FIPS disabled and DualStack disabled -func TestEndpointCase7(t *testing.T) { +// For region cn-northwest-1 with FIPS disabled and DualStack disabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), + Region: ptr.String("cn-northwest-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -289,12 +457,25 @@ func TestEndpointCase7(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tax.cn-north-1.amazonaws.com.cn") + uri, _ := url.Parse("https://tax.cn-northwest-1.amazonaws.com.cn") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "cn-northwest-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -310,10 +491,10 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase8(t *testing.T) { +// For region us-gov-west-1 with FIPS enabled and DualStack enabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -326,12 +507,25 @@ func TestEndpointCase8(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tax-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://tax-fips.us-gov-west-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -347,10 +541,10 @@ func TestEndpointCase8(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { +// For region us-gov-west-1 with FIPS enabled and DualStack disabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -363,12 +557,25 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tax-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://tax-fips.us-gov-west-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -384,10 +591,10 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { +// For region us-gov-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -400,12 +607,25 @@ func TestEndpointCase10(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tax.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://tax.us-gov-west-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -421,10 +641,10 @@ func TestEndpointCase10(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-west-1 with FIPS disabled and DualStack disabled +func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -437,12 +657,25 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tax.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://tax.us-gov-west-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -459,7 +692,7 @@ func TestEndpointCase11(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -479,7 +712,7 @@ func TestEndpointCase12(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -497,9 +730,22 @@ func TestEndpointCase13(t *testing.T) { uri, _ := url.Parse("https://tax-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -516,7 +762,7 @@ func TestEndpointCase13(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -536,7 +782,7 @@ func TestEndpointCase14(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -554,9 +800,22 @@ func TestEndpointCase15(t *testing.T) { uri, _ := url.Parse("https://tax.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -573,7 +832,7 @@ func TestEndpointCase15(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -593,7 +852,7 @@ func TestEndpointCase16(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -611,9 +870,22 @@ func TestEndpointCase17(t *testing.T) { uri, _ := url.Parse("https://tax-fips.us-isob-east-1.sc2s.sgov.gov") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-isob-east-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -630,7 +902,7 @@ func TestEndpointCase17(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -650,7 +922,7 @@ func TestEndpointCase18(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -668,9 +940,22 @@ func TestEndpointCase19(t *testing.T) { uri, _ := url.Parse("https://tax.us-isob-east-1.sc2s.sgov.gov") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-isob-east-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -686,13 +971,32 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase20(t *testing.T) { +// For region eu-isoe-west-1 with FIPS enabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), + Region: ptr.String("eu-isoe-west-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region eu-isoe-west-1 with FIPS enabled and DualStack disabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Endpoint: ptr.String("https://example.com"), } resolver := NewDefaultEndpointResolverV2() @@ -703,12 +1007,25 @@ func TestEndpointCase20(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://example.com") + uri, _ := url.Parse("https://tax-fips.eu-isoe-west-1.cloud.adc-e.uk") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "eu-isoe-west-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -724,12 +1041,32 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase21(t *testing.T) { +// For region eu-isoe-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region eu-isoe-west-1 with FIPS disabled and DualStack disabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Endpoint: ptr.String("https://example.com"), } resolver := NewDefaultEndpointResolverV2() @@ -740,12 +1077,25 @@ func TestEndpointCase21(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://example.com") + uri, _ := url.Parse("https://tax.eu-isoe-west-1.cloud.adc-e.uk") expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "eu-isoe-west-1") + return sp + }(), + }, + }) + return out + }(), } if e, a := expectEndpoint.URI, result.URI; e != a { @@ -761,13 +1111,12 @@ func TestEndpointCase21(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { +// For region us-isof-south-1 with FIPS enabled and DualStack enabled +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("us-isof-south-1"), UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - Endpoint: ptr.String("https://example.com"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -777,18 +1126,67 @@ func TestEndpointCase22(t *testing.T) { if err == nil { t.Fatalf("expect error, got none") } - if e, a := "Invalid Configuration: FIPS and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { t.Errorf("expect %v error in %v", e, a) } } -// For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase23(t *testing.T) { +// For region us-isof-south-1 with FIPS enabled and DualStack disabled +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("us-isof-south-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://tax-fips.us-isof-south-1.csp.hci.ic.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-isof-south-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-isof-south-1 with FIPS disabled and DualStack enabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Endpoint: ptr.String("https://example.com"), } resolver := NewDefaultEndpointResolverV2() @@ -798,13 +1196,63 @@ func TestEndpointCase23(t *testing.T) { if err == nil { t.Fatalf("expect error, got none") } - if e, a := "Invalid Configuration: Dualstack and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { t.Errorf("expect %v error in %v", e, a) } } +// For region us-isof-south-1 with FIPS disabled and DualStack disabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://tax.us-isof-south-1.csp.hci.ic.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-isof-south-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + // Missing region -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{} resolver := NewDefaultEndpointResolverV2() diff --git a/service/taxsettings/internal/endpoints/endpoints.go b/service/taxsettings/internal/endpoints/endpoints.go index 383d21bf7b1..8972d764bf5 100644 --- a/service/taxsettings/internal/endpoints/endpoints.go +++ b/service/taxsettings/internal/endpoints/endpoints.go @@ -136,8 +136,19 @@ var defaultPartitions = endpoints.Partitions{ SignatureVersions: []string{"v4"}, }, }, - RegionRegex: partitionRegexp.Aws, - IsRegionalized: true, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: false, + PartitionEndpoint: "aws-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-global", + }: endpoints.Endpoint{ + Hostname: "tax.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + }, + }, }, { ID: "aws-cn", diff --git a/service/timestreamquery/api_op_UpdateAccountSettings.go b/service/timestreamquery/api_op_UpdateAccountSettings.go index 79b90ab45e1..271bd4d4b6d 100644 --- a/service/timestreamquery/api_op_UpdateAccountSettings.go +++ b/service/timestreamquery/api_op_UpdateAccountSettings.go @@ -49,6 +49,10 @@ type UpdateAccountSettingsInput struct { MaxQueryTCU *int32 // The pricing model for queries in an account. + // + // The QueryPricingModel parameter is used by several Timestream operations; + // however, the UpdateAccountSettings API operation doesn't recognize any values + // other than COMPUTE_UNITS . QueryPricingModel types.QueryPricingModel noSmithyDocumentSerde diff --git a/service/workspacesthinclient/types/types.go b/service/workspacesthinclient/types/types.go index c7e45eed139..09da5f74ca8 100644 --- a/service/workspacesthinclient/types/types.go +++ b/service/workspacesthinclient/types/types.go @@ -157,8 +157,8 @@ type Environment struct { // The type of streaming desktop for the environment. DesktopType DesktopType - // "The tag keys and optional values for the newly created devices for this - // environment." + // The tag keys and optional values for the newly created devices for this + // environment. DeviceCreationTags map[string]string // The ID of the environment.