From e91c9c4e48a47fa92d82251dd6ba0f0edd4bff3d Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Thu, 19 Sep 2024 18:25:11 +0000 Subject: [PATCH] Regenerated Clients --- .../1aed1d178fc8423aad9504e4f907cfcb.json | 8 + .../345fe5f4bfe74ac7a09b2a6cfabdbce7.json | 8 + .../5ada7c81bf7a41b19797a7d6ff960c17.json | 8 + .../6aec3289a3f140089d861db465547dba.json | 8 + .../af0931aa94dd4179a7dd596486250201.json | 8 + .../c5b81c6bfe6a4f979d8fdf6831251d00.json | 8 + .../ceab748aee0143a2ac1b26a7e570d139.json | 8 + .../e8820abc8d454b01bd6ba9841c02b054.json | 8 + .../attributevalue/go_module_metadata.go | 2 +- .../api_op_CreateSyncConfiguration.go | 4 + .../api_op_UpdateSyncConfiguration.go | 4 + service/codeconnections/deserializers.go | 9 + service/codeconnections/serializers.go | 10 + service/codeconnections/types/enums.go | 19 + service/codeconnections/types/types.go | 7 +- service/glue/api_op_TestConnection.go | 147 ++++ service/glue/deserializers.go | 162 ++++ service/glue/generated.json | 1 + service/glue/serializers.go | 100 +++ .../snapshot/api_op_TestConnection.go.snap | 36 + service/glue/snapshot_test.go | 24 + service/glue/types/types.go | 34 + service/glue/validators.go | 59 ++ service/lambda/api_op_AddPermission.go | 18 +- .../lambda/api_op_CreateCodeSigningConfig.go | 3 + .../lambda/api_op_CreateEventSourceMapping.go | 6 + .../lambda/api_op_DeleteEventSourceMapping.go | 3 + service/lambda/api_op_DeleteResourcePolicy.go | 4 + .../lambda/api_op_GetEventSourceMapping.go | 3 + .../api_op_GetPublicAccessBlockConfig.go | 4 + service/lambda/api_op_GetResourcePolicy.go | 4 + service/lambda/api_op_ListTags.go | 7 +- .../api_op_PutPublicAccessBlockConfig.go | 4 + service/lambda/api_op_PutResourcePolicy.go | 4 + service/lambda/api_op_TagResource.go | 6 +- service/lambda/api_op_UntagResource.go | 6 +- .../lambda/api_op_UpdateEventSourceMapping.go | 3 + service/lambda/deserializers.go | 51 ++ service/lambda/serializers.go | 14 + service/lambda/types/types.go | 3 + service/mediaconvert/deserializers.go | 59 ++ service/mediaconvert/serializers.go | 31 + service/mediaconvert/types/enums.go | 60 ++ service/mediaconvert/types/types.go | 47 ++ service/medialive/deserializers.go | 290 +++++++ service/medialive/serializers.go | 142 ++++ service/medialive/types/enums.go | 50 ++ service/medialive/types/types.go | 103 +++ .../api_op_ListFoldersForResource.go | 256 +++++++ service/quicksight/deserializers.go | 296 +++++++ service/quicksight/generated.json | 1 + service/quicksight/serializers.go | 117 +++ .../api_op_ListFoldersForResource.go.snap | 36 + service/quicksight/snapshot_test.go | 24 + service/quicksight/types/enums.go | 19 + service/quicksight/types/types.go | 22 + service/quicksight/validators.go | 42 + service/sagemaker/types/enums.go | 16 + service/workspacesweb/api_op_CreatePortal.go | 8 +- service/workspacesweb/api_op_ExpireSession.go | 142 ++++ service/workspacesweb/api_op_GetSession.go | 147 ++++ service/workspacesweb/api_op_ListSessions.go | 259 +++++++ service/workspacesweb/api_op_UpdatePortal.go | 8 +- service/workspacesweb/deserializers.go | 719 +++++++++++++++++- service/workspacesweb/generated.json | 3 + service/workspacesweb/serializers.go | 237 ++++++ .../snapshot/api_op_ExpireSession.go.snap | 36 + .../snapshot/api_op_GetSession.go.snap | 36 + .../snapshot/api_op_ListSessions.go.snap | 36 + service/workspacesweb/snapshot_test.go | 72 ++ service/workspacesweb/types/enums.go | 38 + service/workspacesweb/types/types.go | 67 +- service/workspacesweb/validators.go | 123 +++ 73 files changed, 4319 insertions(+), 48 deletions(-) create mode 100644 .changelog/1aed1d178fc8423aad9504e4f907cfcb.json create mode 100644 .changelog/345fe5f4bfe74ac7a09b2a6cfabdbce7.json create mode 100644 .changelog/5ada7c81bf7a41b19797a7d6ff960c17.json create mode 100644 .changelog/6aec3289a3f140089d861db465547dba.json create mode 100644 .changelog/af0931aa94dd4179a7dd596486250201.json create mode 100644 .changelog/c5b81c6bfe6a4f979d8fdf6831251d00.json create mode 100644 .changelog/ceab748aee0143a2ac1b26a7e570d139.json create mode 100644 .changelog/e8820abc8d454b01bd6ba9841c02b054.json create mode 100644 service/glue/api_op_TestConnection.go create mode 100644 service/glue/snapshot/api_op_TestConnection.go.snap create mode 100644 service/quicksight/api_op_ListFoldersForResource.go create mode 100644 service/quicksight/snapshot/api_op_ListFoldersForResource.go.snap create mode 100644 service/workspacesweb/api_op_ExpireSession.go create mode 100644 service/workspacesweb/api_op_GetSession.go create mode 100644 service/workspacesweb/api_op_ListSessions.go create mode 100644 service/workspacesweb/snapshot/api_op_ExpireSession.go.snap create mode 100644 service/workspacesweb/snapshot/api_op_GetSession.go.snap create mode 100644 service/workspacesweb/snapshot/api_op_ListSessions.go.snap diff --git a/.changelog/1aed1d178fc8423aad9504e4f907cfcb.json b/.changelog/1aed1d178fc8423aad9504e4f907cfcb.json new file mode 100644 index 00000000000..20e258277aa --- /dev/null +++ b/.changelog/1aed1d178fc8423aad9504e4f907cfcb.json @@ -0,0 +1,8 @@ +{ + "id": "1aed1d17-8fc8-423a-ad95-04e4f907cfcb", + "type": "feature", + "description": "Introduced support for G6e instance types on SageMaker Studio for JupyterLab and CodeEditor applications.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/345fe5f4bfe74ac7a09b2a6cfabdbce7.json b/.changelog/345fe5f4bfe74ac7a09b2a6cfabdbce7.json new file mode 100644 index 00000000000..7dab0025ba6 --- /dev/null +++ b/.changelog/345fe5f4bfe74ac7a09b2a6cfabdbce7.json @@ -0,0 +1,8 @@ +{ + "id": "345fe5f4-bfe7-4ac7-a09b-2a6cfabdbce7", + "type": "feature", + "description": "This change is for releasing TestConnection api SDK model", + "modules": [ + "service/glue" + ] +} \ No newline at end of file diff --git a/.changelog/5ada7c81bf7a41b19797a7d6ff960c17.json b/.changelog/5ada7c81bf7a41b19797a7d6ff960c17.json new file mode 100644 index 00000000000..ffc74bb11e5 --- /dev/null +++ b/.changelog/5ada7c81bf7a41b19797a7d6ff960c17.json @@ -0,0 +1,8 @@ +{ + "id": "5ada7c81-bf7a-41b1-9797-a7d6ff960c17", + "type": "feature", + "description": "Adds Bandwidth Reduction Filtering for HD AVC and HEVC encodes, multiplex container settings.", + "modules": [ + "service/medialive" + ] +} \ No newline at end of file diff --git a/.changelog/6aec3289a3f140089d861db465547dba.json b/.changelog/6aec3289a3f140089d861db465547dba.json new file mode 100644 index 00000000000..f3ef1f6a8db --- /dev/null +++ b/.changelog/6aec3289a3f140089d861db465547dba.json @@ -0,0 +1,8 @@ +{ + "id": "6aec3289-a3f1-4008-9d86-1db465547dba", + "type": "feature", + "description": "Tagging support for Lambda event source mapping, and code signing configuration resources.", + "modules": [ + "service/lambda" + ] +} \ No newline at end of file diff --git a/.changelog/af0931aa94dd4179a7dd596486250201.json b/.changelog/af0931aa94dd4179a7dd596486250201.json new file mode 100644 index 00000000000..6f137c89bd4 --- /dev/null +++ b/.changelog/af0931aa94dd4179a7dd596486250201.json @@ -0,0 +1,8 @@ +{ + "id": "af0931aa-94dd-4179-a7dd-596486250201", + "type": "feature", + "description": "WorkSpaces Secure Browser now enables Administrators to view and manage end-user browsing sessions via Session Management APIs.", + "modules": [ + "service/workspacesweb" + ] +} \ No newline at end of file diff --git a/.changelog/c5b81c6bfe6a4f979d8fdf6831251d00.json b/.changelog/c5b81c6bfe6a4f979d8fdf6831251d00.json new file mode 100644 index 00000000000..10931c89d8d --- /dev/null +++ b/.changelog/c5b81c6bfe6a4f979d8fdf6831251d00.json @@ -0,0 +1,8 @@ +{ + "id": "c5b81c6b-fe6a-4f97-9d8f-df6831251d00", + "type": "feature", + "description": "QuickSight: 1. Add new API - ListFoldersForResource. 2. Commit mode adds visibility configuration of Apply button on multi-select controls for authors.", + "modules": [ + "service/quicksight" + ] +} \ No newline at end of file diff --git a/.changelog/ceab748aee0143a2ac1b26a7e570d139.json b/.changelog/ceab748aee0143a2ac1b26a7e570d139.json new file mode 100644 index 00000000000..f56c16ee6a3 --- /dev/null +++ b/.changelog/ceab748aee0143a2ac1b26a7e570d139.json @@ -0,0 +1,8 @@ +{ + "id": "ceab748a-ee01-43a2-ac1b-26a7e570d139", + "type": "feature", + "description": "This release provides support for additional DRM configurations per SPEKE Version 2.0.", + "modules": [ + "service/mediaconvert" + ] +} \ No newline at end of file diff --git a/.changelog/e8820abc8d454b01bd6ba9841c02b054.json b/.changelog/e8820abc8d454b01bd6ba9841c02b054.json new file mode 100644 index 00000000000..ff504cd71c2 --- /dev/null +++ b/.changelog/e8820abc8d454b01bd6ba9841c02b054.json @@ -0,0 +1,8 @@ +{ + "id": "e8820abc-8d45-4b01-bd6b-a9841c02b054", + "type": "feature", + "description": "This release adds the PullRequestComment field to CreateSyncConfiguration API input, UpdateSyncConfiguration API input, GetSyncConfiguration API output and ListSyncConfiguration API output", + "modules": [ + "service/codeconnections" + ] +} \ 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 7304421d7b8..76dae59b430 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.14.16" +const goModuleVersion = "1.15.4" diff --git a/service/codeconnections/api_op_CreateSyncConfiguration.go b/service/codeconnections/api_op_CreateSyncConfiguration.go index 01233ccac77..a325c9b7098 100644 --- a/service/codeconnections/api_op_CreateSyncConfiguration.go +++ b/service/codeconnections/api_op_CreateSyncConfiguration.go @@ -72,6 +72,10 @@ type CreateSyncConfigurationInput struct { // providers. PublishDeploymentStatus types.PublishDeploymentStatus + // A toggle that specifies whether to enable or disable pull request comments for + // the sync configuration to be created. + PullRequestComment types.PullRequestComment + // When to trigger Git sync to begin the stack update. TriggerResourceUpdateOn types.TriggerResourceUpdateOn diff --git a/service/codeconnections/api_op_UpdateSyncConfiguration.go b/service/codeconnections/api_op_UpdateSyncConfiguration.go index 911fe426e92..b8fa2c0deb7 100644 --- a/service/codeconnections/api_op_UpdateSyncConfiguration.go +++ b/service/codeconnections/api_op_UpdateSyncConfiguration.go @@ -51,6 +51,10 @@ type UpdateSyncConfigurationInput struct { // providers. PublishDeploymentStatus types.PublishDeploymentStatus + // TA toggle that specifies whether to enable or disable pull request comments for + // the sync configuration to be updated. + PullRequestComment types.PullRequestComment + // The ID of the repository link for the sync configuration to be updated. RepositoryLinkId *string diff --git a/service/codeconnections/deserializers.go b/service/codeconnections/deserializers.go index 648858fc03e..f534aa0bd20 100644 --- a/service/codeconnections/deserializers.go +++ b/service/codeconnections/deserializers.go @@ -5581,6 +5581,15 @@ func awsAwsjson10_deserializeDocumentSyncConfiguration(v **types.SyncConfigurati sv.PublishDeploymentStatus = types.PublishDeploymentStatus(jtv) } + case "PullRequestComment": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PullRequestComment to be of type string, got %T instead", value) + } + sv.PullRequestComment = types.PullRequestComment(jtv) + } + case "RepositoryLinkId": if value != nil { jtv, ok := value.(string) diff --git a/service/codeconnections/serializers.go b/service/codeconnections/serializers.go index a480dbced2b..7a4bfdc762c 100644 --- a/service/codeconnections/serializers.go +++ b/service/codeconnections/serializers.go @@ -1711,6 +1711,11 @@ func awsAwsjson10_serializeOpDocumentCreateSyncConfigurationInput(v *CreateSyncC ok.String(string(v.PublishDeploymentStatus)) } + if len(v.PullRequestComment) > 0 { + ok := object.Key("PullRequestComment") + ok.String(string(v.PullRequestComment)) + } + if v.RepositoryLinkId != nil { ok := object.Key("RepositoryLinkId") ok.String(*v.RepositoryLinkId) @@ -2148,6 +2153,11 @@ func awsAwsjson10_serializeOpDocumentUpdateSyncConfigurationInput(v *UpdateSyncC ok.String(string(v.PublishDeploymentStatus)) } + if len(v.PullRequestComment) > 0 { + ok := object.Key("PullRequestComment") + ok.String(string(v.PullRequestComment)) + } + if v.RepositoryLinkId != nil { ok := object.Key("RepositoryLinkId") ok.String(*v.RepositoryLinkId) diff --git a/service/codeconnections/types/enums.go b/service/codeconnections/types/enums.go index 9ee79db00a7..dc75f1d337b 100644 --- a/service/codeconnections/types/enums.go +++ b/service/codeconnections/types/enums.go @@ -103,6 +103,25 @@ func (PublishDeploymentStatus) Values() []PublishDeploymentStatus { } } +type PullRequestComment string + +// Enum values for PullRequestComment +const ( + PullRequestCommentEnabled PullRequestComment = "ENABLED" + PullRequestCommentDisabled PullRequestComment = "DISABLED" +) + +// Values returns all known values for PullRequestComment. 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 (PullRequestComment) Values() []PullRequestComment { + return []PullRequestComment{ + "ENABLED", + "DISABLED", + } +} + type RepositorySyncStatus string // Enum values for RepositorySyncStatus diff --git a/service/codeconnections/types/types.go b/service/codeconnections/types/types.go index 93a3c56a315..1e648861b2a 100644 --- a/service/codeconnections/types/types.go +++ b/service/codeconnections/types/types.go @@ -16,7 +16,8 @@ import ( type Connection struct { // The Amazon Resource Name (ARN) of the connection. The ARN is used as the - // connection reference when the connection is shared between Amazon Web Services. + // connection reference when the connection is shared between Amazon Web + // Servicesservices. // // The ARN is never reused if the connection is deleted. ConnectionArn *string @@ -449,6 +450,10 @@ type SyncConfiguration struct { // providers. PublishDeploymentStatus PublishDeploymentStatus + // A toggle that specifies whether to enable or disable pull request comments for + // the sync configuration to be created. + PullRequestComment PullRequestComment + // When to trigger Git sync to begin the stack update. TriggerResourceUpdateOn TriggerResourceUpdateOn diff --git a/service/glue/api_op_TestConnection.go b/service/glue/api_op_TestConnection.go new file mode 100644 index 00000000000..0e9f48a9400 --- /dev/null +++ b/service/glue/api_op_TestConnection.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package glue + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/glue/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Tests a connection to a service to validate the service credentials that you +// provide. +// +// You can either provide an existing connection name or a TestConnectionInput for +// testing a non-existing connection input. Providing both at the same time will +// cause an error. +// +// If the action is successful, the service sends back an HTTP 200 response. +func (c *Client) TestConnection(ctx context.Context, params *TestConnectionInput, optFns ...func(*Options)) (*TestConnectionOutput, error) { + if params == nil { + params = &TestConnectionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TestConnection", params, optFns, c.addOperationTestConnectionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TestConnectionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TestConnectionInput struct { + + // Optional. The name of the connection to test. If only name is provided, the + // operation will get the connection and use that for testing. + ConnectionName *string + + // A structure that is used to specify testing a connection to a service. + TestConnectionInput *types.TestConnectionInput + + noSmithyDocumentSerde +} + +type TestConnectionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTestConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpTestConnection{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTestConnection{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TestConnection"); 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 = addOpTestConnectionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestConnection(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_opTestConnection(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TestConnection", + } +} diff --git a/service/glue/deserializers.go b/service/glue/deserializers.go index ef73b3ae9c1..0f245901fa0 100644 --- a/service/glue/deserializers.go +++ b/service/glue/deserializers.go @@ -23506,6 +23506,137 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } +type awsAwsjson11_deserializeOpTestConnection struct { +} + +func (*awsAwsjson11_deserializeOpTestConnection) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpTestConnection) 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_deserializeOpErrorTestConnection(response, &metadata) + } + output := &TestConnectionOutput{} + 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_deserializeOpDocumentTestConnectionOutput(&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_deserializeOpErrorTestConnection(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("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("FederationSourceException", errorCode): + return awsAwsjson11_deserializeErrorFederationSourceException(response, errorBody) + + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpUntagResource struct { } @@ -68031,6 +68162,37 @@ func awsAwsjson11_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, return nil } +func awsAwsjson11_deserializeOpDocumentTestConnectionOutput(v **TestConnectionOutput, 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 *TestConnectionOutput + if *v == nil { + sv = &TestConnectionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/glue/generated.json b/service/glue/generated.json index 51ef5fa66a0..1d5c28a8d1b 100644 --- a/service/glue/generated.json +++ b/service/glue/generated.json @@ -208,6 +208,7 @@ "api_op_StopTrigger.go", "api_op_StopWorkflowRun.go", "api_op_TagResource.go", + "api_op_TestConnection.go", "api_op_UntagResource.go", "api_op_UpdateBlueprint.go", "api_op_UpdateClassifier.go", diff --git a/service/glue/serializers.go b/service/glue/serializers.go index 22532a9ea23..469bd732c65 100644 --- a/service/glue/serializers.go +++ b/service/glue/serializers.go @@ -11017,6 +11017,61 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpTestConnection struct { +} + +func (*awsAwsjson11_serializeOpTestConnection) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpTestConnection) 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.(*TestConnectionInput) + _ = 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("AWSGlue.TestConnection") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentTestConnectionInput(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_serializeOpUntagResource struct { } @@ -20953,6 +21008,32 @@ func awsAwsjson11_serializeDocumentTaskRunSortCriteria(v *types.TaskRunSortCrite return nil } +func awsAwsjson11_serializeDocumentTestConnectionInput(v *types.TestConnectionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AuthenticationConfiguration != nil { + ok := object.Key("AuthenticationConfiguration") + if err := awsAwsjson11_serializeDocumentAuthenticationConfigurationInput(v.AuthenticationConfiguration, ok); err != nil { + return err + } + } + + if v.ConnectionProperties != nil { + ok := object.Key("ConnectionProperties") + if err := awsAwsjson11_serializeDocumentConnectionProperties(v.ConnectionProperties, ok); err != nil { + return err + } + } + + if len(v.ConnectionType) > 0 { + ok := object.Key("ConnectionType") + ok.String(string(v.ConnectionType)) + } + + return nil +} + func awsAwsjson11_serializeDocumentTimestampFilter(v *types.TimestampFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -26731,6 +26812,25 @@ func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value return nil } +func awsAwsjson11_serializeOpDocumentTestConnectionInput(v *TestConnectionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConnectionName != nil { + ok := object.Key("ConnectionName") + ok.String(*v.ConnectionName) + } + + if v.TestConnectionInput != nil { + ok := object.Key("TestConnectionInput") + if err := awsAwsjson11_serializeDocumentTestConnectionInput(v.TestConnectionInput, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/glue/snapshot/api_op_TestConnection.go.snap b/service/glue/snapshot/api_op_TestConnection.go.snap new file mode 100644 index 00000000000..bed0022d38c --- /dev/null +++ b/service/glue/snapshot/api_op_TestConnection.go.snap @@ -0,0 +1,36 @@ +TestConnection + 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/glue/snapshot_test.go b/service/glue/snapshot_test.go index 8a7e36f8ab3..14b1884a518 100644 --- a/service/glue/snapshot_test.go +++ b/service/glue/snapshot_test.go @@ -2462,6 +2462,18 @@ func TestCheckSnapshot_TagResource(t *testing.T) { } } +func TestCheckSnapshot_TestConnection(t *testing.T) { + svc := New(Options{}) + _, err := svc.TestConnection(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "TestConnection") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UntagResource(t *testing.T) { svc := New(Options{}) _, err := svc.UntagResource(context.Background(), nil, func(o *Options) { @@ -5149,6 +5161,18 @@ func TestUpdateSnapshot_TagResource(t *testing.T) { } } +func TestUpdateSnapshot_TestConnection(t *testing.T) { + svc := New(Options{}) + _, err := svc.TestConnection(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "TestConnection") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UntagResource(t *testing.T) { svc := New(Options{}) _, err := svc.UntagResource(context.Background(), nil, func(o *Options) { diff --git a/service/glue/types/types.go b/service/glue/types/types.go index 3da503998c4..f7b6fa5df34 100644 --- a/service/glue/types/types.go +++ b/service/glue/types/types.go @@ -9052,6 +9052,40 @@ type TaskRunSortCriteria struct { noSmithyDocumentSerde } +// A structure that is used to specify testing a connection to a service. +type TestConnectionInput struct { + + // The key-value pairs that define parameters for the connection. + // + // JDBC connections use the following connection properties: + // + // - Required: All of ( HOST , PORT , JDBC_ENGINE ) or JDBC_CONNECTION_URL . + // + // - Required: All of ( USERNAME , PASSWORD ) or SECRET_ID . + // + // - Optional: JDBC_ENFORCE_SSL , CUSTOM_JDBC_CERT , CUSTOM_JDBC_CERT_STRING , + // SKIP_CUSTOM_JDBC_CERT_VALIDATION . These parameters are used to configure SSL + // with JDBC. + // + // SALESFORCE connections require the AuthenticationConfiguration member to be + // configured. + // + // This member is required. + ConnectionProperties map[string]string + + // The type of connection to test. This operation is only available for the JDBC + // or SALESFORCE connection types. + // + // This member is required. + ConnectionType ConnectionType + + // A structure containing the authentication configuration in the TestConnection + // request. Required for a connection to Salesforce using OAuth authentication. + AuthenticationConfiguration *AuthenticationConfigurationInput + + noSmithyDocumentSerde +} + // A timestamped inclusion annotation. type TimestampedInclusionAnnotation struct { diff --git a/service/glue/validators.go b/service/glue/validators.go index 0c362d723c7..a5fea1e87bd 100644 --- a/service/glue/validators.go +++ b/service/glue/validators.go @@ -3350,6 +3350,26 @@ func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpTestConnection struct { +} + +func (*validateOpTestConnection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTestConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TestConnectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTestConnectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUntagResource struct { } @@ -4458,6 +4478,10 @@ func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } +func addOpTestConnectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTestConnection{}, middleware.After) +} + func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } @@ -8078,6 +8102,24 @@ func validateTaskRunSortCriteria(v *types.TaskRunSortCriteria) error { } } +func validateTestConnectionInput(v *types.TestConnectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TestConnectionInput"} + if len(v.ConnectionType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ConnectionType")) + } + if v.ConnectionProperties == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectionProperties")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTransformConfigParameter(v *types.TransformConfigParameter) error { if v == nil { return nil @@ -11314,6 +11356,23 @@ func validateOpTagResourceInput(v *TagResourceInput) error { } } +func validateOpTestConnectionInput(v *TestConnectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TestConnectionInput"} + if v.TestConnectionInput != nil { + if err := validateTestConnectionInput(v.TestConnectionInput); err != nil { + invalidParams.AddNested("TestConnectionInput", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUntagResourceInput(v *UntagResourceInput) error { if v == nil { return nil diff --git a/service/lambda/api_op_AddPermission.go b/service/lambda/api_op_AddPermission.go index 45afb624282..4577deee9da 100644 --- a/service/lambda/api_op_AddPermission.go +++ b/service/lambda/api_op_AddPermission.go @@ -11,12 +11,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Grants an Amazon Web Servicesservice, Amazon Web Services account, or Amazon -// Web Services organization permission to use a function. You can apply the policy -// at the function level, or specify a qualifier to restrict access to a single -// version or alias. If you use a qualifier, the invoker must use the full Amazon -// Resource Name (ARN) of that version or alias to invoke the function. Note: -// Lambda does not support adding policies to version $LATEST. +// Grants a [principal] permission to use a function. You can apply the policy at the +// function level, or specify a qualifier to restrict access to a single version or +// alias. If you use a qualifier, the invoker must use the full Amazon Resource +// Name (ARN) of that version or alias to invoke the function. Note: Lambda does +// not support adding policies to version $LATEST. // // To grant permission to another account, specify the account ID as the Principal // . To grant permission to an organization defined in Organizations, specify the @@ -31,6 +30,7 @@ import ( // This operation adds a statement to a resource-based permissions policy for the // function. For more information about function policies, see [Using resource-based policies for Lambda]. // +// [principal]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying // [Using resource-based policies for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html func (c *Client) AddPermission(ctx context.Context, params *AddPermissionInput, optFns ...func(*Options)) (*AddPermissionOutput, error) { if params == nil { @@ -72,9 +72,9 @@ type AddPermissionInput struct { // This member is required. FunctionName *string - // The Amazon Web Servicesservice or Amazon Web Services account that invokes the - // function. If you specify a service, use SourceArn or SourceAccount to limit who - // can invoke the function through that service. + // The Amazon Web Servicesservice, Amazon Web Services account, IAM user, or IAM + // role that invokes the function. If you specify a service, use SourceArn or + // SourceAccount to limit who can invoke the function through that service. // // This member is required. Principal *string diff --git a/service/lambda/api_op_CreateCodeSigningConfig.go b/service/lambda/api_op_CreateCodeSigningConfig.go index 934eae77aaf..ccb0350c284 100644 --- a/service/lambda/api_op_CreateCodeSigningConfig.go +++ b/service/lambda/api_op_CreateCodeSigningConfig.go @@ -45,6 +45,9 @@ type CreateCodeSigningConfigInput struct { // Descriptive name for this code signing configuration. Description *string + // A list of tags to add to the code signing configuration. + Tags map[string]string + noSmithyDocumentSerde } diff --git a/service/lambda/api_op_CreateEventSourceMapping.go b/service/lambda/api_op_CreateEventSourceMapping.go index 87171a7cc2a..8ab4f103378 100644 --- a/service/lambda/api_op_CreateEventSourceMapping.go +++ b/service/lambda/api_op_CreateEventSourceMapping.go @@ -250,6 +250,9 @@ type CreateEventSourceMappingInput struct { // reading. StartingPositionTimestamp cannot be in the future. StartingPositionTimestamp *time.Time + // A list of tags to apply to the event source mapping. + Tags map[string]string + // The name of the Kafka topic. Topics []string @@ -296,6 +299,9 @@ type CreateEventSourceMappingOutput struct { // The Amazon Resource Name (ARN) of the event source. EventSourceArn *string + // The Amazon Resource Name (ARN) of the event source mapping. + EventSourceMappingArn *string + // An object that defines the filter criteria that determine whether Lambda should // process an event. For more information, see [Lambda event filtering]. // diff --git a/service/lambda/api_op_DeleteEventSourceMapping.go b/service/lambda/api_op_DeleteEventSourceMapping.go index 640bf184d59..74433d6932c 100644 --- a/service/lambda/api_op_DeleteEventSourceMapping.go +++ b/service/lambda/api_op_DeleteEventSourceMapping.go @@ -78,6 +78,9 @@ type DeleteEventSourceMappingOutput struct { // The Amazon Resource Name (ARN) of the event source. EventSourceArn *string + // The Amazon Resource Name (ARN) of the event source mapping. + EventSourceMappingArn *string + // An object that defines the filter criteria that determine whether Lambda should // process an event. For more information, see [Lambda event filtering]. // diff --git a/service/lambda/api_op_DeleteResourcePolicy.go b/service/lambda/api_op_DeleteResourcePolicy.go index 00578fe3446..2d8323d359e 100644 --- a/service/lambda/api_op_DeleteResourcePolicy.go +++ b/service/lambda/api_op_DeleteResourcePolicy.go @@ -10,6 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +// The option to create and modify full JSON resource-based policies, and to use +// the PutResourcePolicy, GetResourcePolicy, and DeleteResourcePolicy APIs, won't +// be available in all Amazon Web Services Regions until September 30, 2024. +// // Deletes a [resource-based policy] from a function. // // [resource-based policy]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html diff --git a/service/lambda/api_op_GetEventSourceMapping.go b/service/lambda/api_op_GetEventSourceMapping.go index 5677103f93a..1ab31534db2 100644 --- a/service/lambda/api_op_GetEventSourceMapping.go +++ b/service/lambda/api_op_GetEventSourceMapping.go @@ -74,6 +74,9 @@ type GetEventSourceMappingOutput struct { // The Amazon Resource Name (ARN) of the event source. EventSourceArn *string + // The Amazon Resource Name (ARN) of the event source mapping. + EventSourceMappingArn *string + // An object that defines the filter criteria that determine whether Lambda should // process an event. For more information, see [Lambda event filtering]. // diff --git a/service/lambda/api_op_GetPublicAccessBlockConfig.go b/service/lambda/api_op_GetPublicAccessBlockConfig.go index 16d0bd543e7..8f44f8d34b5 100644 --- a/service/lambda/api_op_GetPublicAccessBlockConfig.go +++ b/service/lambda/api_op_GetPublicAccessBlockConfig.go @@ -11,6 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +// The option to configure public-access settings, and to use the +// PutPublicAccessBlock and GetPublicAccessBlock APIs, won't be available in all +// Amazon Web Services Regions until September 30, 2024. +// // Retrieve the public-access settings for a function. func (c *Client) GetPublicAccessBlockConfig(ctx context.Context, params *GetPublicAccessBlockConfigInput, optFns ...func(*Options)) (*GetPublicAccessBlockConfigOutput, error) { if params == nil { diff --git a/service/lambda/api_op_GetResourcePolicy.go b/service/lambda/api_op_GetResourcePolicy.go index b91427e2125..f4af24be497 100644 --- a/service/lambda/api_op_GetResourcePolicy.go +++ b/service/lambda/api_op_GetResourcePolicy.go @@ -10,6 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +// The option to create and modify full JSON resource-based policies, and to use +// the PutResourcePolicy, GetResourcePolicy, and DeleteResourcePolicy APIs, won't +// be available in all Amazon Web Services Regions until September 30, 2024. +// // Retrieves the [resource-based policy] attached to a function. // // [resource-based policy]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html diff --git a/service/lambda/api_op_ListTags.go b/service/lambda/api_op_ListTags.go index d8ff90a6894..338e273daa3 100644 --- a/service/lambda/api_op_ListTags.go +++ b/service/lambda/api_op_ListTags.go @@ -10,7 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a function's [tags]. You can also view tags with GetFunction. +// Returns a function, event source mapping, or code signing configuration's [tags]. You +// can also view funciton tags with GetFunction. // // [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html func (c *Client) ListTags(ctx context.Context, params *ListTagsInput, optFns ...func(*Options)) (*ListTagsOutput, error) { @@ -30,8 +31,8 @@ func (c *Client) ListTags(ctx context.Context, params *ListTagsInput, optFns ... type ListTagsInput struct { - // The function's Amazon Resource Name (ARN). Note: Lambda does not support adding - // tags to aliases or versions. + // The resource's Amazon Resource Name (ARN). Note: Lambda does not support adding + // tags to function aliases or versions. // // This member is required. Resource *string diff --git a/service/lambda/api_op_PutPublicAccessBlockConfig.go b/service/lambda/api_op_PutPublicAccessBlockConfig.go index 13b609062b9..4df3dda7387 100644 --- a/service/lambda/api_op_PutPublicAccessBlockConfig.go +++ b/service/lambda/api_op_PutPublicAccessBlockConfig.go @@ -11,6 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +// The option to configure public-access settings, and to use the +// PutPublicAccessBlock and GetPublicAccessBlock APIs, won't be available in all +// Amazon Web Services Regions until September 30, 2024. +// // Configure your function's public-access settings. // // To control public access to a Lambda function, you can choose whether to allow diff --git a/service/lambda/api_op_PutResourcePolicy.go b/service/lambda/api_op_PutResourcePolicy.go index ca23b0a10b1..32b0c99560f 100644 --- a/service/lambda/api_op_PutResourcePolicy.go +++ b/service/lambda/api_op_PutResourcePolicy.go @@ -10,6 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +// The option to create and modify full JSON resource-based policies, and to use +// the PutResourcePolicy, GetResourcePolicy, and DeleteResourcePolicy APIs, won't +// be available in all Amazon Web Services Regions until September 30, 2024. +// // Adds a [resource-based policy] to a function. You can use resource-based policies to grant access to // other [Amazon Web Services accounts], [organizations], or [services]. Resource-based policies apply to a single function, version, or // alias. diff --git a/service/lambda/api_op_TagResource.go b/service/lambda/api_op_TagResource.go index a283dd25ea9..73660df2dda 100644 --- a/service/lambda/api_op_TagResource.go +++ b/service/lambda/api_op_TagResource.go @@ -10,7 +10,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Adds [tags] to a function. +// Adds [tags] to a function, event source mapping, or code signing configuration. // // [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { @@ -30,12 +30,12 @@ func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optF type TagResourceInput struct { - // The function's Amazon Resource Name (ARN). + // The resource's Amazon Resource Name (ARN). // // This member is required. Resource *string - // A list of tags to apply to the function. + // A list of tags to apply to the resource. // // This member is required. Tags map[string]string diff --git a/service/lambda/api_op_UntagResource.go b/service/lambda/api_op_UntagResource.go index aa5bbf633b9..a5185f9922b 100644 --- a/service/lambda/api_op_UntagResource.go +++ b/service/lambda/api_op_UntagResource.go @@ -10,7 +10,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes [tags] from a function. +// Removes [tags] from a function, event source mapping, or code signing configuration. // // [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { @@ -30,12 +30,12 @@ func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, type UntagResourceInput struct { - // The function's Amazon Resource Name (ARN). + // The resource's Amazon Resource Name (ARN). // // This member is required. Resource *string - // A list of tag keys to remove from the function. + // A list of tag keys to remove from the resource. // // This member is required. TagKeys []string diff --git a/service/lambda/api_op_UpdateEventSourceMapping.go b/service/lambda/api_op_UpdateEventSourceMapping.go index 00e4b716cca..ac9ac0ee327 100644 --- a/service/lambda/api_op_UpdateEventSourceMapping.go +++ b/service/lambda/api_op_UpdateEventSourceMapping.go @@ -255,6 +255,9 @@ type UpdateEventSourceMappingOutput struct { // The Amazon Resource Name (ARN) of the event source. EventSourceArn *string + // The Amazon Resource Name (ARN) of the event source mapping. + EventSourceMappingArn *string + // An object that defines the filter criteria that determine whether Lambda should // process an event. For more information, see [Lambda event filtering]. // diff --git a/service/lambda/deserializers.go b/service/lambda/deserializers.go index 979715f6a85..98120291c3f 100644 --- a/service/lambda/deserializers.go +++ b/service/lambda/deserializers.go @@ -317,6 +317,9 @@ func awsRestjson1_deserializeOpErrorAddPermission(response *smithyhttp.Response, case strings.EqualFold("PreconditionFailedException", errorCode): return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + case strings.EqualFold("PublicPolicyException", errorCode): + return awsRestjson1_deserializeErrorPublicPolicyException(response, errorBody) + case strings.EqualFold("ResourceConflictException", errorCode): return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) @@ -924,6 +927,15 @@ func awsRestjson1_deserializeOpDocumentCreateEventSourceMappingOutput(v **Create sv.EventSourceArn = ptr.String(jtv) } + case "EventSourceMappingArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value) + } + sv.EventSourceMappingArn = ptr.String(jtv) + } + case "FilterCriteria": if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { return err @@ -2180,6 +2192,15 @@ func awsRestjson1_deserializeOpDocumentDeleteEventSourceMappingOutput(v **Delete sv.EventSourceArn = ptr.String(jtv) } + case "EventSourceMappingArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value) + } + sv.EventSourceMappingArn = ptr.String(jtv) + } + case "FilterCriteria": if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { return err @@ -3893,6 +3914,15 @@ func awsRestjson1_deserializeOpDocumentGetEventSourceMappingOutput(v **GetEventS sv.EventSourceArn = ptr.String(jtv) } + case "EventSourceMappingArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value) + } + sv.EventSourceMappingArn = ptr.String(jtv) + } + case "FilterCriteria": if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { return err @@ -11937,6 +11967,9 @@ func awsRestjson1_deserializeOpErrorRemovePermission(response *smithyhttp.Respon case strings.EqualFold("PreconditionFailedException", errorCode): return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + case strings.EqualFold("PublicPolicyException", errorCode): + return awsRestjson1_deserializeErrorPublicPolicyException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -12712,6 +12745,15 @@ func awsRestjson1_deserializeOpDocumentUpdateEventSourceMappingOutput(v **Update sv.EventSourceArn = ptr.String(jtv) } + case "EventSourceMappingArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value) + } + sv.EventSourceMappingArn = ptr.String(jtv) + } + case "FilterCriteria": if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { return err @@ -17750,6 +17792,15 @@ func awsRestjson1_deserializeDocumentEventSourceMappingConfiguration(v **types.E sv.EventSourceArn = ptr.String(jtv) } + case "EventSourceMappingArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value) + } + sv.EventSourceMappingArn = ptr.String(jtv) + } + case "FilterCriteria": if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { return err diff --git a/service/lambda/serializers.go b/service/lambda/serializers.go index 924f0e6ff11..5dece8fee7a 100644 --- a/service/lambda/serializers.go +++ b/service/lambda/serializers.go @@ -455,6 +455,13 @@ func awsRestjson1_serializeOpDocumentCreateCodeSigningConfigInput(v *CreateCodeS ok.String(*v.Description) } + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + return nil } @@ -655,6 +662,13 @@ func awsRestjson1_serializeOpDocumentCreateEventSourceMappingInput(v *CreateEven ok.Double(smithytime.FormatEpochSeconds(*v.StartingPositionTimestamp)) } + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + if v.Topics != nil { ok := object.Key("Topics") if err := awsRestjson1_serializeDocumentTopics(v.Topics, ok); err != nil { diff --git a/service/lambda/types/types.go b/service/lambda/types/types.go index aba5f6c9bf3..e10d881abd6 100644 --- a/service/lambda/types/types.go +++ b/service/lambda/types/types.go @@ -349,6 +349,9 @@ type EventSourceMappingConfiguration struct { // The Amazon Resource Name (ARN) of the event source. EventSourceArn *string + // The Amazon Resource Name (ARN) of the event source mapping. + EventSourceMappingArn *string + // An object that defines the filter criteria that determine whether Lambda should // process an event. For more information, see [Lambda event filtering]. // diff --git a/service/mediaconvert/deserializers.go b/service/mediaconvert/deserializers.go index e9f70626eca..9119399ae44 100644 --- a/service/mediaconvert/deserializers.go +++ b/service/mediaconvert/deserializers.go @@ -12123,6 +12123,55 @@ func awsRestjson1_deserializeDocumentEmbeddedSourceSettings(v **types.EmbeddedSo return nil } +func awsRestjson1_deserializeDocumentEncryptionContractConfiguration(v **types.EncryptionContractConfiguration, 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.EncryptionContractConfiguration + if *v == nil { + sv = &types.EncryptionContractConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "spekeAudioPreset": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PresetSpeke20Audio to be of type string, got %T instead", value) + } + sv.SpekeAudioPreset = types.PresetSpeke20Audio(jtv) + } + + case "spekeVideoPreset": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PresetSpeke20Video to be of type string, got %T instead", value) + } + sv.SpekeVideoPreset = types.PresetSpeke20Video(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentEndpoint(v **types.Endpoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -21450,6 +21499,11 @@ func awsRestjson1_deserializeDocumentSpekeKeyProvider(v **types.SpekeKeyProvider sv.CertificateArn = ptr.String(jtv) } + case "encryptionContractConfiguration": + if err := awsRestjson1_deserializeDocumentEncryptionContractConfiguration(&sv.EncryptionContractConfiguration, value); err != nil { + return err + } + case "resourceId": if value != nil { jtv, ok := value.(string) @@ -21518,6 +21572,11 @@ func awsRestjson1_deserializeDocumentSpekeKeyProviderCmaf(v **types.SpekeKeyProv return err } + case "encryptionContractConfiguration": + if err := awsRestjson1_deserializeDocumentEncryptionContractConfiguration(&sv.EncryptionContractConfiguration, value); err != nil { + return err + } + case "hlsSignaledSystemIds": if err := awsRestjson1_deserializeDocument__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12(&sv.HlsSignaledSystemIds, value); err != nil { return err diff --git a/service/mediaconvert/serializers.go b/service/mediaconvert/serializers.go index b2058b1b483..ad194d77c8a 100644 --- a/service/mediaconvert/serializers.go +++ b/service/mediaconvert/serializers.go @@ -5615,6 +5615,23 @@ func awsRestjson1_serializeDocumentEmbeddedSourceSettings(v *types.EmbeddedSourc return nil } +func awsRestjson1_serializeDocumentEncryptionContractConfiguration(v *types.EncryptionContractConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.SpekeAudioPreset) > 0 { + ok := object.Key("spekeAudioPreset") + ok.String(string(v.SpekeAudioPreset)) + } + + if len(v.SpekeVideoPreset) > 0 { + ok := object.Key("spekeVideoPreset") + ok.String(string(v.SpekeVideoPreset)) + } + + return nil +} + func awsRestjson1_serializeDocumentEsamManifestConfirmConditionNotification(v *types.EsamManifestConfirmConditionNotification, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -9359,6 +9376,13 @@ func awsRestjson1_serializeDocumentSpekeKeyProvider(v *types.SpekeKeyProvider, v ok.String(*v.CertificateArn) } + if v.EncryptionContractConfiguration != nil { + ok := object.Key("encryptionContractConfiguration") + if err := awsRestjson1_serializeDocumentEncryptionContractConfiguration(v.EncryptionContractConfiguration, ok); err != nil { + return err + } + } + if v.ResourceId != nil { ok := object.Key("resourceId") ok.String(*v.ResourceId) @@ -9395,6 +9419,13 @@ func awsRestjson1_serializeDocumentSpekeKeyProviderCmaf(v *types.SpekeKeyProvide } } + if v.EncryptionContractConfiguration != nil { + ok := object.Key("encryptionContractConfiguration") + if err := awsRestjson1_serializeDocumentEncryptionContractConfiguration(v.EncryptionContractConfiguration, ok); err != nil { + return err + } + } + if v.HlsSignaledSystemIds != nil { ok := object.Key("hlsSignaledSystemIds") if err := awsRestjson1_serializeDocument__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12(v.HlsSignaledSystemIds, ok); err != nil { diff --git a/service/mediaconvert/types/enums.go b/service/mediaconvert/types/enums.go index 6f58b0512f4..4fe9bae675d 100644 --- a/service/mediaconvert/types/enums.go +++ b/service/mediaconvert/types/enums.go @@ -7560,6 +7560,66 @@ func (PresetListBy) Values() []PresetListBy { } } +type PresetSpeke20Audio string + +// Enum values for PresetSpeke20Audio +const ( + PresetSpeke20AudioPresetAudio1 PresetSpeke20Audio = "PRESET_AUDIO_1" + PresetSpeke20AudioPresetAudio2 PresetSpeke20Audio = "PRESET_AUDIO_2" + PresetSpeke20AudioPresetAudio3 PresetSpeke20Audio = "PRESET_AUDIO_3" + PresetSpeke20AudioShared PresetSpeke20Audio = "SHARED" + PresetSpeke20AudioUnencrypted PresetSpeke20Audio = "UNENCRYPTED" +) + +// Values returns all known values for PresetSpeke20Audio. 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 (PresetSpeke20Audio) Values() []PresetSpeke20Audio { + return []PresetSpeke20Audio{ + "PRESET_AUDIO_1", + "PRESET_AUDIO_2", + "PRESET_AUDIO_3", + "SHARED", + "UNENCRYPTED", + } +} + +type PresetSpeke20Video string + +// Enum values for PresetSpeke20Video +const ( + PresetSpeke20VideoPresetVideo1 PresetSpeke20Video = "PRESET_VIDEO_1" + PresetSpeke20VideoPresetVideo2 PresetSpeke20Video = "PRESET_VIDEO_2" + PresetSpeke20VideoPresetVideo3 PresetSpeke20Video = "PRESET_VIDEO_3" + PresetSpeke20VideoPresetVideo4 PresetSpeke20Video = "PRESET_VIDEO_4" + PresetSpeke20VideoPresetVideo5 PresetSpeke20Video = "PRESET_VIDEO_5" + PresetSpeke20VideoPresetVideo6 PresetSpeke20Video = "PRESET_VIDEO_6" + PresetSpeke20VideoPresetVideo7 PresetSpeke20Video = "PRESET_VIDEO_7" + PresetSpeke20VideoPresetVideo8 PresetSpeke20Video = "PRESET_VIDEO_8" + PresetSpeke20VideoShared PresetSpeke20Video = "SHARED" + PresetSpeke20VideoUnencrypted PresetSpeke20Video = "UNENCRYPTED" +) + +// Values returns all known values for PresetSpeke20Video. 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 (PresetSpeke20Video) Values() []PresetSpeke20Video { + return []PresetSpeke20Video{ + "PRESET_VIDEO_1", + "PRESET_VIDEO_2", + "PRESET_VIDEO_3", + "PRESET_VIDEO_4", + "PRESET_VIDEO_5", + "PRESET_VIDEO_6", + "PRESET_VIDEO_7", + "PRESET_VIDEO_8", + "SHARED", + "UNENCRYPTED", + } +} + type PricingPlan string // Enum values for PricingPlan diff --git a/service/mediaconvert/types/types.go b/service/mediaconvert/types/types.go index 35de6220d9f..83c44f477a0 100644 --- a/service/mediaconvert/types/types.go +++ b/service/mediaconvert/types/types.go @@ -2939,6 +2939,39 @@ type EmbeddedSourceSettings struct { noSmithyDocumentSerde } +// Specify the SPEKE version, either v1.0 or v2.0, that MediaConvert uses when +// encrypting your output. For more information, see: +// https://docs.aws.amazon.com/speke/latest/documentation/speke-api-specification.html +// To use SPEKE v1.0: Leave blank. To use SPEKE v2.0: Specify a SPEKE v2.0 video +// preset and a SPEKE v2.0 audio preset. +type EncryptionContractConfiguration struct { + + // Specify which SPEKE version 2.0 audio preset MediaConvert uses to request + // content keys from your SPEKE server. For more information, see: + // https://docs.aws.amazon.com/mediaconvert/latest/ug/drm-content-speke-v2-presets.html + // To encrypt to your audio outputs, choose from the following: Audio preset 1, + // Audio preset 2, or Audio preset 3. To encrypt your audio outputs, using the same + // content key for both your audio and video outputs: Choose Shared. When you do, + // you must also set SPEKE v2.0 video preset to Shared. To not encrypt your audio + // outputs: Choose Unencrypted. When you do, to encrypt your video outputs, you + // must also specify a SPEKE v2.0 video preset (other than Shared or Unencrypted). + SpekeAudioPreset PresetSpeke20Audio + + // Specify which SPEKE version 2.0 video preset MediaConvert uses to request + // content keys from your SPEKE server. For more information, see: + // https://docs.aws.amazon.com/mediaconvert/latest/ug/drm-content-speke-v2-presets.html + // To encrypt to your video outputs, choose from the following: Video preset 1, + // Video preset 2, Video preset 3, Video preset 4, Video preset 5, Video preset 6, + // Video preset 7, or Video preset 8. To encrypt your video outputs, using the same + // content key for both your video and audio outputs: Choose Shared. When you do, + // you must also set SPEKE v2.0 audio preset to Shared. To not encrypt your video + // outputs: Choose Unencrypted. When you do, to encrypt your audio outputs, you + // must also specify a SPEKE v2.0 audio preset (other than Shared or Unencrypted). + SpekeVideoPreset PresetSpeke20Video + + noSmithyDocumentSerde +} + // Describes an account-specific API endpoint. type Endpoint struct { @@ -7488,6 +7521,13 @@ type SpekeKeyProvider struct { // Manager. Specify the certificate's Amazon Resource Name (ARN) here. CertificateArn *string + // Specify the SPEKE version, either v1.0 or v2.0, that MediaConvert uses when + // encrypting your output. For more information, see: + // https://docs.aws.amazon.com/speke/latest/documentation/speke-api-specification.html + // To use SPEKE v1.0: Leave blank. To use SPEKE v2.0: Specify a SPEKE v2.0 video + // preset and a SPEKE v2.0 audio preset. + EncryptionContractConfiguration *EncryptionContractConfiguration + // Specify the resource ID that your SPEKE-compliant key provider uses to identify // this content. ResourceId *string @@ -7520,6 +7560,13 @@ type SpekeKeyProviderCmaf struct { // https://dashif.org/identifiers/content_protection/. DashSignaledSystemIds []string + // Specify the SPEKE version, either v1.0 or v2.0, that MediaConvert uses when + // encrypting your output. For more information, see: + // https://docs.aws.amazon.com/speke/latest/documentation/speke-api-specification.html + // To use SPEKE v1.0: Leave blank. To use SPEKE v2.0: Specify a SPEKE v2.0 video + // preset and a SPEKE v2.0 audio preset. + EncryptionContractConfiguration *EncryptionContractConfiguration + // Specify the DRM system ID that you want signaled in the HLS manifest that // MediaConvert creates as part of this CMAF package. The HLS manifest can // currently signal only one system ID. For more information, see diff --git a/service/medialive/deserializers.go b/service/medialive/deserializers.go index c92f442d72a..5bb67145f09 100644 --- a/service/medialive/deserializers.go +++ b/service/medialive/deserializers.go @@ -27463,6 +27463,55 @@ func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestExc return nil } +func awsRestjson1_deserializeDocumentBandwidthReductionFilterSettings(v **types.BandwidthReductionFilterSettings, 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.BandwidthReductionFilterSettings + if *v == nil { + sv = &types.BandwidthReductionFilterSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "postFilterSharpening": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BandwidthReductionPostFilterSharpening to be of type string, got %T instead", value) + } + sv.PostFilterSharpening = types.BandwidthReductionPostFilterSharpening(jtv) + } + + case "strength": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BandwidthReductionFilterStrength to be of type string, got %T instead", value) + } + sv.Strength = types.BandwidthReductionFilterStrength(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentBatchFailedResultModel(v **types.BatchFailedResultModel, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -32567,6 +32616,11 @@ func awsRestjson1_deserializeDocumentH264FilterSettings(v **types.H264FilterSett for key, value := range shape { switch key { + case "bandwidthReductionFilterSettings": + if err := awsRestjson1_deserializeDocumentBandwidthReductionFilterSettings(&sv.BandwidthReductionFilterSettings, value); err != nil { + return err + } + case "temporalFilterSettings": if err := awsRestjson1_deserializeDocumentTemporalFilterSettings(&sv.TemporalFilterSettings, value); err != nil { return err @@ -33154,6 +33208,11 @@ func awsRestjson1_deserializeDocumentH265FilterSettings(v **types.H265FilterSett for key, value := range shape { switch key { + case "bandwidthReductionFilterSettings": + if err := awsRestjson1_deserializeDocumentBandwidthReductionFilterSettings(&sv.BandwidthReductionFilterSettings, value); err != nil { + return err + } + case "temporalFilterSettings": if err := awsRestjson1_deserializeDocumentTemporalFilterSettings(&sv.TemporalFilterSettings, value); err != nil { return err @@ -39204,6 +39263,42 @@ func awsRestjson1_deserializeDocumentMultiplex(v **types.Multiplex, value interf return nil } +func awsRestjson1_deserializeDocumentMultiplexContainerSettings(v **types.MultiplexContainerSettings, 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.MultiplexContainerSettings + if *v == nil { + sv = &types.MultiplexContainerSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "multiplexM2tsSettings": + if err := awsRestjson1_deserializeDocumentMultiplexM2tsSettings(&sv.MultiplexM2tsSettings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentMultiplexGroupSettings(v **types.MultiplexGroupSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -39235,6 +39330,196 @@ func awsRestjson1_deserializeDocumentMultiplexGroupSettings(v **types.MultiplexG return nil } +func awsRestjson1_deserializeDocumentMultiplexM2tsSettings(v **types.MultiplexM2tsSettings, 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.MultiplexM2tsSettings + if *v == nil { + sv = &types.MultiplexM2tsSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "absentInputAudioBehavior": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected M2tsAbsentInputAudioBehavior to be of type string, got %T instead", value) + } + sv.AbsentInputAudioBehavior = types.M2tsAbsentInputAudioBehavior(jtv) + } + + case "arib": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected M2tsArib to be of type string, got %T instead", value) + } + sv.Arib = types.M2tsArib(jtv) + } + + case "audioBufferModel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected M2tsAudioBufferModel to be of type string, got %T instead", value) + } + sv.AudioBufferModel = types.M2tsAudioBufferModel(jtv) + } + + case "audioFramesPerPes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin0 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AudioFramesPerPes = ptr.Int32(int32(i64)) + } + + case "audioStreamType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected M2tsAudioStreamType to be of type string, got %T instead", value) + } + sv.AudioStreamType = types.M2tsAudioStreamType(jtv) + } + + case "ccDescriptor": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected M2tsCcDescriptor to be of type string, got %T instead", value) + } + sv.CcDescriptor = types.M2tsCcDescriptor(jtv) + } + + case "ebif": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected M2tsEbifControl to be of type string, got %T instead", value) + } + sv.Ebif = types.M2tsEbifControl(jtv) + } + + case "esRateInPes": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected M2tsEsRateInPes to be of type string, got %T instead", value) + } + sv.EsRateInPes = types.M2tsEsRateInPes(jtv) + } + + case "klv": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected M2tsKlv to be of type string, got %T instead", value) + } + sv.Klv = types.M2tsKlv(jtv) + } + + case "nielsenId3Behavior": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected M2tsNielsenId3Behavior to be of type string, got %T instead", value) + } + sv.NielsenId3Behavior = types.M2tsNielsenId3Behavior(jtv) + } + + case "pcrControl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected M2tsPcrControl to be of type string, got %T instead", value) + } + sv.PcrControl = types.M2tsPcrControl(jtv) + } + + case "pcrPeriod": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin0Max500 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PcrPeriod = ptr.Int32(int32(i64)) + } + + case "scte35Control": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected M2tsScte35Control to be of type string, got %T instead", value) + } + sv.Scte35Control = types.M2tsScte35Control(jtv) + } + + case "scte35PrerollPullupMilliseconds": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Scte35PrerollPullupMilliseconds = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Scte35PrerollPullupMilliseconds = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __doubleMin0Max5000 to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentMultiplexMediaConnectOutputDestinationSettings(v **types.MultiplexMediaConnectOutputDestinationSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -39333,6 +39618,11 @@ func awsRestjson1_deserializeDocumentMultiplexOutputSettings(v **types.Multiplex for key, value := range shape { switch key { + case "containerSettings": + if err := awsRestjson1_deserializeDocumentMultiplexContainerSettings(&sv.ContainerSettings, value); err != nil { + return err + } + case "destination": if err := awsRestjson1_deserializeDocumentOutputLocationRef(&sv.Destination, value); err != nil { return err diff --git a/service/medialive/serializers.go b/service/medialive/serializers.go index b6caeb7bab0..01d7551bf16 100644 --- a/service/medialive/serializers.go +++ b/service/medialive/serializers.go @@ -10966,6 +10966,23 @@ func awsRestjson1_serializeDocumentAvailSettings(v *types.AvailSettings, value s return nil } +func awsRestjson1_serializeDocumentBandwidthReductionFilterSettings(v *types.BandwidthReductionFilterSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.PostFilterSharpening) > 0 { + ok := object.Key("postFilterSharpening") + ok.String(string(v.PostFilterSharpening)) + } + + if len(v.Strength) > 0 { + ok := object.Key("strength") + ok.String(string(v.Strength)) + } + + return nil +} + func awsRestjson1_serializeDocumentBatchScheduleActionCreateRequest(v *types.BatchScheduleActionCreateRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -12569,6 +12586,13 @@ func awsRestjson1_serializeDocumentH264FilterSettings(v *types.H264FilterSetting object := value.Object() defer object.Close() + if v.BandwidthReductionFilterSettings != nil { + ok := object.Key("bandwidthReductionFilterSettings") + if err := awsRestjson1_serializeDocumentBandwidthReductionFilterSettings(v.BandwidthReductionFilterSettings, ok); err != nil { + return err + } + } + if v.TemporalFilterSettings != nil { ok := object.Key("temporalFilterSettings") if err := awsRestjson1_serializeDocumentTemporalFilterSettings(v.TemporalFilterSettings, ok); err != nil { @@ -12866,6 +12890,13 @@ func awsRestjson1_serializeDocumentH265FilterSettings(v *types.H265FilterSetting object := value.Object() defer object.Close() + if v.BandwidthReductionFilterSettings != nil { + ok := object.Key("bandwidthReductionFilterSettings") + if err := awsRestjson1_serializeDocumentBandwidthReductionFilterSettings(v.BandwidthReductionFilterSettings, ok); err != nil { + return err + } + } + if v.TemporalFilterSettings != nil { ok := object.Key("temporalFilterSettings") if err := awsRestjson1_serializeDocumentTemporalFilterSettings(v.TemporalFilterSettings, ok); err != nil { @@ -15161,6 +15192,20 @@ func awsRestjson1_serializeDocumentMulticastSourceUpdateRequest(v *types.Multica return nil } +func awsRestjson1_serializeDocumentMultiplexContainerSettings(v *types.MultiplexContainerSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MultiplexM2tsSettings != nil { + ok := object.Key("multiplexM2tsSettings") + if err := awsRestjson1_serializeDocumentMultiplexM2tsSettings(v.MultiplexM2tsSettings, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentMultiplexGroupSettings(v *types.MultiplexGroupSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -15168,10 +15213,107 @@ func awsRestjson1_serializeDocumentMultiplexGroupSettings(v *types.MultiplexGrou return nil } +func awsRestjson1_serializeDocumentMultiplexM2tsSettings(v *types.MultiplexM2tsSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AbsentInputAudioBehavior) > 0 { + ok := object.Key("absentInputAudioBehavior") + ok.String(string(v.AbsentInputAudioBehavior)) + } + + if len(v.Arib) > 0 { + ok := object.Key("arib") + ok.String(string(v.Arib)) + } + + if len(v.AudioBufferModel) > 0 { + ok := object.Key("audioBufferModel") + ok.String(string(v.AudioBufferModel)) + } + + if v.AudioFramesPerPes != nil { + ok := object.Key("audioFramesPerPes") + ok.Integer(*v.AudioFramesPerPes) + } + + if len(v.AudioStreamType) > 0 { + ok := object.Key("audioStreamType") + ok.String(string(v.AudioStreamType)) + } + + if len(v.CcDescriptor) > 0 { + ok := object.Key("ccDescriptor") + ok.String(string(v.CcDescriptor)) + } + + if len(v.Ebif) > 0 { + ok := object.Key("ebif") + ok.String(string(v.Ebif)) + } + + if len(v.EsRateInPes) > 0 { + ok := object.Key("esRateInPes") + ok.String(string(v.EsRateInPes)) + } + + if len(v.Klv) > 0 { + ok := object.Key("klv") + ok.String(string(v.Klv)) + } + + if len(v.NielsenId3Behavior) > 0 { + ok := object.Key("nielsenId3Behavior") + ok.String(string(v.NielsenId3Behavior)) + } + + if len(v.PcrControl) > 0 { + ok := object.Key("pcrControl") + ok.String(string(v.PcrControl)) + } + + if v.PcrPeriod != nil { + ok := object.Key("pcrPeriod") + ok.Integer(*v.PcrPeriod) + } + + if len(v.Scte35Control) > 0 { + ok := object.Key("scte35Control") + ok.String(string(v.Scte35Control)) + } + + if v.Scte35PrerollPullupMilliseconds != nil { + ok := object.Key("scte35PrerollPullupMilliseconds") + switch { + case math.IsNaN(*v.Scte35PrerollPullupMilliseconds): + ok.String("NaN") + + case math.IsInf(*v.Scte35PrerollPullupMilliseconds, 1): + ok.String("Infinity") + + case math.IsInf(*v.Scte35PrerollPullupMilliseconds, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Scte35PrerollPullupMilliseconds) + + } + } + + return nil +} + func awsRestjson1_serializeDocumentMultiplexOutputSettings(v *types.MultiplexOutputSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() + if v.ContainerSettings != nil { + ok := object.Key("containerSettings") + if err := awsRestjson1_serializeDocumentMultiplexContainerSettings(v.ContainerSettings, ok); err != nil { + return err + } + } + if v.Destination != nil { ok := object.Key("destination") if err := awsRestjson1_serializeDocumentOutputLocationRef(v.Destination, ok); err != nil { diff --git a/service/medialive/types/enums.go b/service/medialive/types/enums.go index 99cb164174a..2a31e59933c 100644 --- a/service/medialive/types/enums.go +++ b/service/medialive/types/enums.go @@ -659,6 +659,56 @@ func (AvailBlankingState) Values() []AvailBlankingState { } } +type BandwidthReductionFilterStrength string + +// Enum values for BandwidthReductionFilterStrength +const ( + BandwidthReductionFilterStrengthAuto BandwidthReductionFilterStrength = "AUTO" + BandwidthReductionFilterStrengthStrength1 BandwidthReductionFilterStrength = "STRENGTH_1" + BandwidthReductionFilterStrengthStrength2 BandwidthReductionFilterStrength = "STRENGTH_2" + BandwidthReductionFilterStrengthStrength3 BandwidthReductionFilterStrength = "STRENGTH_3" + BandwidthReductionFilterStrengthStrength4 BandwidthReductionFilterStrength = "STRENGTH_4" +) + +// Values returns all known values for BandwidthReductionFilterStrength. 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 (BandwidthReductionFilterStrength) Values() []BandwidthReductionFilterStrength { + return []BandwidthReductionFilterStrength{ + "AUTO", + "STRENGTH_1", + "STRENGTH_2", + "STRENGTH_3", + "STRENGTH_4", + } +} + +type BandwidthReductionPostFilterSharpening string + +// Enum values for BandwidthReductionPostFilterSharpening +const ( + BandwidthReductionPostFilterSharpeningDisabled BandwidthReductionPostFilterSharpening = "DISABLED" + BandwidthReductionPostFilterSharpeningSharpening1 BandwidthReductionPostFilterSharpening = "SHARPENING_1" + BandwidthReductionPostFilterSharpeningSharpening2 BandwidthReductionPostFilterSharpening = "SHARPENING_2" + BandwidthReductionPostFilterSharpeningSharpening3 BandwidthReductionPostFilterSharpening = "SHARPENING_3" +) + +// Values returns all known values for BandwidthReductionPostFilterSharpening. +// 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 (BandwidthReductionPostFilterSharpening) Values() []BandwidthReductionPostFilterSharpening { + return []BandwidthReductionPostFilterSharpening{ + "DISABLED", + "SHARPENING_1", + "SHARPENING_2", + "SHARPENING_3", + } +} + type BlackoutSlateNetworkEndBlackout string // Enum values for BlackoutSlateNetworkEndBlackout diff --git a/service/medialive/types/types.go b/service/medialive/types/types.go index 4531b91f3c7..e9a568a02de 100644 --- a/service/medialive/types/types.go +++ b/service/medialive/types/types.go @@ -716,6 +716,25 @@ type AvailSettings struct { noSmithyDocumentSerde } +// Bandwidth Reduction Filter Settings +type BandwidthReductionFilterSettings struct { + + // Configures the sharpening control, which is available when the bandwidth + // reduction filter is enabled. This control sharpens edges and contours, which + // produces a specific artistic effect that you might want. + // + // We recommend that you test each of the values (including DISABLED) to observe + // the sharpening effect on the content. + PostFilterSharpening BandwidthReductionPostFilterSharpening + + // Enables the bandwidth reduction filter. The filter strengths range from 1 to 4. + // We recommend that you always enable this filter and use AUTO, to let MediaLive + // apply the optimum filtering for the context. + Strength BandwidthReductionFilterStrength + + noSmithyDocumentSerde +} + // Details from a failed operation type BatchFailedResultModel struct { @@ -2562,6 +2581,9 @@ type H264ColorSpaceSettings struct { // H264 Filter Settings type H264FilterSettings struct { + // Bandwidth Reduction Filter Settings + BandwidthReductionFilterSettings *BandwidthReductionFilterSettings + // Temporal Filter Settings TemporalFilterSettings *TemporalFilterSettings @@ -2856,6 +2878,9 @@ type H265ColorSpaceSettings struct { // H265 Filter Settings type H265FilterSettings struct { + // Bandwidth Reduction Filter Settings + BandwidthReductionFilterSettings *BandwidthReductionFilterSettings + // Temporal Filter Settings TemporalFilterSettings *TemporalFilterSettings @@ -5314,11 +5339,86 @@ type Multiplex struct { noSmithyDocumentSerde } +// Multiplex Container Settings +type MultiplexContainerSettings struct { + + // Multiplex M2ts Settings + MultiplexM2tsSettings *MultiplexM2tsSettings + + noSmithyDocumentSerde +} + // Multiplex Group Settings type MultiplexGroupSettings struct { noSmithyDocumentSerde } +// Multiplex M2ts Settings +type MultiplexM2tsSettings struct { + + // When set to drop, output audio streams will be removed from the program if the + // selected input audio stream is removed from the input. This allows the output + // audio configuration to dynamically change based on input configuration. If this + // is set to encodeSilence, all output audio streams will output encoded silence + // when not connected to an active input stream. + AbsentInputAudioBehavior M2tsAbsentInputAudioBehavior + + // When set to enabled, uses ARIB-compliant field muxing and removes video + // descriptor. + Arib M2tsArib + + // When set to dvb, uses DVB buffer model for Dolby Digital audio. When set to + // atsc, the ATSC model is used. + AudioBufferModel M2tsAudioBufferModel + + // The number of audio frames to insert for each PES packet. + AudioFramesPerPes *int32 + + // When set to atsc, uses stream type = 0x81 for AC3 and stream type = 0x87 for + // EAC3. When set to dvb, uses stream type = 0x06. + AudioStreamType M2tsAudioStreamType + + // When set to enabled, generates captionServiceDescriptor in PMT. + CcDescriptor M2tsCcDescriptor + + // If set to passthrough, passes any EBIF data from the input source to this + // output. + Ebif M2tsEbifControl + + // Include or exclude the ES Rate field in the PES header. + EsRateInPes M2tsEsRateInPes + + // If set to passthrough, passes any KLV data from the input source to this output. + Klv M2tsKlv + + // If set to passthrough, Nielsen inaudible tones for media tracking will be + // detected in the input audio and an equivalent ID3 tag will be inserted in the + // output. + NielsenId3Behavior M2tsNielsenId3Behavior + + // When set to pcrEveryPesPacket, a Program Clock Reference value is inserted for + // every Packetized Elementary Stream (PES) header. This parameter is effective + // only when the PCR PID is the same as the video or audio elementary stream. + PcrControl M2tsPcrControl + + // Maximum time in milliseconds between Program Clock Reference (PCRs) inserted + // into the transport stream. + PcrPeriod *int32 + + // Optionally pass SCTE-35 signals from the input source to this output. + Scte35Control M2tsScte35Control + + // Defines the amount SCTE-35 preroll will be increased (in milliseconds) on the + // output. Preroll is the amount of time between the presence of a SCTE-35 + // indication in a transport stream and the PTS of the video frame it references. + // Zero means don't add pullup (it doesn't mean set the preroll to zero). Negative + // pullup is not supported, which means that you can't make the preroll shorter. Be + // aware that latency in the output will increase by the pullup amount. + Scte35PrerollPullupMilliseconds *float64 + + noSmithyDocumentSerde +} + // Multiplex MediaConnect output destination settings. type MultiplexMediaConnectOutputDestinationSettings struct { @@ -5345,6 +5445,9 @@ type MultiplexOutputSettings struct { // This member is required. Destination *OutputLocationRef + // Multiplex Container Settings + ContainerSettings *MultiplexContainerSettings + noSmithyDocumentSerde } diff --git a/service/quicksight/api_op_ListFoldersForResource.go b/service/quicksight/api_op_ListFoldersForResource.go new file mode 100644 index 00000000000..98c47765fa2 --- /dev/null +++ b/service/quicksight/api_op_ListFoldersForResource.go @@ -0,0 +1,256 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +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" +) + +// List all folders that a resource is a member of. +func (c *Client) ListFoldersForResource(ctx context.Context, params *ListFoldersForResourceInput, optFns ...func(*Options)) (*ListFoldersForResourceOutput, error) { + if params == nil { + params = &ListFoldersForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListFoldersForResource", params, optFns, c.addOperationListFoldersForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListFoldersForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListFoldersForResourceInput struct { + + // The ID for the Amazon Web Services account that contains the resource. + // + // This member is required. + AwsAccountId *string + + // The Amazon Resource Name (ARN) the resource whose folders you need to list. + // + // This member is required. + ResourceArn *string + + // The maximum number of results to be returned per request. + MaxResults *int32 + + // The token for the next set of results, or null if there are no more results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListFoldersForResourceOutput struct { + + // A list that contains the Amazon Resource Names (ARNs) of all folders that the + // resource is a member of. + Folders []string + + // The token for the next set of results, or null if there are no more results. + NextToken *string + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListFoldersForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListFoldersForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFoldersForResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListFoldersForResource"); 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 = addOpListFoldersForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFoldersForResource(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 +} + +// ListFoldersForResourcePaginatorOptions is the paginator options for +// ListFoldersForResource +type ListFoldersForResourcePaginatorOptions struct { + // The maximum number of results to be returned per request. + 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 +} + +// ListFoldersForResourcePaginator is a paginator for ListFoldersForResource +type ListFoldersForResourcePaginator struct { + options ListFoldersForResourcePaginatorOptions + client ListFoldersForResourceAPIClient + params *ListFoldersForResourceInput + nextToken *string + firstPage bool +} + +// NewListFoldersForResourcePaginator returns a new ListFoldersForResourcePaginator +func NewListFoldersForResourcePaginator(client ListFoldersForResourceAPIClient, params *ListFoldersForResourceInput, optFns ...func(*ListFoldersForResourcePaginatorOptions)) *ListFoldersForResourcePaginator { + if params == nil { + params = &ListFoldersForResourceInput{} + } + + options := ListFoldersForResourcePaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListFoldersForResourcePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListFoldersForResourcePaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListFoldersForResource page. +func (p *ListFoldersForResourcePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFoldersForResourceOutput, 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.ListFoldersForResource(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 +} + +// ListFoldersForResourceAPIClient is a client that implements the +// ListFoldersForResource operation. +type ListFoldersForResourceAPIClient interface { + ListFoldersForResource(context.Context, *ListFoldersForResourceInput, ...func(*Options)) (*ListFoldersForResourceOutput, error) +} + +var _ ListFoldersForResourceAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListFoldersForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListFoldersForResource", + } +} diff --git a/service/quicksight/deserializers.go b/service/quicksight/deserializers.go index 62e6d8e14cf..eeec91ffc71 100644 --- a/service/quicksight/deserializers.go +++ b/service/quicksight/deserializers.go @@ -21534,6 +21534,203 @@ func awsRestjson1_deserializeOpDocumentListFoldersOutput(v **ListFoldersOutput, return nil } +type awsRestjson1_deserializeOpListFoldersForResource struct { +} + +func (*awsRestjson1_deserializeOpListFoldersForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListFoldersForResource) 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_deserializeOpErrorListFoldersForResource(response, &metadata) + } + output := &ListFoldersForResourceOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsListFoldersForResourceOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + 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_deserializeOpDocumentListFoldersForResourceOutput(&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_deserializeOpErrorListFoldersForResource(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("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsListFoldersForResourceOutput(v *ListFoldersForResourceOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentListFoldersForResourceOutput(v **ListFoldersForResourceOutput, 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 *ListFoldersForResourceOutput + if *v == nil { + sv = &ListFoldersForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Folders": + if err := awsRestjson1_deserializeDocumentFoldersForResourceArnList(&sv.Folders, 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) + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListGroupMemberships struct { } @@ -53247,6 +53444,15 @@ func awsRestjson1_deserializeDocumentDefaultDateTimePickerControlOptions(v **typ for key, value := range shape { switch key { + case "CommitMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommitMode to be of type string, got %T instead", value) + } + sv.CommitMode = types.CommitMode(jtv) + } + case "DisplayOptions": if err := awsRestjson1_deserializeDocumentDateTimePickerControlDisplayOptions(&sv.DisplayOptions, value); err != nil { return err @@ -53403,6 +53609,15 @@ func awsRestjson1_deserializeDocumentDefaultFilterDropDownControlOptions(v **typ for key, value := range shape { switch key { + case "CommitMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommitMode to be of type string, got %T instead", value) + } + sv.CommitMode = types.CommitMode(jtv) + } + case "DisplayOptions": if err := awsRestjson1_deserializeDocumentDropDownControlDisplayOptions(&sv.DisplayOptions, value); err != nil { return err @@ -53747,6 +53962,15 @@ func awsRestjson1_deserializeDocumentDefaultRelativeDateTimeControlOptions(v **t for key, value := range shape { switch key { + case "CommitMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommitMode to be of type string, got %T instead", value) + } + sv.CommitMode = types.CommitMode(jtv) + } + case "DisplayOptions": if err := awsRestjson1_deserializeDocumentRelativeDateTimeControlDisplayOptions(&sv.DisplayOptions, value); err != nil { return err @@ -56523,6 +56747,15 @@ func awsRestjson1_deserializeDocumentFilterDateTimePickerControl(v **types.Filte for key, value := range shape { switch key { + case "CommitMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommitMode to be of type string, got %T instead", value) + } + sv.CommitMode = types.CommitMode(jtv) + } + case "DisplayOptions": if err := awsRestjson1_deserializeDocumentDateTimePickerControlDisplayOptions(&sv.DisplayOptions, value); err != nil { return err @@ -56600,6 +56833,15 @@ func awsRestjson1_deserializeDocumentFilterDropDownControl(v **types.FilterDropD return err } + case "CommitMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommitMode to be of type string, got %T instead", value) + } + sv.CommitMode = types.CommitMode(jtv) + } + case "DisplayOptions": if err := awsRestjson1_deserializeDocumentDropDownControlDisplayOptions(&sv.DisplayOptions, value); err != nil { return err @@ -57120,6 +57362,15 @@ func awsRestjson1_deserializeDocumentFilterRelativeDateTimeControl(v **types.Fil for key, value := range shape { switch key { + case "CommitMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommitMode to be of type string, got %T instead", value) + } + sv.CommitMode = types.CommitMode(jtv) + } + case "DisplayOptions": if err := awsRestjson1_deserializeDocumentRelativeDateTimeControlDisplayOptions(&sv.DisplayOptions, value); err != nil { return err @@ -57779,6 +58030,42 @@ func awsRestjson1_deserializeDocumentFolderMemberList(v *[]types.MemberIdArnPair return nil } +func awsRestjson1_deserializeDocumentFoldersForResourceArnList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentFolderSummary(v **types.FolderSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -68970,6 +69257,15 @@ func awsRestjson1_deserializeDocumentParameterDropDownControl(v **types.Paramete return err } + case "CommitMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommitMode to be of type string, got %T instead", value) + } + sv.CommitMode = types.CommitMode(jtv) + } + case "DisplayOptions": if err := awsRestjson1_deserializeDocumentDropDownControlDisplayOptions(&sv.DisplayOptions, value); err != nil { return err diff --git a/service/quicksight/generated.json b/service/quicksight/generated.json index 1356215e90f..0cbe243a827 100644 --- a/service/quicksight/generated.json +++ b/service/quicksight/generated.json @@ -115,6 +115,7 @@ "api_op_ListDataSources.go", "api_op_ListFolderMembers.go", "api_op_ListFolders.go", + "api_op_ListFoldersForResource.go", "api_op_ListGroupMemberships.go", "api_op_ListGroups.go", "api_op_ListIAMPolicyAssignments.go", diff --git a/service/quicksight/serializers.go b/service/quicksight/serializers.go index a1ca413b292..90a343b2094 100644 --- a/service/quicksight/serializers.go +++ b/service/quicksight/serializers.go @@ -9470,6 +9470,88 @@ func awsRestjson1_serializeOpHttpBindingsListFoldersInput(v *ListFoldersInput, e return nil } +type awsRestjson1_serializeOpListFoldersForResource struct { +} + +func (*awsRestjson1_serializeOpListFoldersForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListFoldersForResource) 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.(*ListFoldersForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/resource/{ResourceArn}/folders") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsListFoldersForResourceInput(input, restEncoder); 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_serializeOpHttpBindingsListFoldersForResourceInput(v *ListFoldersForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpListGroupMemberships struct { } @@ -23567,6 +23649,11 @@ func awsRestjson1_serializeDocumentDefaultDateTimePickerControlOptions(v *types. object := value.Object() defer object.Close() + if len(v.CommitMode) > 0 { + ok := object.Key("CommitMode") + ok.String(string(v.CommitMode)) + } + if v.DisplayOptions != nil { ok := object.Key("DisplayOptions") if err := awsRestjson1_serializeDocumentDateTimePickerControlDisplayOptions(v.DisplayOptions, ok); err != nil { @@ -23661,6 +23748,11 @@ func awsRestjson1_serializeDocumentDefaultFilterDropDownControlOptions(v *types. object := value.Object() defer object.Close() + if len(v.CommitMode) > 0 { + ok := object.Key("CommitMode") + ok.String(string(v.CommitMode)) + } + if v.DisplayOptions != nil { ok := object.Key("DisplayOptions") if err := awsRestjson1_serializeDocumentDropDownControlDisplayOptions(v.DisplayOptions, ok); err != nil { @@ -23821,6 +23913,11 @@ func awsRestjson1_serializeDocumentDefaultRelativeDateTimeControlOptions(v *type object := value.Object() defer object.Close() + if len(v.CommitMode) > 0 { + ok := object.Key("CommitMode") + ok.String(string(v.CommitMode)) + } + if v.DisplayOptions != nil { ok := object.Key("DisplayOptions") if err := awsRestjson1_serializeDocumentRelativeDateTimeControlDisplayOptions(v.DisplayOptions, ok); err != nil { @@ -25012,6 +25109,11 @@ func awsRestjson1_serializeDocumentFilterDateTimePickerControl(v *types.FilterDa object := value.Object() defer object.Close() + if len(v.CommitMode) > 0 { + ok := object.Key("CommitMode") + ok.String(string(v.CommitMode)) + } + if v.DisplayOptions != nil { ok := object.Key("DisplayOptions") if err := awsRestjson1_serializeDocumentDateTimePickerControlDisplayOptions(v.DisplayOptions, ok); err != nil { @@ -25053,6 +25155,11 @@ func awsRestjson1_serializeDocumentFilterDropDownControl(v *types.FilterDropDown } } + if len(v.CommitMode) > 0 { + ok := object.Key("CommitMode") + ok.String(string(v.CommitMode)) + } + if v.DisplayOptions != nil { ok := object.Key("DisplayOptions") if err := awsRestjson1_serializeDocumentDropDownControlDisplayOptions(v.DisplayOptions, ok); err != nil { @@ -25296,6 +25403,11 @@ func awsRestjson1_serializeDocumentFilterRelativeDateTimeControl(v *types.Filter object := value.Object() defer object.Close() + if len(v.CommitMode) > 0 { + ok := object.Key("CommitMode") + ok.String(string(v.CommitMode)) + } + if v.DisplayOptions != nil { ok := object.Key("DisplayOptions") if err := awsRestjson1_serializeDocumentRelativeDateTimeControlDisplayOptions(v.DisplayOptions, ok); err != nil { @@ -30402,6 +30514,11 @@ func awsRestjson1_serializeDocumentParameterDropDownControl(v *types.ParameterDr } } + if len(v.CommitMode) > 0 { + ok := object.Key("CommitMode") + ok.String(string(v.CommitMode)) + } + if v.DisplayOptions != nil { ok := object.Key("DisplayOptions") if err := awsRestjson1_serializeDocumentDropDownControlDisplayOptions(v.DisplayOptions, ok); err != nil { diff --git a/service/quicksight/snapshot/api_op_ListFoldersForResource.go.snap b/service/quicksight/snapshot/api_op_ListFoldersForResource.go.snap new file mode 100644 index 00000000000..1e9fba35ee4 --- /dev/null +++ b/service/quicksight/snapshot/api_op_ListFoldersForResource.go.snap @@ -0,0 +1,36 @@ +ListFoldersForResource + 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/quicksight/snapshot_test.go b/service/quicksight/snapshot_test.go index 36f188ec3f1..1198edac552 100644 --- a/service/quicksight/snapshot_test.go +++ b/service/quicksight/snapshot_test.go @@ -1346,6 +1346,18 @@ func TestCheckSnapshot_ListFolders(t *testing.T) { } } +func TestCheckSnapshot_ListFoldersForResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListFoldersForResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListFoldersForResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListGroupMemberships(t *testing.T) { svc := New(Options{}) _, err := svc.ListGroupMemberships(context.Background(), nil, func(o *Options) { @@ -3469,6 +3481,18 @@ func TestUpdateSnapshot_ListFolders(t *testing.T) { } } +func TestUpdateSnapshot_ListFoldersForResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListFoldersForResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListFoldersForResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListGroupMemberships(t *testing.T) { svc := New(Options{}) _, err := svc.ListGroupMemberships(context.Background(), nil, func(o *Options) { diff --git a/service/quicksight/types/enums.go b/service/quicksight/types/enums.go index e60af2aefff..1f87609b30a 100644 --- a/service/quicksight/types/enums.go +++ b/service/quicksight/types/enums.go @@ -918,6 +918,25 @@ func (ColumnTagName) Values() []ColumnTagName { } } +type CommitMode string + +// Enum values for CommitMode +const ( + CommitModeAuto CommitMode = "AUTO" + CommitModeManual CommitMode = "MANUAL" +) + +// Values returns all known values for CommitMode. 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 (CommitMode) Values() []CommitMode { + return []CommitMode{ + "AUTO", + "MANUAL", + } +} + type ComparisonMethod string // Enum values for ComparisonMethod diff --git a/service/quicksight/types/types.go b/service/quicksight/types/types.go index 6b468b463c0..0835739a83c 100644 --- a/service/quicksight/types/types.go +++ b/service/quicksight/types/types.go @@ -5299,6 +5299,9 @@ type DecimalValueWhenUnsetConfiguration struct { // DateTimePicker . type DefaultDateTimePickerControlOptions struct { + // The visibility configuration of the Apply button on a DateTimePickerControl . + CommitMode CommitMode + // The display options of a control. DisplayOptions *DateTimePickerControlDisplayOptions @@ -5361,6 +5364,9 @@ type DefaultFilterControlOptions struct { // The default options that correspond to the Dropdown filter control type. type DefaultFilterDropDownControlOptions struct { + // The visibility configuration of the Apply button on a FilterDropDownControl . + CommitMode CommitMode + // The display options of a control. DisplayOptions *DropDownControlDisplayOptions @@ -5478,6 +5484,9 @@ type DefaultPaginatedLayoutConfiguration struct { // The default options that correspond to the RelativeDateTime filter control type. type DefaultRelativeDateTimeControlOptions struct { + // The visibility configuration of the Apply button on a RelativeDateTimeControl . + CommitMode CommitMode + // The display options of a control. DisplayOptions *RelativeDateTimeControlDisplayOptions @@ -6262,6 +6271,9 @@ type FilterDateTimePickerControl struct { // This member is required. Title *string + // The visibility configurationof the Apply button on a DateTimePickerControl . + CommitMode CommitMode + // The display options of a control. DisplayOptions *DateTimePickerControlDisplayOptions @@ -6298,6 +6310,9 @@ type FilterDropDownControl struct { // values that are valid based on what's selected in other controls. CascadingControlConfiguration *CascadingControlConfiguration + // The visibility configuration of the Apply button on a FilterDropDownControl . + CommitMode CommitMode + // The display options of the FilterDropDownControl . DisplayOptions *DropDownControlDisplayOptions @@ -6489,6 +6504,10 @@ type FilterRelativeDateTimeControl struct { // This member is required. Title *string + // The visibility configuration of the Apply button on a + // FilterRelativeDateTimeControl . + CommitMode CommitMode + // The display options of a control. DisplayOptions *RelativeDateTimeControlDisplayOptions @@ -9909,6 +9928,9 @@ type ParameterDropDownControl struct { // values that are valid based on what's selected in other controls. CascadingControlConfiguration *CascadingControlConfiguration + // The visibility configuration of the Apply button on a ParameterDropDownControl . + CommitMode CommitMode + // The display options of a control. DisplayOptions *DropDownControlDisplayOptions diff --git a/service/quicksight/validators.go b/service/quicksight/validators.go index 9ae4caad009..831061f2b14 100644 --- a/service/quicksight/validators.go +++ b/service/quicksight/validators.go @@ -2130,6 +2130,26 @@ func (m *validateOpListFolderMembers) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpListFoldersForResource struct { +} + +func (*validateOpListFoldersForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListFoldersForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListFoldersForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListFoldersForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListFolders struct { } @@ -3974,6 +3994,10 @@ func addOpListFolderMembersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListFolderMembers{}, middleware.After) } +func addOpListFoldersForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListFoldersForResource{}, middleware.After) +} + func addOpListFoldersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListFolders{}, middleware.After) } @@ -20802,6 +20826,24 @@ func validateOpListFolderMembersInput(v *ListFolderMembersInput) error { } } +func validateOpListFoldersForResourceInput(v *ListFoldersForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListFoldersForResourceInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListFoldersInput(v *ListFoldersInput) error { if v == nil { return nil diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 6a5e55e4ac6..3c2d49a537d 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -209,6 +209,14 @@ const ( AppInstanceTypeMlG616xlarge AppInstanceType = "ml.g6.16xlarge" AppInstanceTypeMlG624xlarge AppInstanceType = "ml.g6.24xlarge" AppInstanceTypeMlG648xlarge AppInstanceType = "ml.g6.48xlarge" + AppInstanceTypeMlG6eXlarge AppInstanceType = "ml.g6e.xlarge" + AppInstanceTypeMlG6e2xlarge AppInstanceType = "ml.g6e.2xlarge" + AppInstanceTypeMlG6e4xlarge AppInstanceType = "ml.g6e.4xlarge" + AppInstanceTypeMlG6e8xlarge AppInstanceType = "ml.g6e.8xlarge" + AppInstanceTypeMlG6e12xlarge AppInstanceType = "ml.g6e.12xlarge" + AppInstanceTypeMlG6e16xlarge AppInstanceType = "ml.g6e.16xlarge" + AppInstanceTypeMlG6e24xlarge AppInstanceType = "ml.g6e.24xlarge" + AppInstanceTypeMlG6e48xlarge AppInstanceType = "ml.g6e.48xlarge" AppInstanceTypeMlGeospatialInteractive AppInstanceType = "ml.geospatial.interactive" AppInstanceTypeMlP4d24xlarge AppInstanceType = "ml.p4d.24xlarge" AppInstanceTypeMlP4de24xlarge AppInstanceType = "ml.p4de.24xlarge" @@ -370,6 +378,14 @@ func (AppInstanceType) Values() []AppInstanceType { "ml.g6.16xlarge", "ml.g6.24xlarge", "ml.g6.48xlarge", + "ml.g6e.xlarge", + "ml.g6e.2xlarge", + "ml.g6e.4xlarge", + "ml.g6e.8xlarge", + "ml.g6e.12xlarge", + "ml.g6e.16xlarge", + "ml.g6e.24xlarge", + "ml.g6e.48xlarge", "ml.geospatial.interactive", "ml.p4d.24xlarge", "ml.p4de.24xlarge", diff --git a/service/workspacesweb/api_op_CreatePortal.go b/service/workspacesweb/api_op_CreatePortal.go index 66ae8bb7528..b1103316fe7 100644 --- a/service/workspacesweb/api_op_CreatePortal.go +++ b/service/workspacesweb/api_op_CreatePortal.go @@ -40,10 +40,10 @@ type CreatePortalInput struct { // with your web portal. User and group access to your web portal is controlled // through your identity provider. // - // IAM Identity Center web portals are authenticated through IAM Identity Center - // (successor to Single Sign-On). Identity sources (including external identity - // provider integration), plus user and group access to your web portal, can be - // configured in the IAM Identity Center. + // IAM Identity Center web portals are authenticated through IAM Identity Center. + // Identity sources (including external identity provider integration), plus user + // and group access to your web portal, can be configured in the IAM Identity + // Center. AuthenticationType types.AuthenticationType // A unique, case-sensitive identifier that you provide to ensure the idempotency diff --git a/service/workspacesweb/api_op_ExpireSession.go b/service/workspacesweb/api_op_ExpireSession.go new file mode 100644 index 00000000000..1b7f5a04a61 --- /dev/null +++ b/service/workspacesweb/api_op_ExpireSession.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workspacesweb + +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" +) + +// Expires an active secure browser session. +func (c *Client) ExpireSession(ctx context.Context, params *ExpireSessionInput, optFns ...func(*Options)) (*ExpireSessionOutput, error) { + if params == nil { + params = &ExpireSessionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ExpireSession", params, optFns, c.addOperationExpireSessionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ExpireSessionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ExpireSessionInput struct { + + // The ID of the web portal for the session. + // + // This member is required. + PortalId *string + + // The ID of the session to expire. + // + // This member is required. + SessionId *string + + noSmithyDocumentSerde +} + +type ExpireSessionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationExpireSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpExpireSession{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpExpireSession{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ExpireSession"); 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 = addOpExpireSessionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExpireSession(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_opExpireSession(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ExpireSession", + } +} diff --git a/service/workspacesweb/api_op_GetSession.go b/service/workspacesweb/api_op_GetSession.go new file mode 100644 index 00000000000..9c0e4e8a992 --- /dev/null +++ b/service/workspacesweb/api_op_GetSession.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workspacesweb + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/workspacesweb/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information for a secure browser session. +func (c *Client) GetSession(ctx context.Context, params *GetSessionInput, optFns ...func(*Options)) (*GetSessionOutput, error) { + if params == nil { + params = &GetSessionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSession", params, optFns, c.addOperationGetSessionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSessionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetSessionInput struct { + + // The ID of the web portal for the session. + // + // This member is required. + PortalId *string + + // The ID of the session. + // + // This member is required. + SessionId *string + + noSmithyDocumentSerde +} + +type GetSessionOutput struct { + + // The sessions in a list. + Session *types.Session + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetSession{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetSession{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetSession"); 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 = addOpGetSessionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSession(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_opGetSession(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetSession", + } +} diff --git a/service/workspacesweb/api_op_ListSessions.go b/service/workspacesweb/api_op_ListSessions.go new file mode 100644 index 00000000000..be51a4aae2b --- /dev/null +++ b/service/workspacesweb/api_op_ListSessions.go @@ -0,0 +1,259 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workspacesweb + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/workspacesweb/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists information for multiple secure browser sessions from a specific portal. +func (c *Client) ListSessions(ctx context.Context, params *ListSessionsInput, optFns ...func(*Options)) (*ListSessionsOutput, error) { + if params == nil { + params = &ListSessionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSessions", params, optFns, c.addOperationListSessionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSessionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSessionsInput struct { + + // The ID of the web portal for the sessions. + // + // This member is required. + PortalId *string + + // The maximum number of results to be included in the next page. + MaxResults *int32 + + // The pagination token used to retrieve the next page of results for this + // operation. + NextToken *string + + // The ID of the session. + SessionId *string + + // The method in which the returned sessions should be sorted. + SortBy types.SessionSortBy + + // The status of the session. + Status types.SessionStatus + + // The username of the session. + Username *string + + noSmithyDocumentSerde +} + +type ListSessionsOutput struct { + + // The sessions in a list. + // + // This member is required. + Sessions []types.SessionSummary + + // The pagination token used to retrieve the next page of results for this + // operation. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSessionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListSessions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListSessions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSessions"); 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 = addOpListSessionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSessions(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 +} + +// ListSessionsPaginatorOptions is the paginator options for ListSessions +type ListSessionsPaginatorOptions struct { + // The maximum number of results to be included in the next page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListSessionsPaginator is a paginator for ListSessions +type ListSessionsPaginator struct { + options ListSessionsPaginatorOptions + client ListSessionsAPIClient + params *ListSessionsInput + nextToken *string + firstPage bool +} + +// NewListSessionsPaginator returns a new ListSessionsPaginator +func NewListSessionsPaginator(client ListSessionsAPIClient, params *ListSessionsInput, optFns ...func(*ListSessionsPaginatorOptions)) *ListSessionsPaginator { + if params == nil { + params = &ListSessionsInput{} + } + + options := ListSessionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSessionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSessionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSessions page. +func (p *ListSessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSessionsOutput, 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.ListSessions(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 +} + +// ListSessionsAPIClient is a client that implements the ListSessions operation. +type ListSessionsAPIClient interface { + ListSessions(context.Context, *ListSessionsInput, ...func(*Options)) (*ListSessionsOutput, error) +} + +var _ ListSessionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListSessions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSessions", + } +} diff --git a/service/workspacesweb/api_op_UpdatePortal.go b/service/workspacesweb/api_op_UpdatePortal.go index 186b622e3ac..12b271b2fbe 100644 --- a/service/workspacesweb/api_op_UpdatePortal.go +++ b/service/workspacesweb/api_op_UpdatePortal.go @@ -42,10 +42,10 @@ type UpdatePortalInput struct { // with your web portal. User and group access to your web portal is controlled // through your identity provider. // - // IAM Identity Center web portals are authenticated through IAM Identity Center - // (successor to Single Sign-On). Identity sources (including external identity - // provider integration), plus user and group access to your web portal, can be - // configured in the IAM Identity Center. + // IAM Identity Center web portals are authenticated through IAM Identity Center. + // Identity sources (including external identity provider integration), plus user + // and group access to your web portal, can be configured in the IAM Identity + // Center. AuthenticationType types.AuthenticationType // The name of the web portal. This is not visible to users who log into the web diff --git a/service/workspacesweb/deserializers.go b/service/workspacesweb/deserializers.go index b27e9364f57..9fe83155243 100644 --- a/service/workspacesweb/deserializers.go +++ b/service/workspacesweb/deserializers.go @@ -3774,6 +3774,101 @@ func awsRestjson1_deserializeOpErrorDisassociateUserSettings(response *smithyhtt } } +type awsRestjson1_deserializeOpExpireSession struct { +} + +func (*awsRestjson1_deserializeOpExpireSession) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpExpireSession) 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_deserializeOpErrorExpireSession(response, &metadata) + } + output := &ExpireSessionOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorExpireSession(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("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(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 + + } +} + type awsRestjson1_deserializeOpGetBrowserSettings struct { } @@ -4741,6 +4836,165 @@ func awsRestjson1_deserializeOpDocumentGetPortalServiceProviderMetadataOutput(v return nil } +type awsRestjson1_deserializeOpGetSession struct { +} + +func (*awsRestjson1_deserializeOpGetSession) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetSession) 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_deserializeOpErrorGetSession(response, &metadata) + } + output := &GetSessionOutput{} + 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_deserializeOpDocumentGetSessionOutput(&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_deserializeOpErrorGetSession(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("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(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_deserializeOpDocumentGetSessionOutput(v **GetSessionOutput, 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 *GetSessionOutput + if *v == nil { + sv = &GetSessionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "session": + if err := awsRestjson1_deserializeDocumentSession(&sv.Session, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetTrustStore struct { } @@ -6046,14 +6300,179 @@ func awsRestjson1_deserializeOpDocumentListNetworkSettingsOutput(v **ListNetwork return nil } -type awsRestjson1_deserializeOpListPortals struct { +type awsRestjson1_deserializeOpListPortals struct { +} + +func (*awsRestjson1_deserializeOpListPortals) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListPortals) 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_deserializeOpErrorListPortals(response, &metadata) + } + output := &ListPortalsOutput{} + 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_deserializeOpDocumentListPortalsOutput(&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_deserializeOpErrorListPortals(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_deserializeOpDocumentListPortalsOutput(v **ListPortalsOutput, 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 *ListPortalsOutput + if *v == nil { + sv = &ListPortalsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + 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) + } + + case "portals": + if err := awsRestjson1_deserializeDocumentPortalList(&sv.Portals, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListSessions struct { } -func (*awsRestjson1_deserializeOpListPortals) ID() string { +func (*awsRestjson1_deserializeOpListSessions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListPortals) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSessions) 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) @@ -6067,9 +6486,9 @@ func (m *awsRestjson1_deserializeOpListPortals) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListPortals(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListSessions(response, &metadata) } - output := &ListPortalsOutput{} + output := &ListSessionsOutput{} out.Result = output var buff [1024]byte @@ -6090,7 +6509,7 @@ func (m *awsRestjson1_deserializeOpListPortals) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListPortalsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSessionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6103,7 +6522,7 @@ func (m *awsRestjson1_deserializeOpListPortals) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListPortals(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSessions(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)} @@ -6150,6 +6569,9 @@ func awsRestjson1_deserializeOpErrorListPortals(response *smithyhttp.Response, m case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -6166,7 +6588,7 @@ func awsRestjson1_deserializeOpErrorListPortals(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentListPortalsOutput(v **ListPortalsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListSessionsOutput(v **ListSessionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6179,9 +6601,9 @@ func awsRestjson1_deserializeOpDocumentListPortalsOutput(v **ListPortalsOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListPortalsOutput + var sv *ListSessionsOutput if *v == nil { - sv = &ListPortalsOutput{} + sv = &ListSessionsOutput{} } else { sv = *v } @@ -6197,8 +6619,8 @@ func awsRestjson1_deserializeOpDocumentListPortalsOutput(v **ListPortalsOutput, sv.NextToken = ptr.String(jtv) } - case "portals": - if err := awsRestjson1_deserializeDocumentPortalList(&sv.Portals, value); err != nil { + case "sessions": + if err := awsRestjson1_deserializeDocumentSessionSummaryList(&sv.Sessions, value); err != nil { return err } @@ -9970,6 +10392,42 @@ func awsRestjson1_deserializeDocumentIpAccessSettingsSummary(v **types.IpAccessS return nil } +func awsRestjson1_deserializeDocumentIpAddressList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IpAddress to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentIpRule(v **types.IpRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10799,6 +11257,243 @@ func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.Ser return nil } +func awsRestjson1_deserializeDocumentSession(v **types.Session, 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.Session + if *v == nil { + sv = &types.Session{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "clientIpAddresses": + if err := awsRestjson1_deserializeDocumentIpAddressList(&sv.ClientIpAddresses, 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 "portalArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.PortalArn = ptr.String(jtv) + } + + case "sessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(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) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionStatus to be of type string, got %T instead", value) + } + sv.Status = types.SessionStatus(jtv) + } + + case "username": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Username to be of type string, got %T instead", value) + } + sv.Username = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSessionSummary(v **types.SessionSummary, 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.SessionSummary + if *v == nil { + sv = &types.SessionSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + 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 "portalArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.PortalArn = ptr.String(jtv) + } + + case "sessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(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) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionStatus to be of type string, got %T instead", value) + } + sv.Status = types.SessionStatus(jtv) + } + + case "username": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Username to be of type string, got %T instead", value) + } + sv.Username = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSessionSummaryList(v *[]types.SessionSummary, 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.SessionSummary + if *v == nil { + cv = []types.SessionSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SessionSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentSessionSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentSubnetIdList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/workspacesweb/generated.json b/service/workspacesweb/generated.json index c61c3389ca3..8dc68d89843 100644 --- a/service/workspacesweb/generated.json +++ b/service/workspacesweb/generated.json @@ -36,12 +36,14 @@ "api_op_DisassociateTrustStore.go", "api_op_DisassociateUserAccessLoggingSettings.go", "api_op_DisassociateUserSettings.go", + "api_op_ExpireSession.go", "api_op_GetBrowserSettings.go", "api_op_GetIdentityProvider.go", "api_op_GetIpAccessSettings.go", "api_op_GetNetworkSettings.go", "api_op_GetPortal.go", "api_op_GetPortalServiceProviderMetadata.go", + "api_op_GetSession.go", "api_op_GetTrustStore.go", "api_op_GetTrustStoreCertificate.go", "api_op_GetUserAccessLoggingSettings.go", @@ -51,6 +53,7 @@ "api_op_ListIpAccessSettings.go", "api_op_ListNetworkSettings.go", "api_op_ListPortals.go", + "api_op_ListSessions.go", "api_op_ListTagsForResource.go", "api_op_ListTrustStoreCertificates.go", "api_op_ListTrustStores.go", diff --git a/service/workspacesweb/serializers.go b/service/workspacesweb/serializers.go index a821da294f3..bf082c7367c 100644 --- a/service/workspacesweb/serializers.go +++ b/service/workspacesweb/serializers.go @@ -2184,6 +2184,80 @@ func awsRestjson1_serializeOpHttpBindingsDisassociateUserSettingsInput(v *Disass return nil } +type awsRestjson1_serializeOpExpireSession struct { +} + +func (*awsRestjson1_serializeOpExpireSession) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpExpireSession) 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.(*ExpireSessionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/portals/{portalId}/sessions/{sessionId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsExpireSessionInput(input, restEncoder); 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_serializeOpHttpBindingsExpireSessionInput(v *ExpireSessionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.PortalId == nil || len(*v.PortalId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member portalId must not be empty")} + } + if v.PortalId != nil { + if err := encoder.SetURI("portalId").String(*v.PortalId); err != nil { + return err + } + } + + if v.SessionId == nil || len(*v.SessionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member sessionId must not be empty")} + } + if v.SessionId != nil { + if err := encoder.SetURI("sessionId").String(*v.SessionId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetBrowserSettings struct { } @@ -2574,6 +2648,80 @@ func awsRestjson1_serializeOpHttpBindingsGetPortalServiceProviderMetadataInput(v return nil } +type awsRestjson1_serializeOpGetSession struct { +} + +func (*awsRestjson1_serializeOpGetSession) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetSession) 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.(*GetSessionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/portals/{portalId}/sessions/{sessionId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetSessionInput(input, restEncoder); 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_serializeOpHttpBindingsGetSessionInput(v *GetSessionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.PortalId == nil || len(*v.PortalId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member portalId must not be empty")} + } + if v.PortalId != nil { + if err := encoder.SetURI("portalId").String(*v.PortalId); err != nil { + return err + } + } + + if v.SessionId == nil || len(*v.SessionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member sessionId must not be empty")} + } + if v.SessionId != nil { + if err := encoder.SetURI("sessionId").String(*v.SessionId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetTrustStore struct { } @@ -3167,6 +3315,95 @@ func awsRestjson1_serializeOpHttpBindingsListPortalsInput(v *ListPortalsInput, e return nil } +type awsRestjson1_serializeOpListSessions struct { +} + +func (*awsRestjson1_serializeOpListSessions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListSessions) 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.(*ListSessionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/portals/{portalId}/sessions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsListSessionsInput(input, restEncoder); 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_serializeOpHttpBindingsListSessionsInput(v *ListSessionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.PortalId == nil || len(*v.PortalId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member portalId must not be empty")} + } + if v.PortalId != nil { + if err := encoder.SetURI("portalId").String(*v.PortalId); err != nil { + return err + } + } + + if v.SessionId != nil { + encoder.SetQuery("sessionId").String(*v.SessionId) + } + + if len(v.SortBy) > 0 { + encoder.SetQuery("sortBy").String(string(v.SortBy)) + } + + if len(v.Status) > 0 { + encoder.SetQuery("status").String(string(v.Status)) + } + + if v.Username != nil { + encoder.SetQuery("username").String(*v.Username) + } + + return nil +} + type awsRestjson1_serializeOpListTagsForResource struct { } diff --git a/service/workspacesweb/snapshot/api_op_ExpireSession.go.snap b/service/workspacesweb/snapshot/api_op_ExpireSession.go.snap new file mode 100644 index 00000000000..3d8a3be29e5 --- /dev/null +++ b/service/workspacesweb/snapshot/api_op_ExpireSession.go.snap @@ -0,0 +1,36 @@ +ExpireSession + 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/workspacesweb/snapshot/api_op_GetSession.go.snap b/service/workspacesweb/snapshot/api_op_GetSession.go.snap new file mode 100644 index 00000000000..165531b26c3 --- /dev/null +++ b/service/workspacesweb/snapshot/api_op_GetSession.go.snap @@ -0,0 +1,36 @@ +GetSession + 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/workspacesweb/snapshot/api_op_ListSessions.go.snap b/service/workspacesweb/snapshot/api_op_ListSessions.go.snap new file mode 100644 index 00000000000..5561b2d0cab --- /dev/null +++ b/service/workspacesweb/snapshot/api_op_ListSessions.go.snap @@ -0,0 +1,36 @@ +ListSessions + 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/workspacesweb/snapshot_test.go b/service/workspacesweb/snapshot_test.go index 6b04ab117f4..ff042657820 100644 --- a/service/workspacesweb/snapshot_test.go +++ b/service/workspacesweb/snapshot_test.go @@ -398,6 +398,18 @@ func TestCheckSnapshot_DisassociateUserSettings(t *testing.T) { } } +func TestCheckSnapshot_ExpireSession(t *testing.T) { + svc := New(Options{}) + _, err := svc.ExpireSession(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ExpireSession") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetBrowserSettings(t *testing.T) { svc := New(Options{}) _, err := svc.GetBrowserSettings(context.Background(), nil, func(o *Options) { @@ -470,6 +482,18 @@ func TestCheckSnapshot_GetPortalServiceProviderMetadata(t *testing.T) { } } +func TestCheckSnapshot_GetSession(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetSession(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetSession") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetTrustStore(t *testing.T) { svc := New(Options{}) _, err := svc.GetTrustStore(context.Background(), nil, func(o *Options) { @@ -578,6 +602,18 @@ func TestCheckSnapshot_ListPortals(t *testing.T) { } } +func TestCheckSnapshot_ListSessions(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListSessions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListSessions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListTagsForResource(t *testing.T) { svc := New(Options{}) _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { @@ -1093,6 +1129,18 @@ func TestUpdateSnapshot_DisassociateUserSettings(t *testing.T) { } } +func TestUpdateSnapshot_ExpireSession(t *testing.T) { + svc := New(Options{}) + _, err := svc.ExpireSession(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ExpireSession") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetBrowserSettings(t *testing.T) { svc := New(Options{}) _, err := svc.GetBrowserSettings(context.Background(), nil, func(o *Options) { @@ -1165,6 +1213,18 @@ func TestUpdateSnapshot_GetPortalServiceProviderMetadata(t *testing.T) { } } +func TestUpdateSnapshot_GetSession(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetSession(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetSession") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetTrustStore(t *testing.T) { svc := New(Options{}) _, err := svc.GetTrustStore(context.Background(), nil, func(o *Options) { @@ -1273,6 +1333,18 @@ func TestUpdateSnapshot_ListPortals(t *testing.T) { } } +func TestUpdateSnapshot_ListSessions(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListSessions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListSessions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { svc := New(Options{}) _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { diff --git a/service/workspacesweb/types/enums.go b/service/workspacesweb/types/enums.go index c8b6bf88c05..0948f5f9a56 100644 --- a/service/workspacesweb/types/enums.go +++ b/service/workspacesweb/types/enums.go @@ -143,6 +143,44 @@ func (RendererType) Values() []RendererType { } } +type SessionSortBy string + +// Enum values for SessionSortBy +const ( + SessionSortByStartTimeAscending SessionSortBy = "StartTimeAscending" + SessionSortByStartTimeDescending SessionSortBy = "StartTimeDescending" +) + +// Values returns all known values for SessionSortBy. 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 (SessionSortBy) Values() []SessionSortBy { + return []SessionSortBy{ + "StartTimeAscending", + "StartTimeDescending", + } +} + +type SessionStatus string + +// Enum values for SessionStatus +const ( + SessionStatusActive SessionStatus = "Active" + SessionStatusTerminated SessionStatus = "Terminated" +) + +// Values returns all known values for SessionStatus. 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 (SessionStatus) Values() []SessionStatus { + return []SessionStatus{ + "Active", + "Terminated", + } +} + type ValidationExceptionReason string // Enum values for ValidationExceptionReason diff --git a/service/workspacesweb/types/types.go b/service/workspacesweb/types/types.go index bc10a3f34e2..73000735c1b 100644 --- a/service/workspacesweb/types/types.go +++ b/service/workspacesweb/types/types.go @@ -355,10 +355,10 @@ type Portal struct { // with your web portal. User and group access to your web portal is controlled // through your identity provider. // - // IAM Identity Center web portals are authenticated through IAM Identity Center - // (successor to Single Sign-On). Identity sources (including external identity - // provider integration), plus user and group access to your web portal, can be - // configured in the IAM Identity Center. + // IAM Identity Center web portals are authenticated through IAM Identity Center. + // Identity sources (including external identity provider integration), plus user + // and group access to your web portal, can be configured in the IAM Identity + // Center. AuthenticationType AuthenticationType // The ARN of the browser settings that is associated with this web portal. @@ -430,10 +430,10 @@ type PortalSummary struct { // with your web portal. User and group access to your web portal is controlled // through your identity provider. // - // IAM Identity Center web portals are authenticated through IAM Identity Center - // (successor to Single Sign-On). Identity sources (including external identity - // provider integration), plus user and group access to your web portal, can be - // configured in the IAM Identity Center. + // IAM Identity Center web portals are authenticated through IAM Identity Center. + // Identity sources (including external identity provider integration), plus user + // and group access to your web portal, can be configured in the IAM Identity + // Center. AuthenticationType AuthenticationType // The ARN of the browser settings that is associated with the web portal. @@ -483,6 +483,57 @@ type PortalSummary struct { noSmithyDocumentSerde } +// Information about a secure browser session. +type Session struct { + + // The IP address of the client. + ClientIpAddresses []string + + // The end time of the session. + EndTime *time.Time + + // The ARN of the web portal. + PortalArn *string + + // The ID of the session. + SessionId *string + + // The start time of the session. + StartTime *time.Time + + // The status of the session. + Status SessionStatus + + // The username of the session. + Username *string + + noSmithyDocumentSerde +} + +// Summary information about a secure browser session. +type SessionSummary struct { + + // The end time of the session. + EndTime *time.Time + + // The ARN of the web portal. + PortalArn *string + + // The ID of the session. + SessionId *string + + // The start time of the session. + StartTime *time.Time + + // The status of the session. + Status SessionStatus + + // The username of the session. + Username *string + + noSmithyDocumentSerde +} + // The tag. type Tag struct { diff --git a/service/workspacesweb/validators.go b/service/workspacesweb/validators.go index 65816705479..cfa4719535d 100644 --- a/service/workspacesweb/validators.go +++ b/service/workspacesweb/validators.go @@ -570,6 +570,26 @@ func (m *validateOpDisassociateUserSettings) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpExpireSession struct { +} + +func (*validateOpExpireSession) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpExpireSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ExpireSessionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpExpireSessionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetBrowserSettings struct { } @@ -690,6 +710,26 @@ func (m *validateOpGetPortalServiceProviderMetadata) HandleInitialize(ctx contex return next.HandleInitialize(ctx, in) } +type validateOpGetSession struct { +} + +func (*validateOpGetSession) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSessionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSessionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetTrustStoreCertificate struct { } @@ -790,6 +830,26 @@ func (m *validateOpListIdentityProviders) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpListSessions struct { +} + +func (*validateOpListSessions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListSessions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListSessionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListSessionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTagsForResource struct { } @@ -1142,6 +1202,10 @@ func addOpDisassociateUserSettingsValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpDisassociateUserSettings{}, middleware.After) } +func addOpExpireSessionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpExpireSession{}, middleware.After) +} + func addOpGetBrowserSettingsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetBrowserSettings{}, middleware.After) } @@ -1166,6 +1230,10 @@ func addOpGetPortalServiceProviderMetadataValidationMiddleware(stack *middleware return stack.Initialize.Add(&validateOpGetPortalServiceProviderMetadata{}, middleware.After) } +func addOpGetSessionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSession{}, middleware.After) +} + func addOpGetTrustStoreCertificateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetTrustStoreCertificate{}, middleware.After) } @@ -1186,6 +1254,10 @@ func addOpListIdentityProvidersValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpListIdentityProviders{}, middleware.After) } +func addOpListSessionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListSessions{}, middleware.After) +} + func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } @@ -1868,6 +1940,24 @@ func validateOpDisassociateUserSettingsInput(v *DisassociateUserSettingsInput) e } } +func validateOpExpireSessionInput(v *ExpireSessionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExpireSessionInput"} + if v.PortalId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PortalId")) + } + if v.SessionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SessionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetBrowserSettingsInput(v *GetBrowserSettingsInput) error { if v == nil { return nil @@ -1958,6 +2048,24 @@ func validateOpGetPortalServiceProviderMetadataInput(v *GetPortalServiceProvider } } +func validateOpGetSessionInput(v *GetSessionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetSessionInput"} + if v.PortalId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PortalId")) + } + if v.SessionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SessionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetTrustStoreCertificateInput(v *GetTrustStoreCertificateInput) error { if v == nil { return nil @@ -2036,6 +2144,21 @@ func validateOpListIdentityProvidersInput(v *ListIdentityProvidersInput) error { } } +func validateOpListSessionsInput(v *ListSessionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListSessionsInput"} + if v.PortalId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PortalId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil