diff --git a/.changelog/1bbce386058c4112916374da3e389220.json b/.changelog/1bbce386058c4112916374da3e389220.json new file mode 100644 index 00000000000..1ce5ee177a5 --- /dev/null +++ b/.changelog/1bbce386058c4112916374da3e389220.json @@ -0,0 +1,8 @@ +{ + "id": "1bbce386-058c-4112-9163-74da3e389220", + "type": "feature", + "description": "This release adds support for enabling or disabling Natural Language Query Processing feature for Amazon OpenSearch Service domains, and provides visibility into the current state of the setup or tear-down.", + "modules": [ + "service/opensearch" + ] +} \ No newline at end of file diff --git a/.changelog/72de1fbde0cb42b1bdafb7d4eb23e5ab.json b/.changelog/72de1fbde0cb42b1bdafb7d4eb23e5ab.json new file mode 100644 index 00000000000..396b92ebf65 --- /dev/null +++ b/.changelog/72de1fbde0cb42b1bdafb7d4eb23e5ab.json @@ -0,0 +1,8 @@ +{ + "id": "72de1fbd-e0cb-42b1-bdaf-b7d4eb23e5ab", + "type": "feature", + "description": "This release adds support for new ListApplicationOperations and DescribeApplicationOperation APIs. It adds a new configuration to enable system rollbacks, adds field ApplicationVersionCreateTimestamp for clarity and improves support for pagination for APIs.", + "modules": [ + "service/kinesisanalyticsv2" + ] +} \ No newline at end of file diff --git a/.changelog/7fd4b06573794ea4b06132398b4fa93a.json b/.changelog/7fd4b06573794ea4b06132398b4fa93a.json new file mode 100644 index 00000000000..c4eb5fc1fe0 --- /dev/null +++ b/.changelog/7fd4b06573794ea4b06132398b4fa93a.json @@ -0,0 +1,8 @@ +{ + "id": "7fd4b065-7379-4ea4-b061-32398b4fa93a", + "type": "feature", + "description": "Added ListLandingZoneOperations API.", + "modules": [ + "service/controltower" + ] +} \ No newline at end of file diff --git a/.changelog/84946d2903134bb280070801cff35867.json b/.changelog/84946d2903134bb280070801cff35867.json new file mode 100644 index 00000000000..b931f669ba6 --- /dev/null +++ b/.changelog/84946d2903134bb280070801cff35867.json @@ -0,0 +1,8 @@ +{ + "id": "84946d29-0313-4bb2-8007-0801cff35867", + "type": "feature", + "description": "Added support for disabling unmanaged addons during cluster creation.", + "modules": [ + "service/eks" + ] +} \ No newline at end of file diff --git a/.changelog/bf3f12cba5e648c582e9b56ca49518de.json b/.changelog/bf3f12cba5e648c582e9b56ca49518de.json new file mode 100644 index 00000000000..03b973f59ec --- /dev/null +++ b/.changelog/bf3f12cba5e648c582e9b56ca49518de.json @@ -0,0 +1,8 @@ +{ + "id": "bf3f12cb-a5e6-48c5-82e9-b56ca49518de", + "type": "feature", + "description": "IVS Real-Time now offers customers the ability to upload public keys for customer vended participant tokens.", + "modules": [ + "service/ivsrealtime" + ] +} \ 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 1cf56057307..6f5c3914aa1 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.35" +const goModuleVersion = "1.14.5" diff --git a/internal/protocoltest/awsrestjson/snapshot/api_op_ContentTypeParameters.go.snap b/internal/protocoltest/awsrestjson/snapshot/api_op_ContentTypeParameters.go.snap new file mode 100644 index 00000000000..b690c72d777 --- /dev/null +++ b/internal/protocoltest/awsrestjson/snapshot/api_op_ContentTypeParameters.go.snap @@ -0,0 +1,35 @@ +ContentTypeParameters + 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/internal/protocoltest/awsrestjson/snapshot/api_op_OperationWithDefaults.go.snap b/internal/protocoltest/awsrestjson/snapshot/api_op_OperationWithDefaults.go.snap new file mode 100644 index 00000000000..ab5f34fba32 --- /dev/null +++ b/internal/protocoltest/awsrestjson/snapshot/api_op_OperationWithDefaults.go.snap @@ -0,0 +1,35 @@ +OperationWithDefaults + 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/internal/protocoltest/awsrestjson/snapshot/api_op_OperationWithNestedStructure.go.snap b/internal/protocoltest/awsrestjson/snapshot/api_op_OperationWithNestedStructure.go.snap new file mode 100644 index 00000000000..46ae55d9b77 --- /dev/null +++ b/internal/protocoltest/awsrestjson/snapshot/api_op_OperationWithNestedStructure.go.snap @@ -0,0 +1,36 @@ +OperationWithNestedStructure + 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/internal/protocoltest/awsrestjson/snapshot/api_op_TestNoInputNoPayload.go.snap b/internal/protocoltest/awsrestjson/snapshot/api_op_TestNoInputNoPayload.go.snap new file mode 100644 index 00000000000..992c70d25d7 --- /dev/null +++ b/internal/protocoltest/awsrestjson/snapshot/api_op_TestNoInputNoPayload.go.snap @@ -0,0 +1,35 @@ +TestNoInputNoPayload + 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/internal/protocoltest/jsonrpc/snapshot/api_op_ContentTypeParameters.go.snap b/internal/protocoltest/jsonrpc/snapshot/api_op_ContentTypeParameters.go.snap new file mode 100644 index 00000000000..b690c72d777 --- /dev/null +++ b/internal/protocoltest/jsonrpc/snapshot/api_op_ContentTypeParameters.go.snap @@ -0,0 +1,35 @@ +ContentTypeParameters + 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/internal/protocoltest/jsonrpc10/snapshot/api_op_ContentTypeParameters.go.snap b/internal/protocoltest/jsonrpc10/snapshot/api_op_ContentTypeParameters.go.snap new file mode 100644 index 00000000000..b690c72d777 --- /dev/null +++ b/internal/protocoltest/jsonrpc10/snapshot/api_op_ContentTypeParameters.go.snap @@ -0,0 +1,35 @@ +ContentTypeParameters + 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/internal/protocoltest/restxml/snapshot/api_op_ContentTypeParameters.go.snap b/internal/protocoltest/restxml/snapshot/api_op_ContentTypeParameters.go.snap new file mode 100644 index 00000000000..b690c72d777 --- /dev/null +++ b/internal/protocoltest/restxml/snapshot/api_op_ContentTypeParameters.go.snap @@ -0,0 +1,35 @@ +ContentTypeParameters + 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/controltower/api_op_DisableControl.go b/service/controltower/api_op_DisableControl.go index 18eceb6a2ab..241840edfe7 100644 --- a/service/controltower/api_op_DisableControl.go +++ b/service/controltower/api_op_DisableControl.go @@ -11,11 +11,11 @@ import ( ) // This API call turns off a control. It starts an asynchronous operation that -// deletes AWS resources on the specified organizational unit and the accounts it -// contains. The resources will vary according to the control that you specify. For -// usage examples, see [the Amazon Web Services Control Tower User Guide]. +// deletes Amazon Web Services resources on the specified organizational unit and +// the accounts it contains. The resources will vary according to the control that +// you specify. For usage examples, see the [Controls Reference Guide]. // -// [the Amazon Web Services Control Tower User Guide]: https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html +// [Controls Reference Guide]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-api-examples-short.html func (c *Client) DisableControl(ctx context.Context, params *DisableControlInput, optFns ...func(*Options)) (*DisableControlOutput, error) { if params == nil { params = &DisableControlInput{} diff --git a/service/controltower/api_op_EnableControl.go b/service/controltower/api_op_EnableControl.go index d50599b8aa8..5c3908c602c 100644 --- a/service/controltower/api_op_EnableControl.go +++ b/service/controltower/api_op_EnableControl.go @@ -14,9 +14,9 @@ import ( // This API call activates a control. It starts an asynchronous operation that // creates Amazon Web Services resources on the specified organizational unit and // the accounts it contains. The resources created will vary according to the -// control that you specify. For usage examples, see [the Amazon Web Services Control Tower User Guide]. +// control that you specify. For usage examples, see the [Controls Reference Guide]. // -// [the Amazon Web Services Control Tower User Guide]: https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html +// [Controls Reference Guide]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-api-examples-short.html func (c *Client) EnableControl(ctx context.Context, params *EnableControlInput, optFns ...func(*Options)) (*EnableControlOutput, error) { if params == nil { params = &EnableControlInput{} diff --git a/service/controltower/api_op_GetControlOperation.go b/service/controltower/api_op_GetControlOperation.go index 40559f0846f..7bc53db0bb9 100644 --- a/service/controltower/api_op_GetControlOperation.go +++ b/service/controltower/api_op_GetControlOperation.go @@ -13,9 +13,9 @@ import ( // Returns the status of a particular EnableControl or DisableControl operation. // Displays a message in case of error. Details for an operation are available for -// 90 days. For usage examples, see [the Amazon Web Services Control Tower User Guide]. +// 90 days. For usage examples, see the [Controls Reference Guide]. // -// [the Amazon Web Services Control Tower User Guide]: https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html +// [Controls Reference Guide]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-api-examples-short.html func (c *Client) GetControlOperation(ctx context.Context, params *GetControlOperationInput, optFns ...func(*Options)) (*GetControlOperationOutput, error) { if params == nil { params = &GetControlOperationInput{} diff --git a/service/controltower/api_op_GetEnabledControl.go b/service/controltower/api_op_GetEnabledControl.go index 5b555c5c073..6d2da2c8e13 100644 --- a/service/controltower/api_op_GetEnabledControl.go +++ b/service/controltower/api_op_GetEnabledControl.go @@ -11,9 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves details about an enabled control. For usage examples, see [the Amazon Web Services Control Tower User Guide]. +// Retrieves details about an enabled control. For usage examples, see the [Controls Reference Guide]. // -// [the Amazon Web Services Control Tower User Guide]: https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html +// [Controls Reference Guide]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-api-examples-short.html func (c *Client) GetEnabledControl(ctx context.Context, params *GetEnabledControlInput, optFns ...func(*Options)) (*GetEnabledControlOutput, error) { if params == nil { params = &GetEnabledControlInput{} diff --git a/service/controltower/api_op_ListControlOperations.go b/service/controltower/api_op_ListControlOperations.go index 29bbad42890..5d9362fb1fa 100644 --- a/service/controltower/api_op_ListControlOperations.go +++ b/service/controltower/api_op_ListControlOperations.go @@ -11,7 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Provides a list of operations in progress or queued. +// Provides a list of operations in progress or queued. For usage examples, see [ListControlOperation examples]. +// +// [ListControlOperation examples]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-api-examples-short.html#list-control-operations-api-examples func (c *Client) ListControlOperations(ctx context.Context, params *ListControlOperationsInput, optFns ...func(*Options)) (*ListControlOperationsOutput, error) { if params == nil { params = &ListControlOperationsInput{} @@ -44,7 +46,7 @@ type ListControlOperationsInput struct { type ListControlOperationsOutput struct { - // Returns a list of output from control operations. PLACEHOLDER + // Returns a list of output from control operations. // // This member is required. ControlOperations []types.ControlOperationSummary diff --git a/service/controltower/api_op_ListEnabledControls.go b/service/controltower/api_op_ListEnabledControls.go index 01cbb47b62b..f129133986d 100644 --- a/service/controltower/api_op_ListEnabledControls.go +++ b/service/controltower/api_op_ListEnabledControls.go @@ -13,9 +13,9 @@ import ( // Lists the controls enabled by Amazon Web Services Control Tower on the // specified organizational unit and the accounts it contains. For usage examples, -// see [the Amazon Web Services Control Tower User Guide]. +// see the [Controls Reference Guide]. // -// [the Amazon Web Services Control Tower User Guide]: https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html +// [Controls Reference Guide]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-api-examples-short.html func (c *Client) ListEnabledControls(ctx context.Context, params *ListEnabledControlsInput, optFns ...func(*Options)) (*ListEnabledControlsOutput, error) { if params == nil { params = &ListEnabledControlsInput{} @@ -33,7 +33,7 @@ func (c *Client) ListEnabledControls(ctx context.Context, params *ListEnabledCon type ListEnabledControlsInput struct { - // An input filter for the ListCEnabledControls API that lets you select the types + // An input filter for the ListEnabledControls API that lets you select the types // of control operations to view. Filter *types.EnabledControlFilter diff --git a/service/controltower/api_op_ListLandingZoneOperations.go b/service/controltower/api_op_ListLandingZoneOperations.go new file mode 100644 index 00000000000..165b0216c03 --- /dev/null +++ b/service/controltower/api_op_ListLandingZoneOperations.go @@ -0,0 +1,247 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package controltower + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/controltower/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all landing zone operations from the past 90 days. Results are sorted by +// time, with the most recent operation first. +func (c *Client) ListLandingZoneOperations(ctx context.Context, params *ListLandingZoneOperationsInput, optFns ...func(*Options)) (*ListLandingZoneOperationsOutput, error) { + if params == nil { + params = &ListLandingZoneOperationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListLandingZoneOperations", params, optFns, c.addOperationListLandingZoneOperationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListLandingZoneOperationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListLandingZoneOperationsInput struct { + + // An input filter for the ListLandingZoneOperations API that lets you select the + // types of landing zone operations to view. + Filter *types.LandingZoneOperationFilter + + // How many results to return per API call. + MaxResults *int32 + + // The token to continue the list from a previous API call with the same + // parameters. + NextToken *string + + noSmithyDocumentSerde +} + +type ListLandingZoneOperationsOutput struct { + + // Lists landing zone operations. + // + // This member is required. + LandingZoneOperations []types.LandingZoneOperationSummary + + // Retrieves the next page of results. If the string is empty, the response is the + // end of the results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListLandingZoneOperationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListLandingZoneOperations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListLandingZoneOperations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListLandingZoneOperations"); 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_opListLandingZoneOperations(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 +} + +// ListLandingZoneOperationsPaginatorOptions is the paginator options for +// ListLandingZoneOperations +type ListLandingZoneOperationsPaginatorOptions struct { + // How many results to return per API call. + 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 +} + +// ListLandingZoneOperationsPaginator is a paginator for ListLandingZoneOperations +type ListLandingZoneOperationsPaginator struct { + options ListLandingZoneOperationsPaginatorOptions + client ListLandingZoneOperationsAPIClient + params *ListLandingZoneOperationsInput + nextToken *string + firstPage bool +} + +// NewListLandingZoneOperationsPaginator returns a new +// ListLandingZoneOperationsPaginator +func NewListLandingZoneOperationsPaginator(client ListLandingZoneOperationsAPIClient, params *ListLandingZoneOperationsInput, optFns ...func(*ListLandingZoneOperationsPaginatorOptions)) *ListLandingZoneOperationsPaginator { + if params == nil { + params = &ListLandingZoneOperationsInput{} + } + + options := ListLandingZoneOperationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListLandingZoneOperationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListLandingZoneOperationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListLandingZoneOperations page. +func (p *ListLandingZoneOperationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLandingZoneOperationsOutput, 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.ListLandingZoneOperations(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 +} + +// ListLandingZoneOperationsAPIClient is a client that implements the +// ListLandingZoneOperations operation. +type ListLandingZoneOperationsAPIClient interface { + ListLandingZoneOperations(context.Context, *ListLandingZoneOperationsInput, ...func(*Options)) (*ListLandingZoneOperationsOutput, error) +} + +var _ ListLandingZoneOperationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListLandingZoneOperations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListLandingZoneOperations", + } +} diff --git a/service/controltower/api_op_ListTagsForResource.go b/service/controltower/api_op_ListTagsForResource.go index 09aa478c45a..d55663efce1 100644 --- a/service/controltower/api_op_ListTagsForResource.go +++ b/service/controltower/api_op_ListTagsForResource.go @@ -10,9 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of tags associated with the resource. For usage examples, see [the Amazon Web Services Control Tower User Guide]. +// Returns a list of tags associated with the resource. For usage examples, see +// the [Controls Reference Guide]. // -// [the Amazon Web Services Control Tower User Guide]: https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html +// [Controls Reference Guide]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-api-examples-short.html func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} diff --git a/service/controltower/api_op_ResetLandingZone.go b/service/controltower/api_op_ResetLandingZone.go index 6d44ec02b1c..c82eb6ac91b 100644 --- a/service/controltower/api_op_ResetLandingZone.go +++ b/service/controltower/api_op_ResetLandingZone.go @@ -11,8 +11,11 @@ import ( ) // This API call resets a landing zone. It starts an asynchronous operation that -// resets the landing zone to the parameters specified in its original -// configuration. +// resets the landing zone to the parameters specified in the original +// configuration, which you specified in the manifest file. Nothing in the manifest +// file's original landing zone configuration is changed during the reset process, +// by default. This API is not the same as a rollback of a landing zone version, +// which is not a supported operation. func (c *Client) ResetLandingZone(ctx context.Context, params *ResetLandingZoneInput, optFns ...func(*Options)) (*ResetLandingZoneOutput, error) { if params == nil { params = &ResetLandingZoneInput{} diff --git a/service/controltower/api_op_TagResource.go b/service/controltower/api_op_TagResource.go index 0f1f88b19d5..28350dd3652 100644 --- a/service/controltower/api_op_TagResource.go +++ b/service/controltower/api_op_TagResource.go @@ -10,9 +10,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Applies tags to a resource. For usage examples, see [the Amazon Web Services Control Tower User Guide]. +// Applies tags to a resource. For usage examples, see the [Controls Reference Guide]. // -// [the Amazon Web Services Control Tower User Guide]: https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html +// [Controls Reference Guide]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-api-examples-short.html func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} diff --git a/service/controltower/api_op_UntagResource.go b/service/controltower/api_op_UntagResource.go index 09939a7845b..035c4f8fa48 100644 --- a/service/controltower/api_op_UntagResource.go +++ b/service/controltower/api_op_UntagResource.go @@ -10,9 +10,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes tags from a resource. For usage examples, see [the Amazon Web Services Control Tower User Guide]. +// Removes tags from a resource. For usage examples, see the [Controls Reference Guide]. // -// [the Amazon Web Services Control Tower User Guide]: https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html +// [Controls Reference Guide]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-api-examples-short.html func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} diff --git a/service/controltower/api_op_UpdateEnabledControl.go b/service/controltower/api_op_UpdateEnabledControl.go index 4db43f02bf3..10175f8ecd0 100644 --- a/service/controltower/api_op_UpdateEnabledControl.go +++ b/service/controltower/api_op_UpdateEnabledControl.go @@ -18,15 +18,14 @@ import ( // Otherwise, Amazon Web Services Control Tower will not accept the request. // // If the enabled control shows an EnablementStatus of FAILED, Amazon Web Services -// Control Tower will update the control to match any valid parameters that you -// supply. +// Control Tower updates the control to match any valid parameters that you supply. // // If the DriftSummary status for the control shows as DRIFTED, you cannot call // this API. Instead, you can update the control by calling DisableControl and // again calling EnableControl , or you can run an extending governance operation. -// For usage examples, see [the Amazon Web Services Control Tower User Guide] +// For usage examples, see the [Controls Reference Guide]. // -// [the Amazon Web Services Control Tower User Guide]: https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html +// [Controls Reference Guide]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-api-examples-short.html func (c *Client) UpdateEnabledControl(ctx context.Context, params *UpdateEnabledControlInput, optFns ...func(*Options)) (*UpdateEnabledControlOutput, error) { if params == nil { params = &UpdateEnabledControlInput{} diff --git a/service/controltower/api_op_UpdateLandingZone.go b/service/controltower/api_op_UpdateLandingZone.go index bd375510bb2..7f15a445cef 100644 --- a/service/controltower/api_op_UpdateLandingZone.go +++ b/service/controltower/api_op_UpdateLandingZone.go @@ -36,8 +36,10 @@ type UpdateLandingZoneInput struct { // This member is required. LandingZoneIdentifier *string - // The manifest JSON file is a text file that describes your Amazon Web Services - // resources. For examples, review [Launch your landing zone]. + // The manifest file (JSON) is a text file that describes your Amazon Web Services + // resources. For an example, review [Launch your landing zone]. The example manifest file contains each of + // the available parameters. The schema for the landing zone's JSON manifest file + // is not published, by design. // // [Launch your landing zone]: https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch // diff --git a/service/controltower/deserializers.go b/service/controltower/deserializers.go index 105cafb3072..665fa25388d 100644 --- a/service/controltower/deserializers.go +++ b/service/controltower/deserializers.go @@ -2861,6 +2861,171 @@ func awsRestjson1_deserializeOpDocumentListEnabledControlsOutput(v **ListEnabled return nil } +type awsRestjson1_deserializeOpListLandingZoneOperations struct { +} + +func (*awsRestjson1_deserializeOpListLandingZoneOperations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListLandingZoneOperations) 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_deserializeOpErrorListLandingZoneOperations(response, &metadata) + } + output := &ListLandingZoneOperationsOutput{} + 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_deserializeOpDocumentListLandingZoneOperationsOutput(&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_deserializeOpErrorListLandingZoneOperations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListLandingZoneOperationsOutput(v **ListLandingZoneOperationsOutput, 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 *ListLandingZoneOperationsOutput + if *v == nil { + sv = &ListLandingZoneOperationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "landingZoneOperations": + if err := awsRestjson1_deserializeDocumentLandingZoneOperations(&sv.LandingZoneOperations, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListLandingZones struct { } @@ -5817,6 +5982,15 @@ func awsRestjson1_deserializeDocumentLandingZoneOperationDetail(v **types.Landin sv.EndTime = ptr.Time(t) } + case "operationIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationIdentifier to be of type string, got %T instead", value) + } + sv.OperationIdentifier = ptr.String(jtv) + } + case "operationType": if value != nil { jtv, ok := value.(string) @@ -5866,6 +6040,98 @@ func awsRestjson1_deserializeDocumentLandingZoneOperationDetail(v **types.Landin return nil } +func awsRestjson1_deserializeDocumentLandingZoneOperations(v *[]types.LandingZoneOperationSummary, 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.LandingZoneOperationSummary + if *v == nil { + cv = []types.LandingZoneOperationSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LandingZoneOperationSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentLandingZoneOperationSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLandingZoneOperationSummary(v **types.LandingZoneOperationSummary, 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.LandingZoneOperationSummary + if *v == nil { + sv = &types.LandingZoneOperationSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "operationIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationIdentifier to be of type string, got %T instead", value) + } + sv.OperationIdentifier = ptr.String(jtv) + } + + case "operationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LandingZoneOperationType to be of type string, got %T instead", value) + } + sv.OperationType = types.LandingZoneOperationType(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LandingZoneOperationStatus to be of type string, got %T instead", value) + } + sv.Status = types.LandingZoneOperationStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentLandingZoneSummaries(v *[]types.LandingZoneSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/controltower/doc.go b/service/controltower/doc.go index 61c79354370..95edf97ad39 100644 --- a/service/controltower/doc.go +++ b/service/controltower/doc.go @@ -7,11 +7,63 @@ // (API) operations that support programmatic interaction with these types of // resources: // -// [controls] +// [Controls] // -// [landing zones] +// [DisableControl] // -// [baselines] +// [EnableControl] +// +// [GetEnabledControl] +// +// [ListControlOperations] +// +// [ListEnabledControls] +// +// [UpdateEnabledControl] +// +// [Landing zones] +// +// [CreateLandingZone] +// +// [DeleteLandingZone] +// +// [GetLandingZone] +// +// [GetLandingZoneOperation] +// +// [ListLandingZones] +// +// [ResetLandingZone] +// +// [UpdateLandingZone] +// +// [Baselines] +// +// [DisableBaseline] +// +// [EnableBaseline] +// +// [GetBaseline] +// +// [GetBaselineOperation] +// +// [GetEnabledBaseline] +// +// [ListBaselines] +// +// [ListEnabledBaselines] +// +// [ResetEnabledBaseline] +// +// [UpdateEnabledBaseline] +// +// [Tagging] +// +// [ListTagsForResource] +// +// [TagResource] +// +// [UntagResource] // // For more information about these types of resources, see the [Amazon Web Services Control Tower User Guide]. // @@ -39,12 +91,11 @@ // // The controlIdentifier is unique in each Amazon Web Services Region for each // control. You can find the controlIdentifier for each Region and control in the [Tables of control metadata] -// or the [Control availability by Region tables]in the Amazon Web Services Control Tower User Guide. +// or the [Control availability by Region tables]in the Amazon Web Services Control Tower Controls Reference Guide. // // A quick-reference list of control identifers for the Amazon Web Services // Control Tower legacy Strongly recommended and Elective controls is given in [Resource identifiers for APIs and controls]in -// the [Controls reference guide section]of the Amazon Web Services Control Tower User Guide. Remember that -// Mandatory controls cannot be added or removed. +// the [Amazon Web Services Control Tower Controls Reference Guide]. Remember that Mandatory controls cannot be added or removed. // // ARN format: arn:aws:controltower:{REGION}::control/{CONTROL_NAME} // @@ -121,28 +172,54 @@ // more about CloudTrail, including how to turn it on and find your log files, see // the Amazon Web Services CloudTrail User Guide. // -// [Controls reference guide section]: https://docs.aws.amazon.com/controltower/latest/userguide/control-identifiers.html -// [Creating Amazon Web Services Control Tower resources with Amazon Web Services CloudFormation]: https://docs.aws.amazon.com/controltower/latest/userguide/creating-resources-with-cloudformation.html -// [controls]: https://docs.aws.amazon.com/controltower/latest/userguide/controls.html -// [baselines]: https://docs.aws.amazon.com/controltower/latest/userguide/types-of-baselines.html -// [API reference manual]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_Operations.html -// [Tables of control metadata]: https://docs.aws.amazon.com/controltower/latest/userguide/control-metadata-tables.html -// [Amazon Web Services Control Tower supports APIs for OU registration and configuration with baselines]: https://docs.aws.amazon.com/controltower/latest/userguide/2024-all.html#baseline-apis // [Getting started with Amazon Web Services Control Tower using APIs]: https://docs.aws.amazon.com/controltower/latest/userguide/getting-started-apis.html -// [Resource identifiers for APIs and controls]: https://docs.aws.amazon.com/controltower/latest/userguide/control-identifiers.html.html -// [Baseline API input and output examples with CLI]: https://docs.aws.amazon.com/controltower/latest/userguide/baseline-api-examples.html -// [Control availability by Region tables (large page)]: https://docs.aws.amazon.com/controltower/latest/userguide/control-region-tables.html -// [Control API input and output examples with CLI]: https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html -// [Controls reference guide]: https://docs.aws.amazon.com/controltower/latest/userguide/controls.html // [Launch a landing zone with CloudFormation]: https://docs.aws.amazon.com/controltower/latest/userguide/lz-apis-cfn-setup.html -// [Amazon Web Services Control Tower supports landing zone APIs]: https://docs.aws.amazon.com/controltower/latest/userguide/2023-all.html#landing-zone-apis -// [Control availability by Region tables]: https://docs.aws.amazon.com/controltower/latest/userguide/control-region-tables.html -// [Control metadata tables (large page)]: https://docs.aws.amazon.com/controltower/latest/userguide/control-metadata-tables.html -// [Controls library groupings]: https://docs.aws.amazon.com/controltower/latest/userguide/controls-reference.html -// [List of identifiers for legacy controls]: https://docs.aws.amazon.com/controltower/latest/userguide/control-identifiers.html +// [GetLandingZone]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_GetLandingZone.html +// [DisableBaseline]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_DisableBaseline.html // [aws-cloudformation/aws-cloudformation-resource-providers-controltower]: https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-controltower +// [ListBaselines]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_ListBaselines.html +// [ListEnabledBaselines]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_ListEnabledBaselines.html +// [ResetLandingZone]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_ResetLandingZone.html +// [Amazon Web Services Control Tower Controls Reference Guide]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-identifiers.html +// [GetLandingZoneOperation]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_GetLandingZoneOperation.html +// [GetBaseline]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_GetBaseline.html +// [Control API input and output examples with CLI]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-api-examples-short.html +// [DisableControl]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_DisableControl.html +// [EnableControl]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_EnableControl.html +// [Amazon Web Services Control Tower supports landing zone APIs]: https://docs.aws.amazon.com/controltower/latest/userguide/2023-all.html#landing-zone-apis +// [CreateLandingZone]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_CreateLandingZone.html +// [Control availability by Region tables]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-region-tables.html +// [Control metadata tables (large page)]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-metadata-tables.html +// [Controls library groupings]: https://docs.aws.amazon.com/controltower/latest/controlreference/controls-reference.html +// [ResetEnabledBaseline]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_ResetEnabledBaseline.html +// [GetEnabledBaseline]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_GetEnabledBaseline.html +// [UntagResource]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_UntagResource.html // [Amazon Web Services Control Tower User Guide]: https://docs.aws.amazon.com/controltower/latest/userguide/what-is-control-tower.html -// [landing zones]: https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch.html -// [Enable controls with CloudFormation]: https://docs.aws.amazon.com/controltower/latest/userguide/enable-controls.html +// [Enable controls with CloudFormation]: https://docs.aws.amazon.com/controltower/latest/controlreference/enable-controls.html +// [EnableBaseline]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_EnableBaseline.html // [Logging Amazon Web Services Control Tower Actions with Amazon Web Services CloudTrail]: https://docs.aws.amazon.com/controltower/latest/userguide/logging-using-cloudtrail.html +// [UpdateEnabledControl]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_UpdateEnabledControl.html +// [ListTagsForResource]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_ListTagsForResource.html +// [UpdateLandingZone]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_UpdateLandingZone.html +// [Creating Amazon Web Services Control Tower resources with Amazon Web Services CloudFormation]: https://docs.aws.amazon.com/controltower/latest/userguide/creating-resources-with-cloudformation.html +// [TagResource]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_TagResource.html +// [Amazon Web Services Control Tower supports APIs for OU registration and configuration with baselines]: https://docs.aws.amazon.com/controltower/latest/userguide/2024-all.html#baseline-apis +// [Resource identifiers for APIs and controls]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-identifiers.html.html +// [Baseline API input and output examples with CLI]: https://docs.aws.amazon.com/controltower/latest/userguide/baseline-api-examples.html +// [GetBaselineOperation]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_GetBaselineOperation.html +// [Controls reference guide]: https://docs.aws.amazon.com/controltower/latest/controlreference/controls.html +// [Baselines]: https://docs.aws.amazon.com/controltower/latest/userguide/types-of-baselines.html +// [ListEnabledControls]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_ListEnabledControls.html +// [GetEnabledControl]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_GetEnabledControl.html +// [List of identifiers for legacy controls]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-identifiers.html +// [Controls]: https://docs.aws.amazon.com/controltower/latest/userguide/controls.html +// [DeleteLandingZone]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_DeleteLandingZone.html +// [ListControlOperations]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_ListControlOperations.html +// [API reference manual]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_Operations.html +// [Tables of control metadata]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-metadata-tables.html +// [Control availability by Region tables (large page)]: https://docs.aws.amazon.com/controltower/latest/controlreference/control-region-tables.html +// [Tagging]: https://docs.aws.amazon.com/controltower/latest/controlreference/tagging.html +// [Landing zones]: https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch.html +// [ListLandingZones]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_ListLandingZones.html +// [UpdateEnabledBaseline]: https://docs.aws.amazon.com/controltower/latest/APIReference/API_UpdateEnabledBaseline.html package controltower diff --git a/service/controltower/generated.json b/service/controltower/generated.json index 749770099c6..97470e2319a 100644 --- a/service/controltower/generated.json +++ b/service/controltower/generated.json @@ -25,6 +25,7 @@ "api_op_ListControlOperations.go", "api_op_ListEnabledBaselines.go", "api_op_ListEnabledControls.go", + "api_op_ListLandingZoneOperations.go", "api_op_ListLandingZones.go", "api_op_ListTagsForResource.go", "api_op_ResetEnabledBaseline.go", diff --git a/service/controltower/serializers.go b/service/controltower/serializers.go index a27b45e916c..c68b37959b7 100644 --- a/service/controltower/serializers.go +++ b/service/controltower/serializers.go @@ -1399,6 +1399,93 @@ func awsRestjson1_serializeOpDocumentListEnabledControlsInput(v *ListEnabledCont return nil } +type awsRestjson1_serializeOpListLandingZoneOperations struct { +} + +func (*awsRestjson1_serializeOpListLandingZoneOperations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListLandingZoneOperations) 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.(*ListLandingZoneOperationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/list-landingzone-operations") + 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_serializeOpDocumentListLandingZoneOperationsInput(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_serializeOpHttpBindingsListLandingZoneOperationsInput(v *ListLandingZoneOperationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListLandingZoneOperationsInput(v *ListLandingZoneOperationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filter != nil { + ok := object.Key("filter") + if err := awsRestjson1_serializeDocumentLandingZoneOperationFilter(v.Filter, ok); err != nil { + return err + } + } + + 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_serializeOpListLandingZones struct { } @@ -2369,6 +2456,49 @@ func awsRestjson1_serializeDocumentEnablementStatuses(v []types.EnablementStatus return nil } +func awsRestjson1_serializeDocumentLandingZoneOperationFilter(v *types.LandingZoneOperationFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Statuses != nil { + ok := object.Key("statuses") + if err := awsRestjson1_serializeDocumentLandingZoneOperationStatuses(v.Statuses, ok); err != nil { + return err + } + } + + if v.Types != nil { + ok := object.Key("types") + if err := awsRestjson1_serializeDocumentLandingZoneOperationTypes(v.Types, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentLandingZoneOperationStatuses(v []types.LandingZoneOperationStatus, 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 awsRestjson1_serializeDocumentLandingZoneOperationTypes(v []types.LandingZoneOperationType, 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 awsRestjson1_serializeDocumentManifest(v document.Interface, value smithyjson.Value) error { if v == nil { return nil diff --git a/service/controltower/snapshot/api_op_ListLandingZoneOperations.go.snap b/service/controltower/snapshot/api_op_ListLandingZoneOperations.go.snap new file mode 100644 index 00000000000..87a54d8d3e5 --- /dev/null +++ b/service/controltower/snapshot/api_op_ListLandingZoneOperations.go.snap @@ -0,0 +1,35 @@ +ListLandingZoneOperations + 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/controltower/snapshot_test.go b/service/controltower/snapshot_test.go index 8285cc3f0b1..f79366b00ee 100644 --- a/service/controltower/snapshot_test.go +++ b/service/controltower/snapshot_test.go @@ -266,6 +266,18 @@ func TestCheckSnapshot_ListEnabledControls(t *testing.T) { } } +func TestCheckSnapshot_ListLandingZoneOperations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListLandingZoneOperations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListLandingZoneOperations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListLandingZones(t *testing.T) { svc := New(Options{}) _, err := svc.ListLandingZones(context.Background(), nil, func(o *Options) { @@ -577,6 +589,18 @@ func TestUpdateSnapshot_ListEnabledControls(t *testing.T) { } } +func TestUpdateSnapshot_ListLandingZoneOperations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListLandingZoneOperations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListLandingZoneOperations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListLandingZones(t *testing.T) { svc := New(Options{}) _, err := svc.ListLandingZones(context.Background(), nil, func(o *Options) { diff --git a/service/controltower/types/types.go b/service/controltower/types/types.go index 3f9f3832ab0..350f4650647 100644 --- a/service/controltower/types/types.go +++ b/service/controltower/types/types.go @@ -89,7 +89,7 @@ type ControlOperation struct { noSmithyDocumentSerde } -// A filter object that lets you call ListCOntrolOperations with a specific filter. +// A filter object that lets you call ListControlOperations with a specific filter. type ControlOperationFilter struct { // The set of controlIdentifier returned by the filter. @@ -184,7 +184,7 @@ type EnabledBaselineDetails struct { // This member is required. BaselineIdentifier *string - // The deployment summary of the enabled control. + // The deployment summary of an EnabledControl or EnabledBaseline resource. // // This member is required. StatusSummary *EnablementStatusSummary @@ -262,7 +262,7 @@ type EnabledBaselineSummary struct { // This member is required. BaselineIdentifier *string - // The deployment summary of the enabled control. + // The deployment summary of an EnabledControl or EnabledBaseline resource. // // This member is required. StatusSummary *EnablementStatusSummary @@ -380,21 +380,24 @@ type EnabledControlSummary struct { noSmithyDocumentSerde } -// The deployment summary of the enabled control. +// The deployment summary of an EnabledControl or EnabledBaseline resource. type EnablementStatusSummary struct { - // The last operation identifier for the enabled control. + // The last operation identifier for the enabled resource. LastOperationIdentifier *string - // The deployment status of the enabled control. + // The deployment status of the enabled resource. // // Valid values: // - // - SUCCEEDED : The enabledControl configuration was deployed successfully. + // - SUCCEEDED : The EnabledControl or EnabledBaseline configuration was deployed + // successfully. // - // - UNDER_CHANGE : The enabledControl configuration is changing. + // - UNDER_CHANGE : The EnabledControl or EnabledBaseline configuration is + // changing. // - // - FAILED : The enabledControl configuration failed to deploy. + // - FAILED : The EnabledControl or EnabledBaseline configuration failed to + // deploy. Status EnablementStatus noSmithyDocumentSerde @@ -455,6 +458,9 @@ type LandingZoneOperationDetail struct { // The landing zone operation end time. EndTime *time.Time + // The operationIdentifier of the landing zone operation. + OperationIdentifier *string + // The landing zone operation type. // // Valid values: @@ -487,6 +493,34 @@ type LandingZoneOperationDetail struct { noSmithyDocumentSerde } +// A filter object that lets you call ListLandingZoneOperations with a specific +// filter. +type LandingZoneOperationFilter struct { + + // The statuses of the set of landing zone operations selected by the filter. + Statuses []LandingZoneOperationStatus + + // The set of landing zone operation types selected by the filter. + Types []LandingZoneOperationType + + noSmithyDocumentSerde +} + +// Returns a summary of information about a landing zone operation. +type LandingZoneOperationSummary struct { + + // The operationIdentifier of the landing zone operation. + OperationIdentifier *string + + // The type of the landing zone operation. + OperationType LandingZoneOperationType + + // The status of the landing zone operation. + Status LandingZoneOperationStatus + + noSmithyDocumentSerde +} + // Returns a summary of information about a landing zone. type LandingZoneSummary struct { diff --git a/service/eks/api_op_CreateCluster.go b/service/eks/api_op_CreateCluster.go index 825e1deaf8d..496ccbea478 100644 --- a/service/eks/api_op_CreateCluster.go +++ b/service/eks/api_op_CreateCluster.go @@ -98,6 +98,15 @@ type CreateClusterInput struct { // The access configuration for the cluster. AccessConfig *types.CreateAccessConfigRequest + // If you set this value to False when creating a cluster, the default networking + // add-ons will not be installed. + // + // The default networking addons include vpc-cni, coredns, and kube-proxy. + // + // Use this option when you plan to install third-party alternative add-ons or + // self-manage the default networking add-ons. + BootstrapSelfManagedAddons *bool + // A unique, case-sensitive identifier that you provide to ensure the idempotency // of the request. ClientRequestToken *string diff --git a/service/eks/serializers.go b/service/eks/serializers.go index e6f73861781..5185a0330da 100644 --- a/service/eks/serializers.go +++ b/service/eks/serializers.go @@ -633,6 +633,11 @@ func awsRestjson1_serializeOpDocumentCreateClusterInput(v *CreateClusterInput, v } } + if v.BootstrapSelfManagedAddons != nil { + ok := object.Key("bootstrapSelfManagedAddons") + ok.Boolean(*v.BootstrapSelfManagedAddons) + } + if v.ClientRequestToken != nil { ok := object.Key("clientRequestToken") ok.String(*v.ClientRequestToken) diff --git a/service/ivsrealtime/api_op_CreateStage.go b/service/ivsrealtime/api_op_CreateStage.go index f42b5795d2c..ce7ecdb885e 100644 --- a/service/ivsrealtime/api_op_CreateStage.go +++ b/service/ivsrealtime/api_op_CreateStage.go @@ -29,7 +29,8 @@ func (c *Client) CreateStage(ctx context.Context, params *CreateStageInput, optF type CreateStageInput struct { - // Auto participant recording configuration object attached to the stage. + // Configuration object for individual participant recording, to attach to the new + // stage. AutoParticipantRecordingConfiguration *types.AutoParticipantRecordingConfiguration // Optional name that can be specified for the stage being created. diff --git a/service/ivsrealtime/api_op_DeletePublicKey.go b/service/ivsrealtime/api_op_DeletePublicKey.go new file mode 100644 index 00000000000..b0287b7661b --- /dev/null +++ b/service/ivsrealtime/api_op_DeletePublicKey.go @@ -0,0 +1,139 @@ +// 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 the specified public key used to sign stage participant tokens. This +// invalidates future participant tokens generated using the key pair’s private +// key. +func (c *Client) DeletePublicKey(ctx context.Context, params *DeletePublicKeyInput, optFns ...func(*Options)) (*DeletePublicKeyOutput, error) { + if params == nil { + params = &DeletePublicKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeletePublicKey", params, optFns, c.addOperationDeletePublicKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeletePublicKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeletePublicKeyInput struct { + + // ARN of the public key to be deleted. + // + // This member is required. + Arn *string + + noSmithyDocumentSerde +} + +type DeletePublicKeyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeletePublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeletePublicKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeletePublicKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePublicKey"); 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 = addOpDeletePublicKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePublicKey(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_opDeletePublicKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeletePublicKey", + } +} diff --git a/service/ivsrealtime/api_op_GetPublicKey.go b/service/ivsrealtime/api_op_GetPublicKey.go new file mode 100644 index 00000000000..d49d87ada29 --- /dev/null +++ b/service/ivsrealtime/api_op_GetPublicKey.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 for the specified public key. +func (c *Client) GetPublicKey(ctx context.Context, params *GetPublicKeyInput, optFns ...func(*Options)) (*GetPublicKeyOutput, error) { + if params == nil { + params = &GetPublicKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPublicKey", params, optFns, c.addOperationGetPublicKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPublicKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPublicKeyInput struct { + + // ARN of the public key for which the information is to be retrieved. + // + // This member is required. + Arn *string + + noSmithyDocumentSerde +} + +type GetPublicKeyOutput struct { + + // The public key that is returned. + PublicKey *types.PublicKey + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetPublicKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetPublicKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPublicKey"); 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 = addOpGetPublicKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPublicKey(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_opGetPublicKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPublicKey", + } +} diff --git a/service/ivsrealtime/api_op_ImportPublicKey.go b/service/ivsrealtime/api_op_ImportPublicKey.go new file mode 100644 index 00000000000..fa7b36a7ad4 --- /dev/null +++ b/service/ivsrealtime/api_op_ImportPublicKey.go @@ -0,0 +1,153 @@ +// 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" +) + +// Import a public key to be used for signing stage participant tokens. +func (c *Client) ImportPublicKey(ctx context.Context, params *ImportPublicKeyInput, optFns ...func(*Options)) (*ImportPublicKeyOutput, error) { + if params == nil { + params = &ImportPublicKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ImportPublicKey", params, optFns, c.addOperationImportPublicKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ImportPublicKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ImportPublicKeyInput struct { + + // The content of the public key to be imported. + // + // This member is required. + PublicKeyMaterial *string + + // Name of the public key to be imported. + 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. + // + // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + Tags map[string]string + + noSmithyDocumentSerde +} + +type ImportPublicKeyOutput struct { + + // The public key that was imported. + PublicKey *types.PublicKey + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationImportPublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpImportPublicKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpImportPublicKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ImportPublicKey"); 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 = addOpImportPublicKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportPublicKey(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_opImportPublicKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ImportPublicKey", + } +} diff --git a/service/ivsrealtime/api_op_ListPublicKeys.go b/service/ivsrealtime/api_op_ListPublicKeys.go new file mode 100644 index 00000000000..abe5b4504db --- /dev/null +++ b/service/ivsrealtime/api_op_ListPublicKeys.go @@ -0,0 +1,241 @@ +// 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 summary information about all public keys in your account, in the AWS +// region where the API request is processed. +func (c *Client) ListPublicKeys(ctx context.Context, params *ListPublicKeysInput, optFns ...func(*Options)) (*ListPublicKeysOutput, error) { + if params == nil { + params = &ListPublicKeysInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListPublicKeys", params, optFns, c.addOperationListPublicKeysMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListPublicKeysOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListPublicKeysInput struct { + + // Maximum number of results to return. Default: 50. + MaxResults *int32 + + // The first public key to retrieve. This is used for pagination; see the nextToken + // response field. + NextToken *string + + noSmithyDocumentSerde +} + +type ListPublicKeysOutput struct { + + // List of the matching public keys (summary information only). + // + // This member is required. + PublicKeys []types.PublicKeySummary + + // If there are more public keys 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) addOperationListPublicKeysMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListPublicKeys{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListPublicKeys{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListPublicKeys"); 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_opListPublicKeys(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 +} + +// ListPublicKeysPaginatorOptions is the paginator options for ListPublicKeys +type ListPublicKeysPaginatorOptions 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 +} + +// ListPublicKeysPaginator is a paginator for ListPublicKeys +type ListPublicKeysPaginator struct { + options ListPublicKeysPaginatorOptions + client ListPublicKeysAPIClient + params *ListPublicKeysInput + nextToken *string + firstPage bool +} + +// NewListPublicKeysPaginator returns a new ListPublicKeysPaginator +func NewListPublicKeysPaginator(client ListPublicKeysAPIClient, params *ListPublicKeysInput, optFns ...func(*ListPublicKeysPaginatorOptions)) *ListPublicKeysPaginator { + if params == nil { + params = &ListPublicKeysInput{} + } + + options := ListPublicKeysPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListPublicKeysPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListPublicKeysPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListPublicKeys page. +func (p *ListPublicKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPublicKeysOutput, 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.ListPublicKeys(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 +} + +// ListPublicKeysAPIClient is a client that implements the ListPublicKeys +// operation. +type ListPublicKeysAPIClient interface { + ListPublicKeys(context.Context, *ListPublicKeysInput, ...func(*Options)) (*ListPublicKeysOutput, error) +} + +var _ ListPublicKeysAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListPublicKeys(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListPublicKeys", + } +} diff --git a/service/ivsrealtime/api_op_UpdateStage.go b/service/ivsrealtime/api_op_UpdateStage.go index 6d55be0cadd..89a6eb80cce 100644 --- a/service/ivsrealtime/api_op_UpdateStage.go +++ b/service/ivsrealtime/api_op_UpdateStage.go @@ -34,9 +34,8 @@ type UpdateStageInput struct { // This member is required. Arn *string - // Auto-participant-recording configuration object to attach to the stage. - // Auto-participant-recording configuration cannot be updated while recording is - // active. + // Configuration object for individual participant recording, to attach to the + // stage. Note that this cannot be updated while recording is active. AutoParticipantRecordingConfiguration *types.AutoParticipantRecordingConfiguration // Name of the stage to be updated. diff --git a/service/ivsrealtime/deserializers.go b/service/ivsrealtime/deserializers.go index fa967bc5cb1..2a3efa284b9 100644 --- a/service/ivsrealtime/deserializers.go +++ b/service/ivsrealtime/deserializers.go @@ -777,6 +777,101 @@ func awsRestjson1_deserializeOpErrorDeleteEncoderConfiguration(response *smithyh } } +type awsRestjson1_deserializeOpDeletePublicKey struct { +} + +func (*awsRestjson1_deserializeOpDeletePublicKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeletePublicKey) 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_deserializeOpErrorDeletePublicKey(response, &metadata) + } + output := &DeletePublicKeyOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeletePublicKey(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_deserializeOpDeleteStage struct { } @@ -1539,6 +1634,159 @@ func awsRestjson1_deserializeOpDocumentGetParticipantOutput(v **GetParticipantOu 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) + 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_deserializeOpErrorGetPublicKey(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_deserializeOpDocumentGetPublicKeyOutput(v **GetPublicKeyOutput, 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 *GetPublicKeyOutput + if *v == nil { + sv = &GetPublicKeyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "publicKey": + if err := awsRestjson1_deserializeDocumentPublicKey(&sv.PublicKey, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetStage struct { } @@ -2007,14 +2255,14 @@ func awsRestjson1_deserializeOpDocumentGetStorageConfigurationOutput(v **GetStor return nil } -type awsRestjson1_deserializeOpListCompositions struct { +type awsRestjson1_deserializeOpImportPublicKey struct { } -func (*awsRestjson1_deserializeOpListCompositions) ID() string { +func (*awsRestjson1_deserializeOpImportPublicKey) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListCompositions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -2028,9 +2276,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_deserializeOpErrorImportPublicKey(response, &metadata) } - output := &ListCompositionsOutput{} + output := &ImportPublicKeyOutput{} out.Result = output var buff [1024]byte @@ -2051,7 +2299,7 @@ func (m *awsRestjson1_deserializeOpListCompositions) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListCompositionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentImportPublicKeyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2064,7 +2312,7 @@ func (m *awsRestjson1_deserializeOpListCompositions) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListCompositions(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)} @@ -2111,8 +2359,8 @@ func awsRestjson1_deserializeOpErrorListCompositions(response *smithyhttp.Respon case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("PendingVerification", errorCode): + return awsRestjson1_deserializeErrorPendingVerification(response, errorBody) case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -2130,7 +2378,7 @@ func awsRestjson1_deserializeOpErrorListCompositions(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListCompositionsOutput(v **ListCompositionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentImportPublicKeyOutput(v **ImportPublicKeyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2143,29 +2391,20 @@ func awsRestjson1_deserializeOpDocumentListCompositionsOutput(v **ListCompositio return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListCompositionsOutput + var sv *ImportPublicKeyOutput if *v == nil { - sv = &ListCompositionsOutput{} + sv = &ImportPublicKeyOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "compositions": - if err := awsRestjson1_deserializeDocumentCompositionSummaryList(&sv.Compositions, value); err != nil { + case "publicKey": + if err := awsRestjson1_deserializeDocumentPublicKey(&sv.PublicKey, 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 @@ -2175,14 +2414,350 @@ func awsRestjson1_deserializeOpDocumentListCompositionsOutput(v **ListCompositio return nil } -type awsRestjson1_deserializeOpListEncoderConfigurations struct { +type awsRestjson1_deserializeOpListCompositions struct { +} + +func (*awsRestjson1_deserializeOpListCompositions) ID() string { + return "OperationDeserializer" +} + +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) + 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_deserializeOpErrorListCompositions(response, &metadata) + } + output := &ListCompositionsOutput{} + 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_deserializeOpDocumentListCompositionsOutput(&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_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)} + } + 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("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_deserializeOpDocumentListCompositionsOutput(v **ListCompositionsOutput, 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 *ListCompositionsOutput + if *v == nil { + sv = &ListCompositionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + 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 + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListEncoderConfigurations struct { +} + +func (*awsRestjson1_deserializeOpListEncoderConfigurations) ID() string { + return "OperationDeserializer" +} + +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) + 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_deserializeOpErrorListEncoderConfigurations(response, &metadata) + } + output := &ListEncoderConfigurationsOutput{} + 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_deserializeOpDocumentListEncoderConfigurationsOutput(&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_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)} + } + 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("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_deserializeOpDocumentListEncoderConfigurationsOutput(v **ListEncoderConfigurationsOutput, 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 *ListEncoderConfigurationsOutput + if *v == nil { + sv = &ListEncoderConfigurationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "encoderConfigurations": + if err := awsRestjson1_deserializeDocumentEncoderConfigurationSummaryList(&sv.EncoderConfigurations, 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 + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListParticipantEvents struct { } -func (*awsRestjson1_deserializeOpListEncoderConfigurations) ID() string { +func (*awsRestjson1_deserializeOpListParticipantEvents) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEncoderConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListParticipantEvents) 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) @@ -2196,9 +2771,9 @@ func (m *awsRestjson1_deserializeOpListEncoderConfigurations) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEncoderConfigurations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListParticipantEvents(response, &metadata) } - output := &ListEncoderConfigurationsOutput{} + output := &ListParticipantEventsOutput{} out.Result = output var buff [1024]byte @@ -2219,7 +2794,7 @@ func (m *awsRestjson1_deserializeOpListEncoderConfigurations) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEncoderConfigurationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListParticipantEventsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2232,7 +2807,7 @@ func (m *awsRestjson1_deserializeOpListEncoderConfigurations) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEncoderConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListParticipantEvents(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)} @@ -2276,15 +2851,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) @@ -2298,7 +2864,7 @@ func awsRestjson1_deserializeOpErrorListEncoderConfigurations(response *smithyht } } -func awsRestjson1_deserializeOpDocumentListEncoderConfigurationsOutput(v **ListEncoderConfigurationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListParticipantEventsOutput(v **ListParticipantEventsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2311,17 +2877,17 @@ func awsRestjson1_deserializeOpDocumentListEncoderConfigurationsOutput(v **ListE return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEncoderConfigurationsOutput + var sv *ListParticipantEventsOutput if *v == nil { - sv = &ListEncoderConfigurationsOutput{} + sv = &ListParticipantEventsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "encoderConfigurations": - if err := awsRestjson1_deserializeDocumentEncoderConfigurationSummaryList(&sv.EncoderConfigurations, value); err != nil { + case "events": + if err := awsRestjson1_deserializeDocumentEventList(&sv.Events, value); err != nil { return err } @@ -2343,14 +2909,14 @@ func awsRestjson1_deserializeOpDocumentListEncoderConfigurationsOutput(v **ListE return nil } -type awsRestjson1_deserializeOpListParticipantEvents struct { +type awsRestjson1_deserializeOpListParticipants struct { } -func (*awsRestjson1_deserializeOpListParticipantEvents) ID() string { +func (*awsRestjson1_deserializeOpListParticipants) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListParticipantEvents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListParticipants) 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) @@ -2364,9 +2930,9 @@ func (m *awsRestjson1_deserializeOpListParticipantEvents) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListParticipantEvents(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListParticipants(response, &metadata) } - output := &ListParticipantEventsOutput{} + output := &ListParticipantsOutput{} out.Result = output var buff [1024]byte @@ -2387,7 +2953,7 @@ func (m *awsRestjson1_deserializeOpListParticipantEvents) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListParticipantEventsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListParticipantsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2400,7 +2966,7 @@ func (m *awsRestjson1_deserializeOpListParticipantEvents) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListParticipantEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListParticipants(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)} @@ -2457,7 +3023,7 @@ func awsRestjson1_deserializeOpErrorListParticipantEvents(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentListParticipantEventsOutput(v **ListParticipantEventsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListParticipantsOutput(v **ListParticipantsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2470,20 +3036,15 @@ func awsRestjson1_deserializeOpDocumentListParticipantEventsOutput(v **ListParti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListParticipantEventsOutput + var sv *ListParticipantsOutput if *v == nil { - sv = &ListParticipantEventsOutput{} + sv = &ListParticipantsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "events": - if err := awsRestjson1_deserializeDocumentEventList(&sv.Events, value); err != nil { - return err - } - case "nextToken": if value != nil { jtv, ok := value.(string) @@ -2493,6 +3054,11 @@ func awsRestjson1_deserializeOpDocumentListParticipantEventsOutput(v **ListParti sv.NextToken = ptr.String(jtv) } + case "participants": + if err := awsRestjson1_deserializeDocumentParticipantList(&sv.Participants, value); err != nil { + return err + } + default: _, _ = key, value @@ -2502,14 +3068,14 @@ func awsRestjson1_deserializeOpDocumentListParticipantEventsOutput(v **ListParti return nil } -type awsRestjson1_deserializeOpListParticipants struct { +type awsRestjson1_deserializeOpListPublicKeys struct { } -func (*awsRestjson1_deserializeOpListParticipants) ID() string { +func (*awsRestjson1_deserializeOpListPublicKeys) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListParticipants) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListPublicKeys) 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) @@ -2523,9 +3089,9 @@ func (m *awsRestjson1_deserializeOpListParticipants) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListParticipants(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListPublicKeys(response, &metadata) } - output := &ListParticipantsOutput{} + output := &ListPublicKeysOutput{} out.Result = output var buff [1024]byte @@ -2546,7 +3112,7 @@ func (m *awsRestjson1_deserializeOpListParticipants) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListParticipantsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListPublicKeysOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2559,7 +3125,7 @@ func (m *awsRestjson1_deserializeOpListParticipants) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListParticipants(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListPublicKeys(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)} @@ -2616,7 +3182,7 @@ func awsRestjson1_deserializeOpErrorListParticipants(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListParticipantsOutput(v **ListParticipantsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListPublicKeysOutput(v **ListPublicKeysOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2629,9 +3195,9 @@ func awsRestjson1_deserializeOpDocumentListParticipantsOutput(v **ListParticipan return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListParticipantsOutput + var sv *ListPublicKeysOutput if *v == nil { - sv = &ListParticipantsOutput{} + sv = &ListPublicKeysOutput{} } else { sv = *v } @@ -2647,8 +3213,8 @@ func awsRestjson1_deserializeOpDocumentListParticipantsOutput(v **ListParticipan sv.NextToken = ptr.String(jtv) } - case "participants": - if err := awsRestjson1_deserializeDocumentParticipantList(&sv.Participants, value); err != nil { + case "publicKeys": + if err := awsRestjson1_deserializeDocumentPublicKeyList(&sv.PublicKeys, value); err != nil { return err } @@ -6069,6 +6635,166 @@ func awsRestjson1_deserializeDocumentPipConfiguration(v **types.PipConfiguration return nil } +func awsRestjson1_deserializeDocumentPublicKey(v **types.PublicKey, 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.PublicKey + if *v == nil { + sv = &types.PublicKey{} + } 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 PublicKeyArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "fingerprint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PublicKeyFingerprint to be of type string, got %T instead", value) + } + sv.Fingerprint = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PublicKeyName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "publicKeyMaterial": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PublicKeyMaterial to be of type string, got %T instead", value) + } + sv.PublicKeyMaterial = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPublicKeyList(v *[]types.PublicKeySummary, 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.PublicKeySummary + if *v == nil { + cv = []types.PublicKeySummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PublicKeySummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentPublicKeySummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPublicKeySummary(v **types.PublicKeySummary, 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.PublicKeySummary + if *v == nil { + sv = &types.PublicKeySummary{} + } 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 PublicKeyArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PublicKeyName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentRecordingConfiguration(v **types.RecordingConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6364,6 +7090,11 @@ func awsRestjson1_deserializeDocumentStage(v **types.Stage, value interface{}) e return err } + case "endpoints": + if err := awsRestjson1_deserializeDocumentStageEndpoints(&sv.Endpoints, value); err != nil { + return err + } + case "name": if value != nil { jtv, ok := value.(string) @@ -6387,6 +7118,55 @@ func awsRestjson1_deserializeDocumentStage(v **types.Stage, value interface{}) e return nil } +func awsRestjson1_deserializeDocumentStageEndpoints(v **types.StageEndpoints, 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.StageEndpoints + if *v == nil { + sv = &types.StageEndpoints{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "events": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StageEndpoint to be of type string, got %T instead", value) + } + sv.Events = ptr.String(jtv) + } + + case "whip": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StageEndpoint to be of type string, got %T instead", value) + } + sv.Whip = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentStageSession(v **types.StageSession, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ivsrealtime/doc.go b/service/ivsrealtime/doc.go index ac9a8370806..1081f881add 100644 --- a/service/ivsrealtime/doc.go +++ b/service/ivsrealtime/doc.go @@ -3,39 +3,33 @@ // Package ivsrealtime provides the API client, operations, and parameter types // for Amazon Interactive Video Service RealTime. // -// Introduction -// // The Amazon Interactive Video Service (IVS) real-time API is REST compatible, // using a standard HTTP API and an AWS EventBridge event stream for responses. // JSON is used for both requests and responses, including errors. // -// Terminology: +// Key Concepts // -// - A stage is a virtual space where participants can exchange video in real -// time. +// - Stage — A virtual space where participants can exchange video in real time. // -// - A participant token is a token that authenticates a participant when they -// join a stage. +// - Participant token — A token that authenticates a participant when they join +// a stage. // -// - A participant object represents participants (people) in the stage and +// - Participant object — Represents participants (people) in the stage and // contains information about them. When a token is created, it includes a // participant ID; when a participant uses that token to join a stage, the // participant is associated with that participant ID. There is a 1:1 mapping // between participant tokens and participants. // -// - Server-side composition: The 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. -// -// - Server-side composition: A composition controls the look of the outputs, -// including how participants are positioned in the video. +// For server-side composition: // -// # Resources +// - 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. // -// The following resources contain information about your IVS live stream (see [Getting Started with Amazon IVS Real-Time Streaming]): +// - Composition — Controls the look of the outputs, including how participants +// are positioned in the video. // -// - Stage — A stage is a virtual space where participants can exchange video in -// real time. +// For more information about your IVS live stream, also see [Getting Started with Amazon IVS Real-Time Streaming]. // // # Tagging // @@ -55,109 +49,6 @@ // // At most 50 tags can be applied to a resource. // -// # Stages Endpoints -// -// CreateParticipantToken -// - — Creates an additional token for a specified stage. This can be done after -// stage creation or when tokens expire. -// -// CreateStage -// - — Creates a new stage (and optionally participant tokens). -// -// DeleteStage -// - — Shuts down and deletes the specified stage (disconnecting all -// participants). -// -// DisconnectParticipant -// - — Disconnects a specified participant and revokes the participant -// permanently from a specified stage. -// -// GetParticipant -// - — Gets information about the specified participant token. -// -// GetStage -// - — Gets information for the specified stage. -// -// GetStageSession -// - — Gets information for the specified stage session. -// -// ListParticipantEvents -// - — Lists events for a specified participant that occurred during a specified -// stage session. -// -// ListParticipants -// - — Lists all participants in a specified stage session. -// -// ListStages -// - — Gets summary information about all stages in your account, in the AWS -// region where the API request is processed. -// -// ListStageSessions -// - — Gets all sessions for a specified stage. -// -// UpdateStage -// - — Updates a stage’s configuration. -// -// # Composition Endpoints -// -// GetComposition -// - — Gets information about the specified Composition resource. -// -// ListCompositions -// - — Gets summary information about all Compositions in your account, in the -// AWS region where the API request is processed. -// -// StartComposition -// - — Starts a Composition from a stage based on the configuration provided in -// the request. -// -// StopComposition -// - — Stops and deletes a Composition resource. Any broadcast from the -// Composition resource is stopped. -// -// # EncoderConfiguration Endpoints -// -// CreateEncoderConfiguration -// - — Creates an EncoderConfiguration object. -// -// DeleteEncoderConfiguration -// - — Deletes an EncoderConfiguration resource. Ensures that no Compositions -// are using this template; otherwise, returns an error. -// -// GetEncoderConfiguration -// - — Gets information about the specified EncoderConfiguration resource. -// -// ListEncoderConfigurations -// - — Gets summary information about all EncoderConfigurations in your account, -// in the AWS region where the API request is processed. -// -// # StorageConfiguration Endpoints -// -// CreateStorageConfiguration -// - — Creates a new storage configuration, used to enable recording to Amazon -// S3. -// -// DeleteStorageConfiguration -// - — Deletes the storage configuration for the specified ARN. -// -// GetStorageConfiguration -// - — Gets the storage configuration for the specified ARN. -// -// ListStorageConfigurations -// - — Gets summary information about all storage configurations in your -// account, in the AWS region where the API request is processed. -// -// # Tags Endpoints -// -// ListTagsForResource -// - — Gets information about AWS tags for the specified ARN. -// -// TagResource -// - — Adds or updates tags for the AWS resource with the specified ARN. -// -// UntagResource -// - — Removes tags from the resource with the specified ARN. -// // [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 // [Access Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html diff --git a/service/ivsrealtime/generated.json b/service/ivsrealtime/generated.json index 1058fa52d5a..aae475b66b8 100644 --- a/service/ivsrealtime/generated.json +++ b/service/ivsrealtime/generated.json @@ -13,19 +13,23 @@ "api_op_CreateStage.go", "api_op_CreateStorageConfiguration.go", "api_op_DeleteEncoderConfiguration.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_GetParticipant.go", + "api_op_GetPublicKey.go", "api_op_GetStage.go", "api_op_GetStageSession.go", "api_op_GetStorageConfiguration.go", + "api_op_ImportPublicKey.go", "api_op_ListCompositions.go", "api_op_ListEncoderConfigurations.go", "api_op_ListParticipantEvents.go", "api_op_ListParticipants.go", + "api_op_ListPublicKeys.go", "api_op_ListStageSessions.go", "api_op_ListStages.go", "api_op_ListStorageConfigurations.go", diff --git a/service/ivsrealtime/serializers.go b/service/ivsrealtime/serializers.go index 9981201398e..feab974e45a 100644 --- a/service/ivsrealtime/serializers.go +++ b/service/ivsrealtime/serializers.go @@ -463,6 +463,81 @@ func awsRestjson1_serializeOpDocumentDeleteEncoderConfigurationInput(v *DeleteEn return nil } +type awsRestjson1_serializeOpDeletePublicKey struct { +} + +func (*awsRestjson1_serializeOpDeletePublicKey) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeletePublicKey) 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.(*DeletePublicKeyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/DeletePublicKey") + 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_serializeOpDocumentDeletePublicKeyInput(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_serializeOpHttpBindingsDeletePublicKeyInput(v *DeletePublicKeyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeletePublicKeyInput(v *DeletePublicKeyInput, 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_serializeOpDeleteStage struct { } @@ -933,6 +1008,81 @@ func awsRestjson1_serializeOpDocumentGetParticipantInput(v *GetParticipantInput, return nil } +type awsRestjson1_serializeOpGetPublicKey struct { +} + +func (*awsRestjson1_serializeOpGetPublicKey) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetPublicKey) 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.(*GetPublicKeyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/GetPublicKey") + 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_serializeOpDocumentGetPublicKeyInput(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_serializeOpHttpBindingsGetPublicKeyInput(v *GetPublicKeyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetPublicKeyInput(v *GetPublicKeyInput, 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_serializeOpGetStage struct { } @@ -1163,6 +1313,93 @@ func awsRestjson1_serializeOpDocumentGetStorageConfigurationInput(v *GetStorageC return nil } +type awsRestjson1_serializeOpImportPublicKey struct { +} + +func (*awsRestjson1_serializeOpImportPublicKey) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpImportPublicKey) 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.(*ImportPublicKeyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ImportPublicKey") + 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_serializeOpDocumentImportPublicKeyInput(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_serializeOpHttpBindingsImportPublicKeyInput(v *ImportPublicKeyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentImportPublicKeyInput(v *ImportPublicKeyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.PublicKeyMaterial != nil { + ok := object.Key("publicKeyMaterial") + ok.String(*v.PublicKeyMaterial) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpListCompositions struct { } @@ -1538,6 +1775,86 @@ func awsRestjson1_serializeOpDocumentListParticipantsInput(v *ListParticipantsIn return nil } +type awsRestjson1_serializeOpListPublicKeys struct { +} + +func (*awsRestjson1_serializeOpListPublicKeys) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListPublicKeys) 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.(*ListPublicKeysInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ListPublicKeys") + 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_serializeOpDocumentListPublicKeysInput(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_serializeOpHttpBindingsListPublicKeysInput(v *ListPublicKeysInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListPublicKeysInput(v *ListPublicKeysInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + 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_serializeOpListStages struct { } diff --git a/service/ivsrealtime/snapshot/api_op_DeletePublicKey.go.snap b/service/ivsrealtime/snapshot/api_op_DeletePublicKey.go.snap new file mode 100644 index 00000000000..3072836ab50 --- /dev/null +++ b/service/ivsrealtime/snapshot/api_op_DeletePublicKey.go.snap @@ -0,0 +1,36 @@ +DeletePublicKey + 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_GetPublicKey.go.snap b/service/ivsrealtime/snapshot/api_op_GetPublicKey.go.snap new file mode 100644 index 00000000000..f9aa53ab413 --- /dev/null +++ b/service/ivsrealtime/snapshot/api_op_GetPublicKey.go.snap @@ -0,0 +1,36 @@ +GetPublicKey + 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_ImportPublicKey.go.snap b/service/ivsrealtime/snapshot/api_op_ImportPublicKey.go.snap new file mode 100644 index 00000000000..7f7081f5c6d --- /dev/null +++ b/service/ivsrealtime/snapshot/api_op_ImportPublicKey.go.snap @@ -0,0 +1,36 @@ +ImportPublicKey + 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_ListPublicKeys.go.snap b/service/ivsrealtime/snapshot/api_op_ListPublicKeys.go.snap new file mode 100644 index 00000000000..1e2bd9c2f17 --- /dev/null +++ b/service/ivsrealtime/snapshot/api_op_ListPublicKeys.go.snap @@ -0,0 +1,35 @@ +ListPublicKeys + 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_test.go b/service/ivsrealtime/snapshot_test.go index 75b9391383a..de79f3b1e98 100644 --- a/service/ivsrealtime/snapshot_test.go +++ b/service/ivsrealtime/snapshot_test.go @@ -122,6 +122,18 @@ func TestCheckSnapshot_DeleteEncoderConfiguration(t *testing.T) { } } +func TestCheckSnapshot_DeletePublicKey(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeletePublicKey(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeletePublicKey") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteStage(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteStage(context.Background(), nil, func(o *Options) { @@ -194,6 +206,18 @@ func TestCheckSnapshot_GetParticipant(t *testing.T) { } } +func TestCheckSnapshot_GetPublicKey(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPublicKey(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetPublicKey") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetStage(t *testing.T) { svc := New(Options{}) _, err := svc.GetStage(context.Background(), nil, func(o *Options) { @@ -230,6 +254,18 @@ func TestCheckSnapshot_GetStorageConfiguration(t *testing.T) { } } +func TestCheckSnapshot_ImportPublicKey(t *testing.T) { + svc := New(Options{}) + _, err := svc.ImportPublicKey(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ImportPublicKey") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListCompositions(t *testing.T) { svc := New(Options{}) _, err := svc.ListCompositions(context.Background(), nil, func(o *Options) { @@ -278,6 +314,18 @@ func TestCheckSnapshot_ListParticipants(t *testing.T) { } } +func TestCheckSnapshot_ListPublicKeys(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListPublicKeys(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListPublicKeys") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListStages(t *testing.T) { svc := New(Options{}) _, err := svc.ListStages(context.Background(), nil, func(o *Options) { @@ -445,6 +493,18 @@ func TestUpdateSnapshot_DeleteEncoderConfiguration(t *testing.T) { } } +func TestUpdateSnapshot_DeletePublicKey(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeletePublicKey(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeletePublicKey") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteStage(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteStage(context.Background(), nil, func(o *Options) { @@ -517,6 +577,18 @@ func TestUpdateSnapshot_GetParticipant(t *testing.T) { } } +func TestUpdateSnapshot_GetPublicKey(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPublicKey(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetPublicKey") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetStage(t *testing.T) { svc := New(Options{}) _, err := svc.GetStage(context.Background(), nil, func(o *Options) { @@ -553,6 +625,18 @@ func TestUpdateSnapshot_GetStorageConfiguration(t *testing.T) { } } +func TestUpdateSnapshot_ImportPublicKey(t *testing.T) { + svc := New(Options{}) + _, err := svc.ImportPublicKey(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ImportPublicKey") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListCompositions(t *testing.T) { svc := New(Options{}) _, err := svc.ListCompositions(context.Background(), nil, func(o *Options) { @@ -601,6 +685,18 @@ func TestUpdateSnapshot_ListParticipants(t *testing.T) { } } +func TestUpdateSnapshot_ListPublicKeys(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListPublicKeys(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListPublicKeys") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListStages(t *testing.T) { svc := New(Options{}) _, err := svc.ListStages(context.Background(), nil, func(o *Options) { diff --git a/service/ivsrealtime/types/types.go b/service/ivsrealtime/types/types.go index 413a7126a28..9825b615940 100644 --- a/service/ivsrealtime/types/types.go +++ b/service/ivsrealtime/types/types.go @@ -7,13 +7,13 @@ import ( "time" ) -// Object specifying an auto-participant-recording configuration. +// Object specifying a configuration for individual participant recording. type AutoParticipantRecordingConfiguration struct { - // ARN of the StorageConfiguration resource to use for auto participant recording. Default: "" (empty - // string, no storage configuration is specified). Individual participant recording - // cannot be started unless a storage configuration is specified, when a Stageis - // created or updated. + // ARN of the StorageConfiguration resource to use for individual participant recording. Default: "" + // (empty string, no storage configuration is specified). Individual participant + // recording cannot be started unless a storage configuration is specified, when a Stage + // is created or updated. // // This member is required. StorageConfigurationArn *string @@ -303,6 +303,7 @@ type GridConfiguration struct { // This attribute name identifies the featured slot. A participant with this // attribute set to "true" (as a string value) in ParticipantTokenConfiguration is placed in the featured slot. + // Default: "" (no featured participant). FeaturedParticipantAttribute *string // Specifies the spacing between participant tiles in pixels. Default: 2 . @@ -312,12 +313,14 @@ type GridConfiguration struct { // Default: false . OmitStoppedVideo bool - // Sets the non-featured participant display mode. Default: VIDEO . + // Sets the non-featured participant display mode, to control the aspect ratio of + // video tiles. VIDEO is 16:9, SQUARE is 1:1, and PORTRAIT is 3:4. Default: VIDEO . VideoAspectRatio VideoAspectRatio - // Defines how video fits within the participant tile. When not set, videoFillMode - // defaults to COVER fill mode for participants in the grid and to CONTAIN fill - // mode for featured participants. + // Defines how video content fits within the participant tile: FILL (stretched), + // COVER (cropped), or CONTAIN (letterboxed). When not set, videoFillMode defaults + // to COVER fill mode for participants in the grid and to CONTAIN fill mode for + // featured participants. VideoFillMode VideoFillMode noSmithyDocumentSerde @@ -374,12 +377,12 @@ type Participant struct { // enabled. RecordingS3BucketName *string - // S3 prefix of the S3 bucket to where the participant is being recorded, if + // S3 prefix of the S3 bucket where the participant is being recorded, if // individual participant recording is enabled, or "" (empty string), if recording // is not enabled. RecordingS3Prefix *string - // Participant’s recording state. + // The participant’s recording state. RecordingState ParticipantRecordingState // The participant’s SDK version. @@ -410,7 +413,7 @@ type ParticipantSummary struct { // Whether the participant ever published to the stage session. Published bool - // Participant’s recording state. + // The participant’s recording state. RecordingState ParticipantRecordingState // Whether the participant is connected to or disconnected from the stage. @@ -494,6 +497,7 @@ type PipConfiguration struct { // This attribute name identifies the featured slot. A participant with this // attribute set to "true" (as a string value) in ParticipantTokenConfiguration is placed in the featured slot. + // Default: "" (no featured participant). FeaturedParticipantAttribute *string // Specifies the spacing between participant tiles in pixels. Default: 0 . @@ -503,7 +507,9 @@ type PipConfiguration struct { // Default: false . OmitStoppedVideo bool - // Defines PiP behavior when all participants have left. Default: STATIC . + // Defines PiP behavior when all participants have left: STATIC (maintains + // original position/size) or DYNAMIC (expands to full composition). Default: + // STATIC . PipBehavior PipBehavior // Specifies the height of the PiP window in pixels. When this is not set @@ -515,8 +521,9 @@ type PipConfiguration struct { // determined by PipPosition . Default: 0 . PipOffset int32 - // Identifies the PiP slot. A participant with this attribute set to "true" (as a - // string value) in ParticipantTokenConfigurationis placed in the PiP slot. + // Specifies the participant for the PiP window. A participant with this attribute + // set to "true" (as a string value) in ParticipantTokenConfiguration is placed in the PiP slot. Default: "" + // (no PiP participant). PipParticipantAttribute *string // Determines the corner position of the PiP window. Default: BOTTOM_RIGHT . @@ -527,12 +534,60 @@ type PipConfiguration struct { // the aspect ratio of the participant’s video. PipWidth *int32 - // Defines how video fits within the participant tile. Default: COVER . + // Defines how video content fits within the participant tile: FILL (stretched), + // COVER (cropped), or CONTAIN (letterboxed). Default: COVER . VideoFillMode VideoFillMode noSmithyDocumentSerde } +// Object specifying a public key used to sign stage participant tokens. +type PublicKey struct { + + // Public key ARN. + Arn *string + + // The public key fingerprint, a short string used to identify or verify the full + // public key. + Fingerprint *string + + // Public key name. + Name *string + + // Public key material. + 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. + // + // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + Tags map[string]string + + noSmithyDocumentSerde +} + +// Summary information about a public key. +type PublicKeySummary struct { + + // Public key ARN. + Arn *string + + // Public key name. + 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. + // + // [Tagging AWS Resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + Tags map[string]string + + noSmithyDocumentSerde +} + // An object representing a configuration to record a stage stream. type RecordingConfiguration struct { @@ -601,9 +656,13 @@ type Stage struct { // ID of the active session within the stage. ActiveSessionId *string - // Auto-participant-recording configuration object attached to the stage. + // Configuration object for individual participant recording, attached to the + // stage. AutoParticipantRecordingConfiguration *AutoParticipantRecordingConfiguration + // Summary information about various endpoints for a stage. + Endpoints *StageEndpoints + // Stage name. Name *string @@ -618,6 +677,18 @@ type Stage struct { noSmithyDocumentSerde } +// Summary information about various endpoints for a stage. +type StageEndpoints struct { + + // Events endpoint. + Events *string + + // WHIP endpoint. + Whip *string + + noSmithyDocumentSerde +} + // A stage session begins when the first participant joins a stage and ends after // the last participant leaves the stage. A stage session helps with debugging // stages by grouping events and participants into shorter periods of time (i.e., a diff --git a/service/ivsrealtime/validators.go b/service/ivsrealtime/validators.go index be25c43d171..39416677fb8 100644 --- a/service/ivsrealtime/validators.go +++ b/service/ivsrealtime/validators.go @@ -90,6 +90,26 @@ func (m *validateOpDeleteEncoderConfiguration) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpDeletePublicKey struct { +} + +func (*validateOpDeletePublicKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeletePublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeletePublicKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeletePublicKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteStage struct { } @@ -210,6 +230,26 @@ func (m *validateOpGetParticipant) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpGetPublicKey struct { +} + +func (*validateOpGetPublicKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPublicKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPublicKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetStage struct { } @@ -270,6 +310,26 @@ func (m *validateOpGetStorageConfiguration) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpImportPublicKey struct { +} + +func (*validateOpImportPublicKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpImportPublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ImportPublicKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpImportPublicKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListParticipantEvents struct { } @@ -466,6 +526,10 @@ func addOpDeleteEncoderConfigurationValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpDeleteEncoderConfiguration{}, middleware.After) } +func addOpDeletePublicKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeletePublicKey{}, middleware.After) +} + func addOpDeleteStageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteStage{}, middleware.After) } @@ -490,6 +554,10 @@ func addOpGetParticipantValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetParticipant{}, middleware.After) } +func addOpGetPublicKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPublicKey{}, middleware.After) +} + func addOpGetStageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetStage{}, middleware.After) } @@ -502,6 +570,10 @@ func addOpGetStorageConfigurationValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpGetStorageConfiguration{}, middleware.After) } +func addOpImportPublicKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpImportPublicKey{}, middleware.After) +} + func addOpListParticipantEventsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListParticipantEvents{}, middleware.After) } @@ -706,6 +778,21 @@ func validateOpDeleteEncoderConfigurationInput(v *DeleteEncoderConfigurationInpu } } +func validateOpDeletePublicKeyInput(v *DeletePublicKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeletePublicKeyInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteStageInput(v *DeleteStageInput) error { if v == nil { return nil @@ -805,6 +892,21 @@ func validateOpGetParticipantInput(v *GetParticipantInput) error { } } +func validateOpGetPublicKeyInput(v *GetPublicKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPublicKeyInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetStageInput(v *GetStageInput) error { if v == nil { return nil @@ -853,6 +955,21 @@ func validateOpGetStorageConfigurationInput(v *GetStorageConfigurationInput) err } } +func validateOpImportPublicKeyInput(v *ImportPublicKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ImportPublicKeyInput"} + if v.PublicKeyMaterial == nil { + invalidParams.Add(smithy.NewErrParamRequired("PublicKeyMaterial")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListParticipantEventsInput(v *ListParticipantEventsInput) error { if v == nil { return nil diff --git a/service/kinesisanalyticsv2/api_op_AddApplicationCloudWatchLoggingOption.go b/service/kinesisanalyticsv2/api_op_AddApplicationCloudWatchLoggingOption.go index 990a46af23b..238289f9212 100644 --- a/service/kinesisanalyticsv2/api_op_AddApplicationCloudWatchLoggingOption.go +++ b/service/kinesisanalyticsv2/api_op_AddApplicationCloudWatchLoggingOption.go @@ -70,6 +70,9 @@ type AddApplicationCloudWatchLoggingOptionOutput struct { // Kinesis Data Analytics application. CloudWatchLoggingOptionDescriptions []types.CloudWatchLoggingOptionDescription + // Operation ID for tracking AddApplicationCloudWatchLoggingOption request + OperationId *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalyticsv2/api_op_AddApplicationVpcConfiguration.go b/service/kinesisanalyticsv2/api_op_AddApplicationVpcConfiguration.go index 9f70bf2ed57..dc22631af53 100644 --- a/service/kinesisanalyticsv2/api_op_AddApplicationVpcConfiguration.go +++ b/service/kinesisanalyticsv2/api_op_AddApplicationVpcConfiguration.go @@ -75,6 +75,9 @@ type AddApplicationVpcConfigurationOutput struct { // updates the ApplicationVersionId each time you update the application. ApplicationVersionId *int64 + // Operation ID for tracking AddApplicationVpcConfiguration request + OperationId *string + // The parameters of the new VPC configuration. VpcConfigurationDescription *types.VpcConfigurationDescription diff --git a/service/kinesisanalyticsv2/api_op_DeleteApplicationCloudWatchLoggingOption.go b/service/kinesisanalyticsv2/api_op_DeleteApplicationCloudWatchLoggingOption.go index ecef8bac21c..e6a9ccac688 100644 --- a/service/kinesisanalyticsv2/api_op_DeleteApplicationCloudWatchLoggingOption.go +++ b/service/kinesisanalyticsv2/api_op_DeleteApplicationCloudWatchLoggingOption.go @@ -70,6 +70,9 @@ type DeleteApplicationCloudWatchLoggingOptionOutput struct { // application. CloudWatchLoggingOptionDescriptions []types.CloudWatchLoggingOptionDescription + // Operation ID for tracking DeleteApplicationCloudWatchLoggingOption request + OperationId *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalyticsv2/api_op_DeleteApplicationVpcConfiguration.go b/service/kinesisanalyticsv2/api_op_DeleteApplicationVpcConfiguration.go index aae8fa12a45..3c62edd09b5 100644 --- a/service/kinesisanalyticsv2/api_op_DeleteApplicationVpcConfiguration.go +++ b/service/kinesisanalyticsv2/api_op_DeleteApplicationVpcConfiguration.go @@ -62,6 +62,9 @@ type DeleteApplicationVpcConfigurationOutput struct { // The updated version ID of the application. ApplicationVersionId *int64 + // Operation ID for tracking DeleteApplicationVpcConfiguration request + OperationId *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalyticsv2/api_op_DescribeApplicationOperation.go b/service/kinesisanalyticsv2/api_op_DescribeApplicationOperation.go new file mode 100644 index 00000000000..321f33f4f3e --- /dev/null +++ b/service/kinesisanalyticsv2/api_op_DescribeApplicationOperation.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package kinesisanalyticsv2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about a specific operation performed on a Managed Service +// for Apache Flink application +func (c *Client) DescribeApplicationOperation(ctx context.Context, params *DescribeApplicationOperationInput, optFns ...func(*Options)) (*DescribeApplicationOperationOutput, error) { + if params == nil { + params = &DescribeApplicationOperationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeApplicationOperation", params, optFns, c.addOperationDescribeApplicationOperationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeApplicationOperationOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Request for information about a specific operation performed on a Managed +// Service for Apache Flink application +type DescribeApplicationOperationInput struct { + + // The name of the application + // + // This member is required. + ApplicationName *string + + // Identifier of the Operation + // + // This member is required. + OperationId *string + + noSmithyDocumentSerde +} + +// Provides details of the operation corresponding to the operation-ID on a +// Managed Service for Apache Flink application +type DescribeApplicationOperationOutput struct { + + // Provides a description of the operation, such as the operation-type and status + ApplicationOperationInfoDetails *types.ApplicationOperationInfoDetails + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeApplicationOperationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeApplicationOperation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeApplicationOperation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeApplicationOperation"); 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 = addOpDescribeApplicationOperationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplicationOperation(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_opDescribeApplicationOperation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeApplicationOperation", + } +} diff --git a/service/kinesisanalyticsv2/api_op_ListApplicationOperations.go b/service/kinesisanalyticsv2/api_op_ListApplicationOperations.go new file mode 100644 index 00000000000..cc8f5cf1f3f --- /dev/null +++ b/service/kinesisanalyticsv2/api_op_ListApplicationOperations.go @@ -0,0 +1,257 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package kinesisanalyticsv2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists information about operations performed on a Managed Service for Apache +// Flink application +func (c *Client) ListApplicationOperations(ctx context.Context, params *ListApplicationOperationsInput, optFns ...func(*Options)) (*ListApplicationOperationsOutput, error) { + if params == nil { + params = &ListApplicationOperationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListApplicationOperations", params, optFns, c.addOperationListApplicationOperationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListApplicationOperationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Request to list operations performed on an application +type ListApplicationOperationsInput struct { + + // The name of the application + // + // This member is required. + ApplicationName *string + + // Limit on the number of records returned in the response + Limit *int32 + + // If a previous command returned a pagination token, pass it into this value to + // retrieve the next set of results + NextToken *string + + // Type of operation performed on an application + Operation *string + + // Status of the operation performed on an application + OperationStatus types.OperationStatus + + noSmithyDocumentSerde +} + +// Response with the list of operations for an application +type ListApplicationOperationsOutput struct { + + // List of ApplicationOperationInfo for an application + ApplicationOperationInfoList []types.ApplicationOperationInfo + + // If a previous command returned a pagination token, pass it into this value to + // retrieve the next set of results + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListApplicationOperationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListApplicationOperations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListApplicationOperations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListApplicationOperations"); 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 = addOpListApplicationOperationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationOperations(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 +} + +// ListApplicationOperationsPaginatorOptions is the paginator options for +// ListApplicationOperations +type ListApplicationOperationsPaginatorOptions struct { + // Limit on the number of records returned in the response + 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 +} + +// ListApplicationOperationsPaginator is a paginator for ListApplicationOperations +type ListApplicationOperationsPaginator struct { + options ListApplicationOperationsPaginatorOptions + client ListApplicationOperationsAPIClient + params *ListApplicationOperationsInput + nextToken *string + firstPage bool +} + +// NewListApplicationOperationsPaginator returns a new +// ListApplicationOperationsPaginator +func NewListApplicationOperationsPaginator(client ListApplicationOperationsAPIClient, params *ListApplicationOperationsInput, optFns ...func(*ListApplicationOperationsPaginatorOptions)) *ListApplicationOperationsPaginator { + if params == nil { + params = &ListApplicationOperationsInput{} + } + + options := ListApplicationOperationsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListApplicationOperationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListApplicationOperationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListApplicationOperations page. +func (p *ListApplicationOperationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListApplicationOperationsOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListApplicationOperations(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 +} + +// ListApplicationOperationsAPIClient is a client that implements the +// ListApplicationOperations operation. +type ListApplicationOperationsAPIClient interface { + ListApplicationOperations(context.Context, *ListApplicationOperationsInput, ...func(*Options)) (*ListApplicationOperationsOutput, error) +} + +var _ ListApplicationOperationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListApplicationOperations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListApplicationOperations", + } +} diff --git a/service/kinesisanalyticsv2/api_op_ListApplicationSnapshots.go b/service/kinesisanalyticsv2/api_op_ListApplicationSnapshots.go index 3cb74fcf98e..46cc006ad89 100644 --- a/service/kinesisanalyticsv2/api_op_ListApplicationSnapshots.go +++ b/service/kinesisanalyticsv2/api_op_ListApplicationSnapshots.go @@ -146,6 +146,101 @@ func (c *Client) addOperationListApplicationSnapshotsMiddlewares(stack *middlewa return nil } +// ListApplicationSnapshotsPaginatorOptions is the paginator options for +// ListApplicationSnapshots +type ListApplicationSnapshotsPaginatorOptions struct { + // The maximum number of application snapshots to list. + 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 +} + +// ListApplicationSnapshotsPaginator is a paginator for ListApplicationSnapshots +type ListApplicationSnapshotsPaginator struct { + options ListApplicationSnapshotsPaginatorOptions + client ListApplicationSnapshotsAPIClient + params *ListApplicationSnapshotsInput + nextToken *string + firstPage bool +} + +// NewListApplicationSnapshotsPaginator returns a new +// ListApplicationSnapshotsPaginator +func NewListApplicationSnapshotsPaginator(client ListApplicationSnapshotsAPIClient, params *ListApplicationSnapshotsInput, optFns ...func(*ListApplicationSnapshotsPaginatorOptions)) *ListApplicationSnapshotsPaginator { + if params == nil { + params = &ListApplicationSnapshotsInput{} + } + + options := ListApplicationSnapshotsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListApplicationSnapshotsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListApplicationSnapshotsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListApplicationSnapshots page. +func (p *ListApplicationSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListApplicationSnapshotsOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListApplicationSnapshots(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 +} + +// ListApplicationSnapshotsAPIClient is a client that implements the +// ListApplicationSnapshots operation. +type ListApplicationSnapshotsAPIClient interface { + ListApplicationSnapshots(context.Context, *ListApplicationSnapshotsInput, ...func(*Options)) (*ListApplicationSnapshotsOutput, error) +} + +var _ ListApplicationSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesisanalyticsv2/api_op_ListApplicationVersions.go b/service/kinesisanalyticsv2/api_op_ListApplicationVersions.go index e7cb54f8371..76d42fb3fa0 100644 --- a/service/kinesisanalyticsv2/api_op_ListApplicationVersions.go +++ b/service/kinesisanalyticsv2/api_op_ListApplicationVersions.go @@ -162,6 +162,101 @@ func (c *Client) addOperationListApplicationVersionsMiddlewares(stack *middlewar return nil } +// ListApplicationVersionsPaginatorOptions is the paginator options for +// ListApplicationVersions +type ListApplicationVersionsPaginatorOptions struct { + // The maximum number of versions to list in this invocation of the operation. + 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 +} + +// ListApplicationVersionsPaginator is a paginator for ListApplicationVersions +type ListApplicationVersionsPaginator struct { + options ListApplicationVersionsPaginatorOptions + client ListApplicationVersionsAPIClient + params *ListApplicationVersionsInput + nextToken *string + firstPage bool +} + +// NewListApplicationVersionsPaginator returns a new +// ListApplicationVersionsPaginator +func NewListApplicationVersionsPaginator(client ListApplicationVersionsAPIClient, params *ListApplicationVersionsInput, optFns ...func(*ListApplicationVersionsPaginatorOptions)) *ListApplicationVersionsPaginator { + if params == nil { + params = &ListApplicationVersionsInput{} + } + + options := ListApplicationVersionsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListApplicationVersionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListApplicationVersionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListApplicationVersions page. +func (p *ListApplicationVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListApplicationVersionsOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListApplicationVersions(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 +} + +// ListApplicationVersionsAPIClient is a client that implements the +// ListApplicationVersions operation. +type ListApplicationVersionsAPIClient interface { + ListApplicationVersions(context.Context, *ListApplicationVersionsInput, ...func(*Options)) (*ListApplicationVersionsOutput, error) +} + +var _ ListApplicationVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesisanalyticsv2/api_op_ListApplications.go b/service/kinesisanalyticsv2/api_op_ListApplications.go index 97ff4d5a686..ada6c64903c 100644 --- a/service/kinesisanalyticsv2/api_op_ListApplications.go +++ b/service/kinesisanalyticsv2/api_op_ListApplications.go @@ -147,6 +147,99 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } +// ListApplicationsPaginatorOptions is the paginator options for ListApplications +type ListApplicationsPaginatorOptions struct { + // The maximum number of applications to list. + 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 +} + +// ListApplicationsPaginator is a paginator for ListApplications +type ListApplicationsPaginator struct { + options ListApplicationsPaginatorOptions + client ListApplicationsAPIClient + params *ListApplicationsInput + nextToken *string + firstPage bool +} + +// NewListApplicationsPaginator returns a new ListApplicationsPaginator +func NewListApplicationsPaginator(client ListApplicationsAPIClient, params *ListApplicationsInput, optFns ...func(*ListApplicationsPaginatorOptions)) *ListApplicationsPaginator { + if params == nil { + params = &ListApplicationsInput{} + } + + options := ListApplicationsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListApplicationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListApplicationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListApplications page. +func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListApplicationsOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListApplications(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 +} + +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesisanalyticsv2/api_op_RollbackApplication.go b/service/kinesisanalyticsv2/api_op_RollbackApplication.go index 95c3465f3e8..576034331dd 100644 --- a/service/kinesisanalyticsv2/api_op_RollbackApplication.go +++ b/service/kinesisanalyticsv2/api_op_RollbackApplication.go @@ -12,17 +12,15 @@ import ( ) // Reverts the application to the previous running version. You can roll back an -// application if you suspect it is stuck in a transient status. -// -// You can roll back an application only if it is in the UPDATING or AUTOSCALING +// application if you suspect it is stuck in a transient status or in the running // status. // +// You can roll back an application only if it is in the UPDATING , AUTOSCALING , +// or RUNNING statuses. +// // When you rollback an application, it loads state data from the last successful // snapshot. If the application has no snapshots, Managed Service for Apache Flink // rejects the rollback request. -// -// This action is not supported for Managed Service for Apache Flink for SQL -// applications. func (c *Client) RollbackApplication(ctx context.Context, params *RollbackApplicationInput, optFns ...func(*Options)) (*RollbackApplicationOutput, error) { if params == nil { params = &RollbackApplicationInput{} @@ -62,6 +60,9 @@ type RollbackApplicationOutput struct { // This member is required. ApplicationDetail *types.ApplicationDetail + // Operation ID for tracking RollbackApplication request + OperationId *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalyticsv2/api_op_StartApplication.go b/service/kinesisanalyticsv2/api_op_StartApplication.go index 2f453707b85..94527deab2a 100644 --- a/service/kinesisanalyticsv2/api_op_StartApplication.go +++ b/service/kinesisanalyticsv2/api_op_StartApplication.go @@ -44,6 +44,10 @@ type StartApplicationInput struct { } type StartApplicationOutput struct { + + // Operation ID for tracking StartApplication request + OperationId *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalyticsv2/api_op_StopApplication.go b/service/kinesisanalyticsv2/api_op_StopApplication.go index fa2b86eddcf..0c1bc062915 100644 --- a/service/kinesisanalyticsv2/api_op_StopApplication.go +++ b/service/kinesisanalyticsv2/api_op_StopApplication.go @@ -57,6 +57,10 @@ type StopApplicationInput struct { } type StopApplicationOutput struct { + + // Operation ID for tracking StopApplication request + OperationId *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalyticsv2/api_op_UpdateApplication.go b/service/kinesisanalyticsv2/api_op_UpdateApplication.go index 2ad79c23cc3..2250eb97abc 100644 --- a/service/kinesisanalyticsv2/api_op_UpdateApplication.go +++ b/service/kinesisanalyticsv2/api_op_UpdateApplication.go @@ -86,6 +86,9 @@ type UpdateApplicationOutput struct { // This member is required. ApplicationDetail *types.ApplicationDetail + // Operation ID for tracking UpdateApplication request + OperationId *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalyticsv2/deserializers.go b/service/kinesisanalyticsv2/deserializers.go index 7dc4cc4dcc7..4630ef20adc 100644 --- a/service/kinesisanalyticsv2/deserializers.go +++ b/service/kinesisanalyticsv2/deserializers.go @@ -2069,6 +2069,119 @@ func awsAwsjson11_deserializeOpErrorDescribeApplication(response *smithyhttp.Res } } +type awsAwsjson11_deserializeOpDescribeApplicationOperation struct { +} + +func (*awsAwsjson11_deserializeOpDescribeApplicationOperation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeApplicationOperation) 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, awsAwsjson11_deserializeOpErrorDescribeApplicationOperation(response, &metadata) + } + output := &DescribeApplicationOperationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeApplicationOperationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeApplicationOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidArgumentException", errorCode): + return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDescribeApplicationSnapshot struct { } @@ -2417,6 +2530,119 @@ func awsAwsjson11_deserializeOpErrorDiscoverInputSchema(response *smithyhttp.Res } } +type awsAwsjson11_deserializeOpListApplicationOperations struct { +} + +func (*awsAwsjson11_deserializeOpListApplicationOperations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListApplicationOperations) 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, awsAwsjson11_deserializeOpErrorListApplicationOperations(response, &metadata) + } + output := &ListApplicationOperationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListApplicationOperationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListApplicationOperations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidArgumentException", errorCode): + return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpListApplications struct { } @@ -4240,6 +4466,11 @@ func awsAwsjson11_deserializeDocumentApplicationConfigurationDescription(v **typ return err } + case "ApplicationSystemRollbackConfigurationDescription": + if err := awsAwsjson11_deserializeDocumentApplicationSystemRollbackConfigurationDescription(&sv.ApplicationSystemRollbackConfigurationDescription, value); err != nil { + return err + } + case "EnvironmentPropertyDescriptions": if err := awsAwsjson11_deserializeDocumentEnvironmentPropertyDescriptions(&sv.EnvironmentPropertyDescriptions, value); err != nil { return err @@ -4356,6 +4587,22 @@ func awsAwsjson11_deserializeDocumentApplicationDetail(v **types.ApplicationDeta sv.ApplicationStatus = types.ApplicationStatus(jtv) } + case "ApplicationVersionCreateTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ApplicationVersionCreateTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) @@ -4530,7 +4777,7 @@ func awsAwsjson11_deserializeDocumentApplicationMaintenanceConfigurationDescript return nil } -func awsAwsjson11_deserializeDocumentApplicationRestoreConfiguration(v **types.ApplicationRestoreConfiguration, value interface{}) error { +func awsAwsjson11_deserializeDocumentApplicationOperationInfo(v **types.ApplicationOperationInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4543,37 +4790,252 @@ func awsAwsjson11_deserializeDocumentApplicationRestoreConfiguration(v **types.A return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ApplicationRestoreConfiguration + var sv *types.ApplicationOperationInfo if *v == nil { - sv = &types.ApplicationRestoreConfiguration{} + sv = &types.ApplicationOperationInfo{} } else { sv = *v } for key, value := range shape { switch key { - case "ApplicationRestoreType": + case "EndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Operation": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ApplicationRestoreType to be of type string, got %T instead", value) + return fmt.Errorf("expected Operation to be of type string, got %T instead", value) } - sv.ApplicationRestoreType = types.ApplicationRestoreType(jtv) + sv.Operation = ptr.String(jtv) } - case "SnapshotName": + case "OperationId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SnapshotName to be of type string, got %T instead", value) + return fmt.Errorf("expected OperationId to be of type string, got %T instead", value) } - sv.SnapshotName = ptr.String(jtv) + sv.OperationId = ptr.String(jtv) } - default: - _, _ = key, value - - } + case "OperationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationStatus to be of type string, got %T instead", value) + } + sv.OperationStatus = types.OperationStatus(jtv) + } + + case "StartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentApplicationOperationInfoDetails(v **types.ApplicationOperationInfoDetails, 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.ApplicationOperationInfoDetails + if *v == nil { + sv = &types.ApplicationOperationInfoDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationVersionChangeDetails": + if err := awsAwsjson11_deserializeDocumentApplicationVersionChangeDetails(&sv.ApplicationVersionChangeDetails, value); err != nil { + return err + } + + case "EndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Operation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Operation to be of type string, got %T instead", value) + } + sv.Operation = ptr.String(jtv) + } + + case "OperationFailureDetails": + if err := awsAwsjson11_deserializeDocumentOperationFailureDetails(&sv.OperationFailureDetails, value); err != nil { + return err + } + + case "OperationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationStatus to be of type string, got %T instead", value) + } + sv.OperationStatus = types.OperationStatus(jtv) + } + + case "StartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentApplicationOperationInfoList(v *[]types.ApplicationOperationInfo, 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.ApplicationOperationInfo + if *v == nil { + cv = []types.ApplicationOperationInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ApplicationOperationInfo + destAddr := &col + if err := awsAwsjson11_deserializeDocumentApplicationOperationInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentApplicationRestoreConfiguration(v **types.ApplicationRestoreConfiguration, 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.ApplicationRestoreConfiguration + if *v == nil { + sv = &types.ApplicationRestoreConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationRestoreType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationRestoreType to be of type string, got %T instead", value) + } + sv.ApplicationRestoreType = types.ApplicationRestoreType(jtv) + } + + case "SnapshotName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SnapshotName to be of type string, got %T instead", value) + } + sv.SnapshotName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } } *v = sv return nil @@ -4639,21 +5101,150 @@ func awsAwsjson11_deserializeDocumentApplicationSummaries(v *[]types.Application cv = *v } - for _, value := range shape { - var col types.ApplicationSummary - destAddr := &col - if err := awsAwsjson11_deserializeDocumentApplicationSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for _, value := range shape { + var col types.ApplicationSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentApplicationSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentApplicationSummary(v **types.ApplicationSummary, 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.ApplicationSummary + if *v == nil { + sv = &types.ApplicationSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) + } + sv.ApplicationARN = ptr.String(jtv) + } + + case "ApplicationMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationMode to be of type string, got %T instead", value) + } + sv.ApplicationMode = types.ApplicationMode(jtv) + } + + case "ApplicationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) + } + sv.ApplicationName = ptr.String(jtv) + } + + case "ApplicationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationStatus to be of type string, got %T instead", value) + } + sv.ApplicationStatus = types.ApplicationStatus(jtv) + } + + case "ApplicationVersionId": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ApplicationVersionId = ptr.Int64(i64) + } + + case "RuntimeEnvironment": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuntimeEnvironment to be of type string, got %T instead", value) + } + sv.RuntimeEnvironment = types.RuntimeEnvironment(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentApplicationSystemRollbackConfigurationDescription(v **types.ApplicationSystemRollbackConfigurationDescription, 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.ApplicationSystemRollbackConfigurationDescription + if *v == nil { + sv = &types.ApplicationSystemRollbackConfigurationDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RollbackEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) + } + sv.RollbackEnabled = ptr.Bool(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentApplicationSummary(v **types.ApplicationSummary, value interface{}) error { +func awsAwsjson11_deserializeDocumentApplicationVersionChangeDetails(v **types.ApplicationVersionChangeDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4666,52 +5257,29 @@ func awsAwsjson11_deserializeDocumentApplicationSummary(v **types.ApplicationSum return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ApplicationSummary + var sv *types.ApplicationVersionChangeDetails if *v == nil { - sv = &types.ApplicationSummary{} + sv = &types.ApplicationVersionChangeDetails{} } else { sv = *v } for key, value := range shape { switch key { - case "ApplicationARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) - } - sv.ApplicationARN = ptr.String(jtv) - } - - case "ApplicationMode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ApplicationMode to be of type string, got %T instead", value) - } - sv.ApplicationMode = types.ApplicationMode(jtv) - } - - case "ApplicationName": + case "ApplicationVersionUpdatedFrom": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) + return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } - sv.ApplicationName = ptr.String(jtv) - } - - case "ApplicationStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ApplicationStatus to be of type string, got %T instead", value) + i64, err := jtv.Int64() + if err != nil { + return err } - sv.ApplicationStatus = types.ApplicationStatus(jtv) + sv.ApplicationVersionUpdatedFrom = ptr.Int64(i64) } - case "ApplicationVersionId": + case "ApplicationVersionUpdatedTo": if value != nil { jtv, ok := value.(json.Number) if !ok { @@ -4721,16 +5289,7 @@ func awsAwsjson11_deserializeDocumentApplicationSummary(v **types.ApplicationSum if err != nil { return err } - sv.ApplicationVersionId = ptr.Int64(i64) - } - - case "RuntimeEnvironment": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RuntimeEnvironment to be of type string, got %T instead", value) - } - sv.RuntimeEnvironment = types.RuntimeEnvironment(jtv) + sv.ApplicationVersionUpdatedTo = ptr.Int64(i64) } default: @@ -5424,6 +5983,46 @@ func awsAwsjson11_deserializeDocumentEnvironmentPropertyDescriptions(v **types.E return nil } +func awsAwsjson11_deserializeDocumentErrorInfo(v **types.ErrorInfo, 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.ErrorInfo + if *v == nil { + sv = &types.ErrorInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorString to be of type string, got %T instead", value) + } + sv.ErrorString = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentFlinkApplicationConfigurationDescription(v **types.FlinkApplicationConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6484,6 +7083,51 @@ func awsAwsjson11_deserializeDocumentMonitoringConfigurationDescription(v **type return nil } +func awsAwsjson11_deserializeDocumentOperationFailureDetails(v **types.OperationFailureDetails, 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.OperationFailureDetails + if *v == nil { + sv = &types.OperationFailureDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorInfo": + if err := awsAwsjson11_deserializeDocumentErrorInfo(&sv.ErrorInfo, value); err != nil { + return err + } + + case "RollbackOperationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationId to be of type string, got %T instead", value) + } + sv.RollbackOperationId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentOutputDescription(v **types.OutputDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8319,6 +8963,15 @@ func awsAwsjson11_deserializeOpDocumentAddApplicationCloudWatchLoggingOptionOutp return err } + case "OperationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationId to be of type string, got %T instead", value) + } + sv.OperationId = ptr.String(jtv) + } + default: _, _ = key, value @@ -8613,6 +9266,15 @@ func awsAwsjson11_deserializeOpDocumentAddApplicationVpcConfigurationOutput(v ** sv.ApplicationVersionId = ptr.Int64(i64) } + case "OperationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationId to be of type string, got %T instead", value) + } + sv.OperationId = ptr.String(jtv) + } + case "VpcConfigurationDescription": if err := awsAwsjson11_deserializeDocumentVpcConfigurationDescription(&sv.VpcConfigurationDescription, value); err != nil { return err @@ -8783,6 +9445,15 @@ func awsAwsjson11_deserializeOpDocumentDeleteApplicationCloudWatchLoggingOptionO return err } + case "OperationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationId to be of type string, got %T instead", value) + } + sv.OperationId = ptr.String(jtv) + } + default: _, _ = key, value @@ -9057,6 +9728,51 @@ func awsAwsjson11_deserializeOpDocumentDeleteApplicationVpcConfigurationOutput(v sv.ApplicationVersionId = ptr.Int64(i64) } + case "OperationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationId to be of type string, got %T instead", value) + } + sv.OperationId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeApplicationOperationOutput(v **DescribeApplicationOperationOutput, 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 *DescribeApplicationOperationOutput + if *v == nil { + sv = &DescribeApplicationOperationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationOperationInfoDetails": + if err := awsAwsjson11_deserializeDocumentApplicationOperationInfoDetails(&sv.ApplicationOperationInfoDetails, value); err != nil { + return err + } + default: _, _ = key, value @@ -9225,6 +9941,51 @@ func awsAwsjson11_deserializeOpDocumentDiscoverInputSchemaOutput(v **DiscoverInp return nil } +func awsAwsjson11_deserializeOpDocumentListApplicationOperationsOutput(v **ListApplicationOperationsOutput, 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 *ListApplicationOperationsOutput + if *v == nil { + sv = &ListApplicationOperationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationOperationInfoList": + if err := awsAwsjson11_deserializeDocumentApplicationOperationInfoList(&sv.ApplicationOperationInfoList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListApplicationSnapshotsOutput(v **ListApplicationSnapshotsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9423,6 +10184,15 @@ func awsAwsjson11_deserializeOpDocumentRollbackApplicationOutput(v **RollbackApp return err } + case "OperationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationId to be of type string, got %T instead", value) + } + sv.OperationId = ptr.String(jtv) + } + default: _, _ = key, value @@ -9454,6 +10224,15 @@ func awsAwsjson11_deserializeOpDocumentStartApplicationOutput(v **StartApplicati for key, value := range shape { switch key { + case "OperationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationId to be of type string, got %T instead", value) + } + sv.OperationId = ptr.String(jtv) + } + default: _, _ = key, value @@ -9485,6 +10264,15 @@ func awsAwsjson11_deserializeOpDocumentStopApplicationOutput(v **StopApplication for key, value := range shape { switch key { + case "OperationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationId to be of type string, got %T instead", value) + } + sv.OperationId = ptr.String(jtv) + } + default: _, _ = key, value @@ -9628,6 +10416,15 @@ func awsAwsjson11_deserializeOpDocumentUpdateApplicationOutput(v **UpdateApplica return err } + case "OperationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationId to be of type string, got %T instead", value) + } + sv.OperationId = ptr.String(jtv) + } + default: _, _ = key, value diff --git a/service/kinesisanalyticsv2/generated.json b/service/kinesisanalyticsv2/generated.json index c18854072d5..535932cdac5 100644 --- a/service/kinesisanalyticsv2/generated.json +++ b/service/kinesisanalyticsv2/generated.json @@ -25,9 +25,11 @@ "api_op_DeleteApplicationSnapshot.go", "api_op_DeleteApplicationVpcConfiguration.go", "api_op_DescribeApplication.go", + "api_op_DescribeApplicationOperation.go", "api_op_DescribeApplicationSnapshot.go", "api_op_DescribeApplicationVersion.go", "api_op_DiscoverInputSchema.go", + "api_op_ListApplicationOperations.go", "api_op_ListApplicationSnapshots.go", "api_op_ListApplicationVersions.go", "api_op_ListApplications.go", diff --git a/service/kinesisanalyticsv2/serializers.go b/service/kinesisanalyticsv2/serializers.go index 4b40dd5e257..1298d3a62f2 100644 --- a/service/kinesisanalyticsv2/serializers.go +++ b/service/kinesisanalyticsv2/serializers.go @@ -951,6 +951,61 @@ func (m *awsAwsjson11_serializeOpDescribeApplication) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribeApplicationOperation struct { +} + +func (*awsAwsjson11_serializeOpDescribeApplicationOperation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeApplicationOperation) 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.(*DescribeApplicationOperationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.DescribeApplicationOperation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeApplicationOperationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDescribeApplicationSnapshot struct { } @@ -1116,6 +1171,61 @@ func (m *awsAwsjson11_serializeOpDiscoverInputSchema) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListApplicationOperations struct { +} + +func (*awsAwsjson11_serializeOpListApplicationOperations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListApplicationOperations) 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.(*ListApplicationOperationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.ListApplicationOperations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListApplicationOperationsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListApplications struct { } @@ -1776,6 +1886,13 @@ func awsAwsjson11_serializeDocumentApplicationConfiguration(v *types.Application } } + if v.ApplicationSystemRollbackConfiguration != nil { + ok := object.Key("ApplicationSystemRollbackConfiguration") + if err := awsAwsjson11_serializeDocumentApplicationSystemRollbackConfiguration(v.ApplicationSystemRollbackConfiguration, ok); err != nil { + return err + } + } + if v.EnvironmentProperties != nil { ok := object.Key("EnvironmentProperties") if err := awsAwsjson11_serializeDocumentEnvironmentProperties(v.EnvironmentProperties, ok); err != nil { @@ -1832,6 +1949,13 @@ func awsAwsjson11_serializeDocumentApplicationConfigurationUpdate(v *types.Appli } } + if v.ApplicationSystemRollbackConfigurationUpdate != nil { + ok := object.Key("ApplicationSystemRollbackConfigurationUpdate") + if err := awsAwsjson11_serializeDocumentApplicationSystemRollbackConfigurationUpdate(v.ApplicationSystemRollbackConfigurationUpdate, ok); err != nil { + return err + } + } + if v.EnvironmentPropertyUpdates != nil { ok := object.Key("EnvironmentPropertyUpdates") if err := awsAwsjson11_serializeDocumentEnvironmentPropertyUpdates(v.EnvironmentPropertyUpdates, ok); err != nil { @@ -1923,6 +2047,30 @@ func awsAwsjson11_serializeDocumentApplicationSnapshotConfigurationUpdate(v *typ return nil } +func awsAwsjson11_serializeDocumentApplicationSystemRollbackConfiguration(v *types.ApplicationSystemRollbackConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RollbackEnabled != nil { + ok := object.Key("RollbackEnabled") + ok.Boolean(*v.RollbackEnabled) + } + + return nil +} + +func awsAwsjson11_serializeDocumentApplicationSystemRollbackConfigurationUpdate(v *types.ApplicationSystemRollbackConfigurationUpdate, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RollbackEnabledUpdate != nil { + ok := object.Key("RollbackEnabledUpdate") + ok.Boolean(*v.RollbackEnabledUpdate) + } + + return nil +} + func awsAwsjson11_serializeDocumentCatalogConfiguration(v *types.CatalogConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4076,6 +4224,23 @@ func awsAwsjson11_serializeOpDocumentDescribeApplicationInput(v *DescribeApplica return nil } +func awsAwsjson11_serializeOpDocumentDescribeApplicationOperationInput(v *DescribeApplicationOperationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApplicationName != nil { + ok := object.Key("ApplicationName") + ok.String(*v.ApplicationName) + } + + if v.OperationId != nil { + ok := object.Key("OperationId") + ok.String(*v.OperationId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeApplicationSnapshotInput(v *DescribeApplicationSnapshotInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4148,6 +4313,38 @@ func awsAwsjson11_serializeOpDocumentDiscoverInputSchemaInput(v *DiscoverInputSc return nil } +func awsAwsjson11_serializeOpDocumentListApplicationOperationsInput(v *ListApplicationOperationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApplicationName != nil { + ok := object.Key("ApplicationName") + ok.String(*v.ApplicationName) + } + + if v.Limit != nil { + ok := object.Key("Limit") + ok.Integer(*v.Limit) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.Operation != nil { + ok := object.Key("Operation") + ok.String(*v.Operation) + } + + if len(v.OperationStatus) > 0 { + ok := object.Key("OperationStatus") + ok.String(string(v.OperationStatus)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListApplicationsInput(v *ListApplicationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/kinesisanalyticsv2/snapshot/api_op_DescribeApplicationOperation.go.snap b/service/kinesisanalyticsv2/snapshot/api_op_DescribeApplicationOperation.go.snap new file mode 100644 index 00000000000..6a735e98319 --- /dev/null +++ b/service/kinesisanalyticsv2/snapshot/api_op_DescribeApplicationOperation.go.snap @@ -0,0 +1,36 @@ +DescribeApplicationOperation + 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/kinesisanalyticsv2/snapshot/api_op_ListApplicationOperations.go.snap b/service/kinesisanalyticsv2/snapshot/api_op_ListApplicationOperations.go.snap new file mode 100644 index 00000000000..cf651bf2529 --- /dev/null +++ b/service/kinesisanalyticsv2/snapshot/api_op_ListApplicationOperations.go.snap @@ -0,0 +1,36 @@ +ListApplicationOperations + 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/kinesisanalyticsv2/snapshot_test.go b/service/kinesisanalyticsv2/snapshot_test.go index c2bd13bfff1..427ef48b83d 100644 --- a/service/kinesisanalyticsv2/snapshot_test.go +++ b/service/kinesisanalyticsv2/snapshot_test.go @@ -266,6 +266,18 @@ func TestCheckSnapshot_DescribeApplication(t *testing.T) { } } +func TestCheckSnapshot_DescribeApplicationOperation(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeApplicationOperation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeApplicationOperation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeApplicationSnapshot(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeApplicationSnapshot(context.Background(), nil, func(o *Options) { @@ -302,6 +314,18 @@ func TestCheckSnapshot_DiscoverInputSchema(t *testing.T) { } } +func TestCheckSnapshot_ListApplicationOperations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListApplicationOperations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListApplicationOperations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListApplications(t *testing.T) { svc := New(Options{}) _, err := svc.ListApplications(context.Background(), nil, func(o *Options) { @@ -637,6 +661,18 @@ func TestUpdateSnapshot_DescribeApplication(t *testing.T) { } } +func TestUpdateSnapshot_DescribeApplicationOperation(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeApplicationOperation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeApplicationOperation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeApplicationSnapshot(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeApplicationSnapshot(context.Background(), nil, func(o *Options) { @@ -673,6 +709,18 @@ func TestUpdateSnapshot_DiscoverInputSchema(t *testing.T) { } } +func TestUpdateSnapshot_ListApplicationOperations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListApplicationOperations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListApplicationOperations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListApplications(t *testing.T) { svc := New(Options{}) _, err := svc.ListApplications(context.Background(), nil, func(o *Options) { diff --git a/service/kinesisanalyticsv2/types/enums.go b/service/kinesisanalyticsv2/types/enums.go index cda36f7ef05..9614f522a20 100644 --- a/service/kinesisanalyticsv2/types/enums.go +++ b/service/kinesisanalyticsv2/types/enums.go @@ -203,6 +203,29 @@ func (MetricsLevel) Values() []MetricsLevel { } } +type OperationStatus string + +// Enum values for OperationStatus +const ( + OperationStatusInProgress OperationStatus = "IN_PROGRESS" + OperationStatusCancelled OperationStatus = "CANCELLED" + OperationStatusSuccessful OperationStatus = "SUCCESSFUL" + OperationStatusFailed OperationStatus = "FAILED" +) + +// Values returns all known values for OperationStatus. 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 (OperationStatus) Values() []OperationStatus { + return []OperationStatus{ + "IN_PROGRESS", + "CANCELLED", + "SUCCESSFUL", + "FAILED", + } +} + type RecordFormatType string // Enum values for RecordFormatType diff --git a/service/kinesisanalyticsv2/types/types.go b/service/kinesisanalyticsv2/types/types.go index a74cffc18b5..f369b55db99 100644 --- a/service/kinesisanalyticsv2/types/types.go +++ b/service/kinesisanalyticsv2/types/types.go @@ -61,6 +61,10 @@ type ApplicationConfiguration struct { // application. ApplicationSnapshotConfiguration *ApplicationSnapshotConfiguration + // Describes system rollback configuration for a Managed Service for Apache Flink + // application + ApplicationSystemRollbackConfiguration *ApplicationSystemRollbackConfiguration + // Describes execution properties for a Managed Service for Apache Flink // application. EnvironmentProperties *EnvironmentProperties @@ -95,6 +99,10 @@ type ApplicationConfigurationDescription struct { // application. ApplicationSnapshotConfigurationDescription *ApplicationSnapshotConfigurationDescription + // Describes system rollback configuration for a Managed Service for Apache Flink + // application + ApplicationSystemRollbackConfigurationDescription *ApplicationSystemRollbackConfigurationDescription + // Describes execution properties for a Managed Service for Apache Flink // application. EnvironmentPropertyDescriptions *EnvironmentPropertyDescriptions @@ -130,6 +138,10 @@ type ApplicationConfigurationUpdate struct { // application. ApplicationSnapshotConfigurationUpdate *ApplicationSnapshotConfigurationUpdate + // Describes system rollback configuration for a Managed Service for Apache Flink + // application + ApplicationSystemRollbackConfigurationUpdate *ApplicationSystemRollbackConfigurationUpdate + // Describes updates to the environment properties for a Managed Service for // Apache Flink application. EnvironmentPropertyUpdates *EnvironmentPropertyUpdates @@ -198,6 +210,9 @@ type ApplicationDetail struct { // application, the mode is optional. ApplicationMode ApplicationMode + // The current timestamp when the application version was created. + ApplicationVersionCreateTimestamp *time.Time + // If you reverted the application using RollbackApplication, the application version when // RollbackApplication was called. ApplicationVersionRolledBackFrom *int64 @@ -254,6 +269,60 @@ type ApplicationMaintenanceConfigurationUpdate struct { noSmithyDocumentSerde } +// Provides a description of the operation, such as the type and status of +// operation +type ApplicationOperationInfo struct { + + // The timestamp at which the operation finished for the application + EndTime *time.Time + + // Type of operation performed on an application + Operation *string + + // Identifier of the Operation + OperationId *string + + // Status of the operation performed on an application + OperationStatus OperationStatus + + // The timestamp at which the operation was created + StartTime *time.Time + + noSmithyDocumentSerde +} + +// Provides a description of the operation, such as the operation-type and status +type ApplicationOperationInfoDetails struct { + + // The timestamp at which the operation finished for the application + // + // This member is required. + EndTime *time.Time + + // Type of operation performed on an application + // + // This member is required. + Operation *string + + // Status of the operation performed on an application + // + // This member is required. + OperationStatus OperationStatus + + // The timestamp at which the operation was created + // + // This member is required. + StartTime *time.Time + + // Contains information about the application version changes due to an operation + ApplicationVersionChangeDetails *ApplicationVersionChangeDetails + + // Provides a description of the operation failure + OperationFailureDetails *OperationFailureDetails + + noSmithyDocumentSerde +} + // Specifies the method and snapshot to use when restarting an application using // previously saved application state. type ApplicationRestoreConfiguration struct { @@ -345,6 +414,62 @@ type ApplicationSummary struct { noSmithyDocumentSerde } +// Describes system rollback configuration for a Managed Service for Apache Flink +// application +type ApplicationSystemRollbackConfiguration struct { + + // Describes whether system rollbacks are enabled for a Managed Service for Apache + // Flink application + // + // This member is required. + RollbackEnabled *bool + + noSmithyDocumentSerde +} + +// Describes system rollback configuration for a Managed Service for Apache Flink +// application +type ApplicationSystemRollbackConfigurationDescription struct { + + // Describes whether system rollbacks are enabled for a Managed Service for Apache + // Flink application + // + // This member is required. + RollbackEnabled *bool + + noSmithyDocumentSerde +} + +// Describes system rollback configuration for a Managed Service for Apache Flink +// application +type ApplicationSystemRollbackConfigurationUpdate struct { + + // Describes whether system rollbacks are enabled for a Managed Service for Apache + // Flink application + // + // This member is required. + RollbackEnabledUpdate *bool + + noSmithyDocumentSerde +} + +// Contains information about the application version changes due to an operation +type ApplicationVersionChangeDetails struct { + + // The operation was performed on this version of the application + // + // This member is required. + ApplicationVersionUpdatedFrom *int64 + + // The operation execution resulted in the transition to the following version of + // the application + // + // This member is required. + ApplicationVersionUpdatedTo *int64 + + noSmithyDocumentSerde +} + // The summary of the application version. type ApplicationVersionSummary struct { @@ -802,6 +927,15 @@ type EnvironmentPropertyUpdates struct { noSmithyDocumentSerde } +// Provides a description of the operation failure error +type ErrorInfo struct { + + // Error message resulting in failure of the operation + ErrorString *string + + noSmithyDocumentSerde +} + // Describes configuration parameters for a Managed Service for Apache Flink // application or a Studio notebook. type FlinkApplicationConfiguration struct { @@ -1571,6 +1705,19 @@ type MonitoringConfigurationUpdate struct { noSmithyDocumentSerde } +// Provides a description of the operation failure +type OperationFailureDetails struct { + + // Provides a description of the operation failure error + ErrorInfo *ErrorInfo + + // Provides the operation ID of a system-rollback operation executed due to + // failure in the current operation + RollbackOperationId *string + + noSmithyDocumentSerde +} + // Describes a SQL-based Kinesis Data Analytics application's output // // configuration, in which you identify an in-application stream and a destination diff --git a/service/kinesisanalyticsv2/validators.go b/service/kinesisanalyticsv2/validators.go index 0bd6c5f1e8b..9a1ee66fcf1 100644 --- a/service/kinesisanalyticsv2/validators.go +++ b/service/kinesisanalyticsv2/validators.go @@ -350,6 +350,26 @@ func (m *validateOpDescribeApplication) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDescribeApplicationOperation struct { +} + +func (*validateOpDescribeApplicationOperation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeApplicationOperation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeApplicationOperationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeApplicationOperationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeApplicationSnapshot struct { } @@ -410,6 +430,26 @@ func (m *validateOpDiscoverInputSchema) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpListApplicationOperations struct { +} + +func (*validateOpListApplicationOperations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListApplicationOperations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListApplicationOperationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListApplicationOperationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListApplicationSnapshots struct { } @@ -678,6 +718,10 @@ func addOpDescribeApplicationValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDescribeApplication{}, middleware.After) } +func addOpDescribeApplicationOperationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeApplicationOperation{}, middleware.After) +} + func addOpDescribeApplicationSnapshotValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeApplicationSnapshot{}, middleware.After) } @@ -690,6 +734,10 @@ func addOpDiscoverInputSchemaValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDiscoverInputSchema{}, middleware.After) } +func addOpListApplicationOperationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListApplicationOperations{}, middleware.After) +} + func addOpListApplicationSnapshotsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListApplicationSnapshots{}, middleware.After) } @@ -780,6 +828,11 @@ func validateApplicationConfiguration(v *types.ApplicationConfiguration) error { invalidParams.AddNested("ApplicationSnapshotConfiguration", err.(smithy.InvalidParamsError)) } } + if v.ApplicationSystemRollbackConfiguration != nil { + if err := validateApplicationSystemRollbackConfiguration(v.ApplicationSystemRollbackConfiguration); err != nil { + invalidParams.AddNested("ApplicationSystemRollbackConfiguration", err.(smithy.InvalidParamsError)) + } + } if v.VpcConfigurations != nil { if err := validateVpcConfigurations(v.VpcConfigurations); err != nil { invalidParams.AddNested("VpcConfigurations", err.(smithy.InvalidParamsError)) @@ -817,6 +870,11 @@ func validateApplicationConfigurationUpdate(v *types.ApplicationConfigurationUpd invalidParams.AddNested("ApplicationSnapshotConfigurationUpdate", err.(smithy.InvalidParamsError)) } } + if v.ApplicationSystemRollbackConfigurationUpdate != nil { + if err := validateApplicationSystemRollbackConfigurationUpdate(v.ApplicationSystemRollbackConfigurationUpdate); err != nil { + invalidParams.AddNested("ApplicationSystemRollbackConfigurationUpdate", err.(smithy.InvalidParamsError)) + } + } if v.VpcConfigurationUpdates != nil { if err := validateVpcConfigurationUpdates(v.VpcConfigurationUpdates); err != nil { invalidParams.AddNested("VpcConfigurationUpdates", err.(smithy.InvalidParamsError)) @@ -894,6 +952,36 @@ func validateApplicationSnapshotConfigurationUpdate(v *types.ApplicationSnapshot } } +func validateApplicationSystemRollbackConfiguration(v *types.ApplicationSystemRollbackConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ApplicationSystemRollbackConfiguration"} + if v.RollbackEnabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("RollbackEnabled")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateApplicationSystemRollbackConfigurationUpdate(v *types.ApplicationSystemRollbackConfigurationUpdate) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ApplicationSystemRollbackConfigurationUpdate"} + if v.RollbackEnabledUpdate == nil { + invalidParams.Add(smithy.NewErrParamRequired("RollbackEnabledUpdate")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateCatalogConfiguration(v *types.CatalogConfiguration) error { if v == nil { return nil @@ -2708,6 +2796,24 @@ func validateOpDescribeApplicationInput(v *DescribeApplicationInput) error { } } +func validateOpDescribeApplicationOperationInput(v *DescribeApplicationOperationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeApplicationOperationInput"} + if v.ApplicationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) + } + if v.OperationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OperationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeApplicationSnapshotInput(v *DescribeApplicationSnapshotInput) error { if v == nil { return nil @@ -2769,6 +2875,21 @@ func validateOpDiscoverInputSchemaInput(v *DiscoverInputSchemaInput) error { } } +func validateOpListApplicationOperationsInput(v *ListApplicationOperationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListApplicationOperationsInput"} + if v.ApplicationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListApplicationSnapshotsInput(v *ListApplicationSnapshotsInput) error { if v == nil { return nil diff --git a/service/opensearch/api_op_CreateDomain.go b/service/opensearch/api_op_CreateDomain.go index 2018e876430..a45e86f9a7c 100644 --- a/service/opensearch/api_op_CreateDomain.go +++ b/service/opensearch/api_op_CreateDomain.go @@ -37,6 +37,9 @@ type CreateDomainInput struct { // This member is required. DomainName *string + // Options for all machine learning features for the specified domain. + AIMLOptions *types.AIMLOptionsInput + // Identity and Access Management (IAM) policy document specifying the access // policies for the new domain. AccessPolicies *string diff --git a/service/opensearch/api_op_UpdateDomainConfig.go b/service/opensearch/api_op_UpdateDomainConfig.go index 913f2706ebb..7581ab762dd 100644 --- a/service/opensearch/api_op_UpdateDomainConfig.go +++ b/service/opensearch/api_op_UpdateDomainConfig.go @@ -36,6 +36,9 @@ type UpdateDomainConfigInput struct { // This member is required. DomainName *string + // Options for all machine learning features for the specified domain. + AIMLOptions *types.AIMLOptionsInput + // Identity and Access Management (IAM) access policy as a JSON-formatted string. AccessPolicies *string diff --git a/service/opensearch/deserializers.go b/service/opensearch/deserializers.go index 9704a4ee8a1..bdb7f8017b5 100644 --- a/service/opensearch/deserializers.go +++ b/service/opensearch/deserializers.go @@ -11174,6 +11174,83 @@ func awsRestjson1_deserializeDocumentAdvancedSecurityOptionsStatus(v **types.Adv return nil } +func awsRestjson1_deserializeDocumentAIMLOptionsOutput(v **types.AIMLOptionsOutput, 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.AIMLOptionsOutput + if *v == nil { + sv = &types.AIMLOptionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NaturalLanguageQueryGenerationOptions": + if err := awsRestjson1_deserializeDocumentNaturalLanguageQueryGenerationOptionsOutput(&sv.NaturalLanguageQueryGenerationOptions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAIMLOptionsStatus(v **types.AIMLOptionsStatus, 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.AIMLOptionsStatus + if *v == nil { + sv = &types.AIMLOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentAIMLOptionsOutput(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAuthorizedPrincipal(v **types.AuthorizedPrincipal, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13201,6 +13278,11 @@ func awsRestjson1_deserializeDocumentDomainConfig(v **types.DomainConfig, value return err } + case "AIMLOptions": + if err := awsRestjson1_deserializeDocumentAIMLOptionsStatus(&sv.AIMLOptions, value); err != nil { + return err + } + case "AutoTuneOptions": if err := awsRestjson1_deserializeDocumentAutoTuneOptionsStatus(&sv.AutoTuneOptions, value); err != nil { return err @@ -14004,6 +14086,11 @@ func awsRestjson1_deserializeDocumentDomainStatus(v **types.DomainStatus, value return err } + case "AIMLOptions": + if err := awsRestjson1_deserializeDocumentAIMLOptionsOutput(&sv.AIMLOptions, value); err != nil { + return err + } + case "ARN": if value != nil { jtv, ok := value.(string) @@ -15884,6 +15971,55 @@ func awsRestjson1_deserializeDocumentModifyingPropertiesList(v *[]types.Modifyin return nil } +func awsRestjson1_deserializeDocumentNaturalLanguageQueryGenerationOptionsOutput(v **types.NaturalLanguageQueryGenerationOptionsOutput, 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.NaturalLanguageQueryGenerationOptionsOutput + if *v == nil { + sv = &types.NaturalLanguageQueryGenerationOptionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CurrentState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NaturalLanguageQueryGenerationCurrentState to be of type string, got %T instead", value) + } + sv.CurrentState = types.NaturalLanguageQueryGenerationCurrentState(jtv) + } + + case "DesiredState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NaturalLanguageQueryGenerationDesiredState to be of type string, got %T instead", value) + } + sv.DesiredState = types.NaturalLanguageQueryGenerationDesiredState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentNodeToNodeEncryptionOptions(v **types.NodeToNodeEncryptionOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/opensearch/serializers.go b/service/opensearch/serializers.go index 0f7c08ab5d1..21833bdfe7e 100644 --- a/service/opensearch/serializers.go +++ b/service/opensearch/serializers.go @@ -673,6 +673,13 @@ func awsRestjson1_serializeOpDocumentCreateDomainInput(v *CreateDomainInput, val } } + if v.AIMLOptions != nil { + ok := object.Key("AIMLOptions") + if err := awsRestjson1_serializeDocumentAIMLOptionsInput(v.AIMLOptions, ok); err != nil { + return err + } + } + if v.AutoTuneOptions != nil { ok := object.Key("AutoTuneOptions") if err := awsRestjson1_serializeDocumentAutoTuneOptionsInput(v.AutoTuneOptions, ok); err != nil { @@ -4611,6 +4618,13 @@ func awsRestjson1_serializeOpDocumentUpdateDomainConfigInput(v *UpdateDomainConf } } + if v.AIMLOptions != nil { + ok := object.Key("AIMLOptions") + if err := awsRestjson1_serializeDocumentAIMLOptionsInput(v.AIMLOptions, ok); err != nil { + return err + } + } + if v.AutoTuneOptions != nil { ok := object.Key("AutoTuneOptions") if err := awsRestjson1_serializeDocumentAutoTuneOptions(v.AutoTuneOptions, ok); err != nil { @@ -5136,6 +5150,20 @@ func awsRestjson1_serializeDocumentAdvancedSecurityOptionsInput(v *types.Advance return nil } +func awsRestjson1_serializeDocumentAIMLOptionsInput(v *types.AIMLOptionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NaturalLanguageQueryGenerationOptions != nil { + ok := object.Key("NaturalLanguageQueryGenerationOptions") + if err := awsRestjson1_serializeDocumentNaturalLanguageQueryGenerationOptionsInput(v.NaturalLanguageQueryGenerationOptions, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentAutoTuneMaintenanceSchedule(v *types.AutoTuneMaintenanceSchedule, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5685,6 +5713,18 @@ func awsRestjson1_serializeDocumentMasterUserOptions(v *types.MasterUserOptions, return nil } +func awsRestjson1_serializeDocumentNaturalLanguageQueryGenerationOptionsInput(v *types.NaturalLanguageQueryGenerationOptionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DesiredState) > 0 { + ok := object.Key("DesiredState") + ok.String(string(v.DesiredState)) + } + + return nil +} + func awsRestjson1_serializeDocumentNodeToNodeEncryptionOptions(v *types.NodeToNodeEncryptionOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/opensearch/types/enums.go b/service/opensearch/types/enums.go index 7e93821cbfa..f659df614ac 100644 --- a/service/opensearch/types/enums.go +++ b/service/opensearch/types/enums.go @@ -552,6 +552,56 @@ func (MasterNodeStatus) Values() []MasterNodeStatus { } } +type NaturalLanguageQueryGenerationCurrentState string + +// Enum values for NaturalLanguageQueryGenerationCurrentState +const ( + NaturalLanguageQueryGenerationCurrentStateNotEnabled NaturalLanguageQueryGenerationCurrentState = "NOT_ENABLED" + NaturalLanguageQueryGenerationCurrentStateEnableComplete NaturalLanguageQueryGenerationCurrentState = "ENABLE_COMPLETE" + NaturalLanguageQueryGenerationCurrentStateEnableInProgress NaturalLanguageQueryGenerationCurrentState = "ENABLE_IN_PROGRESS" + NaturalLanguageQueryGenerationCurrentStateEnableFailed NaturalLanguageQueryGenerationCurrentState = "ENABLE_FAILED" + NaturalLanguageQueryGenerationCurrentStateDisableComplete NaturalLanguageQueryGenerationCurrentState = "DISABLE_COMPLETE" + NaturalLanguageQueryGenerationCurrentStateDisableInProgress NaturalLanguageQueryGenerationCurrentState = "DISABLE_IN_PROGRESS" + NaturalLanguageQueryGenerationCurrentStateDisableFailed NaturalLanguageQueryGenerationCurrentState = "DISABLE_FAILED" +) + +// Values returns all known values for NaturalLanguageQueryGenerationCurrentState. +// 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 (NaturalLanguageQueryGenerationCurrentState) Values() []NaturalLanguageQueryGenerationCurrentState { + return []NaturalLanguageQueryGenerationCurrentState{ + "NOT_ENABLED", + "ENABLE_COMPLETE", + "ENABLE_IN_PROGRESS", + "ENABLE_FAILED", + "DISABLE_COMPLETE", + "DISABLE_IN_PROGRESS", + "DISABLE_FAILED", + } +} + +type NaturalLanguageQueryGenerationDesiredState string + +// Enum values for NaturalLanguageQueryGenerationDesiredState +const ( + NaturalLanguageQueryGenerationDesiredStateEnabled NaturalLanguageQueryGenerationDesiredState = "ENABLED" + NaturalLanguageQueryGenerationDesiredStateDisabled NaturalLanguageQueryGenerationDesiredState = "DISABLED" +) + +// Values returns all known values for NaturalLanguageQueryGenerationDesiredState. +// 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 (NaturalLanguageQueryGenerationDesiredState) Values() []NaturalLanguageQueryGenerationDesiredState { + return []NaturalLanguageQueryGenerationDesiredState{ + "ENABLED", + "DISABLED", + } +} + type NodeStatus string // Enum values for NodeStatus diff --git a/service/opensearch/types/types.go b/service/opensearch/types/types.go index 4fabdd1de3d..94477c0deb4 100644 --- a/service/opensearch/types/types.go +++ b/service/opensearch/types/types.go @@ -165,6 +165,39 @@ type AdvancedSecurityOptionsStatus struct { noSmithyDocumentSerde } +// Container for parameters required to enable all machine learning features. +type AIMLOptionsInput struct { + + // Container for parameters required for natural language query generation on the + // specified domain. + NaturalLanguageQueryGenerationOptions *NaturalLanguageQueryGenerationOptionsInput + + noSmithyDocumentSerde +} + +// Container for parameters representing the state of machine learning features on +// the specified domain. +type AIMLOptionsOutput struct { + + // Container for parameters required for natural language query generation on the + // specified domain. + NaturalLanguageQueryGenerationOptions *NaturalLanguageQueryGenerationOptionsOutput + + noSmithyDocumentSerde +} + +// The status of machine learning options on the specified domain. +type AIMLOptionsStatus struct { + + // Machine learning options on the specified domain. + Options *AIMLOptionsOutput + + // Provides the current status of an entity. + Status *OptionStatus + + noSmithyDocumentSerde +} + // Information about an Amazon Web Services account or service that has access to // an Amazon OpenSearch Service domain through the use of an interface VPC // endpoint. @@ -707,6 +740,9 @@ type DescribePackagesFilter struct { // Container for the configuration of an OpenSearch Service domain. type DomainConfig struct { + // Container for parameters required to enable all machine learning features. + AIMLOptions *AIMLOptionsStatus + // Specifies the access policies for the domain. AccessPolicies *AccessPoliciesStatus @@ -972,6 +1008,9 @@ type DomainStatus struct { // This member is required. DomainName *string + // Container for parameters required to enable all machine learning features. + AIMLOptions *AIMLOptionsOutput + // Identity and Access Management (IAM) policy document specifying the access // policies for the domain. AccessPolicies *string @@ -1508,6 +1547,32 @@ type ModifyingProperties struct { noSmithyDocumentSerde } +// Container for parameters required to enable the natural language query +// generation feature. +type NaturalLanguageQueryGenerationOptionsInput struct { + + // The desired state of the natural language query generation feature. Valid + // values are ENABLED and DISABLED. + DesiredState NaturalLanguageQueryGenerationDesiredState + + noSmithyDocumentSerde +} + +// Container for parameters representing the state of the natural language query +// generation feature on the specified domain. +type NaturalLanguageQueryGenerationOptionsOutput struct { + + // The current state of the natural language query generation feature, indicating + // completion, in progress, or failure. + CurrentState NaturalLanguageQueryGenerationCurrentState + + // The desired state of the natural language query generation feature. Valid + // values are ENABLED and DISABLED. + DesiredState NaturalLanguageQueryGenerationDesiredState + + noSmithyDocumentSerde +} + // Enables or disables node-to-node encryption. For more information, see [Node-to-node encryption for Amazon OpenSearch Service]. // // [Node-to-node encryption for Amazon OpenSearch Service]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ntn.html