From a32bbb337b466add6b3afb3800188c17cfd43c5c Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Mon, 9 Sep 2024 18:27:18 +0000 Subject: [PATCH] Regenerated Clients --- .../1239387728454e7599538183f6211fd2.json | 8 + .../12cdb8215cd84b40a465ec3fc84d63e8.json | 8 + .../191ea173674d45d1b80d79e442bc58b0.json | 8 + .../6a62b910d7f84bb0b5251f62d6be480f.json | 8 + .../91b63efb12384b3abd22daca883abf75.json | 8 + .../ee0e541b300648a5be1807d6ea187032.json | 8 + .../attributevalue/go_module_metadata.go | 2 +- .../appmesh/internal/endpoints/endpoints.go | 18 + service/dynamodb/api_op_TagResource.go | 11 + service/dynamodb/api_op_UntagResource.go | 11 + service/dynamodb/types/errors.go | 13 +- .../api_op_DescribeListenerCertificates.go | 84 ++ .../api_op_DescribeLoadBalancers.go | 28 +- .../api_op_DescribeRules.go | 80 ++ .../api_op_CreateEncoderConfiguration.go | 9 +- .../api_op_CreateIngestConfiguration.go | 177 +++ service/ivsrealtime/api_op_CreateStage.go | 9 +- .../api_op_CreateStorageConfiguration.go | 9 +- .../api_op_DeleteIngestConfiguration.go | 144 ++ service/ivsrealtime/api_op_DeleteStage.go | 2 + .../api_op_DisconnectParticipant.go | 10 +- .../api_op_GetIngestConfiguration.go | 142 ++ service/ivsrealtime/api_op_ImportPublicKey.go | 9 +- .../api_op_ListIngestConfigurations.go | 251 ++++ .../ivsrealtime/api_op_StartComposition.go | 11 +- service/ivsrealtime/api_op_TagResource.go | 9 +- service/ivsrealtime/api_op_UntagResource.go | 9 +- .../api_op_UpdateIngestConfiguration.go | 148 +++ service/ivsrealtime/deserializers.go | 1174 +++++++++++++++-- service/ivsrealtime/doc.go | 14 +- service/ivsrealtime/generated.json | 5 + service/ivsrealtime/serializers.go | 445 +++++++ .../api_op_CreateIngestConfiguration.go.snap | 36 + .../api_op_DeleteIngestConfiguration.go.snap | 36 + .../api_op_GetIngestConfiguration.go.snap | 36 + .../api_op_ListIngestConfigurations.go.snap | 35 + .../api_op_UpdateIngestConfiguration.go.snap | 36 + service/ivsrealtime/snapshot_test.go | 120 ++ service/ivsrealtime/types/enums.go | 77 ++ service/ivsrealtime/types/types.go | 210 ++- service/ivsrealtime/validators.go | 156 +++ service/kafka/api_op_GetBootstrapBrokers.go | 7 +- service/kafka/deserializers.go | 45 + service/kafka/serializers.go | 19 + service/kafka/types/enums.go | 20 + service/kafka/types/types.go | 14 + service/sagemaker/api_op_CreateCluster.go | 11 + service/sagemaker/api_op_DescribeCluster.go | 6 + service/sagemaker/api_op_UpdateCluster.go | 3 + service/sagemaker/deserializers.go | 133 +- service/sagemaker/serializers.go | 61 + service/sagemaker/types/enums.go | 50 +- service/sagemaker/types/types.go | 33 + service/sagemaker/validators.go | 39 + .../sagemakerruntime/api_op_InvokeEndpoint.go | 24 + ...api_op_InvokeEndpointWithResponseStream.go | 9 + service/sagemakerruntime/deserializers.go | 10 + service/sagemakerruntime/serializers.go | 10 + 58 files changed, 3901 insertions(+), 207 deletions(-) create mode 100644 .changelog/1239387728454e7599538183f6211fd2.json create mode 100644 .changelog/12cdb8215cd84b40a465ec3fc84d63e8.json create mode 100644 .changelog/191ea173674d45d1b80d79e442bc58b0.json create mode 100644 .changelog/6a62b910d7f84bb0b5251f62d6be480f.json create mode 100644 .changelog/91b63efb12384b3abd22daca883abf75.json create mode 100644 .changelog/ee0e541b300648a5be1807d6ea187032.json create mode 100644 service/ivsrealtime/api_op_CreateIngestConfiguration.go create mode 100644 service/ivsrealtime/api_op_DeleteIngestConfiguration.go create mode 100644 service/ivsrealtime/api_op_GetIngestConfiguration.go create mode 100644 service/ivsrealtime/api_op_ListIngestConfigurations.go create mode 100644 service/ivsrealtime/api_op_UpdateIngestConfiguration.go create mode 100644 service/ivsrealtime/snapshot/api_op_CreateIngestConfiguration.go.snap create mode 100644 service/ivsrealtime/snapshot/api_op_DeleteIngestConfiguration.go.snap create mode 100644 service/ivsrealtime/snapshot/api_op_GetIngestConfiguration.go.snap create mode 100644 service/ivsrealtime/snapshot/api_op_ListIngestConfigurations.go.snap create mode 100644 service/ivsrealtime/snapshot/api_op_UpdateIngestConfiguration.go.snap diff --git a/.changelog/1239387728454e7599538183f6211fd2.json b/.changelog/1239387728454e7599538183f6211fd2.json new file mode 100644 index 00000000000..23dd7e80a9b --- /dev/null +++ b/.changelog/1239387728454e7599538183f6211fd2.json @@ -0,0 +1,8 @@ +{ + "id": "12393877-2845-4e75-9953-8183f6211fd2", + "type": "feature", + "description": "Add paginators for the ELBv2 DescribeListenerCertificates and DescribeRules APIs. Fix broken waiter for the ELBv2 DescribeLoadBalancers API.", + "modules": [ + "service/elasticloadbalancingv2" + ] +} \ No newline at end of file diff --git a/.changelog/12cdb8215cd84b40a465ec3fc84d63e8.json b/.changelog/12cdb8215cd84b40a465ec3fc84d63e8.json new file mode 100644 index 00000000000..ee6a6467e2d --- /dev/null +++ b/.changelog/12cdb8215cd84b40a465ec3fc84d63e8.json @@ -0,0 +1,8 @@ +{ + "id": "12cdb821-5cd8-4b40-a465-ec3fc84d63e8", + "type": "documentation", + "description": "Doc-only update for DynamoDB. Added information about async behavior for TagResource and UntagResource APIs and updated the description of ResourceInUseException.", + "modules": [ + "service/dynamodb" + ] +} \ No newline at end of file diff --git a/.changelog/191ea173674d45d1b80d79e442bc58b0.json b/.changelog/191ea173674d45d1b80d79e442bc58b0.json new file mode 100644 index 00000000000..b1c159a3d86 --- /dev/null +++ b/.changelog/191ea173674d45d1b80d79e442bc58b0.json @@ -0,0 +1,8 @@ +{ + "id": "191ea173-674d-45d1-b80d-79e442bc58b0", + "type": "feature", + "description": "IVS Real-Time now offers customers the ability to broadcast to Stages using RTMP(S).", + "modules": [ + "service/ivsrealtime" + ] +} \ No newline at end of file diff --git a/.changelog/6a62b910d7f84bb0b5251f62d6be480f.json b/.changelog/6a62b910d7f84bb0b5251f62d6be480f.json new file mode 100644 index 00000000000..564de982262 --- /dev/null +++ b/.changelog/6a62b910d7f84bb0b5251f62d6be480f.json @@ -0,0 +1,8 @@ +{ + "id": "6a62b910-d7f8-4bb0-b525-1f62d6be480f", + "type": "feature", + "description": "AWS SageMaker Runtime feature: Add sticky routing to support stateful inference models.", + "modules": [ + "service/sagemakerruntime" + ] +} \ No newline at end of file diff --git a/.changelog/91b63efb12384b3abd22daca883abf75.json b/.changelog/91b63efb12384b3abd22daca883abf75.json new file mode 100644 index 00000000000..ac49a30ae65 --- /dev/null +++ b/.changelog/91b63efb12384b3abd22daca883abf75.json @@ -0,0 +1,8 @@ +{ + "id": "91b63efb-1238-4b3a-bd22-daca883abf75", + "type": "feature", + "description": "Amazon MSK Replicator can now replicate data to identically named topics between MSK clusters within the same AWS Region or across different AWS Regions.", + "modules": [ + "service/kafka" + ] +} \ No newline at end of file diff --git a/.changelog/ee0e541b300648a5be1807d6ea187032.json b/.changelog/ee0e541b300648a5be1807d6ea187032.json new file mode 100644 index 00000000000..43b0a8d5a93 --- /dev/null +++ b/.changelog/ee0e541b300648a5be1807d6ea187032.json @@ -0,0 +1,8 @@ +{ + "id": "ee0e541b-3006-48a5-be18-07d6ea187032", + "type": "feature", + "description": "Amazon Sagemaker supports orchestrating SageMaker HyperPod clusters with Amazon EKS", + "modules": [ + "service/sagemaker" + ] +} \ 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 e5f407ef8bd..74686891639 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.14.8" +const goModuleVersion = "1.15.2" diff --git a/service/appmesh/internal/endpoints/endpoints.go b/service/appmesh/internal/endpoints/endpoints.go index 827154e58f8..fb8ca1c3674 100644 --- a/service/appmesh/internal/endpoints/endpoints.go +++ b/service/appmesh/internal/endpoints/endpoints.go @@ -259,6 +259,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "appmesh.eu-central-1.api.aws", }, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "appmesh.eu-central-2.api.aws", + }, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, @@ -277,6 +286,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "appmesh.eu-south-1.api.aws", }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "appmesh.eu-south-2.api.aws", + }, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/dynamodb/api_op_TagResource.go b/service/dynamodb/api_op_TagResource.go index 7d9d34c8c48..16611734ae7 100644 --- a/service/dynamodb/api_op_TagResource.go +++ b/service/dynamodb/api_op_TagResource.go @@ -17,6 +17,17 @@ import ( // console for cost allocation tracking. You can call TagResource up to five times // per second, per account. // +// - TagResource is an asynchronous operation. If you issue a ListTagsOfResourcerequest +// immediately after a TagResource request, DynamoDB might return your previous +// tag set, if there was one, or an empty tag set. This is because +// ListTagsOfResource uses an eventually consistent query, and the metadata for +// your tags or table might not be available at that moment. Wait for a few +// seconds, and then try the ListTagsOfResource request again. +// +// - The application or removal of tags using TagResource and UntagResource APIs +// is eventually consistent. ListTagsOfResource API will only reflect the changes +// after a few seconds. +// // For an overview on tagging DynamoDB resources, see [Tagging for DynamoDB] in the Amazon DynamoDB // Developer Guide. // diff --git a/service/dynamodb/api_op_UntagResource.go b/service/dynamodb/api_op_UntagResource.go index d24b12bc9f8..a72309eca66 100644 --- a/service/dynamodb/api_op_UntagResource.go +++ b/service/dynamodb/api_op_UntagResource.go @@ -14,6 +14,17 @@ import ( // Removes the association of tags from an Amazon DynamoDB resource. You can call // UntagResource up to five times per second, per account. // +// - UntagResource is an asynchronous operation. If you issue a ListTagsOfResourcerequest +// immediately after an UntagResource request, DynamoDB might return your +// previous tag set, if there was one, or an empty tag set. This is because +// ListTagsOfResource uses an eventually consistent query, and the metadata for +// your tags or table might not be available at that moment. Wait for a few +// seconds, and then try the ListTagsOfResource request again. +// +// - The application or removal of tags using TagResource and UntagResource APIs +// is eventually consistent. ListTagsOfResource API will only reflect the changes +// after a few seconds. +// // For an overview on tagging DynamoDB resources, see [Tagging for DynamoDB] in the Amazon DynamoDB // Developer Guide. // diff --git a/service/dynamodb/types/errors.go b/service/dynamodb/types/errors.go index 97bf7dbd502..2cfd9970e2a 100644 --- a/service/dynamodb/types/errors.go +++ b/service/dynamodb/types/errors.go @@ -709,9 +709,16 @@ func (e *RequestLimitExceeded) ErrorCode() string { } func (e *RequestLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The operation conflicts with the resource's availability. For example, you -// attempted to recreate an existing table, or tried to delete a table currently in -// the CREATING state. +// The operation conflicts with the resource's availability. For example: +// +// - You attempted to recreate an existing table. +// +// - You tried to delete a table currently in the CREATING state. +// +// - You tried to update a resource that was already being updated. +// +// When appropriate, wait for the ongoing update to complete and attempt the +// request again. type ResourceInUseException struct { Message *string diff --git a/service/elasticloadbalancingv2/api_op_DescribeListenerCertificates.go b/service/elasticloadbalancingv2/api_op_DescribeListenerCertificates.go index 22922c6e2ca..47b1b198985 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeListenerCertificates.go +++ b/service/elasticloadbalancingv2/api_op_DescribeListenerCertificates.go @@ -155,6 +155,90 @@ func (c *Client) addOperationDescribeListenerCertificatesMiddlewares(stack *midd return nil } +// DescribeListenerCertificatesPaginatorOptions is the paginator options for +// DescribeListenerCertificates +type DescribeListenerCertificatesPaginatorOptions struct { + // 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 +} + +// DescribeListenerCertificatesPaginator is a paginator for +// DescribeListenerCertificates +type DescribeListenerCertificatesPaginator struct { + options DescribeListenerCertificatesPaginatorOptions + client DescribeListenerCertificatesAPIClient + params *DescribeListenerCertificatesInput + nextToken *string + firstPage bool +} + +// NewDescribeListenerCertificatesPaginator returns a new +// DescribeListenerCertificatesPaginator +func NewDescribeListenerCertificatesPaginator(client DescribeListenerCertificatesAPIClient, params *DescribeListenerCertificatesInput, optFns ...func(*DescribeListenerCertificatesPaginatorOptions)) *DescribeListenerCertificatesPaginator { + if params == nil { + params = &DescribeListenerCertificatesInput{} + } + + options := DescribeListenerCertificatesPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeListenerCertificatesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeListenerCertificatesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeListenerCertificates page. +func (p *DescribeListenerCertificatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeListenerCertificatesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeListenerCertificates(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeListenerCertificatesAPIClient is a client that implements the +// DescribeListenerCertificates operation. +type DescribeListenerCertificatesAPIClient interface { + DescribeListenerCertificates(context.Context, *DescribeListenerCertificatesInput, ...func(*Options)) (*DescribeListenerCertificatesOutput, error) +} + +var _ DescribeListenerCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeListenerCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go b/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go index e341ebcfe74..1b13f1f44e9 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go +++ b/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go @@ -8,7 +8,6 @@ import ( "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" - smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -367,13 +366,8 @@ func loadBalancerAvailableStateRetryable(ctx context.Context, input *DescribeLoa } if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "LoadBalancerNotFound" == apiErr.ErrorCode() { + var errorType *types.LoadBalancerNotFoundException + if errors.As(err, &errorType) { return true, nil } } @@ -545,13 +539,8 @@ func loadBalancerExistsStateRetryable(ctx context.Context, input *DescribeLoadBa } if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "LoadBalancerNotFound" == apiErr.ErrorCode() { + var errorType *types.LoadBalancerNotFoundException + if errors.As(err, &errorType) { return true, nil } } @@ -753,13 +742,8 @@ func loadBalancersDeletedStateRetryable(ctx context.Context, input *DescribeLoad } if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "LoadBalancerNotFound" == apiErr.ErrorCode() { + var errorType *types.LoadBalancerNotFoundException + if errors.As(err, &errorType) { return false, nil } } diff --git a/service/elasticloadbalancingv2/api_op_DescribeRules.go b/service/elasticloadbalancingv2/api_op_DescribeRules.go index 47e7b410918..5a3948347db 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeRules.go +++ b/service/elasticloadbalancingv2/api_op_DescribeRules.go @@ -143,6 +143,86 @@ func (c *Client) addOperationDescribeRulesMiddlewares(stack *middleware.Stack, o return nil } +// DescribeRulesPaginatorOptions is the paginator options for DescribeRules +type DescribeRulesPaginatorOptions struct { + // 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 +} + +// DescribeRulesPaginator is a paginator for DescribeRules +type DescribeRulesPaginator struct { + options DescribeRulesPaginatorOptions + client DescribeRulesAPIClient + params *DescribeRulesInput + nextToken *string + firstPage bool +} + +// NewDescribeRulesPaginator returns a new DescribeRulesPaginator +func NewDescribeRulesPaginator(client DescribeRulesAPIClient, params *DescribeRulesInput, optFns ...func(*DescribeRulesPaginatorOptions)) *DescribeRulesPaginator { + if params == nil { + params = &DescribeRulesInput{} + } + + options := DescribeRulesPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeRulesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeRulesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeRules page. +func (p *DescribeRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeRulesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeRules(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeRulesAPIClient is a client that implements the DescribeRules operation. +type DescribeRulesAPIClient interface { + DescribeRules(context.Context, *DescribeRulesInput, ...func(*Options)) (*DescribeRulesOutput, error) +} + +var _ DescribeRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivsrealtime/api_op_CreateEncoderConfiguration.go b/service/ivsrealtime/api_op_CreateEncoderConfiguration.go index f46501e9945..abce241daf9 100644 --- a/service/ivsrealtime/api_op_CreateEncoderConfiguration.go +++ b/service/ivsrealtime/api_op_CreateEncoderConfiguration.go @@ -33,11 +33,12 @@ type CreateEncoderConfigurationInput struct { Name *string // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string // Video configuration. Default: video resolution 1280x720, bitrate 2500 kbps, 30 diff --git a/service/ivsrealtime/api_op_CreateIngestConfiguration.go b/service/ivsrealtime/api_op_CreateIngestConfiguration.go new file mode 100644 index 00000000000..701e51969fb --- /dev/null +++ b/service/ivsrealtime/api_op_CreateIngestConfiguration.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ivsrealtime + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ivsrealtime/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new IngestConfiguration resource, used to specify the ingest protocol +// for a stage. +func (c *Client) CreateIngestConfiguration(ctx context.Context, params *CreateIngestConfigurationInput, optFns ...func(*Options)) (*CreateIngestConfigurationOutput, error) { + if params == nil { + params = &CreateIngestConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateIngestConfiguration", params, optFns, c.addOperationCreateIngestConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateIngestConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateIngestConfigurationInput struct { + + // Type of ingest protocol that the user employs to broadcast. If this is set to + // RTMP , insecureIngest must be set to true . + // + // This member is required. + IngestProtocol types.IngestProtocol + + // Application-provided attributes to store in the IngestConfiguration and attach + // to a stage. Map keys and values can contain UTF-8 encoded text. The maximum + // length of this field is 1 KB total. This field is exposed to all stage + // participants and should not be used for personally identifying, confidential, or + // sensitive information. + Attributes map[string]string + + // Whether the stage allows insecure RTMP ingest. This must be set to true , if + // ingestProtocol is set to RTMP . Default: false . + InsecureIngest bool + + // Optional name that can be specified for the IngestConfiguration being created. + Name *string + + // ARN of the stage with which the IngestConfiguration is associated. + StageArn *string + + // Tags attached to the resource. Array of maps, each of the form string:string + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. + // + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html + Tags map[string]string + + // Customer-assigned name to help identify the participant using the + // IngestConfiguration; this can be used to link a participant to a user in the + // customer’s own systems. This can be any UTF-8 encoded text. This field is + // exposed to all stage participants and should not be used for personally + // identifying, confidential, or sensitive information. + UserId *string + + noSmithyDocumentSerde +} + +type CreateIngestConfigurationOutput struct { + + // The IngestConfiguration that was created. + IngestConfiguration *types.IngestConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateIngestConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateIngestConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateIngestConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateIngestConfiguration"); 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 = addOpCreateIngestConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateIngestConfiguration(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_opCreateIngestConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateIngestConfiguration", + } +} diff --git a/service/ivsrealtime/api_op_CreateStage.go b/service/ivsrealtime/api_op_CreateStage.go index ce7ecdb885e..93413d880b3 100644 --- a/service/ivsrealtime/api_op_CreateStage.go +++ b/service/ivsrealtime/api_op_CreateStage.go @@ -40,11 +40,12 @@ type CreateStageInput struct { ParticipantTokenConfigurations []types.ParticipantTokenConfiguration // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string noSmithyDocumentSerde diff --git a/service/ivsrealtime/api_op_CreateStorageConfiguration.go b/service/ivsrealtime/api_op_CreateStorageConfiguration.go index 0064ea3a3f0..2cb8d432e2c 100644 --- a/service/ivsrealtime/api_op_CreateStorageConfiguration.go +++ b/service/ivsrealtime/api_op_CreateStorageConfiguration.go @@ -42,11 +42,12 @@ type CreateStorageConfigurationInput struct { Name *string // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string noSmithyDocumentSerde diff --git a/service/ivsrealtime/api_op_DeleteIngestConfiguration.go b/service/ivsrealtime/api_op_DeleteIngestConfiguration.go new file mode 100644 index 00000000000..19817f666d5 --- /dev/null +++ b/service/ivsrealtime/api_op_DeleteIngestConfiguration.go @@ -0,0 +1,144 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ivsrealtime + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a specified IngestConfiguration, so it can no longer be used to +// broadcast. An IngestConfiguration cannot be deleted if the publisher is actively +// streaming to a stage, unless force is set to true . +func (c *Client) DeleteIngestConfiguration(ctx context.Context, params *DeleteIngestConfigurationInput, optFns ...func(*Options)) (*DeleteIngestConfigurationOutput, error) { + if params == nil { + params = &DeleteIngestConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteIngestConfiguration", params, optFns, c.addOperationDeleteIngestConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteIngestConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteIngestConfigurationInput struct { + + // ARN of the IngestConfiguration. + // + // This member is required. + Arn *string + + // Optional field to force deletion of the IngestConfiguration. If this is set to + // true when a participant is actively publishing, the participant is disconnected + // from the stage, followed by deletion of the IngestConfiguration. Default: false . + Force bool + + noSmithyDocumentSerde +} + +type DeleteIngestConfigurationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteIngestConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteIngestConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteIngestConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteIngestConfiguration"); 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 = addOpDeleteIngestConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIngestConfiguration(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_opDeleteIngestConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteIngestConfiguration", + } +} diff --git a/service/ivsrealtime/api_op_DeleteStage.go b/service/ivsrealtime/api_op_DeleteStage.go index 3dd161631ec..a757c061fc4 100644 --- a/service/ivsrealtime/api_op_DeleteStage.go +++ b/service/ivsrealtime/api_op_DeleteStage.go @@ -11,6 +11,8 @@ import ( ) // Shuts down and deletes the specified stage (disconnecting all participants). +// This operation also removes the stageArn from the associated IngestConfiguration, if there are +// participants using the IngestConfiguration to publish to the stage. func (c *Client) DeleteStage(ctx context.Context, params *DeleteStageInput, optFns ...func(*Options)) (*DeleteStageOutput, error) { if params == nil { params = &DeleteStageInput{} diff --git a/service/ivsrealtime/api_op_DisconnectParticipant.go b/service/ivsrealtime/api_op_DisconnectParticipant.go index d7409b5d1b5..d802778f068 100644 --- a/service/ivsrealtime/api_op_DisconnectParticipant.go +++ b/service/ivsrealtime/api_op_DisconnectParticipant.go @@ -10,8 +10,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Disconnects a specified participant and revokes the participant permanently -// from a specified stage. +// Disconnects a specified participant from a specified stage. If the participant +// is publishing using an IngestConfiguration, DisconnectParticipant also updates the stageArn in the +// IngestConfiguration to be an empty string. func (c *Client) DisconnectParticipant(ctx context.Context, params *DisconnectParticipantInput, optFns ...func(*Options)) (*DisconnectParticipantOutput, error) { if params == nil { params = &DisconnectParticipantInput{} @@ -29,8 +30,9 @@ func (c *Client) DisconnectParticipant(ctx context.Context, params *DisconnectPa type DisconnectParticipantInput struct { - // Identifier of the participant to be disconnected. This is assigned by IVS and - // returned by CreateParticipantToken. + // Identifier of the participant to be disconnected. IVS assigns this; it is + // returned by CreateParticipantToken(for streams using WebRTC ingest) or CreateIngestConfiguration (for streams using RTMP + // ingest). // // This member is required. ParticipantId *string diff --git a/service/ivsrealtime/api_op_GetIngestConfiguration.go b/service/ivsrealtime/api_op_GetIngestConfiguration.go new file mode 100644 index 00000000000..2d3665604ff --- /dev/null +++ b/service/ivsrealtime/api_op_GetIngestConfiguration.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ivsrealtime + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ivsrealtime/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about the specified IngestConfiguration. +func (c *Client) GetIngestConfiguration(ctx context.Context, params *GetIngestConfigurationInput, optFns ...func(*Options)) (*GetIngestConfigurationOutput, error) { + if params == nil { + params = &GetIngestConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetIngestConfiguration", params, optFns, c.addOperationGetIngestConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetIngestConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetIngestConfigurationInput struct { + + // ARN of the ingest for which the information is to be retrieved. + // + // This member is required. + Arn *string + + noSmithyDocumentSerde +} + +type GetIngestConfigurationOutput struct { + + // The IngestConfiguration that was returned. + IngestConfiguration *types.IngestConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetIngestConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetIngestConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetIngestConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetIngestConfiguration"); 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 = addOpGetIngestConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIngestConfiguration(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_opGetIngestConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetIngestConfiguration", + } +} diff --git a/service/ivsrealtime/api_op_ImportPublicKey.go b/service/ivsrealtime/api_op_ImportPublicKey.go index fa7b36a7ad4..0a1a0f163aa 100644 --- a/service/ivsrealtime/api_op_ImportPublicKey.go +++ b/service/ivsrealtime/api_op_ImportPublicKey.go @@ -38,11 +38,12 @@ type ImportPublicKeyInput struct { Name *string // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string noSmithyDocumentSerde diff --git a/service/ivsrealtime/api_op_ListIngestConfigurations.go b/service/ivsrealtime/api_op_ListIngestConfigurations.go new file mode 100644 index 00000000000..b7328fc9a18 --- /dev/null +++ b/service/ivsrealtime/api_op_ListIngestConfigurations.go @@ -0,0 +1,251 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ivsrealtime + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ivsrealtime/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all IngestConfigurations in your account, in the AWS region where the API +// request is processed. +func (c *Client) ListIngestConfigurations(ctx context.Context, params *ListIngestConfigurationsInput, optFns ...func(*Options)) (*ListIngestConfigurationsOutput, error) { + if params == nil { + params = &ListIngestConfigurationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListIngestConfigurations", params, optFns, c.addOperationListIngestConfigurationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListIngestConfigurationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListIngestConfigurationsInput struct { + + // Filters the response list to match the specified stage ARN. Only one filter (by + // stage ARN or by state) can be used at a time. + FilterByStageArn *string + + // Filters the response list to match the specified state. Only one filter (by + // stage ARN or by state) can be used at a time. + FilterByState types.IngestConfigurationState + + // Maximum number of results to return. Default: 50. + MaxResults *int32 + + // The first IngestConfiguration to retrieve. This is used for pagination; see the + // nextToken response field. + NextToken *string + + noSmithyDocumentSerde +} + +type ListIngestConfigurationsOutput struct { + + // List of the matching ingest configurations (summary information only). + // + // This member is required. + IngestConfigurations []types.IngestConfigurationSummary + + // If there are more IngestConfigurations than maxResults , use nextToken in the + // request to get the next set. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListIngestConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListIngestConfigurations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListIngestConfigurations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListIngestConfigurations"); 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_opListIngestConfigurations(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 +} + +// ListIngestConfigurationsPaginatorOptions is the paginator options for +// ListIngestConfigurations +type ListIngestConfigurationsPaginatorOptions struct { + // Maximum number of results to return. Default: 50. + 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 +} + +// ListIngestConfigurationsPaginator is a paginator for ListIngestConfigurations +type ListIngestConfigurationsPaginator struct { + options ListIngestConfigurationsPaginatorOptions + client ListIngestConfigurationsAPIClient + params *ListIngestConfigurationsInput + nextToken *string + firstPage bool +} + +// NewListIngestConfigurationsPaginator returns a new +// ListIngestConfigurationsPaginator +func NewListIngestConfigurationsPaginator(client ListIngestConfigurationsAPIClient, params *ListIngestConfigurationsInput, optFns ...func(*ListIngestConfigurationsPaginatorOptions)) *ListIngestConfigurationsPaginator { + if params == nil { + params = &ListIngestConfigurationsInput{} + } + + options := ListIngestConfigurationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListIngestConfigurationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListIngestConfigurationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListIngestConfigurations page. +func (p *ListIngestConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListIngestConfigurationsOutput, 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.ListIngestConfigurations(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 +} + +// ListIngestConfigurationsAPIClient is a client that implements the +// ListIngestConfigurations operation. +type ListIngestConfigurationsAPIClient interface { + ListIngestConfigurations(context.Context, *ListIngestConfigurationsInput, ...func(*Options)) (*ListIngestConfigurationsOutput, error) +} + +var _ ListIngestConfigurationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListIngestConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListIngestConfigurations", + } +} diff --git a/service/ivsrealtime/api_op_StartComposition.go b/service/ivsrealtime/api_op_StartComposition.go index 1bc2e213f71..a37170fa95f 100644 --- a/service/ivsrealtime/api_op_StartComposition.go +++ b/service/ivsrealtime/api_op_StartComposition.go @@ -14,7 +14,7 @@ import ( // Starts a Composition from a stage based on the configuration provided in the // request. // -// A Composition is an ephemeral resource that exists after this endpoint returns +// A Composition is an ephemeral resource that exists after this operation returns // successfully. Composition stops and the resource is deleted: // // - When StopCompositionis called. @@ -63,11 +63,12 @@ type StartCompositionInput struct { Layout *types.LayoutConfiguration // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string noSmithyDocumentSerde diff --git a/service/ivsrealtime/api_op_TagResource.go b/service/ivsrealtime/api_op_TagResource.go index 729df3e4c45..9a863ef5113 100644 --- a/service/ivsrealtime/api_op_TagResource.go +++ b/service/ivsrealtime/api_op_TagResource.go @@ -34,11 +34,12 @@ type TagResourceInput struct { ResourceArn *string // Array of tags to be added or updated. Array of maps, each of the form - // string:string (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply - // to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints - // beyond what is documented there. + // string:string (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for + // details, including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html // // This member is required. Tags map[string]string diff --git a/service/ivsrealtime/api_op_UntagResource.go b/service/ivsrealtime/api_op_UntagResource.go index 4f47e9fed32..29394597458 100644 --- a/service/ivsrealtime/api_op_UntagResource.go +++ b/service/ivsrealtime/api_op_UntagResource.go @@ -34,11 +34,12 @@ type UntagResourceInput struct { ResourceArn *string // Array of tags to be removed. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints beyond what - // is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html // // This member is required. TagKeys []string diff --git a/service/ivsrealtime/api_op_UpdateIngestConfiguration.go b/service/ivsrealtime/api_op_UpdateIngestConfiguration.go new file mode 100644 index 00000000000..bfdcdefd04b --- /dev/null +++ b/service/ivsrealtime/api_op_UpdateIngestConfiguration.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ivsrealtime + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ivsrealtime/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a specified IngestConfiguration. Only the stage ARN attached to the +// IngestConfiguration can be updated. An IngestConfiguration that is active cannot +// be updated. +func (c *Client) UpdateIngestConfiguration(ctx context.Context, params *UpdateIngestConfigurationInput, optFns ...func(*Options)) (*UpdateIngestConfigurationOutput, error) { + if params == nil { + params = &UpdateIngestConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateIngestConfiguration", params, optFns, c.addOperationUpdateIngestConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateIngestConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateIngestConfigurationInput struct { + + // ARN of the IngestConfiguration, for which the related stage ARN needs to be + // updated. + // + // This member is required. + Arn *string + + // Stage ARN that needs to be updated. + StageArn *string + + noSmithyDocumentSerde +} + +type UpdateIngestConfigurationOutput struct { + + // The updated IngestConfiguration. + IngestConfiguration *types.IngestConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateIngestConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateIngestConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateIngestConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateIngestConfiguration"); 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 = addOpUpdateIngestConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateIngestConfiguration(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_opUpdateIngestConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateIngestConfiguration", + } +} diff --git a/service/ivsrealtime/deserializers.go b/service/ivsrealtime/deserializers.go index 2a3efa284b9..65f1afd796a 100644 --- a/service/ivsrealtime/deserializers.go +++ b/service/ivsrealtime/deserializers.go @@ -194,6 +194,162 @@ func awsRestjson1_deserializeOpDocumentCreateEncoderConfigurationOutput(v **Crea return nil } +type awsRestjson1_deserializeOpCreateIngestConfiguration struct { +} + +func (*awsRestjson1_deserializeOpCreateIngestConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateIngestConfiguration) 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_deserializeOpErrorCreateIngestConfiguration(response, &metadata) + } + output := &CreateIngestConfigurationOutput{} + 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_deserializeOpDocumentCreateIngestConfigurationOutput(&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_deserializeOpErrorCreateIngestConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("PendingVerification", errorCode): + return awsRestjson1_deserializeErrorPendingVerification(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateIngestConfigurationOutput(v **CreateIngestConfigurationOutput, 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 *CreateIngestConfigurationOutput + if *v == nil { + sv = &CreateIngestConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ingestConfiguration": + if err := awsRestjson1_deserializeDocumentIngestConfiguration(&sv.IngestConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateParticipantToken struct { } @@ -777,6 +933,101 @@ func awsRestjson1_deserializeOpErrorDeleteEncoderConfiguration(response *smithyh } } +type awsRestjson1_deserializeOpDeleteIngestConfiguration struct { +} + +func (*awsRestjson1_deserializeOpDeleteIngestConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteIngestConfiguration) 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_deserializeOpErrorDeleteIngestConfiguration(response, &metadata) + } + output := &DeleteIngestConfigurationOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteIngestConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("PendingVerification", errorCode): + return awsRestjson1_deserializeErrorPendingVerification(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpDeletePublicKey struct { } @@ -1481,14 +1732,14 @@ func awsRestjson1_deserializeOpDocumentGetEncoderConfigurationOutput(v **GetEnco return nil } -type awsRestjson1_deserializeOpGetParticipant struct { +type awsRestjson1_deserializeOpGetIngestConfiguration struct { } -func (*awsRestjson1_deserializeOpGetParticipant) ID() string { +func (*awsRestjson1_deserializeOpGetIngestConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetParticipant) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetIngestConfiguration) 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) @@ -1502,9 +1753,9 @@ func (m *awsRestjson1_deserializeOpGetParticipant) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetParticipant(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetIngestConfiguration(response, &metadata) } - output := &GetParticipantOutput{} + output := &GetIngestConfigurationOutput{} out.Result = output var buff [1024]byte @@ -1525,7 +1776,7 @@ func (m *awsRestjson1_deserializeOpGetParticipant) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetParticipantOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetIngestConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1538,7 +1789,7 @@ func (m *awsRestjson1_deserializeOpGetParticipant) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetParticipant(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetIngestConfiguration(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)} @@ -1598,7 +1849,7 @@ func awsRestjson1_deserializeOpErrorGetParticipant(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentGetParticipantOutput(v **GetParticipantOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetIngestConfigurationOutput(v **GetIngestConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1611,17 +1862,17 @@ func awsRestjson1_deserializeOpDocumentGetParticipantOutput(v **GetParticipantOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetParticipantOutput + var sv *GetIngestConfigurationOutput if *v == nil { - sv = &GetParticipantOutput{} + sv = &GetIngestConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "participant": - if err := awsRestjson1_deserializeDocumentParticipant(&sv.Participant, value); err != nil { + case "ingestConfiguration": + if err := awsRestjson1_deserializeDocumentIngestConfiguration(&sv.IngestConfiguration, value); err != nil { return err } @@ -1634,14 +1885,14 @@ func awsRestjson1_deserializeOpDocumentGetParticipantOutput(v **GetParticipantOu return nil } -type awsRestjson1_deserializeOpGetPublicKey struct { +type awsRestjson1_deserializeOpGetParticipant struct { } -func (*awsRestjson1_deserializeOpGetPublicKey) ID() string { +func (*awsRestjson1_deserializeOpGetParticipant) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetPublicKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetParticipant) 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) @@ -1655,9 +1906,9 @@ func (m *awsRestjson1_deserializeOpGetPublicKey) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetPublicKey(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetParticipant(response, &metadata) } - output := &GetPublicKeyOutput{} + output := &GetParticipantOutput{} out.Result = output var buff [1024]byte @@ -1678,7 +1929,160 @@ func (m *awsRestjson1_deserializeOpGetPublicKey) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetPublicKeyOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetParticipantOutput(&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_deserializeOpErrorGetParticipant(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetParticipantOutput(v **GetParticipantOutput, 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 *GetParticipantOutput + if *v == nil { + sv = &GetParticipantOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "participant": + if err := awsRestjson1_deserializeDocumentParticipant(&sv.Participant, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetPublicKey struct { +} + +func (*awsRestjson1_deserializeOpGetPublicKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetPublicKey) 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_deserializeOpErrorGetPublicKey(response, &metadata) + } + output := &GetPublicKeyOutput{} + 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_deserializeOpDocumentGetPublicKeyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2114,9 +2518,171 @@ func (m *awsRestjson1_deserializeOpGetStorageConfiguration) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetStorageConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetStorageConfiguration(response, &metadata) + } + output := &GetStorageConfigurationOutput{} + 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_deserializeOpDocumentGetStorageConfigurationOutput(&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_deserializeOpErrorGetStorageConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetStorageConfigurationOutput(v **GetStorageConfigurationOutput, 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 *GetStorageConfigurationOutput + if *v == nil { + sv = &GetStorageConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "storageConfiguration": + if err := awsRestjson1_deserializeDocumentStorageConfiguration(&sv.StorageConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpImportPublicKey struct { +} + +func (*awsRestjson1_deserializeOpImportPublicKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpImportPublicKey) 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_deserializeOpErrorImportPublicKey(response, &metadata) } - output := &GetStorageConfigurationOutput{} + output := &ImportPublicKeyOutput{} out.Result = output var buff [1024]byte @@ -2137,7 +2703,7 @@ func (m *awsRestjson1_deserializeOpGetStorageConfiguration) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetStorageConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentImportPublicKeyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2150,7 +2716,7 @@ func (m *awsRestjson1_deserializeOpGetStorageConfiguration) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetStorageConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorImportPublicKey(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)} @@ -2197,11 +2763,8 @@ func awsRestjson1_deserializeOpErrorGetStorageConfiguration(response *smithyhttp case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("PendingVerification", errorCode): + return awsRestjson1_deserializeErrorPendingVerification(response, errorBody) case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -2219,7 +2782,7 @@ func awsRestjson1_deserializeOpErrorGetStorageConfiguration(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentGetStorageConfigurationOutput(v **GetStorageConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentImportPublicKeyOutput(v **ImportPublicKeyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2232,17 +2795,17 @@ func awsRestjson1_deserializeOpDocumentGetStorageConfigurationOutput(v **GetStor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetStorageConfigurationOutput + var sv *ImportPublicKeyOutput if *v == nil { - sv = &GetStorageConfigurationOutput{} + sv = &ImportPublicKeyOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "storageConfiguration": - if err := awsRestjson1_deserializeDocumentStorageConfiguration(&sv.StorageConfiguration, value); err != nil { + case "publicKey": + if err := awsRestjson1_deserializeDocumentPublicKey(&sv.PublicKey, value); err != nil { return err } @@ -2255,14 +2818,14 @@ func awsRestjson1_deserializeOpDocumentGetStorageConfigurationOutput(v **GetStor return nil } -type awsRestjson1_deserializeOpImportPublicKey struct { +type awsRestjson1_deserializeOpListCompositions struct { } -func (*awsRestjson1_deserializeOpImportPublicKey) ID() string { +func (*awsRestjson1_deserializeOpListCompositions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpImportPublicKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListCompositions) 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) @@ -2276,9 +2839,9 @@ func (m *awsRestjson1_deserializeOpImportPublicKey) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorImportPublicKey(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListCompositions(response, &metadata) } - output := &ImportPublicKeyOutput{} + output := &ListCompositionsOutput{} out.Result = output var buff [1024]byte @@ -2299,7 +2862,7 @@ func (m *awsRestjson1_deserializeOpImportPublicKey) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentImportPublicKeyOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListCompositionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2312,7 +2875,7 @@ func (m *awsRestjson1_deserializeOpImportPublicKey) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorImportPublicKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListCompositions(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)} @@ -2359,8 +2922,8 @@ func awsRestjson1_deserializeOpErrorImportPublicKey(response *smithyhttp.Respons case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("PendingVerification", errorCode): - return awsRestjson1_deserializeErrorPendingVerification(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -2378,7 +2941,7 @@ func awsRestjson1_deserializeOpErrorImportPublicKey(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentImportPublicKeyOutput(v **ImportPublicKeyOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListCompositionsOutput(v **ListCompositionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2391,20 +2954,29 @@ func awsRestjson1_deserializeOpDocumentImportPublicKeyOutput(v **ImportPublicKey return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ImportPublicKeyOutput + var sv *ListCompositionsOutput if *v == nil { - sv = &ImportPublicKeyOutput{} + sv = &ListCompositionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "publicKey": - if err := awsRestjson1_deserializeDocumentPublicKey(&sv.PublicKey, value); err != nil { + case "compositions": + if err := awsRestjson1_deserializeDocumentCompositionSummaryList(&sv.Compositions, value); err != nil { return err } + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -2414,14 +2986,14 @@ func awsRestjson1_deserializeOpDocumentImportPublicKeyOutput(v **ImportPublicKey return nil } -type awsRestjson1_deserializeOpListCompositions struct { +type awsRestjson1_deserializeOpListEncoderConfigurations struct { } -func (*awsRestjson1_deserializeOpListCompositions) ID() string { +func (*awsRestjson1_deserializeOpListEncoderConfigurations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListCompositions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEncoderConfigurations) 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) @@ -2435,9 +3007,9 @@ func (m *awsRestjson1_deserializeOpListCompositions) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListCompositions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEncoderConfigurations(response, &metadata) } - output := &ListCompositionsOutput{} + output := &ListEncoderConfigurationsOutput{} out.Result = output var buff [1024]byte @@ -2458,7 +3030,7 @@ func (m *awsRestjson1_deserializeOpListCompositions) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListCompositionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEncoderConfigurationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2471,7 +3043,7 @@ func (m *awsRestjson1_deserializeOpListCompositions) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListCompositions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEncoderConfigurations(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)} @@ -2537,7 +3109,7 @@ func awsRestjson1_deserializeOpErrorListCompositions(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListCompositionsOutput(v **ListCompositionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEncoderConfigurationsOutput(v **ListEncoderConfigurationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2550,17 +3122,17 @@ func awsRestjson1_deserializeOpDocumentListCompositionsOutput(v **ListCompositio return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListCompositionsOutput + var sv *ListEncoderConfigurationsOutput if *v == nil { - sv = &ListCompositionsOutput{} + sv = &ListEncoderConfigurationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "compositions": - if err := awsRestjson1_deserializeDocumentCompositionSummaryList(&sv.Compositions, value); err != nil { + case "encoderConfigurations": + if err := awsRestjson1_deserializeDocumentEncoderConfigurationSummaryList(&sv.EncoderConfigurations, value); err != nil { return err } @@ -2582,14 +3154,14 @@ func awsRestjson1_deserializeOpDocumentListCompositionsOutput(v **ListCompositio return nil } -type awsRestjson1_deserializeOpListEncoderConfigurations struct { +type awsRestjson1_deserializeOpListIngestConfigurations struct { } -func (*awsRestjson1_deserializeOpListEncoderConfigurations) ID() string { +func (*awsRestjson1_deserializeOpListIngestConfigurations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEncoderConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIngestConfigurations) 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) @@ -2603,9 +3175,9 @@ func (m *awsRestjson1_deserializeOpListEncoderConfigurations) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEncoderConfigurations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIngestConfigurations(response, &metadata) } - output := &ListEncoderConfigurationsOutput{} + output := &ListIngestConfigurationsOutput{} out.Result = output var buff [1024]byte @@ -2626,7 +3198,7 @@ func (m *awsRestjson1_deserializeOpListEncoderConfigurations) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEncoderConfigurationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIngestConfigurationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2639,7 +3211,7 @@ func (m *awsRestjson1_deserializeOpListEncoderConfigurations) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEncoderConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIngestConfigurations(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)} @@ -2683,15 +3255,6 @@ func awsRestjson1_deserializeOpErrorListEncoderConfigurations(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -2705,7 +3268,7 @@ func awsRestjson1_deserializeOpErrorListEncoderConfigurations(response *smithyht } } -func awsRestjson1_deserializeOpDocumentListEncoderConfigurationsOutput(v **ListEncoderConfigurationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIngestConfigurationsOutput(v **ListIngestConfigurationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2718,17 +3281,17 @@ func awsRestjson1_deserializeOpDocumentListEncoderConfigurationsOutput(v **ListE return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEncoderConfigurationsOutput + var sv *ListIngestConfigurationsOutput if *v == nil { - sv = &ListEncoderConfigurationsOutput{} + sv = &ListIngestConfigurationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "encoderConfigurations": - if err := awsRestjson1_deserializeDocumentEncoderConfigurationSummaryList(&sv.EncoderConfigurations, value); err != nil { + case "ingestConfigurations": + if err := awsRestjson1_deserializeDocumentIngestConfigurationList(&sv.IngestConfigurations, value); err != nil { return err } @@ -4290,24 +4853,183 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, errorMessage = message } - switch { - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateIngestConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateIngestConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateIngestConfiguration) 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_deserializeOpErrorUpdateIngestConfiguration(response, &metadata) + } + output := &UpdateIngestConfigurationOutput{} + 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_deserializeOpDocumentUpdateIngestConfigurationOutput(&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_deserializeOpErrorUpdateIngestConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("PendingVerification", errorCode): + return awsRestjson1_deserializeErrorPendingVerification(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateIngestConfigurationOutput(v **UpdateIngestConfigurationOutput, 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 *UpdateIngestConfigurationOutput + if *v == nil { + sv = &UpdateIngestConfigurationOutput{} + } else { + sv = *v + } - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + for key, value := range shape { + switch key { + case "ingestConfiguration": + if err := awsRestjson1_deserializeDocumentIngestConfiguration(&sv.IngestConfiguration, value); err != nil { + return err + } - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: + _, _ = key, value - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, } - return genericError - } + *v = sv + return nil } type awsRestjson1_deserializeOpUpdateStage struct { @@ -5816,6 +6538,247 @@ func awsRestjson1_deserializeDocumentGridConfiguration(v **types.GridConfigurati return nil } +func awsRestjson1_deserializeDocumentIngestConfiguration(v **types.IngestConfiguration, 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.IngestConfiguration + if *v == nil { + sv = &types.IngestConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestConfigurationArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "attributes": + if err := awsRestjson1_deserializeDocumentParticipantAttributes(&sv.Attributes, value); err != nil { + return err + } + + case "ingestProtocol": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestProtocol to be of type string, got %T instead", value) + } + sv.IngestProtocol = types.IngestProtocol(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestConfigurationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "participantId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParticipantId to be of type string, got %T instead", value) + } + sv.ParticipantId = ptr.String(jtv) + } + + case "stageArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestConfigurationStageArn to be of type string, got %T instead", value) + } + sv.StageArn = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestConfigurationState to be of type string, got %T instead", value) + } + sv.State = types.IngestConfigurationState(jtv) + } + + case "streamKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StreamKey to be of type string, got %T instead", value) + } + sv.StreamKey = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "userId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserId to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIngestConfigurationList(v *[]types.IngestConfigurationSummary, 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.IngestConfigurationSummary + if *v == nil { + cv = []types.IngestConfigurationSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IngestConfigurationSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentIngestConfigurationSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIngestConfigurationSummary(v **types.IngestConfigurationSummary, 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.IngestConfigurationSummary + if *v == nil { + sv = &types.IngestConfigurationSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestConfigurationArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "ingestProtocol": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestProtocol to be of type string, got %T instead", value) + } + sv.IngestProtocol = types.IngestProtocol(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestConfigurationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "participantId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParticipantId to be of type string, got %T instead", value) + } + sv.ParticipantId = ptr.String(jtv) + } + + case "stageArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestConfigurationStageArn to be of type string, got %T instead", value) + } + sv.StageArn = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestConfigurationState to be of type string, got %T instead", value) + } + sv.State = types.IngestConfigurationState(jtv) + } + + case "userId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserId to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5991,6 +6954,15 @@ func awsRestjson1_deserializeDocumentParticipant(v **types.Participant, value in sv.ParticipantId = ptr.String(jtv) } + case "protocol": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParticipantProtocol to be of type string, got %T instead", value) + } + sv.Protocol = types.ParticipantProtocol(jtv) + } + case "published": if value != nil { jtv, ok := value.(bool) @@ -7149,6 +8121,24 @@ func awsRestjson1_deserializeDocumentStageEndpoints(v **types.StageEndpoints, va sv.Events = ptr.String(jtv) } + case "rtmp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StageEndpoint to be of type string, got %T instead", value) + } + sv.Rtmp = ptr.String(jtv) + } + + case "rtmps": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StageEndpoint to be of type string, got %T instead", value) + } + sv.Rtmps = ptr.String(jtv) + } + case "whip": if value != nil { jtv, ok := value.(string) diff --git a/service/ivsrealtime/doc.go b/service/ivsrealtime/doc.go index 1081f881add..5ef09f95c37 100644 --- a/service/ivsrealtime/doc.go +++ b/service/ivsrealtime/doc.go @@ -24,7 +24,7 @@ // // - Composition process — Composites participants of a stage into a single // video and forwards it to a set of outputs (e.g., IVS channels). Composition -// endpoints support this process. +// operations support this process. // // - Composition — Controls the look of the outputs, including how participants // are positioned in the video. @@ -35,21 +35,21 @@ // // A tag is a metadata label that you assign to an AWS resource. A tag comprises a // key and a value, both set by you. For example, you might set a tag as -// topic:nature to label a particular video category. See [Tagging AWS Resources] for more information, -// including restrictions that apply to tags and "Tag naming limits and -// requirements"; Amazon IVS stages has no service-specific constraints beyond what -// is documented there. +// topic:nature to label a particular video category. See [Best practices and strategies] in Tagging AWS +// Resources and Tag Editor for details, including restrictions that apply to tags +// and "Tag naming limits and requirements"; Amazon IVS stages has no +// service-specific constraints beyond what is documented there. // // Tags can help you identify and organize your AWS resources. For example, you // can use the same tag for different resources to indicate that they are related. // You can also use tags to manage access (see [Access Tags]). // -// The Amazon IVS real-time API has these tag-related endpoints: TagResource, UntagResource, and ListTagsForResource. The +// The Amazon IVS real-time API has these tag-related operations: TagResource, UntagResource, and ListTagsForResource. The // following resource supports tagging: Stage. // // At most 50 tags can be applied to a resource. // // [Getting Started with Amazon IVS Real-Time Streaming]: https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/getting-started.html -// [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html +// [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html // [Access Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html package ivsrealtime diff --git a/service/ivsrealtime/generated.json b/service/ivsrealtime/generated.json index aae475b66b8..08b21a8dac9 100644 --- a/service/ivsrealtime/generated.json +++ b/service/ivsrealtime/generated.json @@ -9,16 +9,19 @@ "api_client.go", "api_client_test.go", "api_op_CreateEncoderConfiguration.go", + "api_op_CreateIngestConfiguration.go", "api_op_CreateParticipantToken.go", "api_op_CreateStage.go", "api_op_CreateStorageConfiguration.go", "api_op_DeleteEncoderConfiguration.go", + "api_op_DeleteIngestConfiguration.go", "api_op_DeletePublicKey.go", "api_op_DeleteStage.go", "api_op_DeleteStorageConfiguration.go", "api_op_DisconnectParticipant.go", "api_op_GetComposition.go", "api_op_GetEncoderConfiguration.go", + "api_op_GetIngestConfiguration.go", "api_op_GetParticipant.go", "api_op_GetPublicKey.go", "api_op_GetStage.go", @@ -27,6 +30,7 @@ "api_op_ImportPublicKey.go", "api_op_ListCompositions.go", "api_op_ListEncoderConfigurations.go", + "api_op_ListIngestConfigurations.go", "api_op_ListParticipantEvents.go", "api_op_ListParticipants.go", "api_op_ListPublicKeys.go", @@ -38,6 +42,7 @@ "api_op_StopComposition.go", "api_op_TagResource.go", "api_op_UntagResource.go", + "api_op_UpdateIngestConfiguration.go", "api_op_UpdateStage.go", "auth.go", "deserializers.go", diff --git a/service/ivsrealtime/serializers.go b/service/ivsrealtime/serializers.go index feab974e45a..cdcf8131896 100644 --- a/service/ivsrealtime/serializers.go +++ b/service/ivsrealtime/serializers.go @@ -104,6 +104,115 @@ func awsRestjson1_serializeOpDocumentCreateEncoderConfigurationInput(v *CreateEn return nil } +type awsRestjson1_serializeOpCreateIngestConfiguration struct { +} + +func (*awsRestjson1_serializeOpCreateIngestConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateIngestConfiguration) 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.(*CreateIngestConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/CreateIngestConfiguration") + 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_serializeOpDocumentCreateIngestConfigurationInput(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_serializeOpHttpBindingsCreateIngestConfigurationInput(v *CreateIngestConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateIngestConfigurationInput(v *CreateIngestConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Attributes != nil { + ok := object.Key("attributes") + if err := awsRestjson1_serializeDocumentParticipantAttributes(v.Attributes, ok); err != nil { + return err + } + } + + if len(v.IngestProtocol) > 0 { + ok := object.Key("ingestProtocol") + ok.String(string(v.IngestProtocol)) + } + + if v.InsecureIngest { + ok := object.Key("insecureIngest") + ok.Boolean(v.InsecureIngest) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.StageArn != nil { + ok := object.Key("stageArn") + ok.String(*v.StageArn) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + if v.UserId != nil { + ok := object.Key("userId") + ok.String(*v.UserId) + } + + return nil +} + type awsRestjson1_serializeOpCreateParticipantToken struct { } @@ -463,6 +572,86 @@ func awsRestjson1_serializeOpDocumentDeleteEncoderConfigurationInput(v *DeleteEn return nil } +type awsRestjson1_serializeOpDeleteIngestConfiguration struct { +} + +func (*awsRestjson1_serializeOpDeleteIngestConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteIngestConfiguration) 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.(*DeleteIngestConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/DeleteIngestConfiguration") + 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_serializeOpDocumentDeleteIngestConfigurationInput(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_serializeOpHttpBindingsDeleteIngestConfigurationInput(v *DeleteIngestConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteIngestConfigurationInput(v *DeleteIngestConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + if v.Force { + ok := object.Key("force") + ok.Boolean(v.Force) + } + + return nil +} + type awsRestjson1_serializeOpDeletePublicKey struct { } @@ -923,6 +1112,81 @@ func awsRestjson1_serializeOpDocumentGetEncoderConfigurationInput(v *GetEncoderC return nil } +type awsRestjson1_serializeOpGetIngestConfiguration struct { +} + +func (*awsRestjson1_serializeOpGetIngestConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetIngestConfiguration) 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.(*GetIngestConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/GetIngestConfiguration") + 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_serializeOpDocumentGetIngestConfigurationInput(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_serializeOpHttpBindingsGetIngestConfigurationInput(v *GetIngestConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetIngestConfigurationInput(v *GetIngestConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + return nil +} + type awsRestjson1_serializeOpGetParticipant struct { } @@ -1570,6 +1834,96 @@ func awsRestjson1_serializeOpDocumentListEncoderConfigurationsInput(v *ListEncod return nil } +type awsRestjson1_serializeOpListIngestConfigurations struct { +} + +func (*awsRestjson1_serializeOpListIngestConfigurations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListIngestConfigurations) 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.(*ListIngestConfigurationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ListIngestConfigurations") + 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_serializeOpDocumentListIngestConfigurationsInput(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_serializeOpHttpBindingsListIngestConfigurationsInput(v *ListIngestConfigurationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListIngestConfigurationsInput(v *ListIngestConfigurationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterByStageArn != nil { + ok := object.Key("filterByStageArn") + ok.String(*v.FilterByStageArn) + } + + if len(v.FilterByState) > 0 { + ok := object.Key("filterByState") + ok.String(string(v.FilterByState)) + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListParticipantEvents struct { } @@ -2502,6 +2856,86 @@ func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInpu return nil } +type awsRestjson1_serializeOpUpdateIngestConfiguration struct { +} + +func (*awsRestjson1_serializeOpUpdateIngestConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateIngestConfiguration) 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.(*UpdateIngestConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/UpdateIngestConfiguration") + 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_serializeOpDocumentUpdateIngestConfigurationInput(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_serializeOpHttpBindingsUpdateIngestConfigurationInput(v *UpdateIngestConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateIngestConfigurationInput(v *UpdateIngestConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + if v.StageArn != nil { + ok := object.Key("stageArn") + ok.String(*v.StageArn) + } + + return nil +} + type awsRestjson1_serializeOpUpdateStage struct { } @@ -2728,6 +3162,17 @@ func awsRestjson1_serializeDocumentLayoutConfiguration(v *types.LayoutConfigurat return nil } +func awsRestjson1_serializeDocumentParticipantAttributes(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + func awsRestjson1_serializeDocumentParticipantRecordingMediaTypeList(v []types.ParticipantRecordingMediaType, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/ivsrealtime/snapshot/api_op_CreateIngestConfiguration.go.snap b/service/ivsrealtime/snapshot/api_op_CreateIngestConfiguration.go.snap new file mode 100644 index 00000000000..e0873ae362f --- /dev/null +++ b/service/ivsrealtime/snapshot/api_op_CreateIngestConfiguration.go.snap @@ -0,0 +1,36 @@ +CreateIngestConfiguration + 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/ivsrealtime/snapshot/api_op_DeleteIngestConfiguration.go.snap b/service/ivsrealtime/snapshot/api_op_DeleteIngestConfiguration.go.snap new file mode 100644 index 00000000000..a96696e97ac --- /dev/null +++ b/service/ivsrealtime/snapshot/api_op_DeleteIngestConfiguration.go.snap @@ -0,0 +1,36 @@ +DeleteIngestConfiguration + 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/ivsrealtime/snapshot/api_op_GetIngestConfiguration.go.snap b/service/ivsrealtime/snapshot/api_op_GetIngestConfiguration.go.snap new file mode 100644 index 00000000000..2cc1d4a3bba --- /dev/null +++ b/service/ivsrealtime/snapshot/api_op_GetIngestConfiguration.go.snap @@ -0,0 +1,36 @@ +GetIngestConfiguration + 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/ivsrealtime/snapshot/api_op_ListIngestConfigurations.go.snap b/service/ivsrealtime/snapshot/api_op_ListIngestConfigurations.go.snap new file mode 100644 index 00000000000..da82769d68a --- /dev/null +++ b/service/ivsrealtime/snapshot/api_op_ListIngestConfigurations.go.snap @@ -0,0 +1,35 @@ +ListIngestConfigurations + 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/ivsrealtime/snapshot/api_op_UpdateIngestConfiguration.go.snap b/service/ivsrealtime/snapshot/api_op_UpdateIngestConfiguration.go.snap new file mode 100644 index 00000000000..0a8d84f33d6 --- /dev/null +++ b/service/ivsrealtime/snapshot/api_op_UpdateIngestConfiguration.go.snap @@ -0,0 +1,36 @@ +UpdateIngestConfiguration + 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/ivsrealtime/snapshot_test.go b/service/ivsrealtime/snapshot_test.go index de79f3b1e98..bd2fdcf4056 100644 --- a/service/ivsrealtime/snapshot_test.go +++ b/service/ivsrealtime/snapshot_test.go @@ -74,6 +74,18 @@ func TestCheckSnapshot_CreateEncoderConfiguration(t *testing.T) { } } +func TestCheckSnapshot_CreateIngestConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateIngestConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateIngestConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateParticipantToken(t *testing.T) { svc := New(Options{}) _, err := svc.CreateParticipantToken(context.Background(), nil, func(o *Options) { @@ -122,6 +134,18 @@ func TestCheckSnapshot_DeleteEncoderConfiguration(t *testing.T) { } } +func TestCheckSnapshot_DeleteIngestConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteIngestConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteIngestConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeletePublicKey(t *testing.T) { svc := New(Options{}) _, err := svc.DeletePublicKey(context.Background(), nil, func(o *Options) { @@ -194,6 +218,18 @@ func TestCheckSnapshot_GetEncoderConfiguration(t *testing.T) { } } +func TestCheckSnapshot_GetIngestConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetIngestConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetIngestConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetParticipant(t *testing.T) { svc := New(Options{}) _, err := svc.GetParticipant(context.Background(), nil, func(o *Options) { @@ -290,6 +326,18 @@ func TestCheckSnapshot_ListEncoderConfigurations(t *testing.T) { } } +func TestCheckSnapshot_ListIngestConfigurations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListIngestConfigurations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListIngestConfigurations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListParticipantEvents(t *testing.T) { svc := New(Options{}) _, err := svc.ListParticipantEvents(context.Background(), nil, func(o *Options) { @@ -422,6 +470,18 @@ func TestCheckSnapshot_UntagResource(t *testing.T) { } } +func TestCheckSnapshot_UpdateIngestConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateIngestConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateIngestConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateStage(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateStage(context.Background(), nil, func(o *Options) { @@ -445,6 +505,18 @@ func TestUpdateSnapshot_CreateEncoderConfiguration(t *testing.T) { } } +func TestUpdateSnapshot_CreateIngestConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateIngestConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateIngestConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateParticipantToken(t *testing.T) { svc := New(Options{}) _, err := svc.CreateParticipantToken(context.Background(), nil, func(o *Options) { @@ -493,6 +565,18 @@ func TestUpdateSnapshot_DeleteEncoderConfiguration(t *testing.T) { } } +func TestUpdateSnapshot_DeleteIngestConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteIngestConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteIngestConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeletePublicKey(t *testing.T) { svc := New(Options{}) _, err := svc.DeletePublicKey(context.Background(), nil, func(o *Options) { @@ -565,6 +649,18 @@ func TestUpdateSnapshot_GetEncoderConfiguration(t *testing.T) { } } +func TestUpdateSnapshot_GetIngestConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetIngestConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetIngestConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetParticipant(t *testing.T) { svc := New(Options{}) _, err := svc.GetParticipant(context.Background(), nil, func(o *Options) { @@ -661,6 +757,18 @@ func TestUpdateSnapshot_ListEncoderConfigurations(t *testing.T) { } } +func TestUpdateSnapshot_ListIngestConfigurations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListIngestConfigurations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListIngestConfigurations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListParticipantEvents(t *testing.T) { svc := New(Options{}) _, err := svc.ListParticipantEvents(context.Background(), nil, func(o *Options) { @@ -793,6 +901,18 @@ func TestUpdateSnapshot_UntagResource(t *testing.T) { } } +func TestUpdateSnapshot_UpdateIngestConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateIngestConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateIngestConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateStage(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateStage(context.Background(), nil, func(o *Options) { diff --git a/service/ivsrealtime/types/enums.go b/service/ivsrealtime/types/enums.go index 571c8509814..31bcccee87c 100644 --- a/service/ivsrealtime/types/enums.go +++ b/service/ivsrealtime/types/enums.go @@ -61,6 +61,14 @@ const ( EventErrorCodeInsufficientCapabilities EventErrorCode = "INSUFFICIENT_CAPABILITIES" EventErrorCodeQuotaExceeded EventErrorCode = "QUOTA_EXCEEDED" EventErrorCodePublisherNotFound EventErrorCode = "PUBLISHER_NOT_FOUND" + EventErrorCodeBitrateExceeded EventErrorCode = "BITRATE_EXCEEDED" + EventErrorCodeResolutionExceeded EventErrorCode = "RESOLUTION_EXCEEDED" + EventErrorCodeStreamDurationExceeded EventErrorCode = "STREAM_DURATION_EXCEEDED" + EventErrorCodeInvalidAudioCodec EventErrorCode = "INVALID_AUDIO_CODEC" + EventErrorCodeInvalidVideoCodec EventErrorCode = "INVALID_VIDEO_CODEC" + EventErrorCodeInvalidProtocol EventErrorCode = "INVALID_PROTOCOL" + EventErrorCodeInvalidStreamKey EventErrorCode = "INVALID_STREAM_KEY" + EventErrorCodeReuseOfStreamKey EventErrorCode = "REUSE_OF_STREAM_KEY" ) // Values returns all known values for EventErrorCode. Note that this can be @@ -72,6 +80,14 @@ func (EventErrorCode) Values() []EventErrorCode { "INSUFFICIENT_CAPABILITIES", "QUOTA_EXCEEDED", "PUBLISHER_NOT_FOUND", + "BITRATE_EXCEEDED", + "RESOLUTION_EXCEEDED", + "STREAM_DURATION_EXCEEDED", + "INVALID_AUDIO_CODEC", + "INVALID_VIDEO_CODEC", + "INVALID_PROTOCOL", + "INVALID_STREAM_KEY", + "REUSE_OF_STREAM_KEY", } } @@ -108,6 +124,67 @@ func (EventName) Values() []EventName { } } +type IngestConfigurationState string + +// Enum values for IngestConfigurationState +const ( + IngestConfigurationStateActive IngestConfigurationState = "ACTIVE" + IngestConfigurationStateInactive IngestConfigurationState = "INACTIVE" +) + +// Values returns all known values for IngestConfigurationState. 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 (IngestConfigurationState) Values() []IngestConfigurationState { + return []IngestConfigurationState{ + "ACTIVE", + "INACTIVE", + } +} + +type IngestProtocol string + +// Enum values for IngestProtocol +const ( + IngestProtocolRtmp IngestProtocol = "RTMP" + IngestProtocolRtmps IngestProtocol = "RTMPS" +) + +// Values returns all known values for IngestProtocol. 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 (IngestProtocol) Values() []IngestProtocol { + return []IngestProtocol{ + "RTMP", + "RTMPS", + } +} + +type ParticipantProtocol string + +// Enum values for ParticipantProtocol +const ( + ParticipantProtocolUnknown ParticipantProtocol = "UNKNOWN" + ParticipantProtocolWhip ParticipantProtocol = "WHIP" + ParticipantProtocolRtmp ParticipantProtocol = "RTMP" + ParticipantProtocolRtmps ParticipantProtocol = "RTMPS" +) + +// Values returns all known values for ParticipantProtocol. 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 (ParticipantProtocol) Values() []ParticipantProtocol { + return []ParticipantProtocol{ + "UNKNOWN", + "WHIP", + "RTMP", + "RTMPS", + } +} + type ParticipantRecordingFilterByRecordingState string // Enum values for ParticipantRecordingFilterByRecordingState diff --git a/service/ivsrealtime/types/types.go b/service/ivsrealtime/types/types.go index 9825b615940..20fb6206381 100644 --- a/service/ivsrealtime/types/types.go +++ b/service/ivsrealtime/types/types.go @@ -79,11 +79,12 @@ type Composition struct { StartTime *time.Time // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string noSmithyDocumentSerde @@ -121,11 +122,12 @@ type CompositionSummary struct { StartTime *time.Time // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string noSmithyDocumentSerde @@ -225,11 +227,12 @@ type EncoderConfiguration struct { Name *string // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string // Video configuration. Default: video resolution 1280x720, bitrate 2500 kbps, 30 @@ -251,11 +254,12 @@ type EncoderConfigurationSummary struct { Name *string // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string noSmithyDocumentSerde @@ -326,6 +330,111 @@ type GridConfiguration struct { noSmithyDocumentSerde } +// Object specifying an ingest configuration. +type IngestConfiguration struct { + + // Ingest configuration ARN. + // + // This member is required. + Arn *string + + // Type of ingest protocol that the user employs for broadcasting. + // + // This member is required. + IngestProtocol IngestProtocol + + // ID of the participant within the stage. + // + // This member is required. + ParticipantId *string + + // ARN of the stage with which the IngestConfiguration is associated. + // + // This member is required. + StageArn *string + + // State of the ingest configuration. It is ACTIVE if a publisher currently is + // publishing to the stage associated with the ingest configuration. + // + // This member is required. + State IngestConfigurationState + + // Ingest-key value for the RTMP(S) protocol. + // + // This member is required. + StreamKey *string + + // Application-provided attributes to to store in the IngestConfiguration and + // attach to a stage. Map keys and values can contain UTF-8 encoded text. The + // maximum length of this field is 1 KB total. This field is exposed to all stage + // participants and should not be used for personally identifying, confidential, or + // sensitive information. + Attributes map[string]string + + // Ingest name + Name *string + + // Tags attached to the resource. Array of maps, each of the form string:string + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. + // + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html + Tags map[string]string + + // Customer-assigned name to help identify the participant using the + // IngestConfiguration; this can be used to link a participant to a user in the + // customer’s own systems. This can be any UTF-8 encoded text. This field is + // exposed to all stage participants and should not be used for personally + // identifying, confidential, or sensitive information. + UserId *string + + noSmithyDocumentSerde +} + +// Summary information about an IngestConfiguration. +type IngestConfigurationSummary struct { + + // Ingest configuration ARN. + // + // This member is required. + Arn *string + + // Type of ingest protocol that the user employs for broadcasting. + // + // This member is required. + IngestProtocol IngestProtocol + + // ID of the participant within the stage. + // + // This member is required. + ParticipantId *string + + // ARN of the stage with which the IngestConfiguration is associated. + // + // This member is required. + StageArn *string + + // State of the ingest configuration. It is ACTIVE if a publisher currently is + // publishing to the stage associated with the ingest configuration. + // + // This member is required. + State IngestConfigurationState + + // Ingest name. + Name *string + + // Customer-assigned name to help identify the participant using the + // IngestConfiguration; this can be used to link a participant to a user in the + // customer’s own systems. This can be any UTF-8 encoded text. This field is + // exposed to all stage participants and should not be used for personally + // identifying, confidential, or sensitive information. + UserId *string + + noSmithyDocumentSerde +} + // Configuration information of supported layouts for server-side composition. type LayoutConfiguration struct { @@ -369,6 +478,9 @@ type Participant struct { // Unique identifier for this participant, assigned by IVS. ParticipantId *string + // Type of ingest protocol that the participant employs for broadcasting. + Protocol ParticipantProtocol + // Whether the participant ever published to the stage session. Published bool @@ -558,11 +670,12 @@ type PublicKey struct { PublicKeyMaterial *string // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string noSmithyDocumentSerde @@ -578,11 +691,12 @@ type PublicKeySummary struct { Name *string // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string noSmithyDocumentSerde @@ -667,23 +781,32 @@ type Stage struct { Name *string // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string noSmithyDocumentSerde } -// Summary information about various endpoints for a stage. +// Summary information about various endpoints for a stage. We recommend that you +// cache these values at stage creation; the values can be cached for up to 14 +// days. type StageEndpoints struct { // Events endpoint. Events *string - // WHIP endpoint. + // The endpoint to be used for IVS real-time streaming using the RTMP protocol. + Rtmp *string + + // The endpoint to be used for IVS real-time streaming using the RTMPS protocol. + Rtmps *string + + // The endpoint to be used for IVS real-time streaming using the WHIP protocol. Whip *string noSmithyDocumentSerde @@ -739,11 +862,12 @@ type StageSummary struct { Name *string // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string noSmithyDocumentSerde @@ -764,11 +888,12 @@ type StorageConfiguration struct { S3 *S3StorageConfiguration // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string noSmithyDocumentSerde @@ -789,11 +914,12 @@ type StorageConfigurationSummary struct { S3 *S3StorageConfiguration // Tags attached to the resource. Array of maps, each of the form string:string - // (key:value) . See [Tagging AWS Resources] for details, including restrictions that apply to tags and - // "Tag naming limits and requirements"; Amazon IVS has no constraints on tags - // beyond what is documented there. + // (key:value) . See [Best practices and strategies] in Tagging AWS Resources and Tag Editor for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS has no constraints on tags beyond what is documented + // there. // - // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + // [Best practices and strategies]: https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html Tags map[string]string noSmithyDocumentSerde diff --git a/service/ivsrealtime/validators.go b/service/ivsrealtime/validators.go index 39416677fb8..4d8a27616b7 100644 --- a/service/ivsrealtime/validators.go +++ b/service/ivsrealtime/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpCreateIngestConfiguration struct { +} + +func (*validateOpCreateIngestConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateIngestConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateIngestConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateIngestConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateParticipantToken struct { } @@ -90,6 +110,26 @@ func (m *validateOpDeleteEncoderConfiguration) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpDeleteIngestConfiguration struct { +} + +func (*validateOpDeleteIngestConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteIngestConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteIngestConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteIngestConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeletePublicKey struct { } @@ -210,6 +250,26 @@ func (m *validateOpGetEncoderConfiguration) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpGetIngestConfiguration struct { +} + +func (*validateOpGetIngestConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetIngestConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetIngestConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetIngestConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetParticipant struct { } @@ -490,6 +550,26 @@ func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateIngestConfiguration struct { +} + +func (*validateOpUpdateIngestConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateIngestConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateIngestConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateIngestConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateStage struct { } @@ -510,6 +590,10 @@ func (m *validateOpUpdateStage) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +func addOpCreateIngestConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateIngestConfiguration{}, middleware.After) +} + func addOpCreateParticipantTokenValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateParticipantToken{}, middleware.After) } @@ -526,6 +610,10 @@ func addOpDeleteEncoderConfigurationValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpDeleteEncoderConfiguration{}, middleware.After) } +func addOpDeleteIngestConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteIngestConfiguration{}, middleware.After) +} + func addOpDeletePublicKeyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeletePublicKey{}, middleware.After) } @@ -550,6 +638,10 @@ func addOpGetEncoderConfigurationValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpGetEncoderConfiguration{}, middleware.After) } +func addOpGetIngestConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetIngestConfiguration{}, middleware.After) +} + func addOpGetParticipantValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetParticipant{}, middleware.After) } @@ -606,6 +698,10 @@ func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } +func addOpUpdateIngestConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateIngestConfiguration{}, middleware.After) +} + func addOpUpdateStageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateStage{}, middleware.After) } @@ -712,6 +808,21 @@ func validateS3StorageConfiguration(v *types.S3StorageConfiguration) error { } } +func validateOpCreateIngestConfigurationInput(v *CreateIngestConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateIngestConfigurationInput"} + if len(v.IngestProtocol) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("IngestProtocol")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateParticipantTokenInput(v *CreateParticipantTokenInput) error { if v == nil { return nil @@ -778,6 +889,21 @@ func validateOpDeleteEncoderConfigurationInput(v *DeleteEncoderConfigurationInpu } } +func validateOpDeleteIngestConfigurationInput(v *DeleteIngestConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteIngestConfigurationInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeletePublicKeyInput(v *DeletePublicKeyInput) error { if v == nil { return nil @@ -871,6 +997,21 @@ func validateOpGetEncoderConfigurationInput(v *GetEncoderConfigurationInput) err } } +func validateOpGetIngestConfigurationInput(v *GetIngestConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetIngestConfigurationInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetParticipantInput(v *GetParticipantInput) error { if v == nil { return nil @@ -1112,6 +1253,21 @@ func validateOpUntagResourceInput(v *UntagResourceInput) error { } } +func validateOpUpdateIngestConfigurationInput(v *UpdateIngestConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateIngestConfigurationInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateStageInput(v *UpdateStageInput) error { if v == nil { return nil diff --git a/service/kafka/api_op_GetBootstrapBrokers.go b/service/kafka/api_op_GetBootstrapBrokers.go index d0aa935a5f3..e7a38e00138 100644 --- a/service/kafka/api_op_GetBootstrapBrokers.go +++ b/service/kafka/api_op_GetBootstrapBrokers.go @@ -10,7 +10,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// A list of brokers that a client application can use to bootstrap. +// A list of brokers that a client application can use to bootstrap. This list +// doesn't necessarily include all of the brokers in the cluster. The following +// Python 3.6 example shows how you can use the Amazon Resource Name (ARN) of a +// cluster to get its bootstrap brokers. If you don't know the ARN of your cluster, +// you can use the ListClusters operation to get the ARNs of all the clusters in +// this account and Region. func (c *Client) GetBootstrapBrokers(ctx context.Context, params *GetBootstrapBrokersInput, optFns ...func(*Options)) (*GetBootstrapBrokersOutput, error) { if params == nil { params = &GetBootstrapBrokersInput{} diff --git a/service/kafka/deserializers.go b/service/kafka/deserializers.go index 16c5f195e7d..ea95dd224a5 100644 --- a/service/kafka/deserializers.go +++ b/service/kafka/deserializers.go @@ -13723,6 +13723,46 @@ func awsRestjson1_deserializeDocumentReplicationStateInfo(v **types.ReplicationS return nil } +func awsRestjson1_deserializeDocumentReplicationTopicNameConfiguration(v **types.ReplicationTopicNameConfiguration, 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.ReplicationTopicNameConfiguration + if *v == nil { + sv = &types.ReplicationTopicNameConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationTopicNameConfigurationType to be of type string, got %T instead", value) + } + sv.Type = types.ReplicationTopicNameConfigurationType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentReplicatorSummary(v **types.ReplicatorSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14365,6 +14405,11 @@ func awsRestjson1_deserializeDocumentTopicReplication(v **types.TopicReplication return err } + case "topicNameConfiguration": + if err := awsRestjson1_deserializeDocumentReplicationTopicNameConfiguration(&sv.TopicNameConfiguration, value); err != nil { + return err + } + case "topicsToExclude": if err := awsRestjson1_deserializeDocument__listOf__stringMax249(&sv.TopicsToExclude, value); err != nil { return err diff --git a/service/kafka/serializers.go b/service/kafka/serializers.go index dc6089bd16c..2a11eec61bc 100644 --- a/service/kafka/serializers.go +++ b/service/kafka/serializers.go @@ -4931,6 +4931,18 @@ func awsRestjson1_serializeDocumentReplicationStartingPosition(v *types.Replicat return nil } +func awsRestjson1_serializeDocumentReplicationTopicNameConfiguration(v *types.ReplicationTopicNameConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + func awsRestjson1_serializeDocumentS3(v *types.S3, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5094,6 +5106,13 @@ func awsRestjson1_serializeDocumentTopicReplication(v *types.TopicReplication, v } } + if v.TopicNameConfiguration != nil { + ok := object.Key("topicNameConfiguration") + if err := awsRestjson1_serializeDocumentReplicationTopicNameConfiguration(v.TopicNameConfiguration, ok); err != nil { + return err + } + } + if v.TopicsToExclude != nil { ok := object.Key("topicsToExclude") if err := awsRestjson1_serializeDocument__listOf__stringMax249(v.TopicsToExclude, ok); err != nil { diff --git a/service/kafka/types/enums.go b/service/kafka/types/enums.go index 7406c3631f6..fb73efc7972 100644 --- a/service/kafka/types/enums.go +++ b/service/kafka/types/enums.go @@ -211,6 +211,26 @@ func (ReplicationStartingPositionType) Values() []ReplicationStartingPositionTyp } } +type ReplicationTopicNameConfigurationType string + +// Enum values for ReplicationTopicNameConfigurationType +const ( + ReplicationTopicNameConfigurationTypePrefixedWithSourceClusterAlias ReplicationTopicNameConfigurationType = "PREFIXED_WITH_SOURCE_CLUSTER_ALIAS" + ReplicationTopicNameConfigurationTypeIdentical ReplicationTopicNameConfigurationType = "IDENTICAL" +) + +// Values returns all known values for ReplicationTopicNameConfigurationType. 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 (ReplicationTopicNameConfigurationType) Values() []ReplicationTopicNameConfigurationType { + return []ReplicationTopicNameConfigurationType{ + "PREFIXED_WITH_SOURCE_CLUSTER_ALIAS", + "IDENTICAL", + } +} + type ReplicatorState string // Enum values for ReplicatorState diff --git a/service/kafka/types/types.go b/service/kafka/types/types.go index 1f0477ff7b8..d7fd5b4e78b 100644 --- a/service/kafka/types/types.go +++ b/service/kafka/types/types.go @@ -1165,6 +1165,16 @@ type ReplicationStateInfo struct { noSmithyDocumentSerde } +// Configuration for specifying replicated topic names should be the same as their +// corresponding upstream topics or prefixed with source cluster alias. +type ReplicationTopicNameConfiguration struct { + + // The type of replicated topic name. + Type ReplicationTopicNameConfigurationType + + noSmithyDocumentSerde +} + // Information about a replicator. type ReplicatorSummary struct { @@ -1330,6 +1340,10 @@ type TopicReplication struct { // from. StartingPosition *ReplicationStartingPosition + // Configuration for specifying replicated topic names should be the same as their + // corresponding upstream topics or prefixed with source cluster alias. + TopicNameConfiguration *ReplicationTopicNameConfiguration + // List of regular expression patterns indicating the topics that should not be // replicated. TopicsToExclude []string diff --git a/service/sagemaker/api_op_CreateCluster.go b/service/sagemaker/api_op_CreateCluster.go index 23b5bf5cdfa..02c8c72cdde 100644 --- a/service/sagemaker/api_op_CreateCluster.go +++ b/service/sagemaker/api_op_CreateCluster.go @@ -44,6 +44,17 @@ type CreateClusterInput struct { // This member is required. InstanceGroups []types.ClusterInstanceGroupSpecification + // The node recovery mode for the SageMaker HyperPod cluster. When set to Automatic + // , SageMaker HyperPod will automatically reboot or replace faulty nodes when + // issues are detected. When set to None , cluster administrators will need to + // manually manage any faulty cluster instances. + NodeRecovery types.ClusterNodeRecovery + + // The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, + // the only supported value is "eks" , which is to use an Amazon Elastic Kubernetes + // Service (EKS) cluster as the orchestrator. + Orchestrator *types.ClusterOrchestrator + // Custom tags for managing the SageMaker HyperPod cluster as an Amazon Web // Services resource. You can add tags to your cluster in the same way you add them // in other Amazon Web Services services that support tagging. To learn more about diff --git a/service/sagemaker/api_op_DescribeCluster.go b/service/sagemaker/api_op_DescribeCluster.go index 544be8a1451..613d699891c 100644 --- a/service/sagemaker/api_op_DescribeCluster.go +++ b/service/sagemaker/api_op_DescribeCluster.go @@ -65,6 +65,12 @@ type DescribeClusterOutput struct { // The failure message of the SageMaker HyperPod cluster. FailureMessage *string + // The node recovery mode configured for the SageMaker HyperPod cluster. + NodeRecovery types.ClusterNodeRecovery + + // The type of orchestrator used for the SageMaker HyperPod cluster. + Orchestrator *types.ClusterOrchestrator + // Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, // hosted models, and compute resources have access to. You can control access to // and from your resources by configuring a VPC. For more information, see [Give SageMaker Access to Resources in your Amazon VPC]. diff --git a/service/sagemaker/api_op_UpdateCluster.go b/service/sagemaker/api_op_UpdateCluster.go index 2db4939464b..9ede7a78c0c 100644 --- a/service/sagemaker/api_op_UpdateCluster.go +++ b/service/sagemaker/api_op_UpdateCluster.go @@ -39,6 +39,9 @@ type UpdateClusterInput struct { // This member is required. InstanceGroups []types.ClusterInstanceGroupSpecification + // The node recovery mode to be applied to the SageMaker HyperPod cluster. + NodeRecovery types.ClusterNodeRecovery + noSmithyDocumentSerde } diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index 5201163017b..6622bebde19 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -41260,7 +41260,7 @@ func awsAwsjson11_deserializeDocumentClusterInstanceGroupDetails(v **types.Clust if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IAMRoleArn to be of type string, got %T instead", value) + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) } sv.ExecutionRole = ptr.String(jtv) } @@ -41293,6 +41293,11 @@ func awsAwsjson11_deserializeDocumentClusterInstanceGroupDetails(v **types.Clust return err } + case "OnStartDeepHealthChecks": + if err := awsAwsjson11_deserializeDocumentOnStartDeepHealthChecks(&sv.OnStartDeepHealthChecks, value); err != nil { + return err + } + case "TargetCount": if value != nil { jtv, ok := value.(json.Number) @@ -41819,6 +41824,82 @@ func awsAwsjson11_deserializeDocumentClusterNodeSummary(v **types.ClusterNodeSum return nil } +func awsAwsjson11_deserializeDocumentClusterOrchestrator(v **types.ClusterOrchestrator, 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.ClusterOrchestrator + if *v == nil { + sv = &types.ClusterOrchestrator{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Eks": + if err := awsAwsjson11_deserializeDocumentClusterOrchestratorEksConfig(&sv.Eks, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentClusterOrchestratorEksConfig(v **types.ClusterOrchestratorEksConfig, 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.ClusterOrchestratorEksConfig + if *v == nil { + sv = &types.ClusterOrchestratorEksConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ClusterArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EksClusterArn to be of type string, got %T instead", value) + } + sv.ClusterArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentClusterSummaries(v *[]types.ClusterSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -65695,6 +65776,42 @@ func awsAwsjson11_deserializeDocumentOnlineStoreSecurityConfig(v **types.OnlineS return nil } +func awsAwsjson11_deserializeDocumentOnStartDeepHealthChecks(v *[]types.DeepHealthCheckType, 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.DeepHealthCheckType + if *v == nil { + cv = []types.DeepHealthCheckType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DeepHealthCheckType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeepHealthCheckType to be of type string, got %T instead", value) + } + col = types.DeepHealthCheckType(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentOptimizationConfig(v *types.OptimizationConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -86161,6 +86278,20 @@ func awsAwsjson11_deserializeOpDocumentDescribeClusterOutput(v **DescribeCluster return err } + case "NodeRecovery": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClusterNodeRecovery to be of type string, got %T instead", value) + } + sv.NodeRecovery = types.ClusterNodeRecovery(jtv) + } + + case "Orchestrator": + if err := awsAwsjson11_deserializeDocumentClusterOrchestrator(&sv.Orchestrator, value); err != nil { + return err + } + case "VpcConfig": if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil { return err diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index 2389f7ec2ba..f2af52b13c6 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -20261,6 +20261,13 @@ func awsAwsjson11_serializeDocumentClusterInstanceGroupSpecification(v *types.Cl } } + if v.OnStartDeepHealthChecks != nil { + ok := object.Key("OnStartDeepHealthChecks") + if err := awsAwsjson11_serializeDocumentOnStartDeepHealthChecks(v.OnStartDeepHealthChecks, ok); err != nil { + return err + } + } + if v.ThreadsPerCore != nil { ok := object.Key("ThreadsPerCore") ok.Integer(*v.ThreadsPerCore) @@ -20333,6 +20340,32 @@ func awsAwsjson11_serializeDocumentClusterLifeCycleConfig(v *types.ClusterLifeCy return nil } +func awsAwsjson11_serializeDocumentClusterOrchestrator(v *types.ClusterOrchestrator, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Eks != nil { + ok := object.Key("Eks") + if err := awsAwsjson11_serializeDocumentClusterOrchestratorEksConfig(v.Eks, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentClusterOrchestratorEksConfig(v *types.ClusterOrchestratorEksConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClusterArn != nil { + ok := object.Key("ClusterArn") + ok.String(*v.ClusterArn) + } + + return nil +} + func awsAwsjson11_serializeDocumentCodeEditorAppImageConfig(v *types.CodeEditorAppImageConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -25884,6 +25917,17 @@ func awsAwsjson11_serializeDocumentOnlineStoreSecurityConfig(v *types.OnlineStor return nil } +func awsAwsjson11_serializeDocumentOnStartDeepHealthChecks(v []types.DeepHealthCheckType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsAwsjson11_serializeDocumentOptimizationConfig(v types.OptimizationConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -30289,6 +30333,18 @@ func awsAwsjson11_serializeOpDocumentCreateClusterInput(v *CreateClusterInput, v } } + if len(v.NodeRecovery) > 0 { + ok := object.Key("NodeRecovery") + ok.String(string(v.NodeRecovery)) + } + + if v.Orchestrator != nil { + ok := object.Key("Orchestrator") + if err := awsAwsjson11_serializeDocumentClusterOrchestrator(v.Orchestrator, ok); err != nil { + return err + } + } + if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { @@ -39182,6 +39238,11 @@ func awsAwsjson11_serializeOpDocumentUpdateClusterInput(v *UpdateClusterInput, v } } + if len(v.NodeRecovery) > 0 { + ok := object.Key("NodeRecovery") + ok.String(string(v.NodeRecovery)) + } + return nil } diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index f72061987de..6a5e55e4ac6 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -1531,11 +1531,12 @@ type ClusterInstanceStatus string // Enum values for ClusterInstanceStatus const ( - ClusterInstanceStatusRunning ClusterInstanceStatus = "Running" - ClusterInstanceStatusFailure ClusterInstanceStatus = "Failure" - ClusterInstanceStatusPending ClusterInstanceStatus = "Pending" - ClusterInstanceStatusShuttingDown ClusterInstanceStatus = "ShuttingDown" - ClusterInstanceStatusSystemUpdating ClusterInstanceStatus = "SystemUpdating" + ClusterInstanceStatusRunning ClusterInstanceStatus = "Running" + ClusterInstanceStatusFailure ClusterInstanceStatus = "Failure" + ClusterInstanceStatusPending ClusterInstanceStatus = "Pending" + ClusterInstanceStatusShuttingDown ClusterInstanceStatus = "ShuttingDown" + ClusterInstanceStatusSystemUpdating ClusterInstanceStatus = "SystemUpdating" + ClusterInstanceStatusDeepHealthCheckInProgress ClusterInstanceStatus = "DeepHealthCheckInProgress" ) // Values returns all known values for ClusterInstanceStatus. Note that this can @@ -1549,6 +1550,7 @@ func (ClusterInstanceStatus) Values() []ClusterInstanceStatus { "Pending", "ShuttingDown", "SystemUpdating", + "DeepHealthCheckInProgress", } } @@ -1643,6 +1645,25 @@ func (ClusterInstanceType) Values() []ClusterInstanceType { } } +type ClusterNodeRecovery string + +// Enum values for ClusterNodeRecovery +const ( + ClusterNodeRecoveryAutomatic ClusterNodeRecovery = "Automatic" + ClusterNodeRecoveryNone ClusterNodeRecovery = "None" +) + +// Values returns all known values for ClusterNodeRecovery. 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 (ClusterNodeRecovery) Values() []ClusterNodeRecovery { + return []ClusterNodeRecovery{ + "Automatic", + "None", + } +} + type ClusterSortBy string // Enum values for ClusterSortBy @@ -1931,6 +1952,25 @@ func (DataSourceName) Values() []DataSourceName { } } +type DeepHealthCheckType string + +// Enum values for DeepHealthCheckType +const ( + DeepHealthCheckTypeInstanceStress DeepHealthCheckType = "InstanceStress" + DeepHealthCheckTypeInstanceConnectivity DeepHealthCheckType = "InstanceConnectivity" +) + +// Values returns all known values for DeepHealthCheckType. 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 (DeepHealthCheckType) Values() []DeepHealthCheckType { + return []DeepHealthCheckType{ + "InstanceStress", + "InstanceConnectivity", + } +} + type DetailedAlgorithmStatus string // Enum values for DetailedAlgorithmStatus diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index e066e0efcce..33a0815a5b4 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -3245,6 +3245,10 @@ type ClusterInstanceGroupDetails struct { // Details of LifeCycle configuration for the instance group. LifeCycleConfig *ClusterLifeCycleConfig + // A flag indicating whether deep health checks should be performed when the + // cluster instance group is created or updated. + OnStartDeepHealthChecks []DeepHealthCheckType + // The number of instances you specified to add to the instance group of a // SageMaker HyperPod cluster. TargetCount *int32 @@ -3294,6 +3298,10 @@ type ClusterInstanceGroupSpecification struct { // SageMaker HyperPod cluster instance group. InstanceStorageConfigs []ClusterInstanceStorageConfig + // A flag indicating whether deep health checks should be performed when the + // cluster instance group is created or updated. + OnStartDeepHealthChecks []DeepHealthCheckType + // Specifies the value for Threads per core. For instance types that support // multithreading, you can specify 1 for disabling multithreading and 2 for // enabling multithreading. For instance types that doesn't support multithreading, @@ -3457,6 +3465,31 @@ type ClusterNodeSummary struct { noSmithyDocumentSerde } +// The type of orchestrator used for the SageMaker HyperPod cluster. +type ClusterOrchestrator struct { + + // The Amazon EKS cluster used as the orchestrator for the SageMaker HyperPod + // cluster. + // + // This member is required. + Eks *ClusterOrchestratorEksConfig + + noSmithyDocumentSerde +} + +// The configuration settings for the Amazon EKS cluster used as the orchestrator +// for the SageMaker HyperPod cluster. +type ClusterOrchestratorEksConfig struct { + + // The Amazon Resource Name (ARN) of the Amazon EKS cluster associated with the + // SageMaker HyperPod cluster. + // + // This member is required. + ClusterArn *string + + noSmithyDocumentSerde +} + // Lists a summary of the properties of a SageMaker HyperPod cluster. type ClusterSummary struct { diff --git a/service/sagemaker/validators.go b/service/sagemaker/validators.go index 6968d35776e..26ba1e87aa5 100644 --- a/service/sagemaker/validators.go +++ b/service/sagemaker/validators.go @@ -7663,6 +7663,40 @@ func validateClusterLifeCycleConfig(v *types.ClusterLifeCycleConfig) error { } } +func validateClusterOrchestrator(v *types.ClusterOrchestrator) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ClusterOrchestrator"} + if v.Eks == nil { + invalidParams.Add(smithy.NewErrParamRequired("Eks")) + } else if v.Eks != nil { + if err := validateClusterOrchestratorEksConfig(v.Eks); err != nil { + invalidParams.AddNested("Eks", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateClusterOrchestratorEksConfig(v *types.ClusterOrchestratorEksConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ClusterOrchestratorEksConfig"} + if v.ClusterArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClusterArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateCodeEditorAppSettings(v *types.CodeEditorAppSettings) error { if v == nil { return nil @@ -13181,6 +13215,11 @@ func validateOpCreateClusterInput(v *CreateClusterInput) error { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } + if v.Orchestrator != nil { + if err := validateClusterOrchestrator(v.Orchestrator); err != nil { + invalidParams.AddNested("Orchestrator", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/sagemakerruntime/api_op_InvokeEndpoint.go b/service/sagemakerruntime/api_op_InvokeEndpoint.go index 556873958b7..938bebe3c4a 100644 --- a/service/sagemakerruntime/api_op_InvokeEndpoint.go +++ b/service/sagemakerruntime/api_op_InvokeEndpoint.go @@ -112,6 +112,23 @@ type InvokeEndpointInput struct { // [Capture Data]: https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-data-capture.html InferenceId *string + // Creates a stateful session or identifies an existing one. You can do one of the + // following: + // + // - Create a stateful session by specifying the value NEW_SESSION . + // + // - Send your request to an existing stateful session by specifying the ID of + // that session. + // + // With a stateful session, you can send multiple requests to a stateful model. + // When you create a session with a stateful model, the model must create the + // session ID and set the expiration time. The model must also provide that + // information in the response to your request. You can get the ID and timestamp + // from the NewSessionId response parameter. For any subsequent request where you + // specify that session ID, SageMaker routes the request to the same instance that + // supports the session. + SessionId *string + // If the endpoint hosts multiple containers and is configured to use direct // invocation, this parameter specifies the host name of the container to invoke. TargetContainerHostname *string @@ -148,6 +165,9 @@ type InvokeEndpointOutput struct { // This member is required. Body []byte + // If you closed a stateful session with your request, the ID of that session. + ClosedSessionId *string + // The MIME type of the inference returned from the model container. ContentType *string @@ -176,6 +196,10 @@ type InvokeEndpointOutput struct { // Identifies the production variant that was invoked. InvokedProductionVariant *string + // If you created a stateful session with your request, the ID and expiration time + // that the model assigns to that session. + NewSessionId *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/sagemakerruntime/api_op_InvokeEndpointWithResponseStream.go b/service/sagemakerruntime/api_op_InvokeEndpointWithResponseStream.go index 3fe5f69f145..5005db3bb24 100644 --- a/service/sagemakerruntime/api_op_InvokeEndpointWithResponseStream.go +++ b/service/sagemakerruntime/api_op_InvokeEndpointWithResponseStream.go @@ -109,6 +109,15 @@ type InvokeEndpointWithResponseStreamInput struct { // An identifier that you assign to your request. InferenceId *string + // The ID of a stateful session to handle your request. + // + // You can't create a stateful session by using the + // InvokeEndpointWithResponseStream action. Instead, you can create one by using + // the InvokeEndpointaction. In your request, you specify NEW_SESSION for the SessionId request + // parameter. The response to that request provides the session ID for the + // NewSessionId response parameter. + SessionId *string + // If the endpoint hosts multiple containers and is configured to use direct // invocation, this parameter specifies the host name of the container to invoke. TargetContainerHostname *string diff --git a/service/sagemakerruntime/deserializers.go b/service/sagemakerruntime/deserializers.go index acbc7e7c9c6..a93c795a6a9 100644 --- a/service/sagemakerruntime/deserializers.go +++ b/service/sagemakerruntime/deserializers.go @@ -143,6 +143,11 @@ func awsRestjson1_deserializeOpHttpBindingsInvokeEndpointOutput(v *InvokeEndpoin return fmt.Errorf("unsupported deserialization for nil %T", v) } + if headerValues := response.Header.Values("X-Amzn-SageMaker-Closed-Session-Id"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ClosedSessionId = ptr.String(headerValues[0]) + } + if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) v.ContentType = ptr.String(headerValues[0]) @@ -158,6 +163,11 @@ func awsRestjson1_deserializeOpHttpBindingsInvokeEndpointOutput(v *InvokeEndpoin v.InvokedProductionVariant = ptr.String(headerValues[0]) } + if headerValues := response.Header.Values("X-Amzn-SageMaker-New-Session-Id"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.NewSessionId = ptr.String(headerValues[0]) + } + return nil } func awsRestjson1_deserializeOpDocumentInvokeEndpointOutput(v *InvokeEndpointOutput, body io.ReadCloser, contentLength int64) error { diff --git a/service/sagemakerruntime/serializers.go b/service/sagemakerruntime/serializers.go index 9f116a228a9..f78479d7800 100644 --- a/service/sagemakerruntime/serializers.go +++ b/service/sagemakerruntime/serializers.go @@ -116,6 +116,11 @@ func awsRestjson1_serializeOpHttpBindingsInvokeEndpointInput(v *InvokeEndpointIn encoder.SetHeader(locationName).String(*v.InferenceId) } + if v.SessionId != nil && len(*v.SessionId) > 0 { + locationName := "X-Amzn-Sagemaker-Session-Id" + encoder.SetHeader(locationName).String(*v.SessionId) + } + if v.TargetContainerHostname != nil && len(*v.TargetContainerHostname) > 0 { locationName := "X-Amzn-Sagemaker-Target-Container-Hostname" encoder.SetHeader(locationName).String(*v.TargetContainerHostname) @@ -333,6 +338,11 @@ func awsRestjson1_serializeOpHttpBindingsInvokeEndpointWithResponseStreamInput(v encoder.SetHeader(locationName).String(*v.InferenceId) } + if v.SessionId != nil && len(*v.SessionId) > 0 { + locationName := "X-Amzn-Sagemaker-Session-Id" + encoder.SetHeader(locationName).String(*v.SessionId) + } + if v.TargetContainerHostname != nil && len(*v.TargetContainerHostname) > 0 { locationName := "X-Amzn-Sagemaker-Target-Container-Hostname" encoder.SetHeader(locationName).String(*v.TargetContainerHostname)