From 6e8d17fd21083f2ec6ec6139f89b35c841994932 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Fri, 3 Feb 2023 19:16:51 +0000 Subject: [PATCH] Regenerated Clients --- .../81bc9a04f34a4ac9b3e82bbfc17f7f2d.json | 8 + .../82cdc00756b241eca3286a547a0cb152.json | 8 + .../internal/endpoints/endpoints.go | 18 + service/proton/api_op_GetResourcesSummary.go | 127 +++++++ service/proton/deserializers.go | 318 ++++++++++++++++++ service/proton/generated.json | 1 + service/proton/serializers.go | 62 ++++ service/proton/types/types.go | 61 ++++ service/redshift/api_op_CreateCluster.go | 17 +- .../api_op_DescribeClusterSecurityGroups.go | 6 +- .../api_op_DescribeEndpointAuthorization.go | 2 +- .../redshift/api_op_DescribeLoggingStatus.go | 4 +- service/redshift/api_op_DisableLogging.go | 4 +- service/redshift/api_op_EnableLogging.go | 8 +- .../api_op_RestoreFromClusterSnapshot.go | 4 +- .../api_op_RestoreTableFromClusterSnapshot.go | 4 +- .../internal/endpoints/endpoints.go | 15 + 17 files changed, 647 insertions(+), 20 deletions(-) create mode 100644 .changelog/81bc9a04f34a4ac9b3e82bbfc17f7f2d.json create mode 100644 .changelog/82cdc00756b241eca3286a547a0cb152.json create mode 100644 service/proton/api_op_GetResourcesSummary.go diff --git a/.changelog/81bc9a04f34a4ac9b3e82bbfc17f7f2d.json b/.changelog/81bc9a04f34a4ac9b3e82bbfc17f7f2d.json new file mode 100644 index 00000000000..3b67b248bde --- /dev/null +++ b/.changelog/81bc9a04f34a4ac9b3e82bbfc17f7f2d.json @@ -0,0 +1,8 @@ +{ + "id": "81bc9a04-f34a-4ac9-b3e8-2bbfc17f7f2d", + "type": "feature", + "description": "Add new GetResourcesSummary API", + "modules": [ + "service/proton" + ] +} \ No newline at end of file diff --git a/.changelog/82cdc00756b241eca3286a547a0cb152.json b/.changelog/82cdc00756b241eca3286a547a0cb152.json new file mode 100644 index 00000000000..84428529a4b --- /dev/null +++ b/.changelog/82cdc00756b241eca3286a547a0cb152.json @@ -0,0 +1,8 @@ +{ + "id": "82cdc007-56b2-41ec-a328-6a547a0cb152", + "type": "documentation", + "description": "Corrects descriptions of the parameters for the API operations RestoreFromClusterSnapshot, RestoreTableFromClusterSnapshot, and CreateCluster.", + "modules": [ + "service/redshift" + ] +} \ No newline at end of file diff --git a/service/computeoptimizer/internal/endpoints/endpoints.go b/service/computeoptimizer/internal/endpoints/endpoints.go index d47cd1ee51c..ddf23777745 100644 --- a/service/computeoptimizer/internal/endpoints/endpoints.go +++ b/service/computeoptimizer/internal/endpoints/endpoints.go @@ -434,5 +434,23 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-gov-east-1", + }: endpoints.Endpoint{ + Hostname: "compute-optimizer-fips.us-gov-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-east-1", + }, + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + }: endpoints.Endpoint{ + Hostname: "compute-optimizer-fips.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + }, + }, }, } diff --git a/service/proton/api_op_GetResourcesSummary.go b/service/proton/api_op_GetResourcesSummary.go new file mode 100644 index 00000000000..c2f2a1961ed --- /dev/null +++ b/service/proton/api_op_GetResourcesSummary.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +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/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get counts of Proton resources. For infrastructure-provisioning resources +// (environments, services, service instances, pipelines), the action returns +// staleness counts. A resource is stale when it's behind the recommended version +// of the Proton template that it uses and it needs an update to become current. +// The action returns staleness counts (counts of resources that are up-to-date, +// behind a template major version, or behind a template minor version), the total +// number of resources, and the number of resources that are in a failed state, +// grouped by resource type. Components, environments, and service templates are +// exceptions—see the components, environments, and serviceTemplates field +// descriptions. For context, the action also returns the total number of each type +// of Proton template in the Amazon Web Services account. For more information, see +// Proton dashboard +// (https://docs.aws.amazon.com/proton/latest/userguide/monitoring-dashboard.html) +// in the Proton User Guide. +func (c *Client) GetResourcesSummary(ctx context.Context, params *GetResourcesSummaryInput, optFns ...func(*Options)) (*GetResourcesSummaryOutput, error) { + if params == nil { + params = &GetResourcesSummaryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResourcesSummary", params, optFns, c.addOperationGetResourcesSummaryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResourcesSummaryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResourcesSummaryInput struct { + noSmithyDocumentSerde +} + +type GetResourcesSummaryOutput struct { + + // Summary counts of each Proton resource type. + // + // This member is required. + Counts *types.CountsSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetResourcesSummaryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetResourcesSummary{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetResourcesSummary{}, 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcesSummary(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_opGetResourcesSummary(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "GetResourcesSummary", + } +} diff --git a/service/proton/deserializers.go b/service/proton/deserializers.go index 71b00636c2c..1aca56bfc52 100644 --- a/service/proton/deserializers.go +++ b/service/proton/deserializers.go @@ -4168,6 +4168,126 @@ func awsAwsjson10_deserializeOpErrorGetRepositorySyncStatus(response *smithyhttp } } +type awsAwsjson10_deserializeOpGetResourcesSummary struct { +} + +func (*awsAwsjson10_deserializeOpGetResourcesSummary) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpGetResourcesSummary) 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, awsAwsjson10_deserializeOpErrorGetResourcesSummary(response, &metadata) + } + output := &GetResourcesSummaryOutput{} + 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 = awsAwsjson10_deserializeOpDocumentGetResourcesSummaryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorGetResourcesSummary(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson10_deserializeOpGetService struct { } @@ -10200,6 +10320,72 @@ func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } +func awsAwsjson10_deserializeDocumentCountsSummary(v **types.CountsSummary, 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.CountsSummary + if *v == nil { + sv = &types.CountsSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "components": + if err := awsAwsjson10_deserializeDocumentResourceCountsSummary(&sv.Components, value); err != nil { + return err + } + + case "environments": + if err := awsAwsjson10_deserializeDocumentResourceCountsSummary(&sv.Environments, value); err != nil { + return err + } + + case "environmentTemplates": + if err := awsAwsjson10_deserializeDocumentResourceCountsSummary(&sv.EnvironmentTemplates, value); err != nil { + return err + } + + case "pipelines": + if err := awsAwsjson10_deserializeDocumentResourceCountsSummary(&sv.Pipelines, value); err != nil { + return err + } + + case "serviceInstances": + if err := awsAwsjson10_deserializeDocumentResourceCountsSummary(&sv.ServiceInstances, value); err != nil { + return err + } + + case "services": + if err := awsAwsjson10_deserializeDocumentResourceCountsSummary(&sv.Services, value); err != nil { + return err + } + + case "serviceTemplates": + if err := awsAwsjson10_deserializeDocumentResourceCountsSummary(&sv.ServiceTemplates, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentEnvironment(v **types.Environment, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12272,6 +12458,102 @@ func awsAwsjson10_deserializeDocumentRepositorySyncEvents(v *[]types.RepositoryS return nil } +func awsAwsjson10_deserializeDocumentResourceCountsSummary(v **types.ResourceCountsSummary, 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.ResourceCountsSummary + if *v == nil { + sv = &types.ResourceCountsSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "behindMajor": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BehindMajor = ptr.Int32(int32(i64)) + } + + case "behindMinor": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BehindMinor = ptr.Int32(int32(i64)) + } + + case "failed": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Failed = ptr.Int32(int32(i64)) + } + + case "total": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Total = ptr.Int32(int32(i64)) + } + + case "upToDate": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.UpToDate = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15502,6 +15784,42 @@ func awsAwsjson10_deserializeOpDocumentGetRepositorySyncStatusOutput(v **GetRepo return nil } +func awsAwsjson10_deserializeOpDocumentGetResourcesSummaryOutput(v **GetResourcesSummaryOutput, 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 *GetResourcesSummaryOutput + if *v == nil { + sv = &GetResourcesSummaryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "counts": + if err := awsAwsjson10_deserializeDocumentCountsSummary(&sv.Counts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentGetServiceInstanceOutput(v **GetServiceInstanceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/proton/generated.json b/service/proton/generated.json index f326fb9041a..ca7cb4c0f31 100644 --- a/service/proton/generated.json +++ b/service/proton/generated.json @@ -42,6 +42,7 @@ "api_op_GetEnvironmentTemplateVersion.go", "api_op_GetRepository.go", "api_op_GetRepositorySyncStatus.go", + "api_op_GetResourcesSummary.go", "api_op_GetService.go", "api_op_GetServiceInstance.go", "api_op_GetServiceTemplate.go", diff --git a/service/proton/serializers.go b/service/proton/serializers.go index a7afa9d2624..bbcaa1570f2 100644 --- a/service/proton/serializers.go +++ b/service/proton/serializers.go @@ -1830,6 +1830,61 @@ func (m *awsAwsjson10_serializeOpGetRepositorySyncStatus) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpGetResourcesSummary struct { +} + +func (*awsAwsjson10_serializeOpGetResourcesSummary) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetResourcesSummary) 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.(*GetResourcesSummaryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetResourcesSummary") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetResourcesSummaryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpGetService struct { } @@ -5188,6 +5243,13 @@ func awsAwsjson10_serializeOpDocumentGetRepositorySyncStatusInput(v *GetReposito return nil } +func awsAwsjson10_serializeOpDocumentGetResourcesSummaryInput(v *GetResourcesSummaryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + func awsAwsjson10_serializeOpDocumentGetServiceInput(v *GetServiceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/proton/types/types.go b/service/proton/types/types.go index 6caf4612229..e875c0c8502 100644 --- a/service/proton/types/types.go +++ b/service/proton/types/types.go @@ -183,6 +183,40 @@ type ComponentSummary struct { noSmithyDocumentSerde } +// Summary counts of each Proton resource type. +type CountsSummary struct { + + // The total number of components in the Amazon Web Services account. The semantics + // of the components field are different from the semantics of results for other + // infrastructure-provisioning resources. That's because at this time components + // don't have associated templates, therefore they don't have the concept of + // staleness. The components object will only contain total and failed members. + Components *ResourceCountsSummary + + // The total number of environment templates in the Amazon Web Services account. + EnvironmentTemplates *ResourceCountsSummary + + // The staleness counts for Proton environments in the Amazon Web Services account. + // The environments object will only contain total members. + Environments *ResourceCountsSummary + + // The staleness counts for Proton pipelines in the Amazon Web Services account. + Pipelines *ResourceCountsSummary + + // The staleness counts for Proton service instances in the Amazon Web Services + // account. + ServiceInstances *ResourceCountsSummary + + // The total number of service templates in the Amazon Web Services account. The + // serviceTemplates object will only contain total members. + ServiceTemplates *ResourceCountsSummary + + // The staleness counts for Proton services in the Amazon Web Services account. + Services *ResourceCountsSummary + + noSmithyDocumentSerde +} + // Detailed data of an Proton environment resource. An Proton environment is a set // of resources shared across Proton services. type Environment struct { @@ -920,6 +954,33 @@ type RepositorySyncEvent struct { noSmithyDocumentSerde } +// Summary counts of each Proton resource types. +type ResourceCountsSummary struct { + + // The total number of resources of this type in the Amazon Web Services account. + // + // This member is required. + Total *int32 + + // The number of resources of this type in the Amazon Web Services account that + // need a major template version update. + BehindMajor *int32 + + // The number of resources of this type in the Amazon Web Services account that + // need a minor template version update. + BehindMinor *int32 + + // The number of resources of this type in the Amazon Web Services account that + // failed to deploy. + Failed *int32 + + // The number of resources of this type in the Amazon Web Services account that are + // up-to-date with their template. + UpToDate *int32 + + noSmithyDocumentSerde +} + // Detail data for a resource sync attempt activated by a push to a repository. type ResourceSyncAttempt struct { diff --git a/service/redshift/api_op_CreateCluster.go b/service/redshift/api_op_CreateCluster.go index 4e879f9a670..8c0ec0169b6 100644 --- a/service/redshift/api_op_CreateCluster.go +++ b/service/redshift/api_op_CreateCluster.go @@ -81,13 +81,20 @@ type CreateClusterInput struct { // The user name associated with the admin user account for the cluster that is // being created. Constraints: // - // * Must be 1 - 128 alphanumeric characters. The user - // name can't be PUBLIC. + // * Must be 1 - 128 alphanumeric characters or + // hyphens. The user name can't be PUBLIC. // - // * First character must be a letter. + // * Must contain only lowercase letters, + // numbers, underscore, plus sign, period (dot), at symbol (@), or hyphen. + // + // * The + // first character must be a letter. + // + // * Must not contain a colon (:) or a slash + // (/). // - // * Cannot be a - // reserved word. A list of reserved words can be found in Reserved Words + // * Cannot be a reserved word. A list of reserved words can be found in + // Reserved Words // (https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html) in the // Amazon Redshift Database Developer Guide. // diff --git a/service/redshift/api_op_DescribeClusterSecurityGroups.go b/service/redshift/api_op_DescribeClusterSecurityGroups.go index 34004696e7f..1253db5f5f9 100644 --- a/service/redshift/api_op_DescribeClusterSecurityGroups.go +++ b/service/redshift/api_op_DescribeClusterSecurityGroups.go @@ -42,8 +42,8 @@ func (c *Client) DescribeClusterSecurityGroups(ctx context.Context, params *Desc type DescribeClusterSecurityGroupsInput struct { // The name of a cluster security group for which you are requesting details. You - // can specify either the Marker parameter or a ClusterSecurityGroupName parameter, - // but not both. Example: securitygroup1 + // must specify either the Marker parameter or a ClusterSecurityGroupName + // parameter, but not both. Example: securitygroup1 ClusterSecurityGroupName *string // An optional parameter that specifies the starting point to return a set of @@ -51,7 +51,7 @@ type DescribeClusterSecurityGroupsInput struct { // exceed the value specified in MaxRecords, Amazon Web Services returns a value in // the Marker field of the response. You can retrieve the next set of response // records by providing the returned marker value in the Marker parameter and - // retrying the request. Constraints: You can specify either the + // retrying the request. Constraints: You must specify either the // ClusterSecurityGroupName parameter or the Marker parameter, but not both. Marker *string diff --git a/service/redshift/api_op_DescribeEndpointAuthorization.go b/service/redshift/api_op_DescribeEndpointAuthorization.go index a479f5520b7..a7d4907c4af 100644 --- a/service/redshift/api_op_DescribeEndpointAuthorization.go +++ b/service/redshift/api_op_DescribeEndpointAuthorization.go @@ -30,7 +30,7 @@ func (c *Client) DescribeEndpointAuthorization(ctx context.Context, params *Desc type DescribeEndpointAuthorizationInput struct { - // The AAmazon Web Services account ID of either the cluster owner (grantor) or + // The Amazon Web Services account ID of either the cluster owner (grantor) or // grantee. If Grantee parameter is true, then the Account value is of the grantor. Account *string diff --git a/service/redshift/api_op_DescribeLoggingStatus.go b/service/redshift/api_op_DescribeLoggingStatus.go index a48db30cbcd..1bfb40cb6ec 100644 --- a/service/redshift/api_op_DescribeLoggingStatus.go +++ b/service/redshift/api_op_DescribeLoggingStatus.go @@ -58,8 +58,8 @@ type DescribeLoggingStatusOutput struct { // The log destination type. An enum with possible values of s3 and cloudwatch. LogDestinationType types.LogDestinationType - // The collection of exported log types. Log types include the connection log, user - // log and user activity log. + // The collection of exported log types. Possible values are connectionlog, + // useractivitylog, and userlog. LogExports []string // true if logging is on, false if logging is off. diff --git a/service/redshift/api_op_DisableLogging.go b/service/redshift/api_op_DisableLogging.go index 9acc7eb9965..c4fbcfea351 100644 --- a/service/redshift/api_op_DisableLogging.go +++ b/service/redshift/api_op_DisableLogging.go @@ -58,8 +58,8 @@ type DisableLoggingOutput struct { // The log destination type. An enum with possible values of s3 and cloudwatch. LogDestinationType types.LogDestinationType - // The collection of exported log types. Log types include the connection log, user - // log and user activity log. + // The collection of exported log types. Possible values are connectionlog, + // useractivitylog, and userlog. LogExports []string // true if logging is on, false if logging is off. diff --git a/service/redshift/api_op_EnableLogging.go b/service/redshift/api_op_EnableLogging.go index 3aa81eaa0ba..0f20561bb28 100644 --- a/service/redshift/api_op_EnableLogging.go +++ b/service/redshift/api_op_EnableLogging.go @@ -49,8 +49,8 @@ type EnableLoggingInput struct { // The log destination type. An enum with possible values of s3 and cloudwatch. LogDestinationType types.LogDestinationType - // The collection of exported log types. Log types include the connection log, user - // log and user activity log. + // The collection of exported log types. Possible values are connectionlog, + // useractivitylog, and userlog. LogExports []string // The prefix applied to the log file names. Constraints: @@ -94,8 +94,8 @@ type EnableLoggingOutput struct { // The log destination type. An enum with possible values of s3 and cloudwatch. LogDestinationType types.LogDestinationType - // The collection of exported log types. Log types include the connection log, user - // log and user activity log. + // The collection of exported log types. Possible values are connectionlog, + // useractivitylog, and userlog. LogExports []string // true if logging is on, false if logging is off. diff --git a/service/redshift/api_op_RestoreFromClusterSnapshot.go b/service/redshift/api_op_RestoreFromClusterSnapshot.go index 5670977418a..3ad1d566cec 100644 --- a/service/redshift/api_op_RestoreFromClusterSnapshot.go +++ b/service/redshift/api_op_RestoreFromClusterSnapshot.go @@ -214,7 +214,7 @@ type RestoreFromClusterSnapshotInput struct { ReservedNodeId *string // The Amazon Resource Name (ARN) of the snapshot associated with the message to - // restore from a cluster. You can specify this parameter or snapshotIdentifier, + // restore from a cluster. You must specify this parameter or snapshotIdentifier, // but not both. SnapshotArn *string @@ -224,7 +224,7 @@ type RestoreFromClusterSnapshotInput struct { SnapshotClusterIdentifier *string // The name of the snapshot from which to create the new cluster. This parameter - // isn't case sensitive. You can specify this parameter or snapshotArn, but not + // isn't case sensitive. You must specify this parameter or snapshotArn, but not // both. Example: my-snapshot-id SnapshotIdentifier *string diff --git a/service/redshift/api_op_RestoreTableFromClusterSnapshot.go b/service/redshift/api_op_RestoreTableFromClusterSnapshot.go index 39506edc17d..55c387d06bb 100644 --- a/service/redshift/api_op_RestoreTableFromClusterSnapshot.go +++ b/service/redshift/api_op_RestoreTableFromClusterSnapshot.go @@ -21,7 +21,9 @@ import ( // RestoreTableFromClusterSnapshot. When you have renamed your original table, then // you can pass the original name of the table as the NewTableName parameter value // in the call to RestoreTableFromClusterSnapshot. This way, you can replace the -// original table with the table created from the snapshot. +// original table with the table created from the snapshot. You can't use this +// operation to restore tables with interleaved sort keys +// (https://docs.aws.amazon.com/redshift/latest/dg/t_Sorting_data.html#t_Sorting_data-interleaved). func (c *Client) RestoreTableFromClusterSnapshot(ctx context.Context, params *RestoreTableFromClusterSnapshotInput, optFns ...func(*Options)) (*RestoreTableFromClusterSnapshotOutput, error) { if params == nil { params = &RestoreTableFromClusterSnapshotInput{} diff --git a/service/timestreamwrite/internal/endpoints/endpoints.go b/service/timestreamwrite/internal/endpoints/endpoints.go index 17e916d13db..9ba35c4ced6 100644 --- a/service/timestreamwrite/internal/endpoints/endpoints.go +++ b/service/timestreamwrite/internal/endpoints/endpoints.go @@ -354,6 +354,21 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ingest.timestream.us-gov-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1-fips", + }: endpoints.Endpoint{ + Hostname: "ingest.timestream.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, }, }, }