diff --git a/.changelog/0068fb4c720e47f491df160443c2136a.json b/.changelog/0068fb4c720e47f491df160443c2136a.json new file mode 100644 index 00000000000..a807b1b5a73 --- /dev/null +++ b/.changelog/0068fb4c720e47f491df160443c2136a.json @@ -0,0 +1,8 @@ +{ + "id": "0068fb4c-720e-47f4-91df-160443c2136a", + "type": "documentation", + "description": "This update provides example usage for TransitGatewayRouteTableArn.", + "modules": [ + "service/networkmanager" + ] +} \ No newline at end of file diff --git a/.changelog/1287fc48879b4331967ba0319ddc38ef.json b/.changelog/1287fc48879b4331967ba0319ddc38ef.json new file mode 100644 index 00000000000..1bec2b57b94 --- /dev/null +++ b/.changelog/1287fc48879b4331967ba0319ddc38ef.json @@ -0,0 +1,8 @@ +{ + "id": "1287fc48-879b-4331-967b-a0319ddc38ef", + "type": "feature", + "description": "Updated all AWS Cloud Map APIs to provide consistent throttling exception (RequestLimitExceeded)", + "modules": [ + "service/servicediscovery" + ] +} \ No newline at end of file diff --git a/.changelog/1775f4e28119472ca65a29c228f10d6d.json b/.changelog/1775f4e28119472ca65a29c228f10d6d.json new file mode 100644 index 00000000000..9cab1ca7de8 --- /dev/null +++ b/.changelog/1775f4e28119472ca65a29c228f10d6d.json @@ -0,0 +1,8 @@ +{ + "id": "1775f4e2-8119-472c-a65a-29c228f10d6d", + "type": "feature", + "description": "Added support for Redshift Serverless workgroup-arn wherever the WorkgroupName parameter is available.", + "modules": [ + "service/redshiftdata" + ] +} \ No newline at end of file diff --git a/.changelog/2a0d9c0214e54f83b07270c43278d3f1.json b/.changelog/2a0d9c0214e54f83b07270c43278d3f1.json new file mode 100644 index 00000000000..690a7f48a42 --- /dev/null +++ b/.changelog/2a0d9c0214e54f83b07270c43278d3f1.json @@ -0,0 +1,8 @@ +{ + "id": "2a0d9c02-14e5-4f83-b072-70c43278d3f1", + "type": "feature", + "description": "This release adds a new API, GetMetricDataV2, which returns metric data for Amazon Connect.", + "modules": [ + "service/connect" + ] +} \ No newline at end of file diff --git a/.changelog/5c7587573a5e4c098027028a6b6d3c1b.json b/.changelog/5c7587573a5e4c098027028a6b6d3c1b.json new file mode 100644 index 00000000000..439f6bc486c --- /dev/null +++ b/.changelog/5c7587573a5e4c098027028a6b6d3c1b.json @@ -0,0 +1,8 @@ +{ + "id": "5c758757-3a5e-4c09-8027-028a6b6d3c1b", + "type": "feature", + "description": "Updated entity override documentation", + "modules": [ + "service/evidently" + ] +} \ No newline at end of file diff --git a/.changelog/65dabe15f9a4489fa24d384c40128dd0.json b/.changelog/65dabe15f9a4489fa24d384c40128dd0.json new file mode 100644 index 00000000000..f10d86be34f --- /dev/null +++ b/.changelog/65dabe15f9a4489fa24d384c40128dd0.json @@ -0,0 +1,8 @@ +{ + "id": "65dabe15-f9a4-489f-a24d-384c40128dd0", + "type": "feature", + "description": "This release has two changes: add state persistence feature for embedded dashboard and console in GenerateEmbedUrlForRegisteredUser API; add properties for hidden collapsed row dimensions in PivotTableOptions.", + "modules": [ + "service/quicksight" + ] +} \ No newline at end of file diff --git a/.changelog/8e223978801f4116be5652a33e489c21.json b/.changelog/8e223978801f4116be5652a33e489c21.json new file mode 100644 index 00000000000..52e4f14abb7 --- /dev/null +++ b/.changelog/8e223978801f4116be5652a33e489c21.json @@ -0,0 +1,8 @@ +{ + "id": "8e223978-801f-4116-be56-52a33e489c21", + "type": "feature", + "description": "This release introduces a new recommendation in Virtual Deliverability Manager Advisor, which detects missing or misconfigured Brand Indicator for Message Identification (BIMI) DNS records for customer sending identities.", + "modules": [ + "service/sesv2" + ] +} \ No newline at end of file diff --git a/.changelog/aaa3ca211cd24cd1a0af6971763dda7a.json b/.changelog/aaa3ca211cd24cd1a0af6971763dda7a.json new file mode 100644 index 00000000000..5a8f8523541 --- /dev/null +++ b/.changelog/aaa3ca211cd24cd1a0af6971763dda7a.json @@ -0,0 +1,8 @@ +{ + "id": "aaa3ca21-1cd2-4cd1-a0af-6971763dda7a", + "type": "feature", + "description": "This release introduces the generic package format, a mechanism for storing arbitrary binary assets. It also adds a new API, PublishPackageVersion, to allow for publishing generic packages.", + "modules": [ + "service/codeartifact" + ] +} \ No newline at end of file diff --git a/.changelog/e0146ba858c346f39d5b0a38f9a21304.json b/.changelog/e0146ba858c346f39d5b0a38f9a21304.json new file mode 100644 index 00000000000..79259da5a7b --- /dev/null +++ b/.changelog/e0146ba858c346f39d5b0a38f9a21304.json @@ -0,0 +1,8 @@ +{ + "id": "e0146ba8-58c3-46f3-9d5b-0a38f9a21304", + "type": "feature", + "description": "Amazon SageMaker Inference now allows SSM access to customer's model container by setting the \"EnableSSMAccess\" parameter for a ProductionVariant in CreateEndpointConfig API.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/service/codeartifact/api_op_CopyPackageVersions.go b/service/codeartifact/api_op_CopyPackageVersions.go index dd91e690aaa..da48d375068 100644 --- a/service/codeartifact/api_op_CopyPackageVersions.go +++ b/service/codeartifact/api_op_CopyPackageVersions.go @@ -84,6 +84,8 @@ type CopyPackageVersionsInput struct { // * Python and NuGet package versions do not contain a // corresponding component, package versions of those formats do not have a // namespace. + // + // * The namespace of a generic package is it’s namespace. Namespace *string // A list of key-value pairs. The keys are package versions and the values are diff --git a/service/codeartifact/api_op_DeletePackageVersions.go b/service/codeartifact/api_op_DeletePackageVersions.go index 6945fd359b4..2d7cc8d923e 100644 --- a/service/codeartifact/api_op_DeletePackageVersions.go +++ b/service/codeartifact/api_op_DeletePackageVersions.go @@ -15,7 +15,7 @@ import ( // restored in your repository. If you want to remove a package version from your // repository and be able to restore it later, set its status to Archived. Archived // packages cannot be downloaded from a repository and don't show up with list -// package APIs (for example, ListackageVersions +// package APIs (for example, ListPackageVersions // (https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_ListPackageVersions.html)), // but you can restore them using UpdatePackageVersionsStatus // (https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_UpdatePackageVersionsStatus.html). @@ -81,6 +81,8 @@ type DeletePackageVersionsInput struct { // * Python and NuGet package versions do not contain a // corresponding component, package versions of those formats do not have a // namespace. + // + // * The namespace of a generic package is it’s namespace. Namespace *string noSmithyDocumentSerde diff --git a/service/codeartifact/api_op_DescribePackage.go b/service/codeartifact/api_op_DescribePackage.go index b68f3b9007c..fe985dcec85 100644 --- a/service/codeartifact/api_op_DescribePackage.go +++ b/service/codeartifact/api_op_DescribePackage.go @@ -67,6 +67,8 @@ type DescribePackageInput struct { // * Python and NuGet packages do not // contain a corresponding component, packages of those formats do not have a // namespace. + // + // * The namespace of a generic package is it’s namespace. Namespace *string noSmithyDocumentSerde diff --git a/service/codeartifact/api_op_DescribePackageVersion.go b/service/codeartifact/api_op_DescribePackageVersion.go index 74fbb767450..917edde339f 100644 --- a/service/codeartifact/api_op_DescribePackageVersion.go +++ b/service/codeartifact/api_op_DescribePackageVersion.go @@ -73,6 +73,8 @@ type DescribePackageVersionInput struct { // * Python and NuGet package versions do not contain a // corresponding component, package versions of those formats do not have a // namespace. + // + // * The namespace of a generic package is it’s namespace. Namespace *string noSmithyDocumentSerde diff --git a/service/codeartifact/api_op_DisposePackageVersions.go b/service/codeartifact/api_op_DisposePackageVersions.go index b6ca42e9d83..bcfa6f41d2a 100644 --- a/service/codeartifact/api_op_DisposePackageVersions.go +++ b/service/codeartifact/api_op_DisposePackageVersions.go @@ -83,6 +83,8 @@ type DisposePackageVersionsInput struct { // * Python and NuGet package versions do not // contain a corresponding component, package versions of those formats do not have // a namespace. + // + // * The namespace of a generic package is it’s namespace. Namespace *string // The revisions of the package versions you want to dispose. diff --git a/service/codeartifact/api_op_GetPackageVersionAsset.go b/service/codeartifact/api_op_GetPackageVersionAsset.go index f4d1bfbd258..f9787b1be5e 100644 --- a/service/codeartifact/api_op_GetPackageVersionAsset.go +++ b/service/codeartifact/api_op_GetPackageVersionAsset.go @@ -80,6 +80,9 @@ type GetPackageVersionAssetInput struct { // * Python and NuGet package // versions do not contain a corresponding component, package versions of those // formats do not have a namespace. + // + // * The namespace of a generic package is it’s + // namespace. Namespace *string // The name of the package version revision that contains the requested asset. diff --git a/service/codeartifact/api_op_GetPackageVersionReadme.go b/service/codeartifact/api_op_GetPackageVersionReadme.go index f1155eb21a3..8c87e28f0ca 100644 --- a/service/codeartifact/api_op_GetPackageVersionReadme.go +++ b/service/codeartifact/api_op_GetPackageVersionReadme.go @@ -38,8 +38,7 @@ type GetPackageVersionReadmeInput struct { Domain *string // A format that specifies the type of the package version with the requested - // readme file. Although maven is listed as a valid value, CodeArtifact does not - // support displaying readme files for Maven packages. + // readme file. // // This member is required. Format types.PackageFormat diff --git a/service/codeartifact/api_op_ListPackageVersionAssets.go b/service/codeartifact/api_op_ListPackageVersionAssets.go index 42f71d87b3f..2fef788d22f 100644 --- a/service/codeartifact/api_op_ListPackageVersionAssets.go +++ b/service/codeartifact/api_op_ListPackageVersionAssets.go @@ -78,6 +78,9 @@ type ListPackageVersionAssetsInput struct { // * Python and // NuGet package versions do not contain a corresponding component, package // versions of those formats do not have a namespace. + // + // * The namespace of a generic + // package is it’s namespace. Namespace *string // The token for the next set of results. Use the value returned in the previous diff --git a/service/codeartifact/api_op_ListPackageVersionDependencies.go b/service/codeartifact/api_op_ListPackageVersionDependencies.go index bbff2ba96d3..cfa3054c590 100644 --- a/service/codeartifact/api_op_ListPackageVersionDependencies.go +++ b/service/codeartifact/api_op_ListPackageVersionDependencies.go @@ -77,6 +77,9 @@ type ListPackageVersionDependenciesInput struct { // * Python and NuGet package // versions do not contain a corresponding component, package versions of those // formats do not have a namespace. + // + // * The namespace of a generic package is it’s + // namespace. Namespace *string // The token for the next set of results. Use the value returned in the previous diff --git a/service/codeartifact/api_op_ListPackageVersions.go b/service/codeartifact/api_op_ListPackageVersions.go index afa7a507f15..eab02ede142 100644 --- a/service/codeartifact/api_op_ListPackageVersions.go +++ b/service/codeartifact/api_op_ListPackageVersions.go @@ -40,7 +40,7 @@ type ListPackageVersionsInput struct { // This member is required. Domain *string - // The format of the returned package versions. + // The format of the package versions you want to list. // // This member is required. Format types.PackageFormat @@ -73,6 +73,9 @@ type ListPackageVersionsInput struct { // // * Python and NuGet packages do not contain a // corresponding component, packages of those formats do not have a namespace. + // + // * + // The namespace of a generic package is it’s namespace. Namespace *string // The token for the next set of results. Use the value returned in the previous diff --git a/service/codeartifact/api_op_ListPackages.go b/service/codeartifact/api_op_ListPackages.go index 6126689726f..e855154d113 100644 --- a/service/codeartifact/api_op_ListPackages.go +++ b/service/codeartifact/api_op_ListPackages.go @@ -54,18 +54,22 @@ type ListPackagesInput struct { // The maximum number of results to return per page. MaxResults *int32 - // The namespace used to filter requested packages. Only packages with the provided - // namespace will be returned. The package component that specifies its namespace - // depends on its type. For example: + // The namespace prefix used to filter requested packages. Only packages with a + // namespace that starts with the provided string value are returned. Note that + // although this option is called --namespace and not --namespace-prefix, it has + // prefix-matching behavior. Each package format uses namespace as follows: // - // * The namespace of a Maven package is its - // groupId. + // * The + // namespace of a Maven package is its groupId. // - // * The namespace of an npm package is its scope. + // * The namespace of an npm package + // is its scope. // - // * Python and NuGet - // packages do not contain a corresponding component, packages of those formats do - // not have a namespace. + // * Python and NuGet packages do not contain a corresponding + // component, packages of those formats do not have a namespace. + // + // * The namespace + // of a generic package is it’s namespace. Namespace *string // The token for the next set of results. Use the value returned in the previous diff --git a/service/codeartifact/api_op_PublishPackageVersion.go b/service/codeartifact/api_op_PublishPackageVersion.go new file mode 100644 index 00000000000..eac3c4966bd --- /dev/null +++ b/service/codeartifact/api_op_PublishPackageVersion.go @@ -0,0 +1,210 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codeartifact + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/codeartifact/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" +) + +// Creates a new package version containing one or more assets (or files). The +// unfinished flag can be used to keep the package version in the Unfinished state +// until all of it’s assets have been uploaded (see Package version status +// (https://docs.aws.amazon.com/codeartifact/latest/ug/packages-overview.html#package-version-status.html#package-version-status) +// in the CodeArtifact user guide). To set the package version’s status to +// Published, omit the unfinished flag when uploading the final asset, or set the +// status using UpdatePackageVersionStatus +// (https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_UpdatePackageVersionsStatus.html). +// Once a package version’s status is set to Published, it cannot change back to +// Unfinished. Only generic packages can be published using this API. +func (c *Client) PublishPackageVersion(ctx context.Context, params *PublishPackageVersionInput, optFns ...func(*Options)) (*PublishPackageVersionOutput, error) { + if params == nil { + params = &PublishPackageVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PublishPackageVersion", params, optFns, c.addOperationPublishPackageVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PublishPackageVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PublishPackageVersionInput struct { + + // The content of the asset to publish. + // + // This member is required. + AssetContent io.Reader + + // The name of the asset to publish. Asset names can include Unicode letters and + // numbers, and the following special characters: ~ ! @ ^ & ( ) - ` _ + [ ] { } ; , + // . ` + // + // This member is required. + AssetName *string + + // The SHA256 hash of the assetContent to publish. This value must be calculated by + // the caller and provided with the request. This value is used as an integrity + // check to verify that the assetContent has not changed after it was originally + // sent. + // + // This member is required. + AssetSHA256 *string + + // The name of the domain that contains the repository that contains the package + // version to publish. + // + // This member is required. + Domain *string + + // A format that specifies the type of the package version with the requested asset + // file. + // + // This member is required. + Format types.PackageFormat + + // The name of the package version to publish. + // + // This member is required. + Package *string + + // The package version to publish (for example, 3.5.2). + // + // This member is required. + PackageVersion *string + + // The name of the repository that the package version will be published to. + // + // This member is required. + Repository *string + + // The 12-digit account number of the AWS account that owns the domain. It does not + // include dashes or spaces. + DomainOwner *string + + // The namespace of the package version to publish. + Namespace *string + + // Specifies whether the package version should remain in the unfinished state. If + // omitted, the package version status will be set to Published (see Package + // version status + // (https://docs.aws.amazon.com/codeartifact/latest/ug/packages-overview.html#package-version-status.html#package-version-status) + // in the CodeArtifact User Guide). Valid values: unfinished + Unfinished *bool + + noSmithyDocumentSerde +} + +type PublishPackageVersionOutput struct { + + // An AssetSummary + // (https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_AssetSummary.html) + // for the published asset. + Asset *types.AssetSummary + + // The format of the package version. + Format types.PackageFormat + + // The namespace of the package version. + Namespace *string + + // The name of the package. + Package *string + + // A string that contains the status of the package version. For more information, + // see Package version status + // (https://docs.aws.amazon.com/codeartifact/latest/ug/packages-overview.html#package-version-status.html#package-version-status) + // in the CodeArtifact User Guide. + Status types.PackageVersionStatus + + // The version of the package. + Version *string + + // The revision of the package version. + VersionRevision *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPublishPackageVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPublishPackageVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPublishPackageVersion{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpPublishPackageVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPublishPackageVersion(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opPublishPackageVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "codeartifact", + OperationName: "PublishPackageVersion", + } +} diff --git a/service/codeartifact/api_op_PutPackageOriginConfiguration.go b/service/codeartifact/api_op_PutPackageOriginConfiguration.go index 79d54608be5..82f43cbf1e1 100644 --- a/service/codeartifact/api_op_PutPackageOriginConfiguration.go +++ b/service/codeartifact/api_op_PutPackageOriginConfiguration.go @@ -90,6 +90,9 @@ type PutPackageOriginConfigurationInput struct { // * // Python and NuGet packages do not contain a corresponding component, packages of // those formats do not have a namespace. + // + // * The namespace of a generic package is + // it’s namespace. Namespace *string noSmithyDocumentSerde diff --git a/service/codeartifact/api_op_UpdatePackageVersionsStatus.go b/service/codeartifact/api_op_UpdatePackageVersionsStatus.go index b3fa992d949..ae27bbca9ca 100644 --- a/service/codeartifact/api_op_UpdatePackageVersionsStatus.go +++ b/service/codeartifact/api_op_UpdatePackageVersionsStatus.go @@ -87,6 +87,8 @@ type UpdatePackageVersionsStatusInput struct { // * Python and NuGet package versions do not // contain a corresponding component, package versions of those formats do not have // a namespace. + // + // * The namespace of a generic package is it’s namespace. Namespace *string // A map of package versions and package version revisions. The map key is the diff --git a/service/codeartifact/deserializers.go b/service/codeartifact/deserializers.go index 328f0b49a7d..5e9a2de5218 100644 --- a/service/codeartifact/deserializers.go +++ b/service/codeartifact/deserializers.go @@ -5089,6 +5089,225 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } +type awsRestjson1_deserializeOpPublishPackageVersion struct { +} + +func (*awsRestjson1_deserializeOpPublishPackageVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPublishPackageVersion) 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_deserializeOpErrorPublishPackageVersion(response, &metadata) + } + output := &PublishPackageVersionOutput{} + 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_deserializeOpDocumentPublishPackageVersionOutput(&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_deserializeOpErrorPublishPackageVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("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_deserializeOpDocumentPublishPackageVersionOutput(v **PublishPackageVersionOutput, 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 *PublishPackageVersionOutput + if *v == nil { + sv = &PublishPackageVersionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "asset": + if err := awsRestjson1_deserializeDocumentAssetSummary(&sv.Asset, value); err != nil { + return err + } + + case "format": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageFormat to be of type string, got %T instead", value) + } + sv.Format = types.PackageFormat(jtv) + } + + case "namespace": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageNamespace to be of type string, got %T instead", value) + } + sv.Namespace = ptr.String(jtv) + } + + case "package": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageName to be of type string, got %T instead", value) + } + sv.Package = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageVersionStatus to be of type string, got %T instead", value) + } + sv.Status = types.PackageVersionStatus(jtv) + } + + case "version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageVersion to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + case "versionRevision": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageVersionRevision to be of type string, got %T instead", value) + } + sv.VersionRevision = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpPutDomainPermissionsPolicy struct { } diff --git a/service/codeartifact/doc.go b/service/codeartifact/doc.go index 0cadbc26489..c8d8a7df619 100644 --- a/service/codeartifact/doc.go +++ b/service/codeartifact/doc.go @@ -95,9 +95,12 @@ // DeleteDomainPermissionsPolicy: Deletes the resource policy that is set on a // domain. // -// * DeletePackageVersions: Deletes versions of a package. After a package -// has been deleted, it can be republished, but its assets and metadata cannot be -// restored because they have been permanently removed from storage. +// * DeletePackage: Deletes a package and all associated package +// versions. +// +// * DeletePackageVersions: Deletes versions of a package. After a +// package has been deleted, it can be republished, but its assets and metadata +// cannot be restored because they have been permanently removed from storage. // // * // DeleteRepository: Deletes a repository. @@ -184,11 +187,14 @@ // ListRepositoriesInDomain: Returns a list of the repositories in a domain. // // * -// PutDomainPermissionsPolicy: Attaches a resource policy to a domain. +// PublishPackageVersion: Creates a new package version containing one or more +// assets. // -// * -// PutPackageOriginConfiguration: Sets the package origin configuration for a -// package, which determine how new versions of the package can be added to a +// * PutDomainPermissionsPolicy: Attaches a resource policy to a +// domain. +// +// * PutPackageOriginConfiguration: Sets the package origin configuration +// for a package, which determine how new versions of the package can be added to a // specific repository. // // * PutRepositoryPermissionsPolicy: Sets the resource policy diff --git a/service/codeartifact/generated.json b/service/codeartifact/generated.json index 796973abc08..e7d40ba7211 100644 --- a/service/codeartifact/generated.json +++ b/service/codeartifact/generated.json @@ -38,6 +38,7 @@ "api_op_ListRepositories.go", "api_op_ListRepositoriesInDomain.go", "api_op_ListTagsForResource.go", + "api_op_PublishPackageVersion.go", "api_op_PutDomainPermissionsPolicy.go", "api_op_PutPackageOriginConfiguration.go", "api_op_PutRepositoryPermissionsPolicy.go", diff --git a/service/codeartifact/serializers.go b/service/codeartifact/serializers.go index 87241adb7fd..2a3094e068c 100644 --- a/service/codeartifact/serializers.go +++ b/service/codeartifact/serializers.go @@ -2256,6 +2256,108 @@ func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsFor return nil } +type awsRestjson1_serializeOpPublishPackageVersion struct { +} + +func (*awsRestjson1_serializeOpPublishPackageVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPublishPackageVersion) 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.(*PublishPackageVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/package/version/publish") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPublishPackageVersionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + + if input.AssetContent != nil { + payload := input.AssetContent + if request, err = request.SetStream(payload); 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_serializeOpHttpBindingsPublishPackageVersionInput(v *PublishPackageVersionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AssetName != nil { + encoder.SetQuery("asset").String(*v.AssetName) + } + + if v.AssetSHA256 != nil && len(*v.AssetSHA256) > 0 { + locationName := "X-Amz-Content-Sha256" + encoder.SetHeader(locationName).String(*v.AssetSHA256) + } + + if v.Domain != nil { + encoder.SetQuery("domain").String(*v.Domain) + } + + if v.DomainOwner != nil { + encoder.SetQuery("domain-owner").String(*v.DomainOwner) + } + + if len(v.Format) > 0 { + encoder.SetQuery("format").String(string(v.Format)) + } + + if v.Namespace != nil { + encoder.SetQuery("namespace").String(*v.Namespace) + } + + if v.Package != nil { + encoder.SetQuery("package").String(*v.Package) + } + + if v.PackageVersion != nil { + encoder.SetQuery("version").String(*v.PackageVersion) + } + + if v.Repository != nil { + encoder.SetQuery("repository").String(*v.Repository) + } + + if v.Unfinished != nil { + encoder.SetQuery("unfinished").Boolean(*v.Unfinished) + } + + return nil +} + type awsRestjson1_serializeOpPutDomainPermissionsPolicy struct { } diff --git a/service/codeartifact/types/enums.go b/service/codeartifact/types/enums.go index 477cd25da47..7d7e6b54060 100644 --- a/service/codeartifact/types/enums.go +++ b/service/codeartifact/types/enums.go @@ -98,10 +98,11 @@ type PackageFormat string // Enum values for PackageFormat const ( - PackageFormatNpm PackageFormat = "npm" - PackageFormatPypi PackageFormat = "pypi" - PackageFormatMaven PackageFormat = "maven" - PackageFormatNuget PackageFormat = "nuget" + PackageFormatNpm PackageFormat = "npm" + PackageFormatPypi PackageFormat = "pypi" + PackageFormatMaven PackageFormat = "maven" + PackageFormatNuget PackageFormat = "nuget" + PackageFormatGeneric PackageFormat = "generic" ) // Values returns all known values for PackageFormat. Note that this can be @@ -113,6 +114,7 @@ func (PackageFormat) Values() []PackageFormat { "pypi", "maven", "nuget", + "generic", } } diff --git a/service/codeartifact/types/types.go b/service/codeartifact/types/types.go index 352073ce03e..1c414e1594e 100644 --- a/service/codeartifact/types/types.go +++ b/service/codeartifact/types/types.go @@ -120,8 +120,19 @@ type LicenseInfo struct { type PackageDependency struct { // The type of a package dependency. The possible values depend on the package - // type. Example types are compile, runtime, and test for Maven packages, and dev, - // prod, and optional for npm packages. + // type. + // + // * npm: regular, dev, peer, optional + // + // * maven: optional, parent, compile, + // runtime, test, system, provided. Note that parent is not a regular Maven + // dependency type; instead this is extracted from the element if one is defined + // in the package version's POM file. + // + // * nuget: The dependencyType field is never + // set for NuGet packages. + // + // * pypi: Requires-Dist DependencyType *string // The namespace of the package that this package depends on. The package component @@ -168,6 +179,8 @@ type PackageDescription struct { // * Python and NuGet // packages do not contain a corresponding component, packages of those formats do // not have a namespace. + // + // * The namespace of a generic package is it’s namespace. Namespace *string // The package origin configuration for the package. @@ -223,6 +236,8 @@ type PackageSummary struct { // * Python and NuGet // packages do not contain a corresponding component, packages of those formats do // not have a namespace. + // + // * The namespace of a generic package is it’s namespace. Namespace *string // A PackageOriginConfiguration @@ -268,6 +283,8 @@ type PackageVersionDescription struct { // * Python and NuGet package versions do not contain a // corresponding component, package versions of those formats do not have a // namespace. + // + // * The namespace of a generic package is it’s namespace. Namespace *string // A PackageVersionOrigin diff --git a/service/codeartifact/validators.go b/service/codeartifact/validators.go index 7d570183ad1..c2dc17c055d 100644 --- a/service/codeartifact/validators.go +++ b/service/codeartifact/validators.go @@ -570,6 +570,26 @@ func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpPublishPackageVersion struct { +} + +func (*validateOpPublishPackageVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPublishPackageVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PublishPackageVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPublishPackageVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpPutDomainPermissionsPolicy struct { } @@ -822,6 +842,10 @@ func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } +func addOpPublishPackageVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPublishPackageVersion{}, middleware.After) +} + func addOpPutDomainPermissionsPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutDomainPermissionsPolicy{}, middleware.After) } @@ -1532,6 +1556,42 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpPublishPackageVersionInput(v *PublishPackageVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PublishPackageVersionInput"} + if v.Domain == nil { + invalidParams.Add(smithy.NewErrParamRequired("Domain")) + } + if v.Repository == nil { + invalidParams.Add(smithy.NewErrParamRequired("Repository")) + } + if len(v.Format) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Format")) + } + if v.Package == nil { + invalidParams.Add(smithy.NewErrParamRequired("Package")) + } + if v.PackageVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("PackageVersion")) + } + if v.AssetContent == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssetContent")) + } + if v.AssetName == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssetName")) + } + if v.AssetSHA256 == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssetSHA256")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpPutDomainPermissionsPolicyInput(v *PutDomainPermissionsPolicyInput) error { if v == nil { return nil diff --git a/service/connect/api_op_GetMetricDataV2.go b/service/connect/api_op_GetMetricDataV2.go new file mode 100644 index 00000000000..b136128ebdf --- /dev/null +++ b/service/connect/api_op_GetMetricDataV2.go @@ -0,0 +1,363 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Gets metric data from the specified Amazon Connect instance. GetMetricDataV2 +// offers more features than GetMetricData +// (https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html), +// the previous version of this API. It has new metrics, offers filtering at a +// metric level, and offers the ability to filter and group data by channels, +// queues, routing profiles, agents, and agent hierarchy levels. It can retrieve +// historical data for last the 14 days, in 24-hour intervals. For a description of +// the historical metrics that are supported by GetMetricDataV2 and GetMetricData, +// see Historical metrics definitions +// (https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html) +// in the Amazon Connect Administrator's Guide. This API is not available in the +// Amazon Web Services GovCloud (US) Regions. +func (c *Client) GetMetricDataV2(ctx context.Context, params *GetMetricDataV2Input, optFns ...func(*Options)) (*GetMetricDataV2Output, error) { + if params == nil { + params = &GetMetricDataV2Input{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMetricDataV2", params, optFns, c.addOperationGetMetricDataV2Middlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMetricDataV2Output) + out.ResultMetadata = metadata + return out, nil +} + +type GetMetricDataV2Input struct { + + // The timestamp, in UNIX Epoch time format, at which to end the reporting interval + // for the retrieval of historical metrics data. The time must be later than the + // start time timestamp. The time range between the start and end time must be less + // than 24 hours. + // + // This member is required. + EndTime *time.Time + + // The filters to apply to returned metrics. You can filter on the following + // resources: + // + // * Queues + // + // * Routing profiles + // + // * Agents + // + // * Channels + // + // * User hierarchy + // groups + // + // At least one filter must be passed from queues, routing profiles, + // agents, or user hierarchy groups. To filter by phone number, see Create a + // historical metrics report + // (https://docs.aws.amazon.com/connect/latest/adminguide/create-historical-metrics-report.html) + // in the Amazon Connect Administrator's Guide. Note the following limits: + // + // * + // Filter keys: A maximum of 5 filter keys are supported in a single request. Valid + // filter keys: QUEUE | ROUTING_PROFILE | AGENT | CHANNEL | + // AGENT_HIERARCHY_LEVEL_ONE | AGENT_HIERARCHY_LEVEL_TWO | + // AGENT_HIERARCHY_LEVEL_THREE | AGENT_HIERARCHY_LEVEL_FOUR | + // AGENT_HIERARCHY_LEVEL_FIVE + // + // * Filter values: A maximum of 100 filter values are + // supported in a single request. For example, a GetMetricDataV2 request can filter + // by 50 queues, 35 agents, and 15 routing profiles for a total of 100 filter + // values. VOICE, CHAT, and TASK are valid filterValue for the CHANNEL filter key. + // + // This member is required. + Filters []types.FilterV2 + + // The metrics to retrieve. Specify the name, groupings, and filters for each + // metric. The following historical metrics are available. For a description of + // each metric, see Historical metrics definitions + // (https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html) + // in the Amazon Connect Administrator's Guide. AGENT_ADHERENT_TIME This metric is + // available only in Amazon Web Services Regions where Forecasting, capacity + // planning, and scheduling + // (https://docs.aws.amazon.com/connect/latest/adminguide/regions.html#optimization_region) + // is available. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing + // Profile, Agent, Agent Hierarchy AGENT_NON_RESPONSE Unit: Count Valid groupings + // and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy + // AGENT_OCCUPANCY Unit: Percentage Valid groupings and filters: Routing Profile, + // Agent, Agent Hierarchy AGENT_SCHEDULE_ADHERENCE This metric is available only in + // Amazon Web Services Regions where Forecasting, capacity planning, and scheduling + // (https://docs.aws.amazon.com/connect/latest/adminguide/regions.html#optimization_region) + // is available. Unit: Percent Valid groupings and filters: Queue, Channel, Routing + // Profile, Agent, Agent Hierarchy AGENT_SCHEDULED_TIME This metric is available + // only in Amazon Web Services Regions where Forecasting, capacity planning, and + // scheduling + // (https://docs.aws.amazon.com/connect/latest/adminguide/regions.html#optimization_region) + // is available. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing + // Profile, Agent, Agent Hierarchy AVG_ABANDON_TIME Unit: Seconds Valid groupings + // and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy + // AVG_AFTER_CONTACT_WORK_TIME Unit: Seconds Valid groupings and filters: Queue, + // Channel, Routing Profile, Agent, Agent Hierarchy AVG_AGENT_CONNECTING_TIME Unit: + // Seconds Valid metric filter key: INITIATION_METHOD. For now, this metric only + // supports the following as INITIATION_METHOD: INBOUND | OUTBOUND | CALLBACK | API + // Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent + // Hierarchy AVG_HANDLE_TIME Unit: Seconds Valid groupings and filters: Queue, + // Channel, Routing Profile, Agent, Agent Hierarchy AVG_HOLD_TIME Unit: Seconds + // Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent + // Hierarchy AVG_INTERACTION_AND_HOLD_TIME Unit: Seconds Valid groupings and + // filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy + // AVG_INTERACTION_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, + // Routing Profile AVG_QUEUE_ANSWER_TIME Unit: Seconds Valid groupings and filters: + // Queue, Channel, Routing Profile CONTACTS_ABANDONED Unit: Count Valid groupings + // and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy + // CONTACTS_CREATED Unit: Count Valid metric filter key: INITIATION_METHOD Valid + // groupings and filters: Queue, Channel, Routing Profile CONTACTS_HANDLED Unit: + // Count Valid metric filter key: INITIATION_METHOD, DISCONNECT_REASON Valid + // groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy + // CONTACTS_HOLD_ABANDONS Unit: Count Valid groupings and filters: Queue, Channel, + // Routing Profile, Agent, Agent Hierarchy CONTACTS_QUEUED Unit: Count Valid + // groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy + // CONTACTS_TRANSFERRED_OUT Unit: Count Valid groupings and filters: Queue, + // Channel, Routing Profile, Agent, Agent Hierarchy + // CONTACTS_TRANSFERRED_OUT_BY_AGENT Unit: Count Valid groupings and filters: + // Queue, Channel, Routing Profile, Agent, Agent Hierarchy + // CONTACTS_TRANSFERRED_OUT_FROM_QUEUE Unit: Count Valid groupings and filters: + // Queue, Channel, Routing Profile, Agent, Agent Hierarchy MAX_QUEUED_TIME Unit: + // Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, + // Agent Hierarchy SERVICE_LEVEL You can include up to 20 SERVICE_LEVEL metrics in + // a request. Unit: Percent Valid groupings and filters: Queue, Channel, Routing + // Profile Threshold: For ThresholdValue, enter any whole number from 1 to 604800 + // (inclusive), in seconds. For Comparison, you must enter LT (for "Less than"). + // SUM_CONTACTS_ANSWERED_IN_X Unit: Count Valid groupings and filters: Queue, + // Channel, Routing Profile SUM_CONTACTS_ABANDONED_IN_X Unit: Count Valid groupings + // and filters: Queue, Channel, Routing Profile SUM_CONTACTS_DISCONNECTED Valid + // metric filter key: DISCONNECT_REASON Unit: Count Valid groupings and filters: + // Queue, Channel, Routing Profile SUM_RETRY_CALLBACK_ATTEMPTS Unit: Count Valid + // groupings and filters: Queue, Channel, Routing Profile + // + // This member is required. + Metrics []types.MetricV2 + + // The Amazon Resource Name (ARN) of the resource. This includes the instanceId an + // Amazon Connect instance. + // + // This member is required. + ResourceArn *string + + // The timestamp, in UNIX Epoch time format, at which to start the reporting + // interval for the retrieval of historical metrics data. The time must be before + // the end time timestamp. The time range between the start and end time must be + // less than 24 hours. The start time cannot be earlier than 14 days before the + // time of the request. Historical metrics are available for 14 days. + // + // This member is required. + StartTime *time.Time + + // The grouping applied to the metrics that are returned. For example, when results + // are grouped by queue, the metrics returned are grouped by queue. The values that + // are returned apply to the metrics for each queue. They are not aggregated for + // all queues. If no grouping is specified, a summary of all metrics is returned. + // Valid grouping keys: QUEUE | ROUTING_PROFILE | AGENT | CHANNEL | + // AGENT_HIERARCHY_LEVEL_ONE | AGENT_HIERARCHY_LEVEL_TWO | + // AGENT_HIERARCHY_LEVEL_THREE | AGENT_HIERARCHY_LEVEL_FOUR | + // AGENT_HIERARCHY_LEVEL_FIVE + Groupings []string + + // The maximum number of results to return per page. + MaxResults *int32 + + // The token for the next set of results. Use the value returned in the previous + // response in the next request to retrieve the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type GetMetricDataV2Output struct { + + // Information about the metrics requested in the API request If no grouping is + // specified, a summary of metric data is returned. + MetricResults []types.MetricResultV2 + + // If there are additional results, this is the token for the next set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMetricDataV2Middlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetMetricDataV2{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetMetricDataV2{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetMetricDataV2ValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMetricDataV2(options.Region), middleware.Before); 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 + } + return nil +} + +// GetMetricDataV2APIClient is a client that implements the GetMetricDataV2 +// operation. +type GetMetricDataV2APIClient interface { + GetMetricDataV2(context.Context, *GetMetricDataV2Input, ...func(*Options)) (*GetMetricDataV2Output, error) +} + +var _ GetMetricDataV2APIClient = (*Client)(nil) + +// GetMetricDataV2PaginatorOptions is the paginator options for GetMetricDataV2 +type GetMetricDataV2PaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetMetricDataV2Paginator is a paginator for GetMetricDataV2 +type GetMetricDataV2Paginator struct { + options GetMetricDataV2PaginatorOptions + client GetMetricDataV2APIClient + params *GetMetricDataV2Input + nextToken *string + firstPage bool +} + +// NewGetMetricDataV2Paginator returns a new GetMetricDataV2Paginator +func NewGetMetricDataV2Paginator(client GetMetricDataV2APIClient, params *GetMetricDataV2Input, optFns ...func(*GetMetricDataV2PaginatorOptions)) *GetMetricDataV2Paginator { + if params == nil { + params = &GetMetricDataV2Input{} + } + + options := GetMetricDataV2PaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetMetricDataV2Paginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetMetricDataV2Paginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetMetricDataV2 page. +func (p *GetMetricDataV2Paginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetMetricDataV2Output, 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 + + result, err := p.client.GetMetricDataV2(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 +} + +func newServiceMetadataMiddleware_opGetMetricDataV2(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "GetMetricDataV2", + } +} diff --git a/service/connect/deserializers.go b/service/connect/deserializers.go index e7297fdcf3e..888525ac04e 100644 --- a/service/connect/deserializers.go +++ b/service/connect/deserializers.go @@ -10778,6 +10778,174 @@ func awsRestjson1_deserializeOpDocumentGetMetricDataOutput(v **GetMetricDataOutp return nil } +type awsRestjson1_deserializeOpGetMetricDataV2 struct { +} + +func (*awsRestjson1_deserializeOpGetMetricDataV2) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetMetricDataV2) 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_deserializeOpErrorGetMetricDataV2(response, &metadata) + } + output := &GetMetricDataV2Output{} + 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_deserializeOpDocumentGetMetricDataV2Output(&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_deserializeOpErrorGetMetricDataV2(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetMetricDataV2Output(v **GetMetricDataV2Output, 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 *GetMetricDataV2Output + if *v == nil { + sv = &GetMetricDataV2Output{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MetricResults": + if err := awsRestjson1_deserializeDocumentMetricResultsV2(&sv.MetricResults, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken2500 to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetTaskTemplate struct { } @@ -26746,6 +26914,42 @@ func awsRestjson1_deserializeDocumentDimensions(v **types.Dimensions, value inte return nil } +func awsRestjson1_deserializeDocumentDimensionsV2Map(v *map[string]string, 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 mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DimensionsV2Value to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsRestjson1_deserializeDocumentDistribution(v **types.Distribution, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -29493,7 +29697,7 @@ func awsRestjson1_deserializeDocumentMediaConcurrency(v **types.MediaConcurrency return nil } -func awsRestjson1_deserializeDocumentNotificationRecipientType(v **types.NotificationRecipientType, value interface{}) error { +func awsRestjson1_deserializeDocumentMetricDataCollectionsV2(v *[]types.MetricDataV2, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -29501,40 +29705,33 @@ func awsRestjson1_deserializeDocumentNotificationRecipientType(v **types.Notific return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.NotificationRecipientType + var cv []types.MetricDataV2 if *v == nil { - sv = &types.NotificationRecipientType{} + cv = []types.MetricDataV2{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "UserIds": - if err := awsRestjson1_deserializeDocumentUserIdList(&sv.UserIds, value); err != nil { - return err - } - - case "UserTags": - if err := awsRestjson1_deserializeDocumentUserTagMap(&sv.UserTags, value); err != nil { - return err - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.MetricDataV2 + destAddr := &col + if err := awsRestjson1_deserializeDocumentMetricDataV2(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentNumberReference(v **types.NumberReference, value interface{}) error { +func awsRestjson1_deserializeDocumentMetricDataV2(v **types.MetricDataV2, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -29547,39 +29744,390 @@ func awsRestjson1_deserializeDocumentNumberReference(v **types.NumberReference, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.NumberReference + var sv *types.MetricDataV2 if *v == nil { - sv = &types.NumberReference{} + sv = &types.MetricDataV2{} } else { sv = *v } for key, value := range shape { switch key { - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReferenceKey to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) + case "Metric": + if err := awsRestjson1_deserializeDocumentMetricV2(&sv.Metric, value); err != nil { + return err } case "Value": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReferenceValue to be of type string, got %T instead", value) - } - sv.Value = ptr.String(jtv) - } + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Value = ptr.Float64(f64) - default: - _, _ = key, value + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() - } - } - *v = sv + 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.Value = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Value to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMetricFiltersV2List(v *[]types.MetricFilterV2, 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.MetricFilterV2 + if *v == nil { + cv = []types.MetricFilterV2{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MetricFilterV2 + destAddr := &col + if err := awsRestjson1_deserializeDocumentMetricFilterV2(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMetricFilterV2(v **types.MetricFilterV2, 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.MetricFilterV2 + if *v == nil { + sv = &types.MetricFilterV2{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MetricFilterKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.MetricFilterKey = ptr.String(jtv) + } + + case "MetricFilterValues": + if err := awsRestjson1_deserializeDocumentMetricFilterValueList(&sv.MetricFilterValues, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMetricFilterValueList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMetricResultsV2(v *[]types.MetricResultV2, 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.MetricResultV2 + if *v == nil { + cv = []types.MetricResultV2{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MetricResultV2 + destAddr := &col + if err := awsRestjson1_deserializeDocumentMetricResultV2(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMetricResultV2(v **types.MetricResultV2, 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.MetricResultV2 + if *v == nil { + sv = &types.MetricResultV2{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Collections": + if err := awsRestjson1_deserializeDocumentMetricDataCollectionsV2(&sv.Collections, value); err != nil { + return err + } + + case "Dimensions": + if err := awsRestjson1_deserializeDocumentDimensionsV2Map(&sv.Dimensions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMetricV2(v **types.MetricV2, 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.MetricV2 + if *v == nil { + sv = &types.MetricV2{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MetricFilters": + if err := awsRestjson1_deserializeDocumentMetricFiltersV2List(&sv.MetricFilters, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricNameV2 to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Threshold": + if err := awsRestjson1_deserializeDocumentThresholdCollections(&sv.Threshold, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNotificationRecipientType(v **types.NotificationRecipientType, 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.NotificationRecipientType + if *v == nil { + sv = &types.NotificationRecipientType{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "UserIds": + if err := awsRestjson1_deserializeDocumentUserIdList(&sv.UserIds, value); err != nil { + return err + } + + case "UserTags": + if err := awsRestjson1_deserializeDocumentUserTagMap(&sv.UserTags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNumberReference(v **types.NumberReference, 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.NumberReference + if *v == nil { + sv = &types.NumberReference{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReferenceKey to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReferenceValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv return nil } @@ -33584,6 +34132,114 @@ func awsRestjson1_deserializeDocumentThreshold(v **types.Threshold, value interf return nil } +func awsRestjson1_deserializeDocumentThresholdCollections(v *[]types.ThresholdV2, 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.ThresholdV2 + if *v == nil { + cv = []types.ThresholdV2{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ThresholdV2 + destAddr := &col + if err := awsRestjson1_deserializeDocumentThresholdV2(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentThresholdV2(v **types.ThresholdV2, 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.ThresholdV2 + if *v == nil { + sv = &types.ThresholdV2{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Comparison": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArnOrId to be of type string, got %T instead", value) + } + sv.Comparison = ptr.String(jtv) + } + + case "ThresholdValue": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ThresholdValue = 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.ThresholdValue = ptr.Float64(f64) + + default: + return fmt.Errorf("expected ThresholdValue to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/connect/generated.json b/service/connect/generated.json index 7b1914ed7b4..c3d49a880d4 100644 --- a/service/connect/generated.json +++ b/service/connect/generated.json @@ -84,6 +84,7 @@ "api_op_GetCurrentUserData.go", "api_op_GetFederationToken.go", "api_op_GetMetricData.go", + "api_op_GetMetricDataV2.go", "api_op_GetTaskTemplate.go", "api_op_GetTrafficDistribution.go", "api_op_ListAgentStatuses.go", diff --git a/service/connect/serializers.go b/service/connect/serializers.go index f759c40554b..bb3ef1e6d12 100644 --- a/service/connect/serializers.go +++ b/service/connect/serializers.go @@ -6145,6 +6145,115 @@ func awsRestjson1_serializeOpDocumentGetMetricDataInput(v *GetMetricDataInput, v return nil } +type awsRestjson1_serializeOpGetMetricDataV2 struct { +} + +func (*awsRestjson1_serializeOpGetMetricDataV2) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetMetricDataV2) 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.(*GetMetricDataV2Input) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/metrics/data") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetMetricDataV2Input(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetMetricDataV2Input(v *GetMetricDataV2Input, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetMetricDataV2Input(v *GetMetricDataV2Input, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EndTime != nil { + ok := object.Key("EndTime") + ok.Double(smithytime.FormatEpochSeconds(*v.EndTime)) + } + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentFiltersV2List(v.Filters, ok); err != nil { + return err + } + } + + if v.Groupings != nil { + ok := object.Key("Groupings") + if err := awsRestjson1_serializeDocumentGroupingsV2(v.Groupings, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.Metrics != nil { + ok := object.Key("Metrics") + if err := awsRestjson1_serializeDocumentMetricsV2(v.Metrics, ok); err != nil { + return err + } + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.ResourceArn != nil { + ok := object.Key("ResourceArn") + ok.String(*v.ResourceArn) + } + + if v.StartTime != nil { + ok := object.Key("StartTime") + ok.Double(smithytime.FormatEpochSeconds(*v.StartTime)) + } + + return nil +} + type awsRestjson1_serializeOpGetTaskTemplate struct { } @@ -14308,6 +14417,49 @@ func awsRestjson1_serializeDocumentFilters(v *types.Filters, value smithyjson.Va return nil } +func awsRestjson1_serializeDocumentFiltersV2List(v []types.FilterV2, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentFilterV2(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentFilterV2(v *types.FilterV2, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterKey != nil { + ok := object.Key("FilterKey") + ok.String(*v.FilterKey) + } + + if v.FilterValues != nil { + ok := object.Key("FilterValues") + if err := awsRestjson1_serializeDocumentFilterValueList(v.FilterValues, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentGroupings(v []types.Grouping, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -14319,6 +14471,17 @@ func awsRestjson1_serializeDocumentGroupings(v []types.Grouping, value smithyjso return nil } +func awsRestjson1_serializeDocumentGroupingsV2(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentHierarchyGroupCondition(v *types.HierarchyGroupCondition, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -14667,6 +14830,88 @@ func awsRestjson1_serializeDocumentMediaConcurrency(v *types.MediaConcurrency, v return nil } +func awsRestjson1_serializeDocumentMetricFiltersV2List(v []types.MetricFilterV2, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentMetricFilterV2(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentMetricFilterV2(v *types.MetricFilterV2, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MetricFilterKey != nil { + ok := object.Key("MetricFilterKey") + ok.String(*v.MetricFilterKey) + } + + if v.MetricFilterValues != nil { + ok := object.Key("MetricFilterValues") + if err := awsRestjson1_serializeDocumentMetricFilterValueList(v.MetricFilterValues, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentMetricFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentMetricsV2(v []types.MetricV2, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentMetricV2(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentMetricV2(v *types.MetricV2, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MetricFilters != nil { + ok := object.Key("MetricFilters") + if err := awsRestjson1_serializeDocumentMetricFiltersV2List(v.MetricFilters, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Threshold != nil { + ok := object.Key("Threshold") + if err := awsRestjson1_serializeDocumentThresholdCollections(v.Threshold, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentNotificationRecipientType(v *types.NotificationRecipientType, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -15686,6 +15931,49 @@ func awsRestjson1_serializeDocumentThreshold(v *types.Threshold, value smithyjso return nil } +func awsRestjson1_serializeDocumentThresholdCollections(v []types.ThresholdV2, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentThresholdV2(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentThresholdV2(v *types.ThresholdV2, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Comparison != nil { + ok := object.Key("Comparison") + ok.String(*v.Comparison) + } + + if v.ThresholdValue != nil { + ok := object.Key("ThresholdValue") + switch { + case math.IsNaN(*v.ThresholdValue): + ok.String("NaN") + + case math.IsInf(*v.ThresholdValue, 1): + ok.String("Infinity") + + case math.IsInf(*v.ThresholdValue, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.ThresholdValue) + + } + } + + return nil +} + func awsRestjson1_serializeDocumentUpdateParticipantRoleConfigChannelInfo(v types.UpdateParticipantRoleConfigChannelInfo, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/connect/types/types.go b/service/connect/types/types.go index bbe30d48fe2..ab1d29e0224 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -711,6 +711,24 @@ type Filters struct { noSmithyDocumentSerde } +// Contains the filter to apply when retrieving metrics with the GetMetricDataV2 +// (https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) +// API. +type FilterV2 struct { + + // The key to use for filtering data. For example, QUEUE, ROUTING_PROFILE, AGENT, + // CHANNEL, AGENT_HIERARCHY_LEVEL_ONE, AGENT_HIERARCHY_LEVEL_TWO, + // AGENT_HIERARCHY_LEVEL_THREE, AGENT_HIERARCHY_LEVEL_FOUR, + // AGENT_HIERARCHY_LEVEL_FIVE. There must be at least 1 key and a maximum 5 keys. + FilterKey *string + + // The identifiers to use for filtering data. For example, if you have a filter key + // of QUEUE, you would add queue IDs or ARNs in FilterValues. + FilterValues []string + + noSmithyDocumentSerde +} + // Contains information about a hierarchy group. type HierarchyGroup struct { @@ -1287,6 +1305,64 @@ type MediaConcurrency struct { noSmithyDocumentSerde } +// Contains the name, thresholds, and metric filters. +type MetricDataV2 struct { + + // The metric name, thresholds, and metric filters of the returned metric. + Metric *MetricV2 + + // The corresponding value of the metric returned in the response. + Value *float64 + + noSmithyDocumentSerde +} + +// Contains information about the filter used when retrieving metrics. +// MetricFiltersV2 can be used on the following metrics: AVG_AGENT_CONNECTING_TIME, +// CONTACTS_CREATED, CONTACTS_HANDLED, SUM_CONTACTS_DISCONNECTED. +type MetricFilterV2 struct { + + // The key to use for filtering data. Valid metric filter keys: INITIATION_METHOD, + // DISCONNECT_REASON + MetricFilterKey *string + + // The values to use for filtering data. Valid metric filter values for + // INITIATION_METHOD: INBOUND | OUTBOUND | TRANSFER | QUEUE_TRANSFER | CALLBACK | + // API Valid metric filter values for DISCONNECT_REASON: CUSTOMER_DISCONNECT | + // AGENT_DISCONNECT | THIRD_PARTY_DISCONNECT | TELECOM_PROBLEM | BARGED | + // CONTACT_FLOW_DISCONNECT | OTHER | EXPIRED | API + MetricFilterValues []string + + noSmithyDocumentSerde +} + +// Contains information about the metric results. +type MetricResultV2 struct { + + // The set of metrics. + Collections []MetricDataV2 + + // The dimension for the metrics. + Dimensions map[string]string + + noSmithyDocumentSerde +} + +// Contains information about the metric. +type MetricV2 struct { + + // Contains the filters to be used when returning data. + MetricFilters []MetricFilterV2 + + // The name of the metric. + Name *string + + // Contains information about the threshold for service level metrics. + Threshold []ThresholdV2 + + noSmithyDocumentSerde +} + // The type of notification recipient. type NotificationRecipientType struct { @@ -2552,6 +2628,18 @@ type Threshold struct { noSmithyDocumentSerde } +// Contains information about the threshold for service level metrics. +type ThresholdV2 struct { + + // The type of comparison. Only "less than" (LT) comparisons are supported. + Comparison *string + + // The threshold value to compare. + ThresholdValue *float64 + + noSmithyDocumentSerde +} + // Information about a traffic distribution group. type TrafficDistributionGroup struct { diff --git a/service/connect/validators.go b/service/connect/validators.go index 1b0eef9ca0f..eb4d9b5e0b6 100644 --- a/service/connect/validators.go +++ b/service/connect/validators.go @@ -1530,6 +1530,26 @@ func (m *validateOpGetMetricData) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpGetMetricDataV2 struct { +} + +func (*validateOpGetMetricDataV2) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetMetricDataV2) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetMetricDataV2Input) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetMetricDataV2Input(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetTaskTemplate struct { } @@ -3614,6 +3634,10 @@ func addOpGetMetricDataValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetMetricData{}, middleware.After) } +func addOpGetMetricDataV2ValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetMetricDataV2{}, middleware.After) +} + func addOpGetTaskTemplateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetTaskTemplate{}, middleware.After) } @@ -6321,6 +6345,33 @@ func validateOpGetMetricDataInput(v *GetMetricDataInput) error { } } +func validateOpGetMetricDataV2Input(v *GetMetricDataV2Input) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetMetricDataV2Input"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.StartTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("StartTime")) + } + if v.EndTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("EndTime")) + } + if v.Filters == nil { + invalidParams.Add(smithy.NewErrParamRequired("Filters")) + } + if v.Metrics == nil { + invalidParams.Add(smithy.NewErrParamRequired("Metrics")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetTaskTemplateInput(v *GetTaskTemplateInput) error { if v == nil { return nil diff --git a/service/evidently/api_op_CreateFeature.go b/service/evidently/api_op_CreateFeature.go index 82e00d40e96..64ace1eecfe 100644 --- a/service/evidently/api_op_CreateFeature.go +++ b/service/evidently/api_op_CreateFeature.go @@ -65,7 +65,9 @@ type CreateFeatureInput struct { // Specify users that should always be served a specific variation of a feature. // Each user is specified by a key-value pair . For each key, specify a user by // entering their user ID, account ID, or some other identifier. For the value, - // specify the name of the variation that they are to be served. + // specify the name of the variation that they are to be served. This parameter is + // limited to 2500 overrides or a total of 40KB. The 40KB limit includes an + // overhead of 6 bytes per override. EntityOverrides map[string]string // Specify ALL_RULES to activate the traffic allocation specified by any ongoing diff --git a/service/evidently/api_op_UpdateFeature.go b/service/evidently/api_op_UpdateFeature.go index 6afe2ca870e..5bad65bfe0a 100644 --- a/service/evidently/api_op_UpdateFeature.go +++ b/service/evidently/api_op_UpdateFeature.go @@ -59,7 +59,9 @@ type UpdateFeatureInput struct { // Specified users that should always be served a specific variation of a feature. // Each user is specified by a key-value pair . For each key, specify a user by // entering their user ID, account ID, or some other identifier. For the value, - // specify the name of the variation that they are to be served. + // specify the name of the variation that they are to be served. This parameter is + // limited to 2500 overrides or a total of 40KB. The 40KB limit includes an + // overhead of 6 bytes per override. EntityOverrides map[string]string // Specify ALL_RULES to activate the traffic allocation specified by any ongoing diff --git a/service/networkmanager/api_op_RegisterTransitGateway.go b/service/networkmanager/api_op_RegisterTransitGateway.go index 593153f53eb..3f4798cdf0a 100644 --- a/service/networkmanager/api_op_RegisterTransitGateway.go +++ b/service/networkmanager/api_op_RegisterTransitGateway.go @@ -11,10 +11,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Registers a transit gateway in your global network. The transit gateway can be -// in any Amazon Web Services Region, but it must be owned by the same Amazon Web -// Services account that owns the global network. You cannot register a transit -// gateway in more than one global network. +// Registers a transit gateway in your global network. Not all Regions support +// transit gateways for global networks. For a list of the supported Regions, see +// Region Availability +// (https://docs.aws.amazon.com/network-manager/latest/tgwnm/what-are-global-networks.html#nm-available-regions) +// in the Amazon Web Services Transit Gateways for Global Networks User Guide. The +// transit gateway can be in any of the supported Amazon Web Services Regions, but +// it must be owned by the same Amazon Web Services account that owns the global +// network. You cannot register a transit gateway in more than one global network. func (c *Client) RegisterTransitGateway(ctx context.Context, params *RegisterTransitGatewayInput, optFns ...func(*Options)) (*RegisterTransitGatewayOutput, error) { if params == nil { params = &RegisterTransitGatewayInput{} diff --git a/service/networkmanager/types/types.go b/service/networkmanager/types/types.go index 781035501ef..091533900d6 100644 --- a/service/networkmanager/types/types.go +++ b/service/networkmanager/types/types.go @@ -1300,7 +1300,9 @@ type TransitGatewayRouteTableAttachment struct { // The ID of the peering attachment. PeeringId *string - // The ARN of the transit gateway attachment route table. + // The ARN of the transit gateway attachment route table. For example, + // "TransitGatewayRouteTableArn": + // "arn:aws:ec2:us-west-2:123456789012:transit-gateway-route-table/tgw-rtb-9876543210123456". TransitGatewayRouteTableArn *string noSmithyDocumentSerde diff --git a/service/quicksight/api_op_DeleteUser.go b/service/quicksight/api_op_DeleteUser.go index 5a69ac98b83..314e37081a9 100644 --- a/service/quicksight/api_op_DeleteUser.go +++ b/service/quicksight/api_op_DeleteUser.go @@ -11,8 +11,8 @@ import ( ) // Deletes the Amazon QuickSight user that is associated with the identity of the -// Identity and Access Management (IAM) user or role that's making the call. The -// IAM user isn't deleted as a result of this call. +// IAM user or role that's making the call. The IAM user isn't deleted as a result +// of this call. func (c *Client) DeleteUser(ctx context.Context, params *DeleteUserInput, optFns ...func(*Options)) (*DeleteUserOutput, error) { if params == nil { params = &DeleteUserInput{} diff --git a/service/quicksight/api_op_GetSessionEmbedUrl.go b/service/quicksight/api_op_GetSessionEmbedUrl.go index 059ed592152..ebb68712319 100644 --- a/service/quicksight/api_op_GetSessionEmbedUrl.go +++ b/service/quicksight/api_op_GetSessionEmbedUrl.go @@ -87,12 +87,12 @@ type GetSessionEmbedUrlInput struct { // * Invited // nonfederated users // - // * Identity and Access Management (IAM) users and IAM - // role-based sessions authenticated through Federated Single Sign-On using SAML, - // OpenID Connect, or IAM federation + // * IAM users and IAM role-based sessions authenticated + // through Federated Single Sign-On using SAML, OpenID Connect, or IAM + // federation // - // Omit this parameter for users in the third - // group, IAM users and IAM role-based sessions. + // Omit this parameter for users in the third group, IAM users and IAM + // role-based sessions. UserArn *string noSmithyDocumentSerde diff --git a/service/quicksight/api_op_UpdateAccountSettings.go b/service/quicksight/api_op_UpdateAccountSettings.go index 8acf69d9aeb..af088c26b52 100644 --- a/service/quicksight/api_op_UpdateAccountSettings.go +++ b/service/quicksight/api_op_UpdateAccountSettings.go @@ -35,9 +35,9 @@ type UpdateAccountSettingsInput struct { AwsAccountId *string // The default namespace for this Amazon Web Services account. Currently, the - // default is default. Identity and Access Management (IAM) users that register for - // the first time with Amazon QuickSight provide an email address that becomes - // associated with the default namespace. + // default is default. IAM users that register for the first time with Amazon + // QuickSight provide an email address that becomes associated with the default + // namespace. // // This member is required. DefaultNamespace *string diff --git a/service/quicksight/deserializers.go b/service/quicksight/deserializers.go index b4c7e1f19f3..cfdec76892a 100644 --- a/service/quicksight/deserializers.go +++ b/service/quicksight/deserializers.go @@ -51445,6 +51445,15 @@ func awsRestjson1_deserializeDocumentPivotTableOptions(v **types.PivotTableOptio return err } + case "CollapsedRowDimensionsVisibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + } + sv.CollapsedRowDimensionsVisibility = types.Visibility(jtv) + } + case "ColumnHeaderStyle": if err := awsRestjson1_deserializeDocumentTableCellStyle(&sv.ColumnHeaderStyle, value); err != nil { return err diff --git a/service/quicksight/serializers.go b/service/quicksight/serializers.go index f3a60e36f36..5fcfea5701b 100644 --- a/service/quicksight/serializers.go +++ b/service/quicksight/serializers.go @@ -22179,6 +22179,11 @@ func awsRestjson1_serializeDocumentPivotTableOptions(v *types.PivotTableOptions, } } + if len(v.CollapsedRowDimensionsVisibility) > 0 { + ok := object.Key("CollapsedRowDimensionsVisibility") + ok.String(string(v.CollapsedRowDimensionsVisibility)) + } + if v.ColumnHeaderStyle != nil { ok := object.Key("ColumnHeaderStyle") if err := awsRestjson1_serializeDocumentTableCellStyle(v.ColumnHeaderStyle, ok); err != nil { @@ -23119,10 +23124,31 @@ func awsRestjson1_serializeDocumentReferenceLineValueLabelConfiguration(v *types return nil } +func awsRestjson1_serializeDocumentRegisteredUserConsoleFeatureConfigurations(v *types.RegisteredUserConsoleFeatureConfigurations, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.StatePersistence != nil { + ok := object.Key("StatePersistence") + if err := awsRestjson1_serializeDocumentStatePersistenceConfigurations(v.StatePersistence, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentRegisteredUserDashboardEmbeddingConfiguration(v *types.RegisteredUserDashboardEmbeddingConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() + if v.FeatureConfigurations != nil { + ok := object.Key("FeatureConfigurations") + if err := awsRestjson1_serializeDocumentRegisteredUserDashboardFeatureConfigurations(v.FeatureConfigurations, ok); err != nil { + return err + } + } + if v.InitialDashboardId != nil { ok := object.Key("InitialDashboardId") ok.String(*v.InitialDashboardId) @@ -23131,6 +23157,20 @@ func awsRestjson1_serializeDocumentRegisteredUserDashboardEmbeddingConfiguration return nil } +func awsRestjson1_serializeDocumentRegisteredUserDashboardFeatureConfigurations(v *types.RegisteredUserDashboardFeatureConfigurations, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.StatePersistence != nil { + ok := object.Key("StatePersistence") + if err := awsRestjson1_serializeDocumentStatePersistenceConfigurations(v.StatePersistence, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentRegisteredUserDashboardVisualEmbeddingConfiguration(v *types.RegisteredUserDashboardVisualEmbeddingConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -23196,6 +23236,13 @@ func awsRestjson1_serializeDocumentRegisteredUserQuickSightConsoleEmbeddingConfi object := value.Object() defer object.Close() + if v.FeatureConfigurations != nil { + ok := object.Key("FeatureConfigurations") + if err := awsRestjson1_serializeDocumentRegisteredUserConsoleFeatureConfigurations(v.FeatureConfigurations, ok); err != nil { + return err + } + } + if v.InitialPath != nil { ok := object.Key("InitialPath") ok.String(*v.InitialPath) @@ -24754,6 +24801,18 @@ func awsRestjson1_serializeDocumentSslProperties(v *types.SslProperties, value s return nil } +func awsRestjson1_serializeDocumentStatePersistenceConfigurations(v *types.StatePersistenceConfigurations, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("Enabled") + ok.Boolean(v.Enabled) + } + + return nil +} + func awsRestjson1_serializeDocumentStringDefaultValueList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/quicksight/types/errors.go b/service/quicksight/types/errors.go index eeb2a6f65bd..4f92db76804 100644 --- a/service/quicksight/types/errors.go +++ b/service/quicksight/types/errors.go @@ -10,8 +10,8 @@ import ( // You don't have access to this item. The provided credentials couldn't be // validated. You might not be authorized to carry out the request. Make sure that // your account is authorized to use the Amazon QuickSight service, that your -// policies have the correct permissions, and that you are using the correct access -// keys. +// policies have the correct permissions, and that you are using the correct +// credentials. type AccessDeniedException struct { Message *string diff --git a/service/quicksight/types/types.go b/service/quicksight/types/types.go index 7a04a4c8225..d6486ff4561 100644 --- a/service/quicksight/types/types.go +++ b/service/quicksight/types/types.go @@ -292,7 +292,7 @@ type AnalysisError struct { // The type of the analysis error. Type AnalysisErrorType - // + // Lists the violated entities that caused the analysis error ViolatedEntities []Entity noSmithyDocumentSerde @@ -8161,6 +8161,11 @@ type PivotTableOptions struct { // The table cell style of cells. CellStyle *TableCellStyle + // The visibility setting of a pivot table's collapsed row dimension fields. If the + // value of this structure is HIDDEN, all collapsed columns in a pivot table are + // automatically hidden. The default value is VISIBLE. + CollapsedRowDimensionsVisibility Visibility + // The table cell style of the column header. ColumnHeaderStyle *TableCellStyle @@ -8744,6 +8749,15 @@ type ReferenceLineValueLabelConfiguration struct { noSmithyDocumentSerde } +// The feature configurations of an embedded Amazon QuickSight console. +type RegisteredUserConsoleFeatureConfigurations struct { + + // The state persistence configurations of an embedded Amazon QuickSight console. + StatePersistence *StatePersistenceConfigurations + + noSmithyDocumentSerde +} + // Information about the dashboard you want to embed. type RegisteredUserDashboardEmbeddingConfiguration struct { @@ -8756,6 +8770,18 @@ type RegisteredUserDashboardEmbeddingConfiguration struct { // This member is required. InitialDashboardId *string + // The feature configurations of an embbedded Amazon QuickSight dashboard. + FeatureConfigurations *RegisteredUserDashboardFeatureConfigurations + + noSmithyDocumentSerde +} + +// The feature configuration for an embedded dashboard. +type RegisteredUserDashboardFeatureConfigurations struct { + + // The state persistence settings of an embedded dashboard. + StatePersistence *StatePersistenceConfigurations + noSmithyDocumentSerde } @@ -8848,6 +8874,9 @@ type RegisteredUserQSearchBarEmbeddingConfiguration struct { // Information about the Amazon QuickSight console that you want to embed. type RegisteredUserQuickSightConsoleEmbeddingConfiguration struct { + // The embedding configuration of an embedded Amazon QuickSight console. + FeatureConfigurations *RegisteredUserConsoleFeatureConfigurations + // The initial URL path for the Amazon QuickSight console. InitialPath is required. // The entry point URL is constrained to the following paths: // @@ -9962,6 +9991,18 @@ type SslProperties struct { noSmithyDocumentSerde } +// The state perssitence configuration of an embedded dashboard. +type StatePersistenceConfigurations struct { + + // Determines if a Amazon QuickSight dashboard's state persistence settings are + // turned on or off. + // + // This member is required. + Enabled bool + + noSmithyDocumentSerde +} + // The default values of the StringParameterDeclaration. type StringDefaultValues struct { @@ -11685,7 +11726,7 @@ type UploadSettings struct { // A registered user of Amazon QuickSight. type User struct { - // The active status of user. When you create an Amazon QuickSight user that’s not + // The active status of user. When you create an Amazon QuickSight user that's not // an IAM user or an Active Directory user, that user is inactive until they sign // in and provide a password. Active bool diff --git a/service/quicksight/validators.go b/service/quicksight/validators.go index 76c91f33161..335494abefb 100644 --- a/service/quicksight/validators.go +++ b/service/quicksight/validators.go @@ -10782,6 +10782,23 @@ func validateReferenceLineValueLabelConfiguration(v *types.ReferenceLineValueLab } } +func validateRegisteredUserConsoleFeatureConfigurations(v *types.RegisteredUserConsoleFeatureConfigurations) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegisteredUserConsoleFeatureConfigurations"} + if v.StatePersistence != nil { + if err := validateStatePersistenceConfigurations(v.StatePersistence); err != nil { + invalidParams.AddNested("StatePersistence", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRegisteredUserDashboardEmbeddingConfiguration(v *types.RegisteredUserDashboardEmbeddingConfiguration) error { if v == nil { return nil @@ -10790,6 +10807,28 @@ func validateRegisteredUserDashboardEmbeddingConfiguration(v *types.RegisteredUs if v.InitialDashboardId == nil { invalidParams.Add(smithy.NewErrParamRequired("InitialDashboardId")) } + if v.FeatureConfigurations != nil { + if err := validateRegisteredUserDashboardFeatureConfigurations(v.FeatureConfigurations); err != nil { + invalidParams.AddNested("FeatureConfigurations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRegisteredUserDashboardFeatureConfigurations(v *types.RegisteredUserDashboardFeatureConfigurations) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegisteredUserDashboardFeatureConfigurations"} + if v.StatePersistence != nil { + if err := validateStatePersistenceConfigurations(v.StatePersistence); err != nil { + invalidParams.AddNested("StatePersistence", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -10826,6 +10865,11 @@ func validateRegisteredUserEmbeddingExperienceConfiguration(v *types.RegisteredU invalidParams.AddNested("Dashboard", err.(smithy.InvalidParamsError)) } } + if v.QuickSightConsole != nil { + if err := validateRegisteredUserQuickSightConsoleEmbeddingConfiguration(v.QuickSightConsole); err != nil { + invalidParams.AddNested("QuickSightConsole", err.(smithy.InvalidParamsError)) + } + } if v.DashboardVisual != nil { if err := validateRegisteredUserDashboardVisualEmbeddingConfiguration(v.DashboardVisual); err != nil { invalidParams.AddNested("DashboardVisual", err.(smithy.InvalidParamsError)) @@ -10838,6 +10882,23 @@ func validateRegisteredUserEmbeddingExperienceConfiguration(v *types.RegisteredU } } +func validateRegisteredUserQuickSightConsoleEmbeddingConfiguration(v *types.RegisteredUserQuickSightConsoleEmbeddingConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegisteredUserQuickSightConsoleEmbeddingConfiguration"} + if v.FeatureConfigurations != nil { + if err := validateRegisteredUserConsoleFeatureConfigurations(v.FeatureConfigurations); err != nil { + invalidParams.AddNested("FeatureConfigurations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRelationalTable(v *types.RelationalTable) error { if v == nil { return nil @@ -11863,6 +11924,18 @@ func validateSqlServerParameters(v *types.SqlServerParameters) error { } } +func validateStatePersistenceConfigurations(v *types.StatePersistenceConfigurations) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StatePersistenceConfigurations"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateStringDefaultValues(v *types.StringDefaultValues) error { if v == nil { return nil diff --git a/service/redshiftdata/api_op_BatchExecuteStatement.go b/service/redshiftdata/api_op_BatchExecuteStatement.go index ce16afc7221..34c828409a4 100644 --- a/service/redshiftdata/api_op_BatchExecuteStatement.go +++ b/service/redshiftdata/api_op_BatchExecuteStatement.go @@ -90,9 +90,9 @@ type BatchExecuteStatementInput struct { // bus after the SQL statements run. WithEvent *bool - // The serverless workgroup name. This parameter is required when connecting to a - // serverless workgroup and authenticating using either Secrets Manager or - // temporary credentials. + // The serverless workgroup name or Amazon Resource Name (ARN). This parameter is + // required when connecting to a serverless workgroup and authenticating using + // either Secrets Manager or temporary credentials. WorkgroupName *string noSmithyDocumentSerde @@ -121,8 +121,8 @@ type BatchExecuteStatementOutput struct { // The name or ARN of the secret that enables access to the database. SecretArn *string - // The serverless workgroup name. This element is not returned when connecting to a - // provisioned cluster. + // The serverless workgroup name or Amazon Resource Name (ARN). This element is not + // returned when connecting to a provisioned cluster. WorkgroupName *string // Metadata pertaining to the operation's result. diff --git a/service/redshiftdata/api_op_DescribeStatement.go b/service/redshiftdata/api_op_DescribeStatement.go index 4cde655f363..6272b0eb21a 100644 --- a/service/redshiftdata/api_op_DescribeStatement.go +++ b/service/redshiftdata/api_op_DescribeStatement.go @@ -136,7 +136,7 @@ type DescribeStatementOutput struct { // updated. An example is the time the status last changed. UpdatedAt *time.Time - // The serverless workgroup name. + // The serverless workgroup name or Amazon Resource Name (ARN). WorkgroupName *string // Metadata pertaining to the operation's result. diff --git a/service/redshiftdata/api_op_DescribeTable.go b/service/redshiftdata/api_op_DescribeTable.go index 9501c5211ea..994ee97ce01 100644 --- a/service/redshiftdata/api_op_DescribeTable.go +++ b/service/redshiftdata/api_op_DescribeTable.go @@ -96,9 +96,9 @@ type DescribeTableInput struct { // for all schemas in the database are returned Table *string - // The serverless workgroup name. This parameter is required when connecting to a - // serverless workgroup and authenticating using either Secrets Manager or - // temporary credentials. + // The serverless workgroup name or Amazon Resource Name (ARN). This parameter is + // required when connecting to a serverless workgroup and authenticating using + // either Secrets Manager or temporary credentials. WorkgroupName *string noSmithyDocumentSerde diff --git a/service/redshiftdata/api_op_ExecuteStatement.go b/service/redshiftdata/api_op_ExecuteStatement.go index ebfeb7dff89..22c2f8a49e7 100644 --- a/service/redshiftdata/api_op_ExecuteStatement.go +++ b/service/redshiftdata/api_op_ExecuteStatement.go @@ -91,9 +91,9 @@ type ExecuteStatementInput struct { // bus after the SQL statement runs. WithEvent *bool - // The serverless workgroup name. This parameter is required when connecting to a - // serverless workgroup and authenticating using either Secrets Manager or - // temporary credentials. + // The serverless workgroup name or Amazon Resource Name (ARN). This parameter is + // required when connecting to a serverless workgroup and authenticating using + // either Secrets Manager or temporary credentials. WorkgroupName *string noSmithyDocumentSerde @@ -121,8 +121,8 @@ type ExecuteStatementOutput struct { // The name or ARN of the secret that enables access to the database. SecretArn *string - // The serverless workgroup name. This element is not returned when connecting to a - // provisioned cluster. + // The serverless workgroup name or Amazon Resource Name (ARN). This element is not + // returned when connecting to a provisioned cluster. WorkgroupName *string // Metadata pertaining to the operation's result. diff --git a/service/redshiftdata/api_op_ListDatabases.go b/service/redshiftdata/api_op_ListDatabases.go index abeefb5aa1f..88f9ad9fc41 100644 --- a/service/redshiftdata/api_op_ListDatabases.go +++ b/service/redshiftdata/api_op_ListDatabases.go @@ -80,9 +80,9 @@ type ListDatabasesInput struct { // parameter is required when authenticating using Secrets Manager. SecretArn *string - // The serverless workgroup name. This parameter is required when connecting to a - // serverless workgroup and authenticating using either Secrets Manager or - // temporary credentials. + // The serverless workgroup name or Amazon Resource Name (ARN). This parameter is + // required when connecting to a serverless workgroup and authenticating using + // either Secrets Manager or temporary credentials. WorkgroupName *string noSmithyDocumentSerde diff --git a/service/redshiftdata/api_op_ListSchemas.go b/service/redshiftdata/api_op_ListSchemas.go index bcee025d83b..b16d9e56618 100644 --- a/service/redshiftdata/api_op_ListSchemas.go +++ b/service/redshiftdata/api_op_ListSchemas.go @@ -90,9 +90,9 @@ type ListSchemasInput struct { // parameter is required when authenticating using Secrets Manager. SecretArn *string - // The serverless workgroup name. This parameter is required when connecting to a - // serverless workgroup and authenticating using either Secrets Manager or - // temporary credentials. + // The serverless workgroup name or Amazon Resource Name (ARN). This parameter is + // required when connecting to a serverless workgroup and authenticating using + // either Secrets Manager or temporary credentials. WorkgroupName *string noSmithyDocumentSerde diff --git a/service/redshiftdata/api_op_ListTables.go b/service/redshiftdata/api_op_ListTables.go index 337d09e66fe..dde3911decb 100644 --- a/service/redshiftdata/api_op_ListTables.go +++ b/service/redshiftdata/api_op_ListTables.go @@ -103,9 +103,9 @@ type ListTablesInput struct { // tables are returned. TablePattern *string - // The serverless workgroup name. This parameter is required when connecting to a - // serverless workgroup and authenticating using either Secrets Manager or - // temporary credentials. + // The serverless workgroup name or Amazon Resource Name (ARN). This parameter is + // required when connecting to a serverless workgroup and authenticating using + // either Secrets Manager or temporary credentials. WorkgroupName *string noSmithyDocumentSerde diff --git a/service/redshiftserverless/internal/endpoints/endpoints.go b/service/redshiftserverless/internal/endpoints/endpoints.go index c250e8b6c11..e4c69570354 100644 --- a/service/redshiftserverless/internal/endpoints/endpoints.go +++ b/service/redshiftserverless/internal/endpoints/endpoints.go @@ -147,6 +147,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, @@ -159,12 +162,18 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index d57ec6d1d2a..c654a6ddb6f 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -61269,6 +61269,15 @@ func awsAwsjson11_deserializeDocumentProductionVariant(v **types.ProductionVaria return err } + case "EnableSSMAccess": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ProductionVariantSSMAccess to be of type *bool, got %T instead", value) + } + sv.EnableSSMAccess = ptr.Bool(jtv) + } + case "InitialInstanceCount": if value != nil { jtv, ok := value.(json.Number) diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index 129dcb4cc5b..98ca6bbab47 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -22907,6 +22907,11 @@ func awsAwsjson11_serializeDocumentProductionVariant(v *types.ProductionVariant, } } + if v.EnableSSMAccess != nil { + ok := object.Key("EnableSSMAccess") + ok.Boolean(*v.EnableSSMAccess) + } + if v.InitialInstanceCount != nil { ok := object.Key("InitialInstanceCount") ok.Integer(*v.InitialInstanceCount) diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index 73eb860f59d..ff6cfeae3d1 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -5062,12 +5062,17 @@ type FinalAutoMLJobObjectiveMetric struct { noSmithyDocumentSerde } -// Shows the final value for the objective metric for a training job that was -// launched by a hyperparameter tuning job. You define the objective metric in the +// Shows the latest objective metric emitted by a training job that was launched by +// a hyperparameter tuning job. You define the objective metric in the // HyperParameterTuningJobObjective parameter of HyperParameterTuningJobConfig. type FinalHyperParameterTuningJobObjectiveMetric struct { - // The name of the objective metric. + // The name of the objective metric. For SageMaker built-in algorithms, metrics are + // defined per algorithm. See the metrics for XGBoost + // (https://docs.aws.amazon.com/sagemaker/latest/dg/xgboost-tuning.html) as an + // example. You can also use a custom algorithm for training and define your own + // metrics. For more information, see Define metrics and environment variables + // (https://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning-define-metrics-variables.html). // // This member is required. MetricName *string @@ -5077,8 +5082,8 @@ type FinalHyperParameterTuningJobObjectiveMetric struct { // This member is required. Value float32 - // Whether to minimize or maximize the objective metric. Valid values are Minimize - // and Maximize. + // Select if you want to minimize or maximize the objective metric during + // hyperparameter tuning. Type HyperParameterTuningJobObjectiveType noSmithyDocumentSerde @@ -10843,40 +10848,40 @@ type OnlineStoreConfig struct { // The security configuration for OnlineStore. type OnlineStoreSecurityConfig struct { - // The ID of the Amazon Web Services Key Management Service (Amazon Web Services - // KMS) key that SageMaker Feature Store uses to encrypt the Amazon S3 objects at - // rest using Amazon S3 server-side encryption. The caller (either IAM user or IAM - // role) of CreateFeatureGroup must have below permissions to the - // OnlineStoreKmsKeyId: + // The Amazon Web Services Key Management Service (KMS) key ARN that SageMaker + // Feature Store uses to encrypt the Amazon S3 objects at rest using Amazon S3 + // server-side encryption. The caller (either IAM user or IAM role) of + // CreateFeatureGroup must have below permissions to the OnlineStoreKmsKeyId: // - // * "kms:Encrypt" + // * + // "kms:Encrypt" // // * "kms:Decrypt" // // * "kms:DescribeKey" // - // * - // "kms:CreateGrant" + // * "kms:CreateGrant" // - // * "kms:RetireGrant" + // * + // "kms:RetireGrant" // // * "kms:ReEncryptFrom" // - // * - // "kms:ReEncryptTo" + // * "kms:ReEncryptTo" // - // * "kms:GenerateDataKey" + // * + // "kms:GenerateDataKey" // // * "kms:ListAliases" // - // * - // "kms:ListGrants" + // * "kms:ListGrants" // - // * "kms:RevokeGrant" + // * + // "kms:RevokeGrant" // - // The caller (either user or IAM role) to - // all DataPlane operations (PutRecord, GetRecord, DeleteRecord) must have the - // following permissions to the KmsKeyId: + // The caller (either user or IAM role) to all DataPlane + // operations (PutRecord, GetRecord, DeleteRecord) must have the following + // permissions to the KmsKeyId: // // * "kms:Decrypt" KmsKeyId *string @@ -12001,7 +12006,9 @@ type ProcessingStoppingCondition struct { // Identifies a model that you want to host and the resources chosen to deploy for // hosting it. If you are deploying multiple models, tell SageMaker how to -// distribute traffic among the models by specifying variant weights. +// distribute traffic among the models by specifying variant weights. For more +// information on production variants, check Production variants +// (https://docs.aws.amazon.com/sagemaker/latest/dg/model-ab-testing.html). type ProductionVariant struct { // The name of the model that you want to host. This is the name that you specified @@ -12031,6 +12038,13 @@ type ProductionVariant struct { // process crashes. CoreDumpConfig *ProductionVariantCoreDumpConfig + // You can use this parameter to turn on native Amazon Web Services Systems Manager + // (SSM) access for a production variant behind an endpoint. By default, SSM access + // is disabled for all production variants behind an endpoints. You can turn on or + // turn off SSM access for a production variant behind an existing endpoint by + // creating a new endpoint configuration and calling UpdateEndpoint. + EnableSSMAccess *bool + // Number of instances to launch initially. InitialInstanceCount *int32 @@ -13465,7 +13479,7 @@ type S3StorageConfig struct { // This member is required. S3Uri *string - // The Amazon Web Services Key Management Service (KMS) key ID of the key used to + // The Amazon Web Services Key Management Service (KMS) key ARN of the key used to // encrypt any objects written into the OfflineStore S3 location. The IAM roleARN // that is passed as a parameter to CreateFeatureGroup must have below permissions // to the KmsKeyId: diff --git a/service/servicediscovery/deserializers.go b/service/servicediscovery/deserializers.go index 9bfc53c54d0..4e15f54454f 100644 --- a/service/servicediscovery/deserializers.go +++ b/service/servicediscovery/deserializers.go @@ -127,6 +127,9 @@ func awsAwsjson11_deserializeOpErrorCreateHttpNamespace(response *smithyhttp.Res case strings.EqualFold("NamespaceAlreadyExists", errorCode): return awsAwsjson11_deserializeErrorNamespaceAlreadyExists(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceLimitExceeded", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody) @@ -250,6 +253,9 @@ func awsAwsjson11_deserializeOpErrorCreatePrivateDnsNamespace(response *smithyht case strings.EqualFold("NamespaceAlreadyExists", errorCode): return awsAwsjson11_deserializeErrorNamespaceAlreadyExists(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceLimitExceeded", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody) @@ -373,6 +379,9 @@ func awsAwsjson11_deserializeOpErrorCreatePublicDnsNamespace(response *smithyhtt case strings.EqualFold("NamespaceAlreadyExists", errorCode): return awsAwsjson11_deserializeErrorNamespaceAlreadyExists(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceLimitExceeded", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody) @@ -493,6 +502,9 @@ func awsAwsjson11_deserializeOpErrorCreateService(response *smithyhttp.Response, case strings.EqualFold("NamespaceNotFound", errorCode): return awsAwsjson11_deserializeErrorNamespaceNotFound(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceLimitExceeded", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody) @@ -619,6 +631,9 @@ func awsAwsjson11_deserializeOpErrorDeleteNamespace(response *smithyhttp.Respons case strings.EqualFold("NamespaceNotFound", errorCode): return awsAwsjson11_deserializeErrorNamespaceNotFound(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceInUse", errorCode): return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody) @@ -733,6 +748,9 @@ func awsAwsjson11_deserializeOpErrorDeleteService(response *smithyhttp.Response, case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceInUse", errorCode): return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody) @@ -856,6 +874,9 @@ func awsAwsjson11_deserializeOpErrorDeregisterInstance(response *smithyhttp.Resp case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceInUse", errorCode): return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody) @@ -1096,6 +1117,9 @@ func awsAwsjson11_deserializeOpErrorGetInstance(response *smithyhttp.Response, m case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ServiceNotFound", errorCode): return awsAwsjson11_deserializeErrorServiceNotFound(response, errorBody) @@ -1213,6 +1237,9 @@ func awsAwsjson11_deserializeOpErrorGetInstancesHealthStatus(response *smithyhtt case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ServiceNotFound", errorCode): return awsAwsjson11_deserializeErrorServiceNotFound(response, errorBody) @@ -1444,6 +1471,9 @@ func awsAwsjson11_deserializeOpErrorGetOperation(response *smithyhttp.Response, case strings.EqualFold("OperationNotFound", errorCode): return awsAwsjson11_deserializeErrorOperationNotFound(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1555,6 +1585,9 @@ func awsAwsjson11_deserializeOpErrorGetService(response *smithyhttp.Response, me case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ServiceNotFound", errorCode): return awsAwsjson11_deserializeErrorServiceNotFound(response, errorBody) @@ -1669,6 +1702,9 @@ func awsAwsjson11_deserializeOpErrorListInstances(response *smithyhttp.Response, case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ServiceNotFound", errorCode): return awsAwsjson11_deserializeErrorServiceNotFound(response, errorBody) @@ -1783,6 +1819,9 @@ func awsAwsjson11_deserializeOpErrorListNamespaces(response *smithyhttp.Response case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1894,6 +1933,9 @@ func awsAwsjson11_deserializeOpErrorListOperations(response *smithyhttp.Response case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2005,6 +2047,9 @@ func awsAwsjson11_deserializeOpErrorListServices(response *smithyhttp.Response, case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2116,6 +2161,9 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -2233,6 +2281,9 @@ func awsAwsjson11_deserializeOpErrorRegisterInstance(response *smithyhttp.Respon case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceInUse", errorCode): return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody) @@ -2353,6 +2404,9 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -2470,6 +2524,9 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -2590,6 +2647,9 @@ func awsAwsjson11_deserializeOpErrorUpdateHttpNamespace(response *smithyhttp.Res case strings.EqualFold("NamespaceNotFound", errorCode): return awsAwsjson11_deserializeErrorNamespaceNotFound(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceInUse", errorCode): return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody) @@ -2688,6 +2748,9 @@ func awsAwsjson11_deserializeOpErrorUpdateInstanceCustomHealthStatus(response *s case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ServiceNotFound", errorCode): return awsAwsjson11_deserializeErrorServiceNotFound(response, errorBody) @@ -2808,6 +2871,9 @@ func awsAwsjson11_deserializeOpErrorUpdatePrivateDnsNamespace(response *smithyht case strings.EqualFold("NamespaceNotFound", errorCode): return awsAwsjson11_deserializeErrorNamespaceNotFound(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceInUse", errorCode): return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody) @@ -2928,6 +2994,9 @@ func awsAwsjson11_deserializeOpErrorUpdatePublicDnsNamespace(response *smithyhtt case strings.EqualFold("NamespaceNotFound", errorCode): return awsAwsjson11_deserializeErrorNamespaceNotFound(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ResourceInUse", errorCode): return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody) @@ -3045,6 +3114,9 @@ func awsAwsjson11_deserializeOpErrorUpdateService(response *smithyhttp.Response, case strings.EqualFold("InvalidInput", errorCode): return awsAwsjson11_deserializeErrorInvalidInput(response, errorBody) + case strings.EqualFold("RequestLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorRequestLimitExceeded(response, errorBody) + case strings.EqualFold("ServiceNotFound", errorCode): return awsAwsjson11_deserializeErrorServiceNotFound(response, errorBody) diff --git a/service/sesv2/types/enums.go b/service/sesv2/types/enums.go index 8a7e71dc3ab..d1c7760deae 100644 --- a/service/sesv2/types/enums.go +++ b/service/sesv2/types/enums.go @@ -540,6 +540,7 @@ const ( RecommendationTypeDkim RecommendationType = "DKIM" RecommendationTypeDmarc RecommendationType = "DMARC" RecommendationTypeSpf RecommendationType = "SPF" + RecommendationTypeBimi RecommendationType = "BIMI" ) // Values returns all known values for RecommendationType. Note that this can be @@ -550,6 +551,7 @@ func (RecommendationType) Values() []RecommendationType { "DKIM", "DMARC", "SPF", + "BIMI", } } diff --git a/service/sesv2/types/types.go b/service/sesv2/types/types.go index 4e7b3a8aa04..bbdd39aa24c 100644 --- a/service/sesv2/types/types.go +++ b/service/sesv2/types/types.go @@ -882,7 +882,53 @@ type EmailTemplateMetadata struct { // S3 for long-term storage. type EventDestination struct { - // The types of events that Amazon SES sends to the specified event destinations. + // The types of events that Amazon SES sends to the specified event + // destinations. + // + // * SEND - The send request was successful and SES will attempt to + // deliver the message to the recipient’s mail server. (If account-level or global + // suppression is being used, SES will still count it as a send, but delivery is + // suppressed.) + // + // * REJECT - SES accepted the email, but determined that it + // contained a virus and didn’t attempt to deliver it to the recipient’s mail + // server. + // + // * BOUNCE - (Hard bounce) The recipient's mail server permanently + // rejected the email. (Soft bounces are only included when SES fails to deliver + // the email after retrying for a period of time.) + // + // * COMPLAINT - The email was + // successfully delivered to the recipient’s mail server, but the recipient marked + // it as spam. + // + // * DELIVERY - SES successfully delivered the email to the + // recipient's mail server. + // + // * OPEN - The recipient received the message and opened + // it in their email client. + // + // * CLICK - The recipient clicked one or more links in + // the email. + // + // * RENDERING_FAILURE - The email wasn't sent because of a template + // rendering issue. This event type can occur when template data is missing, or + // when there is a mismatch between template parameters and data. (This event type + // only occurs when you send email using the SendTemplatedEmail + // (https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html) + // or SendBulkTemplatedEmail + // (https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html) + // API operations.) + // + // * DELIVERY_DELAY - The email couldn't be delivered to the + // recipient’s mail server because a temporary issue occurred. Delivery delays can + // occur, for example, when the recipient's inbox is full, or when the receiving + // email server experiences a transient issue. + // + // * SUBSCRIPTION - The email was + // successfully delivered, but the recipient updated their subscription preferences + // by clicking on an unsubscribe link as part of your subscription management + // (https://docs.aws.amazon.com/ses/latest/dg/sending-email-subscription-management.html). // // This member is required. MatchingEventTypes []EventType @@ -1426,7 +1472,7 @@ type Recommendation struct { // The recommendation status, with values like OPEN or FIXED. Status RecommendationStatus - // The recommendation type, with values like DKIM, SPF or DMARC. + // The recommendation type, with values like DKIM, SPF, DMARC or BIMI. Type RecommendationType noSmithyDocumentSerde