diff --git a/.changelog/03b4633602aa466e93e2411de6a97a35.json b/.changelog/03b4633602aa466e93e2411de6a97a35.json new file mode 100644 index 00000000000..fa8056793c3 --- /dev/null +++ b/.changelog/03b4633602aa466e93e2411de6a97a35.json @@ -0,0 +1,8 @@ +{ + "id": "03b46336-02aa-466e-93e2-411de6a97a35", + "type": "feature", + "description": "Provides support for overriding endpoint when region is \"snow\". This will enable bucket APIs for Amazon S3 Compatible storage on Snow Family devices.", + "modules": [ + "service/s3control" + ] +} \ No newline at end of file diff --git a/.changelog/188abe0e48924e90a966f24394073970.json b/.changelog/188abe0e48924e90a966f24394073970.json new file mode 100644 index 00000000000..ac3979dd782 --- /dev/null +++ b/.changelog/188abe0e48924e90a966f24394073970.json @@ -0,0 +1,8 @@ +{ + "id": "188abe0e-4892-4e90-a966-f24394073970", + "type": "documentation", + "description": "Documentation updates for Secrets Manager", + "modules": [ + "service/secretsmanager" + ] +} \ No newline at end of file diff --git a/.changelog/317ef553e24544ffb78def09377e404e.json b/.changelog/317ef553e24544ffb78def09377e404e.json new file mode 100644 index 00000000000..c64219377ed --- /dev/null +++ b/.changelog/317ef553e24544ffb78def09377e404e.json @@ -0,0 +1,8 @@ +{ + "id": "317ef553-e245-44ff-b78d-ef09377e404e", + "type": "feature", + "description": "This release supports native document models for custom classification, in addition to plain-text models. You train native document models using documents (PDF, Word, images) in their native format.", + "modules": [ + "service/comprehend" + ] +} \ No newline at end of file diff --git a/.changelog/406b8b5c09bb4e7a849cb554af019cde.json b/.changelog/406b8b5c09bb4e7a849cb554af019cde.json new file mode 100644 index 00000000000..81b9ffbcdc3 --- /dev/null +++ b/.changelog/406b8b5c09bb4e7a849cb554af019cde.json @@ -0,0 +1,8 @@ +{ + "id": "406b8b5c-09bb-4e7a-849c-b554af019cde", + "type": "feature", + "description": "This release supports the Account Setting \"TagResourceAuthorization\" that allows for enhanced Tagging security controls.", + "modules": [ + "service/ecs" + ] +} \ No newline at end of file diff --git a/.changelog/62296087451f4f38871b6cc4963f4e16.json b/.changelog/62296087451f4f38871b6cc4963f4e16.json new file mode 100644 index 00000000000..01561056a6b --- /dev/null +++ b/.changelog/62296087451f4f38871b6cc4963f4e16.json @@ -0,0 +1,8 @@ +{ + "id": "62296087-451f-4f38-871b-6cc4963f4e16", + "type": "documentation", + "description": "Adds support for the ImageId parameter of CreateCustomDBEngineVersion to RDS Custom for Oracle", + "modules": [ + "service/rds" + ] +} \ No newline at end of file diff --git a/.changelog/73f168f1fb36433480fbd46e4108310d.json b/.changelog/73f168f1fb36433480fbd46e4108310d.json new file mode 100644 index 00000000000..21526f34bd5 --- /dev/null +++ b/.changelog/73f168f1fb36433480fbd46e4108310d.json @@ -0,0 +1,8 @@ +{ + "id": "73f168f1-fb36-4334-80fb-d46e4108310d", + "type": "feature", + "description": "This release adds support for customer managed permissions. Customer managed permissions enable customers to author and manage tailored permissions for resources shared using RAM.", + "modules": [ + "service/ram" + ] +} \ No newline at end of file diff --git a/.changelog/8476afa16b3c495aae3630d2cbc536dc.json b/.changelog/8476afa16b3c495aae3630d2cbc536dc.json new file mode 100644 index 00000000000..41dae813d91 --- /dev/null +++ b/.changelog/8476afa16b3c495aae3630d2cbc536dc.json @@ -0,0 +1,8 @@ +{ + "id": "8476afa1-6b3c-495a-ae36-30d2cbc536dc", + "type": "feature", + "description": "Provides support for \"Snow\" Storage class.", + "modules": [ + "service/s3" + ] +} \ No newline at end of file diff --git a/.changelog/a8e641f4c46141cb931ab43bc4a01943.json b/.changelog/a8e641f4c46141cb931ab43bc4a01943.json new file mode 100644 index 00000000000..d96c3e6d33c --- /dev/null +++ b/.changelog/a8e641f4c46141cb931ab43bc4a01943.json @@ -0,0 +1,8 @@ +{ + "id": "a8e641f4-c461-41cb-931a-b43bc4a01943", + "type": "documentation", + "description": "Update that adds SDK code examples for Security Hub", + "modules": [ + "service/securityhub" + ] +} \ No newline at end of file diff --git a/service/applicationautoscaling/internal/endpoints/endpoints.go b/service/applicationautoscaling/internal/endpoints/endpoints.go index 196b275ea21..f9f98ef8c0c 100644 --- a/service/applicationautoscaling/internal/endpoints/endpoints.go +++ b/service/applicationautoscaling/internal/endpoints/endpoints.go @@ -354,13 +354,43 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "us-gov-east-1", }: endpoints.Endpoint{ + Hostname: "application-autoscaling.us-gov-east-1.amazonaws.com", Protocols: []string{"http", "https"}, }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "application-autoscaling.us-gov-east-1.amazonaws.com", + Protocols: []string{"http", "https"}, + }, + endpoints.EndpointKey{ + Region: "us-gov-east-1-fips", + }: endpoints.Endpoint{ + Hostname: "application-autoscaling.us-gov-east-1.amazonaws.com", + Protocols: []string{"http", "https"}, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{ + Hostname: "application-autoscaling.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "application-autoscaling.us-gov-west-1.amazonaws.com", + Protocols: []string{"http", "https"}, + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1-fips", + }: endpoints.Endpoint{ + Hostname: "application-autoscaling.us-gov-west-1.amazonaws.com", + Protocols: []string{"http", "https"}, + Deprecated: aws.TrueTernary, + }, }, }, } diff --git a/service/arczonalshift/internal/endpoints/endpoints.go b/service/arczonalshift/internal/endpoints/endpoints.go index a263ff2a7b7..51b5d7f5474 100644 --- a/service/arczonalshift/internal/endpoints/endpoints.go +++ b/service/arczonalshift/internal/endpoints/endpoints.go @@ -165,12 +165,18 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, diff --git a/service/comprehend/api_op_ClassifyDocument.go b/service/comprehend/api_op_ClassifyDocument.go index 52a6e33fb99..8f75c877c26 100644 --- a/service/comprehend/api_op_ClassifyDocument.go +++ b/service/comprehend/api_op_ClassifyDocument.go @@ -93,6 +93,13 @@ type ClassifyDocumentOutput struct { // and a comedy, all at the same time. Labels []types.DocumentLabel + // Warnings detected while processing the input document. The response includes a + // warning if there is a mismatch between the input document type and the model + // type associated with the endpoint that you specified. The response can also + // include warnings for individual pages that have a mismatch. The field is empty + // if the system generated no warnings. + Warnings []types.WarningsListItem + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/comprehend/api_op_CreateDocumentClassifier.go b/service/comprehend/api_op_CreateDocumentClassifier.go index 5abd23e4481..98f6cc08c14 100644 --- a/service/comprehend/api_op_CreateDocumentClassifier.go +++ b/service/comprehend/api_op_CreateDocumentClassifier.go @@ -13,10 +13,9 @@ import ( ) // Creates a new document classifier that you can use to categorize documents. To -// create a classifier, you provide a set of training documents that labeled with -// the categories that you want to use. After the classifier is trained you can use -// it to categorize a set of labeled documents into the categories. For more -// information, see Document Classification (https://docs.aws.amazon.com/comprehend/latest/dg/how-document-classification.html) +// create a classifier, you provide a set of training documents that are labeled +// with the categories that you want to use. For more information, see Training +// classifier models (https://docs.aws.amazon.com/comprehend/latest/dg/training-classifier-model.html) // in the Comprehend Developer Guide. func (c *Client) CreateDocumentClassifier(ctx context.Context, params *CreateDocumentClassifierInput, optFns ...func(*Options)) (*CreateDocumentClassifierOutput, error) { if params == nil { @@ -87,8 +86,8 @@ type CreateDocumentClassifierInput struct { // ["value"]}' ModelPolicy *string - // Enables the addition of output results configuration parameters for custom - // classifier jobs. + // Specifies the location for the output files from a custom classifier job. This + // parameter is required for a request that creates a native classifier model. OutputDataConfig *types.DocumentClassifierOutputDataConfig // Tags to associate with the document classifier. A tag is a key-value pair that diff --git a/service/comprehend/deserializers.go b/service/comprehend/deserializers.go index c9b98cff74a..2d2fa52f536 100644 --- a/service/comprehend/deserializers.go +++ b/service/comprehend/deserializers.go @@ -7546,6 +7546,9 @@ func awsAwsjson11_deserializeOpErrorStartDocumentClassificationJob(response *smi case strings.EqualFold("KmsKeyValidationException", errorCode): return awsAwsjson11_deserializeErrorKmsKeyValidationException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -7675,6 +7678,9 @@ func awsAwsjson11_deserializeOpErrorStartDominantLanguageDetectionJob(response * case strings.EqualFold("KmsKeyValidationException", errorCode): return awsAwsjson11_deserializeErrorKmsKeyValidationException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) @@ -7798,6 +7804,9 @@ func awsAwsjson11_deserializeOpErrorStartEntitiesDetectionJob(response *smithyht case strings.EqualFold("KmsKeyValidationException", errorCode): return awsAwsjson11_deserializeErrorKmsKeyValidationException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -7927,6 +7936,9 @@ func awsAwsjson11_deserializeOpErrorStartEventsDetectionJob(response *smithyhttp case strings.EqualFold("KmsKeyValidationException", errorCode): return awsAwsjson11_deserializeErrorKmsKeyValidationException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) @@ -8173,6 +8185,9 @@ func awsAwsjson11_deserializeOpErrorStartKeyPhrasesDetectionJob(response *smithy case strings.EqualFold("KmsKeyValidationException", errorCode): return awsAwsjson11_deserializeErrorKmsKeyValidationException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) @@ -8296,6 +8311,9 @@ func awsAwsjson11_deserializeOpErrorStartPiiEntitiesDetectionJob(response *smith case strings.EqualFold("KmsKeyValidationException", errorCode): return awsAwsjson11_deserializeErrorKmsKeyValidationException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) @@ -8419,6 +8437,9 @@ func awsAwsjson11_deserializeOpErrorStartSentimentDetectionJob(response *smithyh case strings.EqualFold("KmsKeyValidationException", errorCode): return awsAwsjson11_deserializeErrorKmsKeyValidationException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) @@ -8542,6 +8563,9 @@ func awsAwsjson11_deserializeOpErrorStartTargetedSentimentDetectionJob(response case strings.EqualFold("KmsKeyValidationException", errorCode): return awsAwsjson11_deserializeErrorKmsKeyValidationException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) @@ -8665,6 +8689,9 @@ func awsAwsjson11_deserializeOpErrorStartTopicsDetectionJob(response *smithyhttp case strings.EqualFold("KmsKeyValidationException", errorCode): return awsAwsjson11_deserializeErrorKmsKeyValidationException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) @@ -12752,6 +12779,55 @@ func awsAwsjson11_deserializeDocumentDocumentClassifierAugmentedManifestsList(v return nil } +func awsAwsjson11_deserializeDocumentDocumentClassifierDocuments(v **types.DocumentClassifierDocuments, 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.DocumentClassifierDocuments + if *v == nil { + sv = &types.DocumentClassifierDocuments{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3Uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value) + } + sv.S3Uri = ptr.String(jtv) + } + + case "TestS3Uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value) + } + sv.TestS3Uri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentDocumentClassifierInputDataConfig(v **types.DocumentClassifierInputDataConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12788,6 +12864,25 @@ func awsAwsjson11_deserializeDocumentDocumentClassifierInputDataConfig(v **types sv.DataFormat = types.DocumentClassifierDataFormat(jtv) } + case "DocumentReaderConfig": + if err := awsAwsjson11_deserializeDocumentDocumentReaderConfig(&sv.DocumentReaderConfig, value); err != nil { + return err + } + + case "Documents": + if err := awsAwsjson11_deserializeDocumentDocumentClassifierDocuments(&sv.Documents, value); err != nil { + return err + } + + case "DocumentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentClassifierDocumentTypeFormat to be of type string, got %T instead", value) + } + sv.DocumentType = types.DocumentClassifierDocumentTypeFormat(jtv) + } + case "LabelDelimiter": if value != nil { jtv, ok := value.(string) @@ -18008,6 +18103,40 @@ func awsAwsjson11_deserializeDocumentListOfTargetedSentimentEntities(v *[]types. return nil } +func awsAwsjson11_deserializeDocumentListOfWarnings(v *[]types.WarningsListItem, 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.WarningsListItem + if *v == nil { + cv = []types.WarningsListItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.WarningsListItem + destAddr := &col + if err := awsAwsjson11_deserializeDocumentWarningsListItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentMentionSentiment(v **types.MentionSentiment, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -20415,6 +20544,68 @@ func awsAwsjson11_deserializeDocumentVpcConfig(v **types.VpcConfig, value interf return nil } +func awsAwsjson11_deserializeDocumentWarningsListItem(v **types.WarningsListItem, 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.WarningsListItem + if *v == nil { + sv = &types.WarningsListItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Page": + 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.Page = ptr.Int32(int32(i64)) + } + + case "WarnCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PageBasedWarningCode to be of type string, got %T instead", value) + } + sv.WarnCode = types.PageBasedWarningCode(jtv) + } + + case "WarnMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.WarnMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentBatchDetectDominantLanguageOutput(v **BatchDetectDominantLanguageOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -20708,6 +20899,11 @@ func awsAwsjson11_deserializeOpDocumentClassifyDocumentOutput(v **ClassifyDocume return err } + case "Warnings": + if err := awsAwsjson11_deserializeDocumentListOfWarnings(&sv.Warnings, value); err != nil { + return err + } + default: _, _ = key, value diff --git a/service/comprehend/serializers.go b/service/comprehend/serializers.go index 2eeccd46ab2..f15edf5227c 100644 --- a/service/comprehend/serializers.go +++ b/service/comprehend/serializers.go @@ -4977,6 +4977,23 @@ func awsAwsjson11_serializeDocumentDocumentClassifierAugmentedManifestsList(v [] return nil } +func awsAwsjson11_serializeDocumentDocumentClassifierDocuments(v *types.DocumentClassifierDocuments, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Uri != nil { + ok := object.Key("S3Uri") + ok.String(*v.S3Uri) + } + + if v.TestS3Uri != nil { + ok := object.Key("TestS3Uri") + ok.String(*v.TestS3Uri) + } + + return nil +} + func awsAwsjson11_serializeDocumentDocumentClassifierFilter(v *types.DocumentClassifierFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5020,6 +5037,25 @@ func awsAwsjson11_serializeDocumentDocumentClassifierInputDataConfig(v *types.Do ok.String(string(v.DataFormat)) } + if v.DocumentReaderConfig != nil { + ok := object.Key("DocumentReaderConfig") + if err := awsAwsjson11_serializeDocumentDocumentReaderConfig(v.DocumentReaderConfig, ok); err != nil { + return err + } + } + + if v.Documents != nil { + ok := object.Key("Documents") + if err := awsAwsjson11_serializeDocumentDocumentClassifierDocuments(v.Documents, ok); err != nil { + return err + } + } + + if len(v.DocumentType) > 0 { + ok := object.Key("DocumentType") + ok.String(string(v.DocumentType)) + } + if v.LabelDelimiter != nil { ok := object.Key("LabelDelimiter") ok.String(*v.LabelDelimiter) diff --git a/service/comprehend/types/enums.go b/service/comprehend/types/enums.go index 6a47f0cf436..32ee483ef68 100644 --- a/service/comprehend/types/enums.go +++ b/service/comprehend/types/enums.go @@ -114,6 +114,25 @@ func (DocumentClassifierDataFormat) Values() []DocumentClassifierDataFormat { } } +type DocumentClassifierDocumentTypeFormat string + +// Enum values for DocumentClassifierDocumentTypeFormat +const ( + DocumentClassifierDocumentTypeFormatPlainTextDocument DocumentClassifierDocumentTypeFormat = "PLAIN_TEXT_DOCUMENT" + DocumentClassifierDocumentTypeFormatSemiStructuredDocument DocumentClassifierDocumentTypeFormat = "SEMI_STRUCTURED_DOCUMENT" +) + +// Values returns all known values for DocumentClassifierDocumentTypeFormat. Note +// that this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (DocumentClassifierDocumentTypeFormat) Values() []DocumentClassifierDocumentTypeFormat { + return []DocumentClassifierDocumentTypeFormat{ + "PLAIN_TEXT_DOCUMENT", + "SEMI_STRUCTURED_DOCUMENT", + } +} + type DocumentClassifierMode string // Enum values for DocumentClassifierMode @@ -530,6 +549,24 @@ func (PageBasedErrorCode) Values() []PageBasedErrorCode { } } +type PageBasedWarningCode string + +// Enum values for PageBasedWarningCode +const ( + PageBasedWarningCodeInferencingPlaintextWithNativeTrainedModel PageBasedWarningCode = "INFERENCING_PLAINTEXT_WITH_NATIVE_TRAINED_MODEL" + PageBasedWarningCodeInferencingNativeDocumentWithPlaintextTrainedModel PageBasedWarningCode = "INFERENCING_NATIVE_DOCUMENT_WITH_PLAINTEXT_TRAINED_MODEL" +) + +// Values returns all known values for PageBasedWarningCode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PageBasedWarningCode) Values() []PageBasedWarningCode { + return []PageBasedWarningCode{ + "INFERENCING_PLAINTEXT_WITH_NATIVE_TRAINED_MODEL", + "INFERENCING_NATIVE_DOCUMENT_WITH_PLAINTEXT_TRAINED_MODEL", + } +} + type PartOfSpeechTagType string // Enum values for PartOfSpeechTagType diff --git a/service/comprehend/types/types.go b/service/comprehend/types/types.go index 3476e392387..cbfa02140bd 100644 --- a/service/comprehend/types/types.go +++ b/service/comprehend/types/types.go @@ -678,6 +678,22 @@ type DocumentClassificationJobProperties struct { noSmithyDocumentSerde } +// The location of the training documents. This parameter is required in a request +// to create a native classifier model. +type DocumentClassifierDocuments struct { + + // The S3 URI location of the training documents specified in the S3Uri CSV file. + // + // This member is required. + S3Uri *string + + // The S3 URI location of the test documents included in the TestS3Uri CSV file. + // This field is not required if you do not specify a test CSV file. + TestS3Uri *string + + noSmithyDocumentSerde +} + // Provides information for filtering a list of document classifiers. You can only // specify one filtering parameter in a request. For more information, see the // ListDocumentClassifiers operation. @@ -725,6 +741,29 @@ type DocumentClassifierInputDataConfig struct { // default. DataFormat DocumentClassifierDataFormat + // Provides configuration parameters to override the default actions for + // extracting text from PDF documents and image files. By default, Amazon + // Comprehend performs the following actions to extract text from files, based on + // the input file type: + // - Word files - Amazon Comprehend parser extracts the text. + // - Digital PDF files - Amazon Comprehend parser extracts the text. + // - Image files and scanned PDF files - Amazon Comprehend uses the Amazon + // Textract DetectDocumentText API to extract the text. + // DocumentReaderConfig does not apply to plain text files or Word files. For + // image files and PDF documents, you can override these default actions using the + // fields listed below. For more information, see Setting text extraction options (https://docs.aws.amazon.com/comprehend/latest/dg/idp-set-textract-options.html) + // in the Comprehend Developer Guide. + DocumentReaderConfig *DocumentReaderConfig + + // The type of input documents for training the model. Provide plain-text + // documents to create a plain-text model, and provide semi-structured documents to + // create a native model. + DocumentType DocumentClassifierDocumentTypeFormat + + // The S3 location of the training documents. This parameter is required in a + // request to create a native classifier model. + Documents *DocumentClassifierDocuments + // Indicates the delimiter used to separate each label for training a multi-label // classifier. The default delimiter between labels is a pipe (|). You can use a // different character as a delimiter (if it's an allowed character) by specifying @@ -750,7 +789,8 @@ type DocumentClassifierInputDataConfig struct { noSmithyDocumentSerde } -// Provides output results configuration parameters for custom classifier jobs. +// Provide the location for output data from a custom classifier job. This field +// is mandatory if you are training a native classifier model. type DocumentClassifierOutputDataConfig struct { // The Amazon S3 prefix for the data lake location of the flywheel statistics. @@ -768,13 +808,13 @@ type DocumentClassifierOutputDataConfig struct { KmsKeyId *string // When you use the OutputDataConfig object while creating a custom classifier, - // you specify the Amazon S3 location where you want to write the confusion matrix. - // The URI must be in the same Region as the API endpoint that you are calling. The - // location is used as the prefix for the actual location of this output file. When - // the custom classifier job is finished, the service creates the output file in a - // directory specific to the job. The S3Uri field contains the location of the - // output file, called output.tar.gz . It is a compressed archive that contains the - // confusion matrix. + // you specify the Amazon S3 location where you want to write the confusion matrix + // and other output files. The URI must be in the same Region as the API endpoint + // that you are calling. The location is used as the prefix for the actual location + // of this output file. When the custom classifier job is finished, the service + // creates the output file in a directory specific to the job. The S3Uri field + // contains the location of the output file, called output.tar.gz . It is a + // compressed archive that contains the confusion matrix. S3Uri *string noSmithyDocumentSerde @@ -834,8 +874,11 @@ type DocumentClassifierProperties struct { SourceModelArn *string // The status of the document classifier. If the status is TRAINED the classifier - // is ready to use. If the status is FAILED you can see additional information - // about why the classifier wasn't trained in the Message field. + // is ready to use. If the status is TRAINED_WITH_WARNINGS the classifier training + // succeeded, but you should review the warnings returned in the + // CreateDocumentClassifier response. If the status is FAILED you can see + // additional information about why the classifier wasn't trained in the Message + // field. Status ModelStatus // The time that the document classifier was submitted for training. @@ -935,8 +978,8 @@ type DocumentMetadata struct { // // DocumentReaderConfig does not apply to plain text files or Word files. For // image files and PDF documents, you can override these default actions using the -// fields listed below. For more information, see Setting text extraction options (https://docs.aws.amazon.com/comprehend/latest/dg/detecting-cer.html#detecting-cer-pdf) -// . +// fields listed below. For more information, see Setting text extraction options (https://docs.aws.amazon.com/comprehend/latest/dg/idp-set-textract-options.html) +// in the Comprehend Developer Guide. type DocumentReaderConfig struct { // This field defines the Amazon Textract API operation that Amazon Comprehend @@ -2759,4 +2802,24 @@ type VpcConfig struct { noSmithyDocumentSerde } +// The system identified one of the following warnings while processing the input +// document: +// - The document to classify is plain text, but the classifier is a native +// model. +// - The document to classify is semi-structured, but the classifier is a +// plain-text model. +type WarningsListItem struct { + + // Page number in the input document. + Page *int32 + + // The type of warning. + WarnCode PageBasedWarningCode + + // Text message associated with the warning. + WarnMessage *string + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/comprehend/validators.go b/service/comprehend/validators.go index 9232c3cdc2f..e919ab85ea6 100644 --- a/service/comprehend/validators.go +++ b/service/comprehend/validators.go @@ -1860,6 +1860,21 @@ func validateDocumentClassifierAugmentedManifestsList(v []types.AugmentedManifes } } +func validateDocumentClassifierDocuments(v *types.DocumentClassifierDocuments) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DocumentClassifierDocuments"} + if v.S3Uri == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Uri")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateDocumentClassifierInputDataConfig(v *types.DocumentClassifierInputDataConfig) error { if v == nil { return nil @@ -1870,6 +1885,16 @@ func validateDocumentClassifierInputDataConfig(v *types.DocumentClassifierInputD invalidParams.AddNested("AugmentedManifests", err.(smithy.InvalidParamsError)) } } + if v.Documents != nil { + if err := validateDocumentClassifierDocuments(v.Documents); err != nil { + invalidParams.AddNested("Documents", err.(smithy.InvalidParamsError)) + } + } + if v.DocumentReaderConfig != nil { + if err := validateDocumentReaderConfig(v.DocumentReaderConfig); err != nil { + invalidParams.AddNested("DocumentReaderConfig", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/ecs/api_op_PutAccountSetting.go b/service/ecs/api_op_PutAccountSetting.go index f0540ca2c6c..3509c6e2a00 100644 --- a/service/ecs/api_op_PutAccountSetting.go +++ b/service/ecs/api_op_PutAccountSetting.go @@ -34,7 +34,14 @@ import ( // containerInsights is turned on, any new clusters that are created will have // Container Insights turned on unless you disable it during cluster creation. For // more information, see CloudWatch Container Insights (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cloudwatch-container-insights.html) -// in the Amazon Elastic Container Service Developer Guide. +// in the Amazon Elastic Container Service Developer Guide. Amazon ECS is +// introducing tagging authorization for resource creation. Users must have +// permissions for actions that create the resource, such as ecsCreateCluster . If +// tags are specified when you create a resource, Amazon Web Services performs +// additional authorization to verify if users or roles have permissions to create +// tags. Therefore, you must grant explicit permissions to use the ecs:TagResource +// action. For more information, see Grant permission to tag resources on creation (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/supported-iam-actions-tagging.html) +// in the Amazon ECS Developer Guide. func (c *Client) PutAccountSetting(ctx context.Context, params *PutAccountSettingInput, optFns ...func(*Options)) (*PutAccountSettingOutput, error) { if params == nil { params = &PutAccountSettingInput{} @@ -61,7 +68,10 @@ type PutAccountSettingInput struct { // Amazon ECS container instances is affected. If containerInsights is specified, // the default setting for Amazon Web Services CloudWatch Container Insights for // your clusters is affected. If fargateFIPSMode is specified, Fargate FIPS 140 - // compliance is affected. + // compliance is affected. If tagResourceAuthorization is specified, the opt-in + // option for tagging resources on creation is affected. For information about the + // opt-in timeline, see Tagging authorization timeline (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#tag-resources) + // in the Amazon ECS Developer Guide. // // This member is required. Name types.SettingName diff --git a/service/ecs/api_op_PutAccountSettingDefault.go b/service/ecs/api_op_PutAccountSettingDefault.go index 7e1c1591c98..6c826003012 100644 --- a/service/ecs/api_op_PutAccountSettingDefault.go +++ b/service/ecs/api_op_PutAccountSettingDefault.go @@ -39,10 +39,14 @@ type PutAccountSettingDefaultInput struct { // awsvpcTrunking is specified, the ENI limit for your Amazon ECS container // instances is affected. If containerInsights is specified, the default setting // for Amazon Web Services CloudWatch Container Insights for your clusters is - // affected. When you specify fargateFIPSMode for the name and enabled for the - // value , Fargate uses FIPS-140 compliant cryptographic algorithms on your tasks. - // For more information about FIPS-140 compliance with Fargate, see Amazon Web - // Services Fargate Federal Information Processing Standard (FIPS) 140-2 compliance (https://docs.aws.amazon.com/AWSEC2ContainerServiceDocs/build/server-root/AmazonECS/latest/developerguide/ecs-fips-compliance.html) + // affected. If tagResourceAuthorization is specified, the opt-in option for + // tagging resources on creation is affected. For information about the opt-in + // timeline, see Tagging authorization timeline (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#tag-resources) + // in the Amazon ECS Developer Guide. When you specify fargateFIPSMode for the name + // and enabled for the value , Fargate uses FIPS-140 compliant cryptographic + // algorithms on your tasks. For more information about FIPS-140 compliance with + // Fargate, see Amazon Web Services Fargate Federal Information Processing + // Standard (FIPS) 140-2 compliance (https://docs.aws.amazon.com/AWSEC2ContainerServiceDocs/build/server-root/AmazonECS/latest/developerguide/ecs-fips-compliance.html) // in the Amazon Elastic Container Service Developer Guide. // // This member is required. diff --git a/service/ecs/api_op_RegisterTaskDefinition.go b/service/ecs/api_op_RegisterTaskDefinition.go index 86b774f6fc2..99849415f52 100644 --- a/service/ecs/api_op_RegisterTaskDefinition.go +++ b/service/ecs/api_op_RegisterTaskDefinition.go @@ -96,6 +96,7 @@ type RegisterTaskDefinitionInput struct { // in the Amazon ECS User Guide for Fargate. For tasks using the Fargate launch // type, the task requires the following platforms: // - Linux platform version 1.4.0 or later. + // - Windows platform version 1.0.0 or later. EphemeralStorage *types.EphemeralStorage // The Amazon Resource Name (ARN) of the task execution role that grants the diff --git a/service/ecs/api_op_StartTask.go b/service/ecs/api_op_StartTask.go index 2de69323ab5..c7d1d244e96 100644 --- a/service/ecs/api_op_StartTask.go +++ b/service/ecs/api_op_StartTask.go @@ -62,7 +62,8 @@ type StartTaskInput struct { EnableECSManagedTags bool // Whether or not the execute command functionality is turned on for the task. If - // true , this enables execute command functionality on all containers in the task. + // true , this turns on the execute command functionality on all containers in the + // task. EnableExecuteCommand bool // The name of the task group to associate with the task. The default value is the diff --git a/service/ecs/types/enums.go b/service/ecs/types/enums.go index 55926633c96..35f7b8c17d9 100644 --- a/service/ecs/types/enums.go +++ b/service/ecs/types/enums.go @@ -894,6 +894,7 @@ const ( SettingNameAwsvpcTrunking SettingName = "awsvpcTrunking" SettingNameContainerInsights SettingName = "containerInsights" SettingNameFargateFipsMode SettingName = "fargateFIPSMode" + SettingNameTagResourceAuthorization SettingName = "tagResourceAuthorization" ) // Values returns all known values for SettingName. Note that this can be expanded @@ -907,6 +908,7 @@ func (SettingName) Values() []SettingName { "awsvpcTrunking", "containerInsights", "fargateFIPSMode", + "tagResourceAuthorization", } } diff --git a/service/ecs/types/types.go b/service/ecs/types/types.go index defa03aa235..3f40dcf8acd 100644 --- a/service/ecs/types/types.go +++ b/service/ecs/types/types.go @@ -1706,6 +1706,7 @@ type EnvironmentFile struct { // in the Amazon ECS User Guide for Fargate. For tasks using the Fargate launch // type, the task requires the following platforms: // - Linux platform version 1.4.0 or later. +// - Windows platform version 1.0.0 or later. type EphemeralStorage struct { // The total amount, in GiB, of ephemeral storage to set for the task. The minimum diff --git a/service/ram/api_op_AcceptResourceShareInvitation.go b/service/ram/api_op_AcceptResourceShareInvitation.go index a7020c87bf0..825d4266a4b 100644 --- a/service/ram/api_op_AcceptResourceShareInvitation.go +++ b/service/ram/api_op_AcceptResourceShareInvitation.go @@ -32,7 +32,7 @@ func (c *Client) AcceptResourceShareInvitation(ctx context.Context, params *Acce type AcceptResourceShareInvitationInput struct { - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the invitation that you want to accept. // // This member is required. @@ -44,7 +44,8 @@ type AcceptResourceShareInvitationInput struct { // to a later call to an operation requires that you also pass the same value for // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) // . If you don't provide this value, then Amazon Web Services generates a random - // one for you. + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. ClientToken *string noSmithyDocumentSerde diff --git a/service/ram/api_op_AssociateResourceShare.go b/service/ram/api_op_AssociateResourceShare.go index 75a9e8c66ac..e655fbf8165 100644 --- a/service/ram/api_op_AssociateResourceShare.go +++ b/service/ram/api_op_AssociateResourceShare.go @@ -32,7 +32,7 @@ func (c *Client) AssociateResourceShare(ctx context.Context, params *AssociateRe type AssociateResourceShareInput struct { - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the resource share that you want to add principals or resources to. // // This member is required. @@ -44,7 +44,8 @@ type AssociateResourceShareInput struct { // to a later call to an operation requires that you also pass the same value for // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) // . If you don't provide this value, then Amazon Web Services generates a random - // one for you. + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. ClientToken *string // Specifies a list of principals to whom you want to the resource share. This can @@ -53,7 +54,7 @@ type AssociateResourceShareInput struct { // with the resource share. See AssociateResourceSharePermission . You can include // the following values: // - An Amazon Web Services account ID, for example: 123456789012 - // - An Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // - An Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of an organization in Organizations, for example: // organizations::123456789012:organization/o-exampleorgid // - An ARN of an organizational unit (OU) in Organizations, for example: diff --git a/service/ram/api_op_AssociateResourceSharePermission.go b/service/ram/api_op_AssociateResourceSharePermission.go index 9677114dec2..e42b0fda2db 100644 --- a/service/ram/api_op_AssociateResourceSharePermission.go +++ b/service/ram/api_op_AssociateResourceSharePermission.go @@ -31,7 +31,7 @@ func (c *Client) AssociateResourceSharePermission(ctx context.Context, params *A type AssociateResourceSharePermissionInput struct { - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the RAM permission to associate with the resource share. To find the ARN for // a permission, use either the ListPermissions operation or go to the Permissions // library (https://console.aws.amazon.com/ram/home#Permissions:) page in the RAM @@ -41,7 +41,7 @@ type AssociateResourceSharePermissionInput struct { // This member is required. PermissionArn *string - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the resource share to which you want to add or replace permissions. // // This member is required. @@ -53,22 +53,27 @@ type AssociateResourceSharePermissionInput struct { // to a later call to an operation requires that you also pass the same value for // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) // . If you don't provide this value, then Amazon Web Services generates a random - // one for you. + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. ClientToken *string // Specifies the version of the RAM permission to associate with the resource - // share. If you don't specify this parameter, the operation uses the version - // designated as the default. You can use the ListPermissionVersions operation to - // discover the available versions of a permission. + // share. You can specify only the version that is currently set as the default + // version for the permission. If you also set the replace pararameter to true , + // then this operation updates an outdated version of the permission to the current + // default version. You don't need to specify this parameter because the default + // behavior is to use the version that is currently set as the default version for + // the permission. This parameter is supported for backwards compatibility. PermissionVersion *int32 - // Specifies whether the specified permission should replace or add to the - // existing permission associated with the resource share. Use true to replace the - // current permissions. Use false to add the permission to the current permission. - // The default value is false . A resource share can have only one permission per - // resource type. If a resource share already has a permission for the specified - // resource type and you don't set replace to true then the operation returns an - // error. This helps prevent accidental overwriting of a permission. + // Specifies whether the specified permission should replace the existing + // permission associated with the resource share. Use true to replace the current + // permissions. Use false to add the permission to a resource share that currently + // doesn't have a permission. The default value is false . A resource share can + // have only one permission per resource type. If a resource share already has a + // permission for the specified resource type and you don't set replace to true + // then the operation returns an error. This helps prevent accidental overwriting + // of a permission. Replace *bool noSmithyDocumentSerde diff --git a/service/ram/api_op_CreatePermission.go b/service/ram/api_op_CreatePermission.go new file mode 100644 index 00000000000..1dc9c2d424a --- /dev/null +++ b/service/ram/api_op_CreatePermission.go @@ -0,0 +1,174 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ram + +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/ram/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a customer managed permission for a specified resource type that you +// can attach to resource shares. It is created in the Amazon Web Services Region +// in which you call the operation. +func (c *Client) CreatePermission(ctx context.Context, params *CreatePermissionInput, optFns ...func(*Options)) (*CreatePermissionOutput, error) { + if params == nil { + params = &CreatePermissionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreatePermission", params, optFns, c.addOperationCreatePermissionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreatePermissionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreatePermissionInput struct { + + // Specifies the name of the customer managed permission. The name must be unique + // within the Amazon Web Services Region. + // + // This member is required. + Name *string + + // A string in JSON format string that contains the following elements of a + // resource-based policy: + // - Effect: must be set to ALLOW . + // - Action: specifies the actions that are allowed by this customer managed + // permission. The list must contain only actions that are supported by the + // specified resource type. For a list of all actions supported by each resource + // type, see Actions, resources, and condition keys for Amazon Web Services + // services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) + // in the Identity and Access Management User Guide. + // - Condition: (optional) specifies conditional parameters that must evaluate + // to true when a user attempts an action for that action to be allowed. For more + // information about the Condition element, see IAM policies: Condition element (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) + // in the Identity and Access Management User Guide. + // This template can't include either the Resource or Principal elements. Those + // are both filled in by RAM when it instantiates the resource-based policy on each + // resource shared using this managed permission. The Resource comes from the ARN + // of the specific resource that you are sharing. The Principal comes from the + // list of identities added to the resource share. + // + // This member is required. + PolicyTemplate *string + + // Specifies the name of the resource type that this customer managed permission + // applies to. The format is : and is not case sensitive. For example, to specify + // an Amazon EC2 Subnet, you can use the string ec2:subnet . To see the list of + // valid values for this parameter, query the ListResourceTypes operation. + // + // This member is required. + ResourceType *string + + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) + // . If you don't provide this value, then Amazon Web Services generates a random + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. + ClientToken *string + + // Specifies a list of one or more tag key and value pairs to attach to the + // permission. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreatePermissionOutput struct { + + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. + ClientToken *string + + // A structure with information about this customer managed permission. + Permission *types.ResourceSharePermissionSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreatePermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreatePermission{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreatePermission{}, 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 = addOpCreatePermissionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePermission(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_opCreatePermission(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ram", + OperationName: "CreatePermission", + } +} diff --git a/service/ram/api_op_CreatePermissionVersion.go b/service/ram/api_op_CreatePermissionVersion.go new file mode 100644 index 00000000000..b3bb60ff085 --- /dev/null +++ b/service/ram/api_op_CreatePermissionVersion.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ram + +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/ram/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new version of the specified customer managed permission. The new +// version is automatically set as the default version of the customer managed +// permission. New resource shares automatically use the default permission. +// Existing resource shares continue to use their original permission versions, but +// you can use ReplacePermissionAssociations to update them. If the specified +// customer managed permission already has the maximum of 5 versions, then you must +// delete one of the existing versions before you can create a new one. +func (c *Client) CreatePermissionVersion(ctx context.Context, params *CreatePermissionVersionInput, optFns ...func(*Options)) (*CreatePermissionVersionOutput, error) { + if params == nil { + params = &CreatePermissionVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreatePermissionVersion", params, optFns, c.addOperationCreatePermissionVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreatePermissionVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreatePermissionVersionInput struct { + + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the customer managed permission you're creating a new version for. + // + // This member is required. + PermissionArn *string + + // A string in JSON format string that contains the following elements of a + // resource-based policy: + // - Effect: must be set to ALLOW . + // - Action: specifies the actions that are allowed by this customer managed + // permission. The list must contain only actions that are supported by the + // specified resource type. For a list of all actions supported by each resource + // type, see Actions, resources, and condition keys for Amazon Web Services + // services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) + // in the Identity and Access Management User Guide. + // - Condition: (optional) specifies conditional parameters that must evaluate + // to true when a user attempts an action for that action to be allowed. For more + // information about the Condition element, see IAM policies: Condition element (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) + // in the Identity and Access Management User Guide. + // This template can't include either the Resource or Principal elements. Those + // are both filled in by RAM when it instantiates the resource-based policy on each + // resource shared using this managed permission. The Resource comes from the ARN + // of the specific resource that you are sharing. The Principal comes from the + // list of identities added to the resource share. + // + // This member is required. + PolicyTemplate *string + + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) + // . If you don't provide this value, then Amazon Web Services generates a random + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. + ClientToken *string + + noSmithyDocumentSerde +} + +type CreatePermissionVersionOutput struct { + + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. + ClientToken *string + + // Information about a RAM managed permission. + Permission *types.ResourceSharePermissionDetail + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreatePermissionVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreatePermissionVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreatePermissionVersion{}, 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 = addOpCreatePermissionVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePermissionVersion(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_opCreatePermissionVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ram", + OperationName: "CreatePermissionVersion", + } +} diff --git a/service/ram/api_op_CreateResourceShare.go b/service/ram/api_op_CreateResourceShare.go index b3417496af0..d40aab4b5b8 100644 --- a/service/ram/api_op_CreateResourceShare.go +++ b/service/ram/api_op_CreateResourceShare.go @@ -53,7 +53,8 @@ type CreateResourceShareInput struct { // to a later call to an operation requires that you also pass the same value for // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) // . If you don't provide this value, then Amazon Web Services generates a random - // one for you. + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. ClientToken *string // Specifies the Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) @@ -66,7 +67,7 @@ type CreateResourceShareInput struct { // Specifies a list of one or more principals to associate with the resource // share. You can include the following values: // - An Amazon Web Services account ID, for example: 123456789012 - // - An Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // - An Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of an organization in Organizations, for example: // organizations::123456789012:organization/o-exampleorgid // - An ARN of an organizational unit (OU) in Organizations, for example: diff --git a/service/ram/api_op_DeletePermission.go b/service/ram/api_op_DeletePermission.go new file mode 100644 index 00000000000..713cbca0e86 --- /dev/null +++ b/service/ram/api_op_DeletePermission.go @@ -0,0 +1,145 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ram + +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/ram/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified customer managed permission in the Amazon Web Services +// Region in which you call this operation. You can delete a customer managed +// permission only if it isn't attached to any resource share. The operation +// deletes all versions associated with the customer managed permission. +func (c *Client) DeletePermission(ctx context.Context, params *DeletePermissionInput, optFns ...func(*Options)) (*DeletePermissionOutput, error) { + if params == nil { + params = &DeletePermissionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeletePermission", params, optFns, c.addOperationDeletePermissionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeletePermissionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeletePermissionInput struct { + + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the customer managed permission that you want to delete. + // + // This member is required. + PermissionArn *string + + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) + // . If you don't provide this value, then Amazon Web Services generates a random + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. + ClientToken *string + + noSmithyDocumentSerde +} + +type DeletePermissionOutput struct { + + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. + ClientToken *string + + // This operation is performed asynchronously, and this response parameter + // indicates the current status. + PermissionStatus types.PermissionStatus + + // A boolean that indicates whether the delete operations succeeded. + ReturnValue *bool + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeletePermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeletePermission{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeletePermission{}, 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 = addOpDeletePermissionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePermission(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_opDeletePermission(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ram", + OperationName: "DeletePermission", + } +} diff --git a/service/ram/api_op_DeletePermissionVersion.go b/service/ram/api_op_DeletePermissionVersion.go new file mode 100644 index 00000000000..ddcfeb2fd73 --- /dev/null +++ b/service/ram/api_op_DeletePermissionVersion.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ram + +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/ram/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes one version of a customer managed permission. The version you specify +// must not be attached to any resource share and must not be the default version +// for the permission. If a customer managed permission has the maximum of 5 +// versions, then you must delete at least one version before you can create +// another. +func (c *Client) DeletePermissionVersion(ctx context.Context, params *DeletePermissionVersionInput, optFns ...func(*Options)) (*DeletePermissionVersionOutput, error) { + if params == nil { + params = &DeletePermissionVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeletePermissionVersion", params, optFns, c.addOperationDeletePermissionVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeletePermissionVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeletePermissionVersionInput struct { + + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the permission with the version you want to delete. + // + // This member is required. + PermissionArn *string + + // Specifies the version number to delete. You can't delete the default version + // for a customer managed permission. You can't delete a version if it's the only + // version of the permission. You must either first create another version, or + // delete the permission completely. You can't delete a version if it is attached + // to any resource shares. If the version is the default, you must first use + // SetDefaultPermissionVersion to set a different version as the default for the + // customer managed permission, and then use AssociateResourceSharePermission to + // update your resource shares to use the new default version. + // + // This member is required. + PermissionVersion *int32 + + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) + // . If you don't provide this value, then Amazon Web Services generates a random + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. + ClientToken *string + + noSmithyDocumentSerde +} + +type DeletePermissionVersionOutput struct { + + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. + ClientToken *string + + // This operation is performed asynchronously, and this response parameter + // indicates the current status. + PermissionStatus types.PermissionStatus + + // A boolean value that indicates whether the operation is successful. + ReturnValue *bool + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeletePermissionVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeletePermissionVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeletePermissionVersion{}, 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 = addOpDeletePermissionVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePermissionVersion(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_opDeletePermissionVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ram", + OperationName: "DeletePermissionVersion", + } +} diff --git a/service/ram/api_op_DeleteResourceShare.go b/service/ram/api_op_DeleteResourceShare.go index d0050047e48..6223dc432bb 100644 --- a/service/ram/api_op_DeleteResourceShare.go +++ b/service/ram/api_op_DeleteResourceShare.go @@ -12,7 +12,7 @@ import ( // Deletes the specified resource share. This doesn't delete any of the resources // that were associated with the resource share; it only stops the sharing of those -// resources outside of the Amazon Web Services account that created them. +// resources through this resource share. func (c *Client) DeleteResourceShare(ctx context.Context, params *DeleteResourceShareInput, optFns ...func(*Options)) (*DeleteResourceShareOutput, error) { if params == nil { params = &DeleteResourceShareInput{} @@ -30,7 +30,7 @@ func (c *Client) DeleteResourceShare(ctx context.Context, params *DeleteResource type DeleteResourceShareInput struct { - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the resource share to delete. // // This member is required. @@ -42,7 +42,8 @@ type DeleteResourceShareInput struct { // to a later call to an operation requires that you also pass the same value for // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) // . If you don't provide this value, then Amazon Web Services generates a random - // one for you. + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. ClientToken *string noSmithyDocumentSerde diff --git a/service/ram/api_op_DisassociateResourceShare.go b/service/ram/api_op_DisassociateResourceShare.go index 5e5f153917f..9ed6cfd4000 100644 --- a/service/ram/api_op_DisassociateResourceShare.go +++ b/service/ram/api_op_DisassociateResourceShare.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Disassociates the specified principals or resources from the specified resource -// share. +// Removes the specified principals or resources from participating in the +// specified resource share. func (c *Client) DisassociateResourceShare(ctx context.Context, params *DisassociateResourceShareInput, optFns ...func(*Options)) (*DisassociateResourceShareOutput, error) { if params == nil { params = &DisassociateResourceShareInput{} @@ -30,8 +30,8 @@ func (c *Client) DisassociateResourceShare(ctx context.Context, params *Disassoc type DisassociateResourceShareInput struct { - // Specifies Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // of the resource share that you want to remove resources from. + // Specifies Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the resource share that you want to remove resources or principals from. // // This member is required. ResourceShareArn *string @@ -42,13 +42,14 @@ type DisassociateResourceShareInput struct { // to a later call to an operation requires that you also pass the same value for // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) // . If you don't provide this value, then Amazon Web Services generates a random - // one for you. + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. ClientToken *string // Specifies a list of one or more principals that no longer are to have access to // the resources in this resource share. You can include the following values: // - An Amazon Web Services account ID, for example: 123456789012 - // - An Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // - An Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of an organization in Organizations, for example: // organizations::123456789012:organization/o-exampleorgid // - An ARN of an organizational unit (OU) in Organizations, for example: @@ -62,8 +63,8 @@ type DisassociateResourceShareInput struct { // Specifies a list of Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // for one or more resources that you want to remove from the resource share. After - // the operation runs, these resources are no longer shared with principals outside - // of the Amazon Web Services account that created the resources. + // the operation runs, these resources are no longer shared with principals + // associated with the resource share. ResourceArns []string noSmithyDocumentSerde @@ -77,8 +78,8 @@ type DisassociateResourceShareOutput struct { // also have the same values that you used in the first call. ClientToken *string - // An array of objects that contain information about the updated associations for - // this resource share. + // An array of objects with information about the updated associations for this + // resource share. ResourceShareAssociations []types.ResourceShareAssociation // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_DisassociateResourceSharePermission.go b/service/ram/api_op_DisassociateResourceSharePermission.go index 414dbe9539c..8c3fbd1f5d9 100644 --- a/service/ram/api_op_DisassociateResourceSharePermission.go +++ b/service/ram/api_op_DisassociateResourceSharePermission.go @@ -10,9 +10,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Disassociates an RAM permission from a resource share. Permission changes take -// effect immediately. You can remove a RAM permission from a resource share only -// if there are currently no resources of the relevant resource type currently +// Removes a managed permission from a resource share. Permission changes take +// effect immediately. You can remove a managed permission from a resource share +// only if there are currently no resources of the relevant resource type currently // attached to the resource share. func (c *Client) DisassociateResourceSharePermission(ctx context.Context, params *DisassociateResourceSharePermissionInput, optFns ...func(*Options)) (*DisassociateResourceSharePermissionOutput, error) { if params == nil { @@ -31,15 +31,15 @@ func (c *Client) DisassociateResourceSharePermission(ctx context.Context, params type DisassociateResourceSharePermissionInput struct { - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // of the permission to disassociate from the resource share. Changes to + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the managed permission to disassociate from the resource share. Changes to // permissions take effect immediately. // // This member is required. PermissionArn *string - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // of the resource share from which you want to disassociate a permission. + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the resource share that you want to remove the managed permission from. // // This member is required. ResourceShareArn *string @@ -50,7 +50,8 @@ type DisassociateResourceSharePermissionInput struct { // to a later call to an operation requires that you also pass the same value for // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) // . If you don't provide this value, then Amazon Web Services generates a random - // one for you. + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. ClientToken *string noSmithyDocumentSerde diff --git a/service/ram/api_op_EnableSharingWithAwsOrganization.go b/service/ram/api_op_EnableSharingWithAwsOrganization.go index 5c94f39506c..f355fb8f28e 100644 --- a/service/ram/api_op_EnableSharingWithAwsOrganization.go +++ b/service/ram/api_op_EnableSharingWithAwsOrganization.go @@ -10,15 +10,17 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Enables resource sharing within your organization in Organizations. Calling -// this operation enables RAM to retrieve information about the organization and -// its structure. This lets you share resources with all of the accounts in an -// organization by specifying the organization's ID, or all of the accounts in an -// organizational unit (OU) by specifying the OU's ID. Until you enable sharing -// within the organization, you can specify only individual Amazon Web Services -// accounts, or for supported resource types, IAM users and roles. You must call -// this operation from an IAM user or role in the organization's management -// account. +// Enables resource sharing within your organization in Organizations. This +// operation creates a service-linked role called +// AWSServiceRoleForResourceAccessManager that has the IAM managed policy named +// AWSResourceAccessManagerServiceRolePolicy attached. This role permits RAM to +// retrieve information about the organization and its structure. This lets you +// share resources with all of the accounts in the calling account's organization +// by specifying the organization ID, or all of the accounts in an organizational +// unit (OU) by specifying the OU ID. Until you enable sharing within the +// organization, you can specify only individual Amazon Web Services accounts, or +// for supported resource types, IAM roles and users. You must call this operation +// from an IAM role or user in the organization's management account. func (c *Client) EnableSharingWithAwsOrganization(ctx context.Context, params *EnableSharingWithAwsOrganizationInput, optFns ...func(*Options)) (*EnableSharingWithAwsOrganizationOutput, error) { if params == nil { params = &EnableSharingWithAwsOrganizationInput{} diff --git a/service/ram/api_op_GetPermission.go b/service/ram/api_op_GetPermission.go index be6c7a654e2..45dbfc84b25 100644 --- a/service/ram/api_op_GetPermission.go +++ b/service/ram/api_op_GetPermission.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets the contents of an RAM permission in JSON format. +// Retrieves the contents of a managed permission in JSON format. func (c *Client) GetPermission(ctx context.Context, params *GetPermissionInput, optFns ...func(*Options)) (*GetPermissionOutput, error) { if params == nil { params = &GetPermissionInput{} @@ -29,7 +29,7 @@ func (c *Client) GetPermission(ctx context.Context, params *GetPermissionInput, type GetPermissionInput struct { - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the permission whose contents you want to retrieve. To find the ARN for a // permission, use either the ListPermissions operation or go to the Permissions // library (https://console.aws.amazon.com/ram/home#Permissions:) page in the RAM @@ -39,8 +39,9 @@ type GetPermissionInput struct { // This member is required. PermissionArn *string - // Specifies identifier for the version of the RAM permission to retrieve. If you - // don't specify this parameter, the operation retrieves the default version. + // Specifies the version number of the RAM permission to retrieve. If you don't + // specify this parameter, the operation retrieves the default version. To see the + // list of available versions, use ListPermissionVersions . PermissionVersion *int32 noSmithyDocumentSerde @@ -48,7 +49,7 @@ type GetPermissionInput struct { type GetPermissionOutput struct { - // An object that contains information about the permission. + // An object with details about the permission. Permission *types.ResourceSharePermissionDetail // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_GetResourceShareAssociations.go b/service/ram/api_op_GetResourceShareAssociations.go index a4c28ce5a8b..55dc0a042c9 100644 --- a/service/ram/api_op_GetResourceShareAssociations.go +++ b/service/ram/api_op_GetResourceShareAssociations.go @@ -12,8 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the resource and principal associations for resource shares that you -// own. +// Retrieves the lists of resources and principals that associated for resource +// shares that you own. func (c *Client) GetResourceShareAssociations(ctx context.Context, params *GetResourceShareAssociationsInput, optFns ...func(*Options)) (*GetResourceShareAssociationsOutput, error) { if params == nil { params = &GetResourceShareAssociationsInput{} @@ -33,15 +33,13 @@ type GetResourceShareAssociationsInput struct { // Specifies whether you want to retrieve the associations that involve a // specified resource or principal. - // - PRINCIPAL – list the principals that are associated with the specified - // resource share. - // - RESOURCE – list the resources that are associated with the specified - // resource share. + // - PRINCIPAL – list the principals whose associations you want to see. + // - RESOURCE – list the resources whose associations you want to see. // // This member is required. AssociationType types.ResourceShareAssociationType - // Specifies that you want to retrieve only associations with this status. + // Specifies that you want to retrieve only associations that have this status. AssociationStatus types.ResourceShareAssociationStatus // Specifies the total number of results that you want included on each page of @@ -63,13 +61,13 @@ type GetResourceShareAssociationsInput struct { // Specifies the ID of the principal whose resource shares you want to retrieve. // This can be an Amazon Web Services account ID, an organization ID, an - // organizational unit ID, or the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // organizational unit ID, or the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of an individual IAM user or role. You cannot specify this parameter if the // association type is RESOURCE . Principal *string - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // of the resource whose resource shares you want to retrieve. You cannot specify + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of a resource whose resource shares you want to retrieve. You cannot specify // this parameter if the association type is PRINCIPAL . ResourceArn *string diff --git a/service/ram/api_op_GetResourceShares.go b/service/ram/api_op_GetResourceShares.go index 75594831aa4..7651ad35270 100644 --- a/service/ram/api_op_GetResourceShares.go +++ b/service/ram/api_op_GetResourceShares.go @@ -61,10 +61,14 @@ type GetResourceSharesInput struct { NextToken *string // Specifies that you want to retrieve details of only those resource shares that - // use the RAM permission with this Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // use the managed permission with this Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // . PermissionArn *string + // Specifies that you want to retrieve details for only those resource shares that + // use the specified version of the managed permission. + PermissionVersion *int32 + // Specifies the Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of individual resource shares that you want information about. ResourceShareArns []string diff --git a/service/ram/api_op_ListPendingInvitationResources.go b/service/ram/api_op_ListPendingInvitationResources.go index 95759637c07..54e7400803b 100644 --- a/service/ram/api_op_ListPendingInvitationResources.go +++ b/service/ram/api_op_ListPendingInvitationResources.go @@ -32,7 +32,7 @@ func (c *Client) ListPendingInvitationResources(ctx context.Context, params *Lis type ListPendingInvitationResourcesInput struct { - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the invitation. You can use GetResourceShareInvitations to find the ARN of // the invitation. // diff --git a/service/ram/api_op_ListPermissionAssociations.go b/service/ram/api_op_ListPermissionAssociations.go new file mode 100644 index 00000000000..1a26621e8f6 --- /dev/null +++ b/service/ram/api_op_ListPermissionAssociations.go @@ -0,0 +1,269 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ram + +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/ram/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists information about the managed permission and its associations to any +// resource shares that use this managed permission. This lets you see which +// resource shares use which versions of the specified managed permission. +func (c *Client) ListPermissionAssociations(ctx context.Context, params *ListPermissionAssociationsInput, optFns ...func(*Options)) (*ListPermissionAssociationsOutput, error) { + if params == nil { + params = &ListPermissionAssociationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListPermissionAssociations", params, optFns, c.addOperationListPermissionAssociationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListPermissionAssociationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListPermissionAssociationsInput struct { + + // Specifies that you want to list only those associations with resource shares + // that match this status. + AssociationStatus types.ResourceShareAssociationStatus + + // When true , specifies that you want to list only those associations with + // resource shares that use the default version of the specified managed + // permission. When false (the default value), lists associations with resource + // shares that use any version of the specified managed permission. + DefaultVersion *bool + + // Specifies that you want to list only those associations with resource shares + // that have a featureSet with this value. + FeatureSet types.PermissionFeatureSet + + // Specifies the total number of results that you want included on each page of + // the response. If you do not include this parameter, it defaults to a value that + // is specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. + MaxResults *int32 + + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. + NextToken *string + + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the managed permission. + PermissionArn *string + + // Specifies that you want to list only those associations with resource shares + // that use this version of the managed permission. If you don't provide a value + // for this parameter, then the operation returns information about associations + // with resource shares that use any version of the managed permission. + PermissionVersion *int32 + + // Specifies that you want to list only those associations with resource shares + // that include at least one resource of this resource type. + ResourceType *string + + noSmithyDocumentSerde +} + +type ListPermissionAssociationsOutput struct { + + // If present, this value indicates that more output is available than is included + // in the current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You should + // repeat this until the NextToken response element comes back as null . This + // indicates that this is the last page of results. + NextToken *string + + // A structure with information about this customer managed permission. + Permissions []types.AssociatedPermission + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListPermissionAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListPermissionAssociations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListPermissionAssociations{}, 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_opListPermissionAssociations(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 +} + +// ListPermissionAssociationsAPIClient is a client that implements the +// ListPermissionAssociations operation. +type ListPermissionAssociationsAPIClient interface { + ListPermissionAssociations(context.Context, *ListPermissionAssociationsInput, ...func(*Options)) (*ListPermissionAssociationsOutput, error) +} + +var _ ListPermissionAssociationsAPIClient = (*Client)(nil) + +// ListPermissionAssociationsPaginatorOptions is the paginator options for +// ListPermissionAssociations +type ListPermissionAssociationsPaginatorOptions struct { + // Specifies the total number of results that you want included on each page of + // the response. If you do not include this parameter, it defaults to a value that + // is specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. + 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 +} + +// ListPermissionAssociationsPaginator is a paginator for +// ListPermissionAssociations +type ListPermissionAssociationsPaginator struct { + options ListPermissionAssociationsPaginatorOptions + client ListPermissionAssociationsAPIClient + params *ListPermissionAssociationsInput + nextToken *string + firstPage bool +} + +// NewListPermissionAssociationsPaginator returns a new +// ListPermissionAssociationsPaginator +func NewListPermissionAssociationsPaginator(client ListPermissionAssociationsAPIClient, params *ListPermissionAssociationsInput, optFns ...func(*ListPermissionAssociationsPaginatorOptions)) *ListPermissionAssociationsPaginator { + if params == nil { + params = &ListPermissionAssociationsInput{} + } + + options := ListPermissionAssociationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListPermissionAssociationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListPermissionAssociationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListPermissionAssociations page. +func (p *ListPermissionAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPermissionAssociationsOutput, 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.ListPermissionAssociations(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_opListPermissionAssociations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ram", + OperationName: "ListPermissionAssociations", + } +} diff --git a/service/ram/api_op_ListPermissionVersions.go b/service/ram/api_op_ListPermissionVersions.go index f1b2c18068a..64c722ad5ec 100644 --- a/service/ram/api_op_ListPermissionVersions.go +++ b/service/ram/api_op_ListPermissionVersions.go @@ -30,7 +30,7 @@ func (c *Client) ListPermissionVersions(ctx context.Context, params *ListPermiss type ListPermissionVersionsInput struct { - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the RAM permission whose versions you want to list. You can use the // permissionVersion parameter on the AssociateResourceSharePermission operation // to specify a non-default version to attach. diff --git a/service/ram/api_op_ListPermissions.go b/service/ram/api_op_ListPermissions.go index bdb6e7974c9..bdd8659264f 100644 --- a/service/ram/api_op_ListPermissions.go +++ b/service/ram/api_op_ListPermissions.go @@ -48,10 +48,18 @@ type ListPermissionsInput struct { // previous call's NextToken response to request the next page of results. NextToken *string - // Specifies that you want to list permissions for only the specified resource - // type. For example, to list only permissions that apply to EC2 subnets, specify - // ec2:Subnet . You can use the ListResourceTypes operation to get the specific - // string required. + // Specifies that you want to list only permissions of this type: + // - AWS – returns only Amazon Web Services managed permissions. + // - LOCAL – returns only customer managed permissions + // - ALL – returns both Amazon Web Services managed permissions and customer + // managed permissions. + // If you don't specify this parameter, the default is All . + PermissionType types.PermissionTypeFilter + + // Specifies that you want to list only those permissions that apply to the + // specified resource type. This parameter is not case sensitive. For example, to + // list only permissions that apply to Amazon EC2 subnets, specify ec2:subnet . You + // can use the ListResourceTypes operation to get the specific string required. ResourceType *string noSmithyDocumentSerde diff --git a/service/ram/api_op_ListPrincipals.go b/service/ram/api_op_ListPrincipals.go index 62a284284b4..f9fd7cc7789 100644 --- a/service/ram/api_op_ListPrincipals.go +++ b/service/ram/api_op_ListPrincipals.go @@ -59,7 +59,7 @@ type ListPrincipalsInput struct { // Specifies that you want to list information for only the listed principals. You // can include the following values: // - An Amazon Web Services account ID, for example: 123456789012 - // - An Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // - An Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of an organization in Organizations, for example: // organizations::123456789012:organization/o-exampleorgid // - An ARN of an organizational unit (OU) in Organizations, for example: @@ -72,7 +72,7 @@ type ListPrincipalsInput struct { Principals []string // Specifies that you want to list principal information for the resource share - // with the specified Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // with the specified Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // . ResourceArn *string diff --git a/service/ram/api_op_ListReplacePermissionAssociationsWork.go b/service/ram/api_op_ListReplacePermissionAssociationsWork.go new file mode 100644 index 00000000000..0c3a5a6046e --- /dev/null +++ b/service/ram/api_op_ListReplacePermissionAssociationsWork.go @@ -0,0 +1,249 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ram + +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/ram/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the current status of the asynchronous tasks performed by RAM when +// you perform the ReplacePermissionAssociationsWork operation. +func (c *Client) ListReplacePermissionAssociationsWork(ctx context.Context, params *ListReplacePermissionAssociationsWorkInput, optFns ...func(*Options)) (*ListReplacePermissionAssociationsWorkOutput, error) { + if params == nil { + params = &ListReplacePermissionAssociationsWorkInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListReplacePermissionAssociationsWork", params, optFns, c.addOperationListReplacePermissionAssociationsWorkMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListReplacePermissionAssociationsWorkOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListReplacePermissionAssociationsWorkInput struct { + + // Specifies the total number of results that you want included on each page of + // the response. If you do not include this parameter, it defaults to a value that + // is specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. + MaxResults *int32 + + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. + NextToken *string + + // Specifies that you want to see only the details about requests with a status + // that matches this value. + Status types.ReplacePermissionAssociationsWorkStatus + + // A list of IDs. These values come from the id field of the + // replacePermissionAssociationsWork structure returned by the + // ReplacePermissionAssociations operation. + WorkIds []string + + noSmithyDocumentSerde +} + +type ListReplacePermissionAssociationsWorkOutput struct { + + // If present, this value indicates that more output is available than is included + // in the current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You should + // repeat this until the NextToken response element comes back as null . This + // indicates that this is the last page of results. + NextToken *string + + // An array of data structures that provide details of the matching work IDs. + ReplacePermissionAssociationsWorks []types.ReplacePermissionAssociationsWork + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListReplacePermissionAssociationsWorkMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListReplacePermissionAssociationsWork{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListReplacePermissionAssociationsWork{}, 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_opListReplacePermissionAssociationsWork(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 +} + +// ListReplacePermissionAssociationsWorkAPIClient is a client that implements the +// ListReplacePermissionAssociationsWork operation. +type ListReplacePermissionAssociationsWorkAPIClient interface { + ListReplacePermissionAssociationsWork(context.Context, *ListReplacePermissionAssociationsWorkInput, ...func(*Options)) (*ListReplacePermissionAssociationsWorkOutput, error) +} + +var _ ListReplacePermissionAssociationsWorkAPIClient = (*Client)(nil) + +// ListReplacePermissionAssociationsWorkPaginatorOptions is the paginator options +// for ListReplacePermissionAssociationsWork +type ListReplacePermissionAssociationsWorkPaginatorOptions struct { + // Specifies the total number of results that you want included on each page of + // the response. If you do not include this parameter, it defaults to a value that + // is specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. + 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 +} + +// ListReplacePermissionAssociationsWorkPaginator is a paginator for +// ListReplacePermissionAssociationsWork +type ListReplacePermissionAssociationsWorkPaginator struct { + options ListReplacePermissionAssociationsWorkPaginatorOptions + client ListReplacePermissionAssociationsWorkAPIClient + params *ListReplacePermissionAssociationsWorkInput + nextToken *string + firstPage bool +} + +// NewListReplacePermissionAssociationsWorkPaginator returns a new +// ListReplacePermissionAssociationsWorkPaginator +func NewListReplacePermissionAssociationsWorkPaginator(client ListReplacePermissionAssociationsWorkAPIClient, params *ListReplacePermissionAssociationsWorkInput, optFns ...func(*ListReplacePermissionAssociationsWorkPaginatorOptions)) *ListReplacePermissionAssociationsWorkPaginator { + if params == nil { + params = &ListReplacePermissionAssociationsWorkInput{} + } + + options := ListReplacePermissionAssociationsWorkPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListReplacePermissionAssociationsWorkPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListReplacePermissionAssociationsWorkPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListReplacePermissionAssociationsWork page. +func (p *ListReplacePermissionAssociationsWorkPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListReplacePermissionAssociationsWorkOutput, 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.ListReplacePermissionAssociationsWork(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_opListReplacePermissionAssociationsWork(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ram", + OperationName: "ListReplacePermissionAssociationsWork", + } +} diff --git a/service/ram/api_op_ListResourceSharePermissions.go b/service/ram/api_op_ListResourceSharePermissions.go index 167b6645ddf..3e1f109d5f0 100644 --- a/service/ram/api_op_ListResourceSharePermissions.go +++ b/service/ram/api_op_ListResourceSharePermissions.go @@ -30,7 +30,7 @@ func (c *Client) ListResourceSharePermissions(ctx context.Context, params *ListR type ListResourceSharePermissionsInput struct { - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the resource share for which you want to retrieve the associated permissions. // // This member is required. diff --git a/service/ram/api_op_PromotePermissionCreatedFromPolicy.go b/service/ram/api_op_PromotePermissionCreatedFromPolicy.go new file mode 100644 index 00000000000..1bfa2b38481 --- /dev/null +++ b/service/ram/api_op_PromotePermissionCreatedFromPolicy.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ram + +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/ram/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// When you attach a resource-based policy to a resource, RAM automatically +// creates a resource share of featureSet = CREATED_FROM_POLICY with a managed +// permission that has the same IAM permissions as the original resource-based +// policy. However, this type of managed permission is visible to only the resource +// share owner, and the associated resource share can't be modified by using RAM. +// This operation creates a separate, fully manageable customer managed permission +// that has the same IAM permissions as the original resource-based policy. You can +// associate this customer managed permission to any resource shares. Before you +// use PromoteResourceShareCreatedFromPolicy , you should first run this operation +// to ensure that you have an appropriate customer managed permission that can be +// associated with the promoted resource share. +// - The original CREATED_FROM_POLICY policy isn't deleted, and resource shares +// using that original policy aren't automatically updated. +// - You can't modify a CREATED_FROM_POLICY resource share so you can't associate +// the new customer managed permission by using ReplacePermsissionAssociations . +// However, if you use PromoteResourceShareCreatedFromPolicy , that operation +// automatically associates the fully manageable customer managed permission to the +// newly promoted STANDARD resource share. +// - After you promote a resource share, if the original CREATED_FROM_POLICY +// managed permission has no other associations to A resource share, then RAM +// automatically deletes it. +func (c *Client) PromotePermissionCreatedFromPolicy(ctx context.Context, params *PromotePermissionCreatedFromPolicyInput, optFns ...func(*Options)) (*PromotePermissionCreatedFromPolicyOutput, error) { + if params == nil { + params = &PromotePermissionCreatedFromPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PromotePermissionCreatedFromPolicy", params, optFns, c.addOperationPromotePermissionCreatedFromPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PromotePermissionCreatedFromPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PromotePermissionCreatedFromPolicyInput struct { + + // Specifies a name for the promoted customer managed permission. + // + // This member is required. + Name *string + + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the CREATED_FROM_POLICY permission that you want to promote. You can get + // this Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // by calling the ListResourceSharePermissions operation. + // + // This member is required. + PermissionArn *string + + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) + // . If you don't provide this value, then Amazon Web Services generates a random + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. + ClientToken *string + + noSmithyDocumentSerde +} + +type PromotePermissionCreatedFromPolicyOutput struct { + + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. + ClientToken *string + + // Information about an RAM permission. + Permission *types.ResourceSharePermissionSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPromotePermissionCreatedFromPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPromotePermissionCreatedFromPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPromotePermissionCreatedFromPolicy{}, 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 = addOpPromotePermissionCreatedFromPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPromotePermissionCreatedFromPolicy(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_opPromotePermissionCreatedFromPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ram", + OperationName: "PromotePermissionCreatedFromPolicy", + } +} diff --git a/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go b/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go index ce56bdc5ac3..16d75035374 100644 --- a/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go +++ b/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go @@ -10,13 +10,20 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// When you attach a resource-based permission policy to a resource, it -// automatically creates a resource share. However, resource shares created this -// way are visible only to the resource share owner, and the resource share can't -// be modified in RAM. You can use this operation to promote the resource share to -// a full RAM resource share. When you promote a resource share, you can then -// manage the resource share in RAM and it becomes visible to all of the principals -// you shared it with. +// When you attach a resource-based policy to a resource, RAM automatically +// creates a resource share of featureSet = CREATED_FROM_POLICY with a managed +// permission that has the same IAM permissions as the original resource-based +// policy. However, this type of managed permission is visible to only the resource +// share owner, and the associated resource share can't be modified by using RAM. +// This operation promotes the resource share to a STANDARD resource share that is +// fully manageable in RAM. When you promote a resource share, you can then manage +// the resource share in RAM and it becomes visible to all of the principals you +// shared it with. Before you perform this operation, you should first run +// PromotePermissionCreatedFromPolicy to ensure that you have an appropriate +// customer managed permission that can be associated with this resource share +// after its is promoted. If this operation can't find a managed permission that +// exactly matches the existing CREATED_FROM_POLICY permission, then this +// operation fails. func (c *Client) PromoteResourceShareCreatedFromPolicy(ctx context.Context, params *PromoteResourceShareCreatedFromPolicyInput, optFns ...func(*Options)) (*PromoteResourceShareCreatedFromPolicyOutput, error) { if params == nil { params = &PromoteResourceShareCreatedFromPolicyInput{} @@ -34,7 +41,7 @@ func (c *Client) PromoteResourceShareCreatedFromPolicy(ctx context.Context, para type PromoteResourceShareCreatedFromPolicyInput struct { - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the resource share to promote. // // This member is required. diff --git a/service/ram/api_op_RejectResourceShareInvitation.go b/service/ram/api_op_RejectResourceShareInvitation.go index 67a5b5d51f6..84e3947ba21 100644 --- a/service/ram/api_op_RejectResourceShareInvitation.go +++ b/service/ram/api_op_RejectResourceShareInvitation.go @@ -30,7 +30,7 @@ func (c *Client) RejectResourceShareInvitation(ctx context.Context, params *Reje type RejectResourceShareInvitationInput struct { - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the invitation that you want to reject. // // This member is required. @@ -42,7 +42,8 @@ type RejectResourceShareInvitationInput struct { // to a later call to an operation requires that you also pass the same value for // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) // . If you don't provide this value, then Amazon Web Services generates a random - // one for you. + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. ClientToken *string noSmithyDocumentSerde diff --git a/service/ram/api_op_ReplacePermissionAssociations.go b/service/ram/api_op_ReplacePermissionAssociations.go new file mode 100644 index 00000000000..fe45e205fc2 --- /dev/null +++ b/service/ram/api_op_ReplacePermissionAssociations.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ram + +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/ram/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates all resource shares that use a managed permission to a different +// managed permission. This operation always applies the default version of the +// target managed permission. You can optionally specify that the update applies to +// only resource shares that currently use a specified version. This enables you to +// update to the latest version, without changing the which managed permission is +// used. You can use this operation to update all of your resource shares to use +// the current default version of the permission by specifying the same value for +// the fromPermissionArn and toPermissionArn parameters. You can use the optional +// fromPermissionVersion parameter to update only those resources that use a +// specified version of the managed permission to the new managed permission. To +// successfully perform this operation, you must have permission to update the +// resource-based policy on all affected resource types. +func (c *Client) ReplacePermissionAssociations(ctx context.Context, params *ReplacePermissionAssociationsInput, optFns ...func(*Options)) (*ReplacePermissionAssociationsOutput, error) { + if params == nil { + params = &ReplacePermissionAssociationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ReplacePermissionAssociations", params, optFns, c.addOperationReplacePermissionAssociationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ReplacePermissionAssociationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ReplacePermissionAssociationsInput struct { + + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the managed permission that you want to replace. + // + // This member is required. + FromPermissionArn *string + + // Specifies the ARN of the managed permission that you want to associate with + // resource shares in place of the one specified by fromPerssionArn and + // fromPermissionVersion . The operation always associates the version that is + // currently the default for the specified managed permission. + // + // This member is required. + ToPermissionArn *string + + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) + // . If you don't provide this value, then Amazon Web Services generates a random + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. + ClientToken *string + + // Specifies that you want to updated the permissions for only those resource + // shares that use the specified version of the managed permission. + FromPermissionVersion *int32 + + noSmithyDocumentSerde +} + +type ReplacePermissionAssociationsOutput struct { + + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. + ClientToken *string + + // Specifies a data structure that you can use to track the asynchronous tasks + // that RAM performs to complete this operation. You can use the + // ListReplacePermissionAssociationsWork operation and pass the id value returned + // in this structure. + ReplacePermissionAssociationsWork *types.ReplacePermissionAssociationsWork + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationReplacePermissionAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpReplacePermissionAssociations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpReplacePermissionAssociations{}, 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 = addOpReplacePermissionAssociationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplacePermissionAssociations(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_opReplacePermissionAssociations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ram", + OperationName: "ReplacePermissionAssociations", + } +} diff --git a/service/ram/api_op_SetDefaultPermissionVersion.go b/service/ram/api_op_SetDefaultPermissionVersion.go new file mode 100644 index 00000000000..02550c371c2 --- /dev/null +++ b/service/ram/api_op_SetDefaultPermissionVersion.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ram + +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/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Designates the specified version number as the default version for the +// specified customer managed permission. New resource shares automatically use +// this new default permission. Existing resource shares continue to use their +// original permission version, but you can use ReplacePermissionAssociations to +// update them. +func (c *Client) SetDefaultPermissionVersion(ctx context.Context, params *SetDefaultPermissionVersionInput, optFns ...func(*Options)) (*SetDefaultPermissionVersionOutput, error) { + if params == nil { + params = &SetDefaultPermissionVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SetDefaultPermissionVersion", params, optFns, c.addOperationSetDefaultPermissionVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SetDefaultPermissionVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SetDefaultPermissionVersionInput struct { + + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the customer managed permission whose default version you want to change. + // + // This member is required. + PermissionArn *string + + // Specifies the version number that you want to designate as the default for + // customer managed permission. To see a list of all available version numbers, use + // ListPermissionVersions . + // + // This member is required. + PermissionVersion *int32 + + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) + // . If you don't provide this value, then Amazon Web Services generates a random + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. + ClientToken *string + + noSmithyDocumentSerde +} + +type SetDefaultPermissionVersionOutput struct { + + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. + ClientToken *string + + // A boolean value that indicates whether the operation was successful. + ReturnValue *bool + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSetDefaultPermissionVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpSetDefaultPermissionVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSetDefaultPermissionVersion{}, 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 = addOpSetDefaultPermissionVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetDefaultPermissionVersion(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_opSetDefaultPermissionVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ram", + OperationName: "SetDefaultPermissionVersion", + } +} diff --git a/service/ram/api_op_TagResource.go b/service/ram/api_op_TagResource.go index fbbedca909e..d1b25a592dc 100644 --- a/service/ram/api_op_TagResource.go +++ b/service/ram/api_op_TagResource.go @@ -11,9 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Adds the specified tag keys and values to the specified resource share. The -// tags are attached only to the resource share, not to the resources that are in -// the resource share. +// Adds the specified tag keys and values to a resource share or managed +// permission. If you choose a resource share, the tags are attached to only the +// resource share, not to the resources that are in the resource share. The tags on +// a managed permission are the same for all versions of the managed permission. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} @@ -31,12 +32,6 @@ func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optF type TagResourceInput struct { - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // of the resource share that you want to add tags to. - // - // This member is required. - ResourceShareArn *string - // A list of one or more tag key and value pairs. The tag key must be present and // not be an empty string. The tag value must be present but can be an empty // string. @@ -44,6 +39,16 @@ type TagResourceInput struct { // This member is required. Tags []types.Tag + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the managed permission that you want to add tags to. You must specify either + // resourceArn , or resourceShareArn , but not both. + ResourceArn *string + + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the resource share that you want to add tags to. You must specify either + // resourceShareArn , or resourceArn , but not both. + ResourceShareArn *string + noSmithyDocumentSerde } diff --git a/service/ram/api_op_UntagResource.go b/service/ram/api_op_UntagResource.go index 1dbfd4b2b8c..3c0dd4b9237 100644 --- a/service/ram/api_op_UntagResource.go +++ b/service/ram/api_op_UntagResource.go @@ -10,7 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes the specified tag key and value pairs from the specified resource share. +// Removes the specified tag key and value pairs from the specified resource share +// or managed permission. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} @@ -28,18 +29,22 @@ func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, type UntagResourceInput struct { - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // of the resource share that you want to remove tags from. The tags are removed - // from the resource share, not the resources in the resource share. - // - // This member is required. - ResourceShareArn *string - // Specifies a list of one or more tag keys that you want to remove. // // This member is required. TagKeys []string + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the managed permission that you want to remove tags from. You must specify + // either resourceArn , or resourceShareArn , but not both. + ResourceArn *string + + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the resource share that you want to remove tags from. The tags are removed + // from the resource share, not the resources in the resource share. You must + // specify either resourceShareArn , or resourceArn , but not both. + ResourceShareArn *string + noSmithyDocumentSerde } diff --git a/service/ram/api_op_UpdateResourceShare.go b/service/ram/api_op_UpdateResourceShare.go index 8e826704e2b..e70242677bf 100644 --- a/service/ram/api_op_UpdateResourceShare.go +++ b/service/ram/api_op_UpdateResourceShare.go @@ -29,7 +29,7 @@ func (c *Client) UpdateResourceShare(ctx context.Context, params *UpdateResource type UpdateResourceShareInput struct { - // Specifies the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // Specifies the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the resource share that you want to modify. // // This member is required. @@ -45,7 +45,8 @@ type UpdateResourceShareInput struct { // to a later call to an operation requires that you also pass the same value for // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) // . If you don't provide this value, then Amazon Web Services generates a random - // one for you. + // one for you. If you retry the operation with the same ClientToken , but with + // different parameters, the retry fails with an IdempotentParameterMismatch error. ClientToken *string // If specified, the new name that you want to attach to the resource share. diff --git a/service/ram/deserializers.go b/service/ram/deserializers.go index c3688373954..fb8f1494cf2 100644 --- a/service/ram/deserializers.go +++ b/service/ram/deserializers.go @@ -566,14 +566,14 @@ func awsRestjson1_deserializeOpDocumentAssociateResourceSharePermissionOutput(v return nil } -type awsRestjson1_deserializeOpCreateResourceShare struct { +type awsRestjson1_deserializeOpCreatePermission struct { } -func (*awsRestjson1_deserializeOpCreateResourceShare) ID() string { +func (*awsRestjson1_deserializeOpCreatePermission) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateResourceShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreatePermission) 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) @@ -587,9 +587,9 @@ func (m *awsRestjson1_deserializeOpCreateResourceShare) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateResourceShare(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreatePermission(response, &metadata) } - output := &CreateResourceShareOutput{} + output := &CreatePermissionOutput{} out.Result = output var buff [1024]byte @@ -610,7 +610,7 @@ func (m *awsRestjson1_deserializeOpCreateResourceShare) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateResourceShareOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreatePermissionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -623,7 +623,7 @@ func (m *awsRestjson1_deserializeOpCreateResourceShare) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateResourceShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreatePermission(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)} @@ -673,17 +673,20 @@ func awsRestjson1_deserializeOpErrorCreateResourceShare(response *smithyhttp.Res case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidStateTransitionException", errorCode): - return awsRestjson1_deserializeErrorInvalidStateTransitionException(response, errorBody) + case strings.EqualFold("InvalidPolicyException", errorCode): + return awsRestjson1_deserializeErrorInvalidPolicyException(response, errorBody) - case strings.EqualFold("MalformedArnException", errorCode): - return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + case strings.EqualFold("MalformedPolicyTemplateException", errorCode): + return awsRestjson1_deserializeErrorMalformedPolicyTemplateException(response, errorBody) case strings.EqualFold("OperationNotPermittedException", errorCode): return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) - case strings.EqualFold("ResourceShareLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceShareLimitExceededException(response, errorBody) + case strings.EqualFold("PermissionAlreadyExistsException", errorCode): + return awsRestjson1_deserializeErrorPermissionAlreadyExistsException(response, errorBody) + + case strings.EqualFold("PermissionLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorPermissionLimitExceededException(response, errorBody) case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) @@ -691,12 +694,6 @@ func awsRestjson1_deserializeOpErrorCreateResourceShare(response *smithyhttp.Res case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - case strings.EqualFold("TagPolicyViolationException", errorCode): - return awsRestjson1_deserializeErrorTagPolicyViolationException(response, errorBody) - - case strings.EqualFold("UnknownResourceException", errorCode): - return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -707,7 +704,7 @@ func awsRestjson1_deserializeOpErrorCreateResourceShare(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentCreateResourceShareOutput(v **CreateResourceShareOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreatePermissionOutput(v **CreatePermissionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -720,9 +717,9 @@ func awsRestjson1_deserializeOpDocumentCreateResourceShareOutput(v **CreateResou return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateResourceShareOutput + var sv *CreatePermissionOutput if *v == nil { - sv = &CreateResourceShareOutput{} + sv = &CreatePermissionOutput{} } else { sv = *v } @@ -738,8 +735,8 @@ func awsRestjson1_deserializeOpDocumentCreateResourceShareOutput(v **CreateResou sv.ClientToken = ptr.String(jtv) } - case "resourceShare": - if err := awsRestjson1_deserializeDocumentResourceShare(&sv.ResourceShare, value); err != nil { + case "permission": + if err := awsRestjson1_deserializeDocumentResourceSharePermissionSummary(&sv.Permission, value); err != nil { return err } @@ -752,14 +749,14 @@ func awsRestjson1_deserializeOpDocumentCreateResourceShareOutput(v **CreateResou return nil } -type awsRestjson1_deserializeOpDeleteResourceShare struct { +type awsRestjson1_deserializeOpCreatePermissionVersion struct { } -func (*awsRestjson1_deserializeOpDeleteResourceShare) ID() string { +func (*awsRestjson1_deserializeOpCreatePermissionVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteResourceShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreatePermissionVersion) 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) @@ -773,9 +770,9 @@ func (m *awsRestjson1_deserializeOpDeleteResourceShare) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteResourceShare(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreatePermissionVersion(response, &metadata) } - output := &DeleteResourceShareOutput{} + output := &CreatePermissionVersionOutput{} out.Result = output var buff [1024]byte @@ -796,7 +793,7 @@ func (m *awsRestjson1_deserializeOpDeleteResourceShare) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteResourceShareOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreatePermissionVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -809,7 +806,7 @@ func (m *awsRestjson1_deserializeOpDeleteResourceShare) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteResourceShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreatePermissionVersion(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)} @@ -859,14 +856,17 @@ func awsRestjson1_deserializeOpErrorDeleteResourceShare(response *smithyhttp.Res case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidStateTransitionException", errorCode): - return awsRestjson1_deserializeErrorInvalidStateTransitionException(response, errorBody) + case strings.EqualFold("InvalidPolicyException", errorCode): + return awsRestjson1_deserializeErrorInvalidPolicyException(response, errorBody) case strings.EqualFold("MalformedArnException", errorCode): return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) - case strings.EqualFold("OperationNotPermittedException", errorCode): - return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) + case strings.EqualFold("MalformedPolicyTemplateException", errorCode): + return awsRestjson1_deserializeErrorMalformedPolicyTemplateException(response, errorBody) + + case strings.EqualFold("PermissionVersionsLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorPermissionVersionsLimitExceededException(response, errorBody) case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) @@ -887,7 +887,7 @@ func awsRestjson1_deserializeOpErrorDeleteResourceShare(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentDeleteResourceShareOutput(v **DeleteResourceShareOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreatePermissionVersionOutput(v **CreatePermissionVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -900,9 +900,9 @@ func awsRestjson1_deserializeOpDocumentDeleteResourceShareOutput(v **DeleteResou return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteResourceShareOutput + var sv *CreatePermissionVersionOutput if *v == nil { - sv = &DeleteResourceShareOutput{} + sv = &CreatePermissionVersionOutput{} } else { sv = *v } @@ -918,13 +918,9 @@ func awsRestjson1_deserializeOpDocumentDeleteResourceShareOutput(v **DeleteResou sv.ClientToken = ptr.String(jtv) } - case "returnValue": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.ReturnValue = ptr.Bool(jtv) + case "permission": + if err := awsRestjson1_deserializeDocumentResourceSharePermissionDetail(&sv.Permission, value); err != nil { + return err } default: @@ -936,14 +932,14 @@ func awsRestjson1_deserializeOpDocumentDeleteResourceShareOutput(v **DeleteResou return nil } -type awsRestjson1_deserializeOpDisassociateResourceShare struct { +type awsRestjson1_deserializeOpCreateResourceShare struct { } -func (*awsRestjson1_deserializeOpDisassociateResourceShare) ID() string { +func (*awsRestjson1_deserializeOpCreateResourceShare) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisassociateResourceShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateResourceShare) 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) @@ -957,9 +953,9 @@ func (m *awsRestjson1_deserializeOpDisassociateResourceShare) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateResourceShare(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateResourceShare(response, &metadata) } - output := &DisassociateResourceShareOutput{} + output := &CreateResourceShareOutput{} out.Result = output var buff [1024]byte @@ -980,7 +976,7 @@ func (m *awsRestjson1_deserializeOpDisassociateResourceShare) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDisassociateResourceShareOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateResourceShareOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -993,7 +989,7 @@ func (m *awsRestjson1_deserializeOpDisassociateResourceShare) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisassociateResourceShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateResourceShare(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)} @@ -1061,6 +1057,9 @@ func awsRestjson1_deserializeOpErrorDisassociateResourceShare(response *smithyht case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("TagPolicyViolationException", errorCode): + return awsRestjson1_deserializeErrorTagPolicyViolationException(response, errorBody) + case strings.EqualFold("UnknownResourceException", errorCode): return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) @@ -1074,7 +1073,7 @@ func awsRestjson1_deserializeOpErrorDisassociateResourceShare(response *smithyht } } -func awsRestjson1_deserializeOpDocumentDisassociateResourceShareOutput(v **DisassociateResourceShareOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateResourceShareOutput(v **CreateResourceShareOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1087,9 +1086,9 @@ func awsRestjson1_deserializeOpDocumentDisassociateResourceShareOutput(v **Disas return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DisassociateResourceShareOutput + var sv *CreateResourceShareOutput if *v == nil { - sv = &DisassociateResourceShareOutput{} + sv = &CreateResourceShareOutput{} } else { sv = *v } @@ -1105,8 +1104,8 @@ func awsRestjson1_deserializeOpDocumentDisassociateResourceShareOutput(v **Disas sv.ClientToken = ptr.String(jtv) } - case "resourceShareAssociations": - if err := awsRestjson1_deserializeDocumentResourceShareAssociationList(&sv.ResourceShareAssociations, value); err != nil { + case "resourceShare": + if err := awsRestjson1_deserializeDocumentResourceShare(&sv.ResourceShare, value); err != nil { return err } @@ -1119,14 +1118,14 @@ func awsRestjson1_deserializeOpDocumentDisassociateResourceShareOutput(v **Disas return nil } -type awsRestjson1_deserializeOpDisassociateResourceSharePermission struct { +type awsRestjson1_deserializeOpDeletePermission struct { } -func (*awsRestjson1_deserializeOpDisassociateResourceSharePermission) ID() string { +func (*awsRestjson1_deserializeOpDeletePermission) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisassociateResourceSharePermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeletePermission) 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) @@ -1140,9 +1139,9 @@ func (m *awsRestjson1_deserializeOpDisassociateResourceSharePermission) HandleDe } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateResourceSharePermission(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeletePermission(response, &metadata) } - output := &DisassociateResourceSharePermissionOutput{} + output := &DeletePermissionOutput{} out.Result = output var buff [1024]byte @@ -1163,7 +1162,7 @@ func (m *awsRestjson1_deserializeOpDisassociateResourceSharePermission) HandleDe return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDisassociateResourceSharePermissionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeletePermissionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1176,7 +1175,7 @@ func (m *awsRestjson1_deserializeOpDisassociateResourceSharePermission) HandleDe return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisassociateResourceSharePermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeletePermission(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)} @@ -1217,15 +1216,12 @@ func awsRestjson1_deserializeOpErrorDisassociateResourceSharePermission(response } switch { + case strings.EqualFold("IdempotentParameterMismatchException", errorCode): + return awsRestjson1_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + case strings.EqualFold("InvalidClientTokenException", errorCode): return awsRestjson1_deserializeErrorInvalidClientTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidStateTransitionException", errorCode): - return awsRestjson1_deserializeErrorInvalidStateTransitionException(response, errorBody) - case strings.EqualFold("MalformedArnException", errorCode): return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) @@ -1251,7 +1247,7 @@ func awsRestjson1_deserializeOpErrorDisassociateResourceSharePermission(response } } -func awsRestjson1_deserializeOpDocumentDisassociateResourceSharePermissionOutput(v **DisassociateResourceSharePermissionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeletePermissionOutput(v **DeletePermissionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1264,9 +1260,9 @@ func awsRestjson1_deserializeOpDocumentDisassociateResourceSharePermissionOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DisassociateResourceSharePermissionOutput + var sv *DeletePermissionOutput if *v == nil { - sv = &DisassociateResourceSharePermissionOutput{} + sv = &DeletePermissionOutput{} } else { sv = *v } @@ -1282,6 +1278,15 @@ func awsRestjson1_deserializeOpDocumentDisassociateResourceSharePermissionOutput sv.ClientToken = ptr.String(jtv) } + case "permissionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PermissionStatus to be of type string, got %T instead", value) + } + sv.PermissionStatus = types.PermissionStatus(jtv) + } + case "returnValue": if value != nil { jtv, ok := value.(bool) @@ -1300,14 +1305,14 @@ func awsRestjson1_deserializeOpDocumentDisassociateResourceSharePermissionOutput return nil } -type awsRestjson1_deserializeOpEnableSharingWithAwsOrganization struct { +type awsRestjson1_deserializeOpDeletePermissionVersion struct { } -func (*awsRestjson1_deserializeOpEnableSharingWithAwsOrganization) ID() string { +func (*awsRestjson1_deserializeOpDeletePermissionVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpEnableSharingWithAwsOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeletePermissionVersion) 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) @@ -1321,9 +1326,9 @@ func (m *awsRestjson1_deserializeOpEnableSharingWithAwsOrganization) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorEnableSharingWithAwsOrganization(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeletePermissionVersion(response, &metadata) } - output := &EnableSharingWithAwsOrganizationOutput{} + output := &DeletePermissionVersionOutput{} out.Result = output var buff [1024]byte @@ -1344,7 +1349,7 @@ func (m *awsRestjson1_deserializeOpEnableSharingWithAwsOrganization) HandleDeser return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentEnableSharingWithAwsOrganizationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeletePermissionVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1357,7 +1362,7 @@ func (m *awsRestjson1_deserializeOpEnableSharingWithAwsOrganization) HandleDeser return out, metadata, err } -func awsRestjson1_deserializeOpErrorEnableSharingWithAwsOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeletePermissionVersion(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)} @@ -1398,6 +1403,18 @@ func awsRestjson1_deserializeOpErrorEnableSharingWithAwsOrganization(response *s } switch { + case strings.EqualFold("IdempotentParameterMismatchException", errorCode): + return awsRestjson1_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + + case strings.EqualFold("InvalidClientTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidClientTokenException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("MalformedArnException", errorCode): + return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + case strings.EqualFold("OperationNotPermittedException", errorCode): return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) @@ -1407,6 +1424,9 @@ func awsRestjson1_deserializeOpErrorEnableSharingWithAwsOrganization(response *s case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("UnknownResourceException", errorCode): + return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1417,7 +1437,7 @@ func awsRestjson1_deserializeOpErrorEnableSharingWithAwsOrganization(response *s } } -func awsRestjson1_deserializeOpDocumentEnableSharingWithAwsOrganizationOutput(v **EnableSharingWithAwsOrganizationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeletePermissionVersionOutput(v **DeletePermissionVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1430,15 +1450,33 @@ func awsRestjson1_deserializeOpDocumentEnableSharingWithAwsOrganizationOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *EnableSharingWithAwsOrganizationOutput + var sv *DeletePermissionVersionOutput if *v == nil { - sv = &EnableSharingWithAwsOrganizationOutput{} + sv = &DeletePermissionVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "clientToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ClientToken = ptr.String(jtv) + } + + case "permissionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PermissionStatus to be of type string, got %T instead", value) + } + sv.PermissionStatus = types.PermissionStatus(jtv) + } + case "returnValue": if value != nil { jtv, ok := value.(bool) @@ -1457,14 +1495,14 @@ func awsRestjson1_deserializeOpDocumentEnableSharingWithAwsOrganizationOutput(v return nil } -type awsRestjson1_deserializeOpGetPermission struct { +type awsRestjson1_deserializeOpDeleteResourceShare struct { } -func (*awsRestjson1_deserializeOpGetPermission) ID() string { +func (*awsRestjson1_deserializeOpDeleteResourceShare) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteResourceShare) 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) @@ -1478,9 +1516,9 @@ func (m *awsRestjson1_deserializeOpGetPermission) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetPermission(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteResourceShare(response, &metadata) } - output := &GetPermissionOutput{} + output := &DeleteResourceShareOutput{} out.Result = output var buff [1024]byte @@ -1501,7 +1539,7 @@ func (m *awsRestjson1_deserializeOpGetPermission) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetPermissionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteResourceShareOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1514,7 +1552,7 @@ func (m *awsRestjson1_deserializeOpGetPermission) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteResourceShare(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)} @@ -1555,9 +1593,18 @@ func awsRestjson1_deserializeOpErrorGetPermission(response *smithyhttp.Response, } switch { + case strings.EqualFold("IdempotentParameterMismatchException", errorCode): + return awsRestjson1_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + + case strings.EqualFold("InvalidClientTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidClientTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidStateTransitionException", errorCode): + return awsRestjson1_deserializeErrorInvalidStateTransitionException(response, errorBody) + case strings.EqualFold("MalformedArnException", errorCode): return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) @@ -1583,7 +1630,7 @@ func awsRestjson1_deserializeOpErrorGetPermission(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentGetPermissionOutput(v **GetPermissionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteResourceShareOutput(v **DeleteResourceShareOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1596,18 +1643,31 @@ func awsRestjson1_deserializeOpDocumentGetPermissionOutput(v **GetPermissionOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetPermissionOutput + var sv *DeleteResourceShareOutput if *v == nil { - sv = &GetPermissionOutput{} + sv = &DeleteResourceShareOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "permission": - if err := awsRestjson1_deserializeDocumentResourceSharePermissionDetail(&sv.Permission, value); err != nil { - return err + case "clientToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ClientToken = ptr.String(jtv) + } + + case "returnValue": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ReturnValue = ptr.Bool(jtv) } default: @@ -1619,14 +1679,14 @@ func awsRestjson1_deserializeOpDocumentGetPermissionOutput(v **GetPermissionOutp return nil } -type awsRestjson1_deserializeOpGetResourcePolicies struct { +type awsRestjson1_deserializeOpDisassociateResourceShare struct { } -func (*awsRestjson1_deserializeOpGetResourcePolicies) ID() string { +func (*awsRestjson1_deserializeOpDisassociateResourceShare) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetResourcePolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisassociateResourceShare) 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) @@ -1640,9 +1700,9 @@ func (m *awsRestjson1_deserializeOpGetResourcePolicies) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetResourcePolicies(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateResourceShare(response, &metadata) } - output := &GetResourcePoliciesOutput{} + output := &DisassociateResourceShareOutput{} out.Result = output var buff [1024]byte @@ -1663,7 +1723,7 @@ func (m *awsRestjson1_deserializeOpGetResourcePolicies) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetResourcePoliciesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDisassociateResourceShareOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1676,7 +1736,7 @@ func (m *awsRestjson1_deserializeOpGetResourcePolicies) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetResourcePolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisassociateResourceShare(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)} @@ -1717,17 +1777,26 @@ func awsRestjson1_deserializeOpErrorGetResourcePolicies(response *smithyhttp.Res } switch { - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("IdempotentParameterMismatchException", errorCode): + return awsRestjson1_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + + case strings.EqualFold("InvalidClientTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidClientTokenException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidStateTransitionException", errorCode): + return awsRestjson1_deserializeErrorInvalidStateTransitionException(response, errorBody) + case strings.EqualFold("MalformedArnException", errorCode): return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) - case strings.EqualFold("ResourceArnNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceArnNotFoundException(response, errorBody) + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) + + case strings.EqualFold("ResourceShareLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceShareLimitExceededException(response, errorBody) case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) @@ -1735,6 +1804,9 @@ func awsRestjson1_deserializeOpErrorGetResourcePolicies(response *smithyhttp.Res case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("UnknownResourceException", errorCode): + return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1745,7 +1817,7 @@ func awsRestjson1_deserializeOpErrorGetResourcePolicies(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentGetResourcePoliciesOutput(v **GetResourcePoliciesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDisassociateResourceShareOutput(v **DisassociateResourceShareOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1758,26 +1830,26 @@ func awsRestjson1_deserializeOpDocumentGetResourcePoliciesOutput(v **GetResource return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetResourcePoliciesOutput + var sv *DisassociateResourceShareOutput if *v == nil { - sv = &GetResourcePoliciesOutput{} + sv = &DisassociateResourceShareOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nextToken": + case "clientToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.ClientToken = ptr.String(jtv) } - case "policies": - if err := awsRestjson1_deserializeDocumentPolicyList(&sv.Policies, value); err != nil { + case "resourceShareAssociations": + if err := awsRestjson1_deserializeDocumentResourceShareAssociationList(&sv.ResourceShareAssociations, value); err != nil { return err } @@ -1790,14 +1862,14 @@ func awsRestjson1_deserializeOpDocumentGetResourcePoliciesOutput(v **GetResource return nil } -type awsRestjson1_deserializeOpGetResourceShareAssociations struct { +type awsRestjson1_deserializeOpDisassociateResourceSharePermission struct { } -func (*awsRestjson1_deserializeOpGetResourceShareAssociations) ID() string { +func (*awsRestjson1_deserializeOpDisassociateResourceSharePermission) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetResourceShareAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisassociateResourceSharePermission) 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) @@ -1811,9 +1883,9 @@ func (m *awsRestjson1_deserializeOpGetResourceShareAssociations) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetResourceShareAssociations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateResourceSharePermission(response, &metadata) } - output := &GetResourceShareAssociationsOutput{} + output := &DisassociateResourceSharePermissionOutput{} out.Result = output var buff [1024]byte @@ -1834,7 +1906,7 @@ func (m *awsRestjson1_deserializeOpGetResourceShareAssociations) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetResourceShareAssociationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDisassociateResourceSharePermissionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1847,7 +1919,7 @@ func (m *awsRestjson1_deserializeOpGetResourceShareAssociations) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetResourceShareAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisassociateResourceSharePermission(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)} @@ -1888,12 +1960,15 @@ func awsRestjson1_deserializeOpErrorGetResourceShareAssociations(response *smith } switch { - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - + case strings.EqualFold("InvalidClientTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidClientTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidStateTransitionException", errorCode): + return awsRestjson1_deserializeErrorInvalidStateTransitionException(response, errorBody) + case strings.EqualFold("MalformedArnException", errorCode): return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) @@ -1919,7 +1994,7 @@ func awsRestjson1_deserializeOpErrorGetResourceShareAssociations(response *smith } } -func awsRestjson1_deserializeOpDocumentGetResourceShareAssociationsOutput(v **GetResourceShareAssociationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDisassociateResourceSharePermissionOutput(v **DisassociateResourceSharePermissionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1932,27 +2007,31 @@ func awsRestjson1_deserializeOpDocumentGetResourceShareAssociationsOutput(v **Ge return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetResourceShareAssociationsOutput + var sv *DisassociateResourceSharePermissionOutput if *v == nil { - sv = &GetResourceShareAssociationsOutput{} + sv = &DisassociateResourceSharePermissionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nextToken": + case "clientToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.ClientToken = ptr.String(jtv) } - case "resourceShareAssociations": - if err := awsRestjson1_deserializeDocumentResourceShareAssociationList(&sv.ResourceShareAssociations, value); err != nil { - return err + case "returnValue": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ReturnValue = ptr.Bool(jtv) } default: @@ -1964,14 +2043,14 @@ func awsRestjson1_deserializeOpDocumentGetResourceShareAssociationsOutput(v **Ge return nil } -type awsRestjson1_deserializeOpGetResourceShareInvitations struct { +type awsRestjson1_deserializeOpEnableSharingWithAwsOrganization struct { } -func (*awsRestjson1_deserializeOpGetResourceShareInvitations) ID() string { +func (*awsRestjson1_deserializeOpEnableSharingWithAwsOrganization) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetResourceShareInvitations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpEnableSharingWithAwsOrganization) 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) @@ -1985,9 +2064,9 @@ func (m *awsRestjson1_deserializeOpGetResourceShareInvitations) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetResourceShareInvitations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorEnableSharingWithAwsOrganization(response, &metadata) } - output := &GetResourceShareInvitationsOutput{} + output := &EnableSharingWithAwsOrganizationOutput{} out.Result = output var buff [1024]byte @@ -2008,7 +2087,7 @@ func (m *awsRestjson1_deserializeOpGetResourceShareInvitations) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetResourceShareInvitationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentEnableSharingWithAwsOrganizationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2021,7 +2100,7 @@ func (m *awsRestjson1_deserializeOpGetResourceShareInvitations) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetResourceShareInvitations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorEnableSharingWithAwsOrganization(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)} @@ -2062,20 +2141,8 @@ func awsRestjson1_deserializeOpErrorGetResourceShareInvitations(response *smithy } switch { - case strings.EqualFold("InvalidMaxResultsException", errorCode): - return awsRestjson1_deserializeErrorInvalidMaxResultsException(response, errorBody) - - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("MalformedArnException", errorCode): - return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) - - case strings.EqualFold("ResourceShareInvitationArnNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceShareInvitationArnNotFoundException(response, errorBody) + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) @@ -2083,9 +2150,6 @@ func awsRestjson1_deserializeOpErrorGetResourceShareInvitations(response *smithy case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - case strings.EqualFold("UnknownResourceException", errorCode): - return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2096,7 +2160,7 @@ func awsRestjson1_deserializeOpErrorGetResourceShareInvitations(response *smithy } } -func awsRestjson1_deserializeOpDocumentGetResourceShareInvitationsOutput(v **GetResourceShareInvitationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentEnableSharingWithAwsOrganizationOutput(v **EnableSharingWithAwsOrganizationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2109,27 +2173,22 @@ func awsRestjson1_deserializeOpDocumentGetResourceShareInvitationsOutput(v **Get return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetResourceShareInvitationsOutput + var sv *EnableSharingWithAwsOrganizationOutput if *v == nil { - sv = &GetResourceShareInvitationsOutput{} + sv = &EnableSharingWithAwsOrganizationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nextToken": + case "returnValue": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.NextToken = ptr.String(jtv) - } - - case "resourceShareInvitations": - if err := awsRestjson1_deserializeDocumentResourceShareInvitationList(&sv.ResourceShareInvitations, value); err != nil { - return err + sv.ReturnValue = ptr.Bool(jtv) } default: @@ -2141,14 +2200,14 @@ func awsRestjson1_deserializeOpDocumentGetResourceShareInvitationsOutput(v **Get return nil } -type awsRestjson1_deserializeOpGetResourceShares struct { +type awsRestjson1_deserializeOpGetPermission struct { } -func (*awsRestjson1_deserializeOpGetResourceShares) ID() string { +func (*awsRestjson1_deserializeOpGetPermission) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetResourceShares) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetPermission) 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) @@ -2162,9 +2221,9 @@ func (m *awsRestjson1_deserializeOpGetResourceShares) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetResourceShares(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetPermission(response, &metadata) } - output := &GetResourceSharesOutput{} + output := &GetPermissionOutput{} out.Result = output var buff [1024]byte @@ -2185,7 +2244,7 @@ func (m *awsRestjson1_deserializeOpGetResourceShares) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetResourceSharesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetPermissionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2198,7 +2257,7 @@ func (m *awsRestjson1_deserializeOpGetResourceShares) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetResourceShares(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetPermission(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)} @@ -2239,15 +2298,15 @@ func awsRestjson1_deserializeOpErrorGetResourceShares(response *smithyhttp.Respo } switch { - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("MalformedArnException", errorCode): return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) + case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) @@ -2267,7 +2326,7 @@ func awsRestjson1_deserializeOpErrorGetResourceShares(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentGetResourceSharesOutput(v **GetResourceSharesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetPermissionOutput(v **GetPermissionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2280,26 +2339,17 @@ func awsRestjson1_deserializeOpDocumentGetResourceSharesOutput(v **GetResourceSh return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetResourceSharesOutput + var sv *GetPermissionOutput if *v == nil { - sv = &GetResourceSharesOutput{} + sv = &GetPermissionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "resourceShares": - if err := awsRestjson1_deserializeDocumentResourceShareList(&sv.ResourceShares, value); err != nil { + case "permission": + if err := awsRestjson1_deserializeDocumentResourceSharePermissionDetail(&sv.Permission, value); err != nil { return err } @@ -2312,14 +2362,14 @@ func awsRestjson1_deserializeOpDocumentGetResourceSharesOutput(v **GetResourceSh return nil } -type awsRestjson1_deserializeOpListPendingInvitationResources struct { +type awsRestjson1_deserializeOpGetResourcePolicies struct { } -func (*awsRestjson1_deserializeOpListPendingInvitationResources) ID() string { +func (*awsRestjson1_deserializeOpGetResourcePolicies) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListPendingInvitationResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetResourcePolicies) 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) @@ -2333,9 +2383,9 @@ func (m *awsRestjson1_deserializeOpListPendingInvitationResources) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListPendingInvitationResources(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetResourcePolicies(response, &metadata) } - output := &ListPendingInvitationResourcesOutput{} + output := &GetResourcePoliciesOutput{} out.Result = output var buff [1024]byte @@ -2356,7 +2406,7 @@ func (m *awsRestjson1_deserializeOpListPendingInvitationResources) HandleDeseria return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListPendingInvitationResourcesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetResourcePoliciesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2369,7 +2419,7 @@ func (m *awsRestjson1_deserializeOpListPendingInvitationResources) HandleDeseria return out, metadata, err } -func awsRestjson1_deserializeOpErrorListPendingInvitationResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetResourcePolicies(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)} @@ -2419,17 +2469,8 @@ func awsRestjson1_deserializeOpErrorListPendingInvitationResources(response *smi case strings.EqualFold("MalformedArnException", errorCode): return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) - case strings.EqualFold("MissingRequiredParameterException", errorCode): - return awsRestjson1_deserializeErrorMissingRequiredParameterException(response, errorBody) - - case strings.EqualFold("ResourceShareInvitationAlreadyRejectedException", errorCode): - return awsRestjson1_deserializeErrorResourceShareInvitationAlreadyRejectedException(response, errorBody) - - case strings.EqualFold("ResourceShareInvitationArnNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceShareInvitationArnNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceShareInvitationExpiredException", errorCode): - return awsRestjson1_deserializeErrorResourceShareInvitationExpiredException(response, errorBody) + case strings.EqualFold("ResourceArnNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceArnNotFoundException(response, errorBody) case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) @@ -2447,7 +2488,7 @@ func awsRestjson1_deserializeOpErrorListPendingInvitationResources(response *smi } } -func awsRestjson1_deserializeOpDocumentListPendingInvitationResourcesOutput(v **ListPendingInvitationResourcesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetResourcePoliciesOutput(v **GetResourcePoliciesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2460,9 +2501,9 @@ func awsRestjson1_deserializeOpDocumentListPendingInvitationResourcesOutput(v ** return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListPendingInvitationResourcesOutput + var sv *GetResourcePoliciesOutput if *v == nil { - sv = &ListPendingInvitationResourcesOutput{} + sv = &GetResourcePoliciesOutput{} } else { sv = *v } @@ -2478,8 +2519,8 @@ func awsRestjson1_deserializeOpDocumentListPendingInvitationResourcesOutput(v ** sv.NextToken = ptr.String(jtv) } - case "resources": - if err := awsRestjson1_deserializeDocumentResourceList(&sv.Resources, value); err != nil { + case "policies": + if err := awsRestjson1_deserializeDocumentPolicyList(&sv.Policies, value); err != nil { return err } @@ -2492,14 +2533,14 @@ func awsRestjson1_deserializeOpDocumentListPendingInvitationResourcesOutput(v ** return nil } -type awsRestjson1_deserializeOpListPermissions struct { +type awsRestjson1_deserializeOpGetResourceShareAssociations struct { } -func (*awsRestjson1_deserializeOpListPermissions) ID() string { +func (*awsRestjson1_deserializeOpGetResourceShareAssociations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetResourceShareAssociations) 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) @@ -2513,9 +2554,9 @@ func (m *awsRestjson1_deserializeOpListPermissions) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetResourceShareAssociations(response, &metadata) } - output := &ListPermissionsOutput{} + output := &GetResourceShareAssociationsOutput{} out.Result = output var buff [1024]byte @@ -2536,7 +2577,7 @@ func (m *awsRestjson1_deserializeOpListPermissions) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetResourceShareAssociationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2549,7 +2590,7 @@ func (m *awsRestjson1_deserializeOpListPermissions) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorListPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetResourceShareAssociations(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)} @@ -2596,6 +2637,9 @@ func awsRestjson1_deserializeOpErrorListPermissions(response *smithyhttp.Respons case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("MalformedArnException", errorCode): + return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + case strings.EqualFold("OperationNotPermittedException", errorCode): return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) @@ -2605,6 +2649,9 @@ func awsRestjson1_deserializeOpErrorListPermissions(response *smithyhttp.Respons case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("UnknownResourceException", errorCode): + return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2615,7 +2662,7 @@ func awsRestjson1_deserializeOpErrorListPermissions(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentListPermissionsOutput(v **ListPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetResourceShareAssociationsOutput(v **GetResourceShareAssociationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2628,9 +2675,9 @@ func awsRestjson1_deserializeOpDocumentListPermissionsOutput(v **ListPermissions return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListPermissionsOutput + var sv *GetResourceShareAssociationsOutput if *v == nil { - sv = &ListPermissionsOutput{} + sv = &GetResourceShareAssociationsOutput{} } else { sv = *v } @@ -2646,8 +2693,8 @@ func awsRestjson1_deserializeOpDocumentListPermissionsOutput(v **ListPermissions sv.NextToken = ptr.String(jtv) } - case "permissions": - if err := awsRestjson1_deserializeDocumentResourceSharePermissionList(&sv.Permissions, value); err != nil { + case "resourceShareAssociations": + if err := awsRestjson1_deserializeDocumentResourceShareAssociationList(&sv.ResourceShareAssociations, value); err != nil { return err } @@ -2660,14 +2707,14 @@ func awsRestjson1_deserializeOpDocumentListPermissionsOutput(v **ListPermissions return nil } -type awsRestjson1_deserializeOpListPermissionVersions struct { +type awsRestjson1_deserializeOpGetResourceShareInvitations struct { } -func (*awsRestjson1_deserializeOpListPermissionVersions) ID() string { +func (*awsRestjson1_deserializeOpGetResourceShareInvitations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListPermissionVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetResourceShareInvitations) 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) @@ -2681,9 +2728,9 @@ func (m *awsRestjson1_deserializeOpListPermissionVersions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListPermissionVersions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetResourceShareInvitations(response, &metadata) } - output := &ListPermissionVersionsOutput{} + output := &GetResourceShareInvitationsOutput{} out.Result = output var buff [1024]byte @@ -2704,7 +2751,7 @@ func (m *awsRestjson1_deserializeOpListPermissionVersions) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListPermissionVersionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetResourceShareInvitationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2717,7 +2764,7 @@ func (m *awsRestjson1_deserializeOpListPermissionVersions) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListPermissionVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetResourceShareInvitations(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)} @@ -2758,6 +2805,9 @@ func awsRestjson1_deserializeOpErrorListPermissionVersions(response *smithyhttp. } switch { + case strings.EqualFold("InvalidMaxResultsException", errorCode): + return awsRestjson1_deserializeErrorInvalidMaxResultsException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) @@ -2767,8 +2817,8 @@ func awsRestjson1_deserializeOpErrorListPermissionVersions(response *smithyhttp. case strings.EqualFold("MalformedArnException", errorCode): return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) - case strings.EqualFold("OperationNotPermittedException", errorCode): - return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) + case strings.EqualFold("ResourceShareInvitationArnNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceShareInvitationArnNotFoundException(response, errorBody) case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) @@ -2789,7 +2839,7 @@ func awsRestjson1_deserializeOpErrorListPermissionVersions(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListPermissionVersionsOutput(v **ListPermissionVersionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetResourceShareInvitationsOutput(v **GetResourceShareInvitationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2802,9 +2852,9 @@ func awsRestjson1_deserializeOpDocumentListPermissionVersionsOutput(v **ListPerm return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListPermissionVersionsOutput + var sv *GetResourceShareInvitationsOutput if *v == nil { - sv = &ListPermissionVersionsOutput{} + sv = &GetResourceShareInvitationsOutput{} } else { sv = *v } @@ -2820,8 +2870,8 @@ func awsRestjson1_deserializeOpDocumentListPermissionVersionsOutput(v **ListPerm sv.NextToken = ptr.String(jtv) } - case "permissions": - if err := awsRestjson1_deserializeDocumentResourceSharePermissionList(&sv.Permissions, value); err != nil { + case "resourceShareInvitations": + if err := awsRestjson1_deserializeDocumentResourceShareInvitationList(&sv.ResourceShareInvitations, value); err != nil { return err } @@ -2834,14 +2884,14 @@ func awsRestjson1_deserializeOpDocumentListPermissionVersionsOutput(v **ListPerm return nil } -type awsRestjson1_deserializeOpListPrincipals struct { +type awsRestjson1_deserializeOpGetResourceShares struct { } -func (*awsRestjson1_deserializeOpListPrincipals) ID() string { +func (*awsRestjson1_deserializeOpGetResourceShares) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListPrincipals) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetResourceShares) 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) @@ -2855,9 +2905,9 @@ func (m *awsRestjson1_deserializeOpListPrincipals) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListPrincipals(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetResourceShares(response, &metadata) } - output := &ListPrincipalsOutput{} + output := &GetResourceSharesOutput{} out.Result = output var buff [1024]byte @@ -2878,7 +2928,7 @@ func (m *awsRestjson1_deserializeOpListPrincipals) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListPrincipalsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetResourceSharesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2891,7 +2941,7 @@ func (m *awsRestjson1_deserializeOpListPrincipals) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListPrincipals(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetResourceShares(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)} @@ -2960,7 +3010,7 @@ func awsRestjson1_deserializeOpErrorListPrincipals(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentListPrincipalsOutput(v **ListPrincipalsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetResourceSharesOutput(v **GetResourceSharesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2973,9 +3023,9 @@ func awsRestjson1_deserializeOpDocumentListPrincipalsOutput(v **ListPrincipalsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListPrincipalsOutput + var sv *GetResourceSharesOutput if *v == nil { - sv = &ListPrincipalsOutput{} + sv = &GetResourceSharesOutput{} } else { sv = *v } @@ -2991,8 +3041,8 @@ func awsRestjson1_deserializeOpDocumentListPrincipalsOutput(v **ListPrincipalsOu sv.NextToken = ptr.String(jtv) } - case "principals": - if err := awsRestjson1_deserializeDocumentPrincipalList(&sv.Principals, value); err != nil { + case "resourceShares": + if err := awsRestjson1_deserializeDocumentResourceShareList(&sv.ResourceShares, value); err != nil { return err } @@ -3005,14 +3055,14 @@ func awsRestjson1_deserializeOpDocumentListPrincipalsOutput(v **ListPrincipalsOu return nil } -type awsRestjson1_deserializeOpListResources struct { +type awsRestjson1_deserializeOpListPendingInvitationResources struct { } -func (*awsRestjson1_deserializeOpListResources) ID() string { +func (*awsRestjson1_deserializeOpListPendingInvitationResources) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListPendingInvitationResources) 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) @@ -3026,9 +3076,9 @@ func (m *awsRestjson1_deserializeOpListResources) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListResources(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListPendingInvitationResources(response, &metadata) } - output := &ListResourcesOutput{} + output := &ListPendingInvitationResourcesOutput{} out.Result = output var buff [1024]byte @@ -3049,7 +3099,7 @@ func (m *awsRestjson1_deserializeOpListResources) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListResourcesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListPendingInvitationResourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3062,7 +3112,7 @@ func (m *awsRestjson1_deserializeOpListResources) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorListResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListPendingInvitationResources(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)} @@ -3109,21 +3159,27 @@ func awsRestjson1_deserializeOpErrorListResources(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidResourceTypeException", errorCode): - return awsRestjson1_deserializeErrorInvalidResourceTypeException(response, errorBody) - case strings.EqualFold("MalformedArnException", errorCode): return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + case strings.EqualFold("MissingRequiredParameterException", errorCode): + return awsRestjson1_deserializeErrorMissingRequiredParameterException(response, errorBody) + + case strings.EqualFold("ResourceShareInvitationAlreadyRejectedException", errorCode): + return awsRestjson1_deserializeErrorResourceShareInvitationAlreadyRejectedException(response, errorBody) + + case strings.EqualFold("ResourceShareInvitationArnNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceShareInvitationArnNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceShareInvitationExpiredException", errorCode): + return awsRestjson1_deserializeErrorResourceShareInvitationExpiredException(response, errorBody) + case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - case strings.EqualFold("UnknownResourceException", errorCode): - return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3134,7 +3190,7 @@ func awsRestjson1_deserializeOpErrorListResources(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListResourcesOutput(v **ListResourcesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListPendingInvitationResourcesOutput(v **ListPendingInvitationResourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3147,9 +3203,9 @@ func awsRestjson1_deserializeOpDocumentListResourcesOutput(v **ListResourcesOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListResourcesOutput + var sv *ListPendingInvitationResourcesOutput if *v == nil { - sv = &ListResourcesOutput{} + sv = &ListPendingInvitationResourcesOutput{} } else { sv = *v } @@ -3179,14 +3235,14 @@ func awsRestjson1_deserializeOpDocumentListResourcesOutput(v **ListResourcesOutp return nil } -type awsRestjson1_deserializeOpListResourceSharePermissions struct { +type awsRestjson1_deserializeOpListPermissionAssociations struct { } -func (*awsRestjson1_deserializeOpListResourceSharePermissions) ID() string { +func (*awsRestjson1_deserializeOpListPermissionAssociations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListResourceSharePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListPermissionAssociations) 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) @@ -3200,9 +3256,9 @@ func (m *awsRestjson1_deserializeOpListResourceSharePermissions) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListResourceSharePermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListPermissionAssociations(response, &metadata) } - output := &ListResourceSharePermissionsOutput{} + output := &ListPermissionAssociationsOutput{} out.Result = output var buff [1024]byte @@ -3223,7 +3279,7 @@ func (m *awsRestjson1_deserializeOpListResourceSharePermissions) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListResourceSharePermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListPermissionAssociationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3236,7 +3292,7 @@ func (m *awsRestjson1_deserializeOpListResourceSharePermissions) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorListResourceSharePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListPermissionAssociations(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)} @@ -3286,18 +3342,12 @@ func awsRestjson1_deserializeOpErrorListResourceSharePermissions(response *smith case strings.EqualFold("MalformedArnException", errorCode): return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) - case strings.EqualFold("OperationNotPermittedException", errorCode): - return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) - case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - case strings.EqualFold("UnknownResourceException", errorCode): - return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3308,7 +3358,7 @@ func awsRestjson1_deserializeOpErrorListResourceSharePermissions(response *smith } } -func awsRestjson1_deserializeOpDocumentListResourceSharePermissionsOutput(v **ListResourceSharePermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListPermissionAssociationsOutput(v **ListPermissionAssociationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3321,9 +3371,9 @@ func awsRestjson1_deserializeOpDocumentListResourceSharePermissionsOutput(v **Li return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListResourceSharePermissionsOutput + var sv *ListPermissionAssociationsOutput if *v == nil { - sv = &ListResourceSharePermissionsOutput{} + sv = &ListPermissionAssociationsOutput{} } else { sv = *v } @@ -3340,7 +3390,7 @@ func awsRestjson1_deserializeOpDocumentListResourceSharePermissionsOutput(v **Li } case "permissions": - if err := awsRestjson1_deserializeDocumentResourceSharePermissionList(&sv.Permissions, value); err != nil { + if err := awsRestjson1_deserializeDocumentAssociatedPermissionList(&sv.Permissions, value); err != nil { return err } @@ -3353,14 +3403,14 @@ func awsRestjson1_deserializeOpDocumentListResourceSharePermissionsOutput(v **Li return nil } -type awsRestjson1_deserializeOpListResourceTypes struct { +type awsRestjson1_deserializeOpListPermissions struct { } -func (*awsRestjson1_deserializeOpListResourceTypes) ID() string { +func (*awsRestjson1_deserializeOpListPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListResourceTypes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListPermissions) 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) @@ -3374,9 +3424,9 @@ func (m *awsRestjson1_deserializeOpListResourceTypes) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListResourceTypes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListPermissions(response, &metadata) } - output := &ListResourceTypesOutput{} + output := &ListPermissionsOutput{} out.Result = output var buff [1024]byte @@ -3397,7 +3447,7 @@ func (m *awsRestjson1_deserializeOpListResourceTypes) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListResourceTypesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3410,7 +3460,7 @@ func (m *awsRestjson1_deserializeOpListResourceTypes) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListResourceTypes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListPermissions(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)} @@ -3457,6 +3507,9 @@ func awsRestjson1_deserializeOpErrorListResourceTypes(response *smithyhttp.Respo case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) + case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) @@ -3473,7 +3526,7 @@ func awsRestjson1_deserializeOpErrorListResourceTypes(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentListResourceTypesOutput(v **ListResourceTypesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListPermissionsOutput(v **ListPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3486,9 +3539,9 @@ func awsRestjson1_deserializeOpDocumentListResourceTypesOutput(v **ListResourceT return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListResourceTypesOutput + var sv *ListPermissionsOutput if *v == nil { - sv = &ListResourceTypesOutput{} + sv = &ListPermissionsOutput{} } else { sv = *v } @@ -3504,8 +3557,8 @@ func awsRestjson1_deserializeOpDocumentListResourceTypesOutput(v **ListResourceT sv.NextToken = ptr.String(jtv) } - case "resourceTypes": - if err := awsRestjson1_deserializeDocumentServiceNameAndResourceTypeList(&sv.ResourceTypes, value); err != nil { + case "permissions": + if err := awsRestjson1_deserializeDocumentResourceSharePermissionList(&sv.Permissions, value); err != nil { return err } @@ -3518,14 +3571,14 @@ func awsRestjson1_deserializeOpDocumentListResourceTypesOutput(v **ListResourceT return nil } -type awsRestjson1_deserializeOpPromoteResourceShareCreatedFromPolicy struct { +type awsRestjson1_deserializeOpListPermissionVersions struct { } -func (*awsRestjson1_deserializeOpPromoteResourceShareCreatedFromPolicy) ID() string { +func (*awsRestjson1_deserializeOpListPermissionVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPromoteResourceShareCreatedFromPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListPermissionVersions) 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) @@ -3539,9 +3592,9 @@ func (m *awsRestjson1_deserializeOpPromoteResourceShareCreatedFromPolicy) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPromoteResourceShareCreatedFromPolicy(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListPermissionVersions(response, &metadata) } - output := &PromoteResourceShareCreatedFromPolicyOutput{} + output := &ListPermissionVersionsOutput{} out.Result = output var buff [1024]byte @@ -3562,7 +3615,7 @@ func (m *awsRestjson1_deserializeOpPromoteResourceShareCreatedFromPolicy) Handle return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPromoteResourceShareCreatedFromPolicyOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListPermissionVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3575,7 +3628,7 @@ func (m *awsRestjson1_deserializeOpPromoteResourceShareCreatedFromPolicy) Handle return out, metadata, err } -func awsRestjson1_deserializeOpErrorPromoteResourceShareCreatedFromPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListPermissionVersions(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)} @@ -3616,21 +3669,18 @@ func awsRestjson1_deserializeOpErrorPromoteResourceShareCreatedFromPolicy(respon } switch { + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("MalformedArnException", errorCode): return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) - case strings.EqualFold("MissingRequiredParameterException", errorCode): - return awsRestjson1_deserializeErrorMissingRequiredParameterException(response, errorBody) - case strings.EqualFold("OperationNotPermittedException", errorCode): return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) - case strings.EqualFold("ResourceShareLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceShareLimitExceededException(response, errorBody) - case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) @@ -3650,7 +3700,7 @@ func awsRestjson1_deserializeOpErrorPromoteResourceShareCreatedFromPolicy(respon } } -func awsRestjson1_deserializeOpDocumentPromoteResourceShareCreatedFromPolicyOutput(v **PromoteResourceShareCreatedFromPolicyOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListPermissionVersionsOutput(v **ListPermissionVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3663,22 +3713,27 @@ func awsRestjson1_deserializeOpDocumentPromoteResourceShareCreatedFromPolicyOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PromoteResourceShareCreatedFromPolicyOutput + var sv *ListPermissionVersionsOutput if *v == nil { - sv = &PromoteResourceShareCreatedFromPolicyOutput{} + sv = &ListPermissionVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "returnValue": + case "nextToken": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ReturnValue = ptr.Bool(jtv) + sv.NextToken = ptr.String(jtv) + } + + case "permissions": + if err := awsRestjson1_deserializeDocumentResourceSharePermissionList(&sv.Permissions, value); err != nil { + return err } default: @@ -3690,14 +3745,14 @@ func awsRestjson1_deserializeOpDocumentPromoteResourceShareCreatedFromPolicyOutp return nil } -type awsRestjson1_deserializeOpRejectResourceShareInvitation struct { +type awsRestjson1_deserializeOpListPrincipals struct { } -func (*awsRestjson1_deserializeOpRejectResourceShareInvitation) ID() string { +func (*awsRestjson1_deserializeOpListPrincipals) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRejectResourceShareInvitation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListPrincipals) 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) @@ -3711,9 +3766,9 @@ func (m *awsRestjson1_deserializeOpRejectResourceShareInvitation) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRejectResourceShareInvitation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListPrincipals(response, &metadata) } - output := &RejectResourceShareInvitationOutput{} + output := &ListPrincipalsOutput{} out.Result = output var buff [1024]byte @@ -3734,7 +3789,7 @@ func (m *awsRestjson1_deserializeOpRejectResourceShareInvitation) HandleDeserial return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRejectResourceShareInvitationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListPrincipalsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3747,7 +3802,7 @@ func (m *awsRestjson1_deserializeOpRejectResourceShareInvitation) HandleDeserial return out, metadata, err } -func awsRestjson1_deserializeOpErrorRejectResourceShareInvitation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListPrincipals(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)} @@ -3788,36 +3843,24 @@ func awsRestjson1_deserializeOpErrorRejectResourceShareInvitation(response *smit } switch { - case strings.EqualFold("IdempotentParameterMismatchException", errorCode): - return awsRestjson1_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidClientTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidClientTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("MalformedArnException", errorCode): return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) - case strings.EqualFold("OperationNotPermittedException", errorCode): - return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) - - case strings.EqualFold("ResourceShareInvitationAlreadyAcceptedException", errorCode): - return awsRestjson1_deserializeErrorResourceShareInvitationAlreadyAcceptedException(response, errorBody) - - case strings.EqualFold("ResourceShareInvitationAlreadyRejectedException", errorCode): - return awsRestjson1_deserializeErrorResourceShareInvitationAlreadyRejectedException(response, errorBody) - - case strings.EqualFold("ResourceShareInvitationArnNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceShareInvitationArnNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceShareInvitationExpiredException", errorCode): - return awsRestjson1_deserializeErrorResourceShareInvitationExpiredException(response, errorBody) - case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("UnknownResourceException", errorCode): + return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3828,7 +3871,7 @@ func awsRestjson1_deserializeOpErrorRejectResourceShareInvitation(response *smit } } -func awsRestjson1_deserializeOpDocumentRejectResourceShareInvitationOutput(v **RejectResourceShareInvitationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListPrincipalsOutput(v **ListPrincipalsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3841,26 +3884,26 @@ func awsRestjson1_deserializeOpDocumentRejectResourceShareInvitationOutput(v **R return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RejectResourceShareInvitationOutput + var sv *ListPrincipalsOutput if *v == nil { - sv = &RejectResourceShareInvitationOutput{} + sv = &ListPrincipalsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "clientToken": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ClientToken = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } - case "resourceShareInvitation": - if err := awsRestjson1_deserializeDocumentResourceShareInvitation(&sv.ResourceShareInvitation, value); err != nil { + case "principals": + if err := awsRestjson1_deserializeDocumentPrincipalList(&sv.Principals, value); err != nil { return err } @@ -3873,14 +3916,14 @@ func awsRestjson1_deserializeOpDocumentRejectResourceShareInvitationOutput(v **R return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpListReplacePermissionAssociationsWork struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpListReplacePermissionAssociationsWork) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListReplacePermissionAssociationsWork) 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) @@ -3894,15 +3937,43 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListReplacePermissionAssociationsWork(response, &metadata) } - output := &TagResourceOutput{} + output := &ListReplacePermissionAssociationsWorkOutput{} 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_deserializeOpDocumentListReplacePermissionAssociationsWorkOutput(&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_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListReplacePermissionAssociationsWork(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)} @@ -3943,30 +4014,18 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } switch { + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("MalformedArnException", errorCode): - return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) - - case strings.EqualFold("ResourceArnNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceArnNotFoundException(response, errorBody) - case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - case strings.EqualFold("TagLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorTagLimitExceededException(response, errorBody) - - case strings.EqualFold("TagPolicyViolationException", errorCode): - return awsRestjson1_deserializeErrorTagPolicyViolationException(response, errorBody) - - case strings.EqualFold("UnknownResourceException", errorCode): - return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3977,38 +4036,111 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpUntagResource struct { -} - -func (*awsRestjson1_deserializeOpUntagResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUntagResource) 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 +func awsRestjson1_deserializeOpDocumentListReplacePermissionAssociationsWorkOutput(v **ListReplacePermissionAssociationsWorkOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - response, ok := out.RawResponse.(*smithyhttp.Response) + shape, ok := value.(map[string]interface{}) if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + return fmt.Errorf("unexpected JSON type %v", value) } - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + var sv *ListReplacePermissionAssociationsWorkOutput + if *v == nil { + sv = &ListReplacePermissionAssociationsWorkOutput{} + } else { + sv = *v } - output := &UntagResourceOutput{} - out.Result = output - return out, metadata, err -} + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + case "replacePermissionAssociationsWorks": + if err := awsRestjson1_deserializeDocumentReplacePermissionAssociationsWorkList(&sv.ReplacePermissionAssociationsWorks, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListResources struct { +} + +func (*awsRestjson1_deserializeOpListResources) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListResources) 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_deserializeOpErrorListResources(response, &metadata) + } + output := &ListResourcesOutput{} + 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_deserializeOpDocumentListResourcesOutput(&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_deserializeOpErrorListResources(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()) @@ -4047,15 +4179,27 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } switch { + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidResourceTypeException", errorCode): + return awsRestjson1_deserializeErrorInvalidResourceTypeException(response, errorBody) + + case strings.EqualFold("MalformedArnException", errorCode): + return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + case strings.EqualFold("ServerInternalException", errorCode): return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("UnknownResourceException", errorCode): + return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4066,14 +4210,59 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpUpdateResourceShare struct { +func awsRestjson1_deserializeOpDocumentListResourcesOutput(v **ListResourcesOutput, 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 *ListResourcesOutput + if *v == nil { + sv = &ListResourcesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "resources": + if err := awsRestjson1_deserializeDocumentResourceList(&sv.Resources, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUpdateResourceShare) ID() string { +type awsRestjson1_deserializeOpListResourceSharePermissions struct { +} + +func (*awsRestjson1_deserializeOpListResourceSharePermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateResourceShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListResourceSharePermissions) 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) @@ -4087,9 +4276,9 @@ func (m *awsRestjson1_deserializeOpUpdateResourceShare) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateResourceShare(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListResourceSharePermissions(response, &metadata) } - output := &UpdateResourceShareOutput{} + output := &ListResourceSharePermissionsOutput{} out.Result = output var buff [1024]byte @@ -4110,7 +4299,7 @@ func (m *awsRestjson1_deserializeOpUpdateResourceShare) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateResourceShareOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListResourceSharePermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4123,7 +4312,7 @@ func (m *awsRestjson1_deserializeOpUpdateResourceShare) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateResourceShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListResourceSharePermissions(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)} @@ -4164,11 +4353,8 @@ func awsRestjson1_deserializeOpErrorUpdateResourceShare(response *smithyhttp.Res } switch { - case strings.EqualFold("IdempotentParameterMismatchException", errorCode): - return awsRestjson1_deserializeErrorIdempotentParameterMismatchException(response, errorBody) - - case strings.EqualFold("InvalidClientTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidClientTokenException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) @@ -4176,9 +4362,6 @@ func awsRestjson1_deserializeOpErrorUpdateResourceShare(response *smithyhttp.Res case strings.EqualFold("MalformedArnException", errorCode): return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) - case strings.EqualFold("MissingRequiredParameterException", errorCode): - return awsRestjson1_deserializeErrorMissingRequiredParameterException(response, errorBody) - case strings.EqualFold("OperationNotPermittedException", errorCode): return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) @@ -4201,7 +4384,7 @@ func awsRestjson1_deserializeOpErrorUpdateResourceShare(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentUpdateResourceShareOutput(v **UpdateResourceShareOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListResourceSharePermissionsOutput(v **ListResourceSharePermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4214,26 +4397,26 @@ func awsRestjson1_deserializeOpDocumentUpdateResourceShareOutput(v **UpdateResou return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateResourceShareOutput + var sv *ListResourceSharePermissionsOutput if *v == nil { - sv = &UpdateResourceShareOutput{} + sv = &ListResourceSharePermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "clientToken": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ClientToken = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } - case "resourceShare": - if err := awsRestjson1_deserializeDocumentResourceShare(&sv.ResourceShare, value); err != nil { + case "permissions": + if err := awsRestjson1_deserializeDocumentResourceSharePermissionList(&sv.Permissions, value); err != nil { return err } @@ -4246,48 +4429,37 @@ func awsRestjson1_deserializeOpDocumentUpdateResourceShareOutput(v **UpdateResou return nil } -func awsRestjson1_deserializeErrorIdempotentParameterMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.IdempotentParameterMismatchException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, 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 err - } +type awsRestjson1_deserializeOpListResourceTypes struct { +} - err := awsRestjson1_deserializeDocumentIdempotentParameterMismatchException(&output, shape) +func (*awsRestjson1_deserializeOpListResourceTypes) ID() string { + return "OperationDeserializer" +} +func (m *awsRestjson1_deserializeOpListResourceTypes) 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 { - 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 + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - return output -} + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListResourceTypes(response, &metadata) + } + output := &ListResourceTypesOutput{} + out.Result = output -func awsRestjson1_deserializeErrorInvalidClientTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidClientTokenException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4298,36 +4470,45 @@ func awsRestjson1_deserializeErrorInvalidClientTokenException(response *smithyht Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentInvalidClientTokenException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentListResourceTypesOutput(&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), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorInvalidMaxResultsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidMaxResultsException{} +func awsRestjson1_deserializeOpErrorListResourceTypes(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() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -4337,7 +4518,1803 @@ func awsRestjson1_deserializeErrorInvalidMaxResultsException(response *smithyhtt return err } - err := awsRestjson1_deserializeDocumentInvalidMaxResultsException(&output, shape) + 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("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServerInternalException", errorCode): + return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListResourceTypesOutput(v **ListResourceTypesOutput, 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 *ListResourceTypesOutput + if *v == nil { + sv = &ListResourceTypesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "resourceTypes": + if err := awsRestjson1_deserializeDocumentServiceNameAndResourceTypeList(&sv.ResourceTypes, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPromotePermissionCreatedFromPolicy struct { +} + +func (*awsRestjson1_deserializeOpPromotePermissionCreatedFromPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPromotePermissionCreatedFromPolicy) 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_deserializeOpErrorPromotePermissionCreatedFromPolicy(response, &metadata) + } + output := &PromotePermissionCreatedFromPolicyOutput{} + 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_deserializeOpDocumentPromotePermissionCreatedFromPolicyOutput(&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_deserializeOpErrorPromotePermissionCreatedFromPolicy(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("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("MalformedArnException", errorCode): + return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + + case strings.EqualFold("MissingRequiredParameterException", errorCode): + return awsRestjson1_deserializeErrorMissingRequiredParameterException(response, errorBody) + + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) + + case strings.EqualFold("ServerInternalException", errorCode): + return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("UnknownResourceException", errorCode): + return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPromotePermissionCreatedFromPolicyOutput(v **PromotePermissionCreatedFromPolicyOutput, 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 *PromotePermissionCreatedFromPolicyOutput + if *v == nil { + sv = &PromotePermissionCreatedFromPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "clientToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ClientToken = ptr.String(jtv) + } + + case "permission": + if err := awsRestjson1_deserializeDocumentResourceSharePermissionSummary(&sv.Permission, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPromoteResourceShareCreatedFromPolicy struct { +} + +func (*awsRestjson1_deserializeOpPromoteResourceShareCreatedFromPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPromoteResourceShareCreatedFromPolicy) 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_deserializeOpErrorPromoteResourceShareCreatedFromPolicy(response, &metadata) + } + output := &PromoteResourceShareCreatedFromPolicyOutput{} + 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_deserializeOpDocumentPromoteResourceShareCreatedFromPolicyOutput(&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_deserializeOpErrorPromoteResourceShareCreatedFromPolicy(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("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidStateTransitionException", errorCode): + return awsRestjson1_deserializeErrorInvalidStateTransitionException(response, errorBody) + + case strings.EqualFold("MalformedArnException", errorCode): + return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + + case strings.EqualFold("MissingRequiredParameterException", errorCode): + return awsRestjson1_deserializeErrorMissingRequiredParameterException(response, errorBody) + + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) + + case strings.EqualFold("ResourceShareLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceShareLimitExceededException(response, errorBody) + + case strings.EqualFold("ServerInternalException", errorCode): + return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("UnknownResourceException", errorCode): + return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) + + case strings.EqualFold("UnmatchedPolicyPermissionException", errorCode): + return awsRestjson1_deserializeErrorUnmatchedPolicyPermissionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPromoteResourceShareCreatedFromPolicyOutput(v **PromoteResourceShareCreatedFromPolicyOutput, 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 *PromoteResourceShareCreatedFromPolicyOutput + if *v == nil { + sv = &PromoteResourceShareCreatedFromPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "returnValue": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ReturnValue = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpRejectResourceShareInvitation struct { +} + +func (*awsRestjson1_deserializeOpRejectResourceShareInvitation) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRejectResourceShareInvitation) 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_deserializeOpErrorRejectResourceShareInvitation(response, &metadata) + } + output := &RejectResourceShareInvitationOutput{} + 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_deserializeOpDocumentRejectResourceShareInvitationOutput(&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_deserializeOpErrorRejectResourceShareInvitation(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("IdempotentParameterMismatchException", errorCode): + return awsRestjson1_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + + case strings.EqualFold("InvalidClientTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidClientTokenException(response, errorBody) + + case strings.EqualFold("MalformedArnException", errorCode): + return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) + + case strings.EqualFold("ResourceShareInvitationAlreadyAcceptedException", errorCode): + return awsRestjson1_deserializeErrorResourceShareInvitationAlreadyAcceptedException(response, errorBody) + + case strings.EqualFold("ResourceShareInvitationAlreadyRejectedException", errorCode): + return awsRestjson1_deserializeErrorResourceShareInvitationAlreadyRejectedException(response, errorBody) + + case strings.EqualFold("ResourceShareInvitationArnNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceShareInvitationArnNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceShareInvitationExpiredException", errorCode): + return awsRestjson1_deserializeErrorResourceShareInvitationExpiredException(response, errorBody) + + case strings.EqualFold("ServerInternalException", errorCode): + return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentRejectResourceShareInvitationOutput(v **RejectResourceShareInvitationOutput, 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 *RejectResourceShareInvitationOutput + if *v == nil { + sv = &RejectResourceShareInvitationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "clientToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ClientToken = ptr.String(jtv) + } + + case "resourceShareInvitation": + if err := awsRestjson1_deserializeDocumentResourceShareInvitation(&sv.ResourceShareInvitation, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpReplacePermissionAssociations struct { +} + +func (*awsRestjson1_deserializeOpReplacePermissionAssociations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpReplacePermissionAssociations) 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_deserializeOpErrorReplacePermissionAssociations(response, &metadata) + } + output := &ReplacePermissionAssociationsOutput{} + 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_deserializeOpDocumentReplacePermissionAssociationsOutput(&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_deserializeOpErrorReplacePermissionAssociations(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("IdempotentParameterMismatchException", errorCode): + return awsRestjson1_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + + case strings.EqualFold("InvalidClientTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidClientTokenException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("MalformedArnException", errorCode): + return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) + + case strings.EqualFold("ServerInternalException", errorCode): + return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("UnknownResourceException", errorCode): + return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentReplacePermissionAssociationsOutput(v **ReplacePermissionAssociationsOutput, 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 *ReplacePermissionAssociationsOutput + if *v == nil { + sv = &ReplacePermissionAssociationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "clientToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ClientToken = ptr.String(jtv) + } + + case "replacePermissionAssociationsWork": + if err := awsRestjson1_deserializeDocumentReplacePermissionAssociationsWork(&sv.ReplacePermissionAssociationsWork, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpSetDefaultPermissionVersion struct { +} + +func (*awsRestjson1_deserializeOpSetDefaultPermissionVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSetDefaultPermissionVersion) 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_deserializeOpErrorSetDefaultPermissionVersion(response, &metadata) + } + output := &SetDefaultPermissionVersionOutput{} + 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_deserializeOpDocumentSetDefaultPermissionVersionOutput(&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_deserializeOpErrorSetDefaultPermissionVersion(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("IdempotentParameterMismatchException", errorCode): + return awsRestjson1_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + + case strings.EqualFold("InvalidClientTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidClientTokenException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("MalformedArnException", errorCode): + return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + + case strings.EqualFold("ServerInternalException", errorCode): + return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("UnknownResourceException", errorCode): + return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentSetDefaultPermissionVersionOutput(v **SetDefaultPermissionVersionOutput, 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 *SetDefaultPermissionVersionOutput + if *v == nil { + sv = &SetDefaultPermissionVersionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "clientToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ClientToken = ptr.String(jtv) + } + + case "returnValue": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ReturnValue = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) 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_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(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("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("MalformedArnException", errorCode): + return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + + case strings.EqualFold("ResourceArnNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceArnNotFoundException(response, errorBody) + + case strings.EqualFold("ServerInternalException", errorCode): + return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TagLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorTagLimitExceededException(response, errorBody) + + case strings.EqualFold("TagPolicyViolationException", errorCode): + return awsRestjson1_deserializeErrorTagPolicyViolationException(response, errorBody) + + case strings.EqualFold("UnknownResourceException", errorCode): + return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) 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_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(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("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("MalformedArnException", errorCode): + return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + + case strings.EqualFold("ServerInternalException", errorCode): + return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("UnknownResourceException", errorCode): + return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateResourceShare struct { +} + +func (*awsRestjson1_deserializeOpUpdateResourceShare) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateResourceShare) 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_deserializeOpErrorUpdateResourceShare(response, &metadata) + } + output := &UpdateResourceShareOutput{} + 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_deserializeOpDocumentUpdateResourceShareOutput(&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_deserializeOpErrorUpdateResourceShare(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("IdempotentParameterMismatchException", errorCode): + return awsRestjson1_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + + case strings.EqualFold("InvalidClientTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidClientTokenException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("MalformedArnException", errorCode): + return awsRestjson1_deserializeErrorMalformedArnException(response, errorBody) + + case strings.EqualFold("MissingRequiredParameterException", errorCode): + return awsRestjson1_deserializeErrorMissingRequiredParameterException(response, errorBody) + + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsRestjson1_deserializeErrorOperationNotPermittedException(response, errorBody) + + case strings.EqualFold("ServerInternalException", errorCode): + return awsRestjson1_deserializeErrorServerInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("UnknownResourceException", errorCode): + return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateResourceShareOutput(v **UpdateResourceShareOutput, 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 *UpdateResourceShareOutput + if *v == nil { + sv = &UpdateResourceShareOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "clientToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ClientToken = ptr.String(jtv) + } + + case "resourceShare": + if err := awsRestjson1_deserializeDocumentResourceShare(&sv.ResourceShare, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorIdempotentParameterMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IdempotentParameterMismatchException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentIdempotentParameterMismatchException(&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 err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInvalidClientTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidClientTokenException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentInvalidClientTokenException(&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 err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInvalidMaxResultsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidMaxResultsException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentInvalidMaxResultsException(&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 err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInvalidNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidNextTokenException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentInvalidNextTokenException(&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 err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidParameterException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentInvalidParameterException(&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 err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInvalidPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidPolicyException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentInvalidPolicyException(&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 err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInvalidResourceTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidResourceTypeException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentInvalidResourceTypeException(&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 err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInvalidStateTransitionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidStateTransitionException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentInvalidStateTransitionException(&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 err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorMalformedArnException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.MalformedArnException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentMalformedArnException(&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 err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorMalformedPolicyTemplateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.MalformedPolicyTemplateException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentMalformedPolicyTemplateException(&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 err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorMissingRequiredParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.MissingRequiredParameterException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentMissingRequiredParameterException(&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 err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorOperationNotPermittedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OperationNotPermittedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentOperationNotPermittedException(&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 err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorPermissionAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PermissionAlreadyExistsException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentPermissionAlreadyExistsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4354,8 +6331,8 @@ func awsRestjson1_deserializeErrorInvalidMaxResultsException(response *smithyhtt return output } -func awsRestjson1_deserializeErrorInvalidNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidNextTokenException{} +func awsRestjson1_deserializeErrorPermissionLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PermissionLimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4373,7 +6350,7 @@ func awsRestjson1_deserializeErrorInvalidNextTokenException(response *smithyhttp return err } - err := awsRestjson1_deserializeDocumentInvalidNextTokenException(&output, shape) + err := awsRestjson1_deserializeDocumentPermissionLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4390,8 +6367,8 @@ func awsRestjson1_deserializeErrorInvalidNextTokenException(response *smithyhttp return output } -func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidParameterException{} +func awsRestjson1_deserializeErrorPermissionVersionsLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PermissionVersionsLimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4409,7 +6386,7 @@ func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp return err } - err := awsRestjson1_deserializeDocumentInvalidParameterException(&output, shape) + err := awsRestjson1_deserializeDocumentPermissionVersionsLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4426,8 +6403,8 @@ func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp return output } -func awsRestjson1_deserializeErrorInvalidResourceTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidResourceTypeException{} +func awsRestjson1_deserializeErrorResourceArnNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceArnNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4445,7 +6422,7 @@ func awsRestjson1_deserializeErrorInvalidResourceTypeException(response *smithyh return err } - err := awsRestjson1_deserializeDocumentInvalidResourceTypeException(&output, shape) + err := awsRestjson1_deserializeDocumentResourceArnNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4462,8 +6439,8 @@ func awsRestjson1_deserializeErrorInvalidResourceTypeException(response *smithyh return output } -func awsRestjson1_deserializeErrorInvalidStateTransitionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidStateTransitionException{} +func awsRestjson1_deserializeErrorResourceShareInvitationAlreadyAcceptedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceShareInvitationAlreadyAcceptedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4481,7 +6458,7 @@ func awsRestjson1_deserializeErrorInvalidStateTransitionException(response *smit return err } - err := awsRestjson1_deserializeDocumentInvalidStateTransitionException(&output, shape) + err := awsRestjson1_deserializeDocumentResourceShareInvitationAlreadyAcceptedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4498,8 +6475,8 @@ func awsRestjson1_deserializeErrorInvalidStateTransitionException(response *smit return output } -func awsRestjson1_deserializeErrorMalformedArnException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.MalformedArnException{} +func awsRestjson1_deserializeErrorResourceShareInvitationAlreadyRejectedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceShareInvitationAlreadyRejectedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4517,7 +6494,7 @@ func awsRestjson1_deserializeErrorMalformedArnException(response *smithyhttp.Res return err } - err := awsRestjson1_deserializeDocumentMalformedArnException(&output, shape) + err := awsRestjson1_deserializeDocumentResourceShareInvitationAlreadyRejectedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4534,8 +6511,8 @@ func awsRestjson1_deserializeErrorMalformedArnException(response *smithyhttp.Res return output } -func awsRestjson1_deserializeErrorMissingRequiredParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.MissingRequiredParameterException{} +func awsRestjson1_deserializeErrorResourceShareInvitationArnNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceShareInvitationArnNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4553,7 +6530,7 @@ func awsRestjson1_deserializeErrorMissingRequiredParameterException(response *sm return err } - err := awsRestjson1_deserializeDocumentMissingRequiredParameterException(&output, shape) + err := awsRestjson1_deserializeDocumentResourceShareInvitationArnNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4570,8 +6547,8 @@ func awsRestjson1_deserializeErrorMissingRequiredParameterException(response *sm return output } -func awsRestjson1_deserializeErrorOperationNotPermittedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.OperationNotPermittedException{} +func awsRestjson1_deserializeErrorResourceShareInvitationExpiredException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceShareInvitationExpiredException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4589,7 +6566,7 @@ func awsRestjson1_deserializeErrorOperationNotPermittedException(response *smith return err } - err := awsRestjson1_deserializeDocumentOperationNotPermittedException(&output, shape) + err := awsRestjson1_deserializeDocumentResourceShareInvitationExpiredException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4606,8 +6583,8 @@ func awsRestjson1_deserializeErrorOperationNotPermittedException(response *smith return output } -func awsRestjson1_deserializeErrorResourceArnNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceArnNotFoundException{} +func awsRestjson1_deserializeErrorResourceShareLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceShareLimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4625,7 +6602,7 @@ func awsRestjson1_deserializeErrorResourceArnNotFoundException(response *smithyh return err } - err := awsRestjson1_deserializeDocumentResourceArnNotFoundException(&output, shape) + err := awsRestjson1_deserializeDocumentResourceShareLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4642,8 +6619,8 @@ func awsRestjson1_deserializeErrorResourceArnNotFoundException(response *smithyh return output } -func awsRestjson1_deserializeErrorResourceShareInvitationAlreadyAcceptedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceShareInvitationAlreadyAcceptedException{} +func awsRestjson1_deserializeErrorServerInternalException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServerInternalException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4661,7 +6638,7 @@ func awsRestjson1_deserializeErrorResourceShareInvitationAlreadyAcceptedExceptio return err } - err := awsRestjson1_deserializeDocumentResourceShareInvitationAlreadyAcceptedException(&output, shape) + err := awsRestjson1_deserializeDocumentServerInternalException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4678,8 +6655,8 @@ func awsRestjson1_deserializeErrorResourceShareInvitationAlreadyAcceptedExceptio return output } -func awsRestjson1_deserializeErrorResourceShareInvitationAlreadyRejectedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceShareInvitationAlreadyRejectedException{} +func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceUnavailableException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4697,7 +6674,7 @@ func awsRestjson1_deserializeErrorResourceShareInvitationAlreadyRejectedExceptio return err } - err := awsRestjson1_deserializeDocumentResourceShareInvitationAlreadyRejectedException(&output, shape) + err := awsRestjson1_deserializeDocumentServiceUnavailableException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4714,8 +6691,8 @@ func awsRestjson1_deserializeErrorResourceShareInvitationAlreadyRejectedExceptio return output } -func awsRestjson1_deserializeErrorResourceShareInvitationArnNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceShareInvitationArnNotFoundException{} +func awsRestjson1_deserializeErrorTagLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TagLimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4733,7 +6710,7 @@ func awsRestjson1_deserializeErrorResourceShareInvitationArnNotFoundException(re return err } - err := awsRestjson1_deserializeDocumentResourceShareInvitationArnNotFoundException(&output, shape) + err := awsRestjson1_deserializeDocumentTagLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4750,8 +6727,8 @@ func awsRestjson1_deserializeErrorResourceShareInvitationArnNotFoundException(re return output } -func awsRestjson1_deserializeErrorResourceShareInvitationExpiredException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceShareInvitationExpiredException{} +func awsRestjson1_deserializeErrorTagPolicyViolationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TagPolicyViolationException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4769,7 +6746,7 @@ func awsRestjson1_deserializeErrorResourceShareInvitationExpiredException(respon return err } - err := awsRestjson1_deserializeDocumentResourceShareInvitationExpiredException(&output, shape) + err := awsRestjson1_deserializeDocumentTagPolicyViolationException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4786,8 +6763,8 @@ func awsRestjson1_deserializeErrorResourceShareInvitationExpiredException(respon return output } -func awsRestjson1_deserializeErrorResourceShareLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceShareLimitExceededException{} +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4805,7 +6782,7 @@ func awsRestjson1_deserializeErrorResourceShareLimitExceededException(response * return err } - err := awsRestjson1_deserializeDocumentResourceShareLimitExceededException(&output, shape) + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4822,8 +6799,8 @@ func awsRestjson1_deserializeErrorResourceShareLimitExceededException(response * return output } -func awsRestjson1_deserializeErrorServerInternalException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServerInternalException{} +func awsRestjson1_deserializeErrorUnknownResourceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnknownResourceException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4841,7 +6818,7 @@ func awsRestjson1_deserializeErrorServerInternalException(response *smithyhttp.R return err } - err := awsRestjson1_deserializeDocumentServerInternalException(&output, shape) + err := awsRestjson1_deserializeDocumentUnknownResourceException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4858,8 +6835,8 @@ func awsRestjson1_deserializeErrorServerInternalException(response *smithyhttp.R return output } -func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServiceUnavailableException{} +func awsRestjson1_deserializeErrorUnmatchedPolicyPermissionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnmatchedPolicyPermissionException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4877,7 +6854,7 @@ func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyht return err } - err := awsRestjson1_deserializeDocumentServiceUnavailableException(&output, shape) + err := awsRestjson1_deserializeDocumentUnmatchedPolicyPermissionException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4894,151 +6871,351 @@ func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyht return output } -func awsRestjson1_deserializeErrorTagLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TagLimitExceededException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) +func awsRestjson1_deserializeDocumentAssociatedPermission(v **types.AssociatedPermission, 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.AssociatedPermission + if *v == nil { + sv = &types.AssociatedPermission{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "defaultVersion": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.DefaultVersion = ptr.Bool(jtv) + } + + case "featureSet": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PermissionFeatureSet to be of type string, got %T instead", value) + } + sv.FeatureSet = types.PermissionFeatureSet(jtv) + } + + case "lastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "permissionVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PermissionVersion = ptr.String(jtv) + } + + case "resourceShareArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceShareArn = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAssociatedPermissionList(v *[]types.AssociatedPermission, 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.AssociatedPermission + if *v == nil { + cv = []types.AssociatedPermission{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AssociatedPermission + destAddr := &col + if err := awsRestjson1_deserializeDocumentAssociatedPermission(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIdempotentParameterMismatchException(v **types.IdempotentParameterMismatchException, 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.IdempotentParameterMismatchException + if *v == nil { + sv = &types.IdempotentParameterMismatchException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value - body := io.TeeReader(errorBody, 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 err } + *v = sv + return nil +} - err := awsRestjson1_deserializeDocumentTagLimitExceededException(&output, shape) +func awsRestjson1_deserializeDocumentInvalidClientTokenException(v **types.InvalidClientTokenException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - 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 + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - errorBody.Seek(0, io.SeekStart) + var sv *types.InvalidClientTokenException + if *v == nil { + sv = &types.InvalidClientTokenException{} + } else { + sv = *v + } - return output -} + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } -func awsRestjson1_deserializeErrorTagPolicyViolationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TagPolicyViolationException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + default: + _, _ = key, value - body := io.TeeReader(errorBody, 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 err } + *v = sv + return nil +} - err := awsRestjson1_deserializeDocumentTagPolicyViolationException(&output, shape) +func awsRestjson1_deserializeDocumentInvalidMaxResultsException(v **types.InvalidMaxResultsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - 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 + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - errorBody.Seek(0, io.SeekStart) + var sv *types.InvalidMaxResultsException + if *v == nil { + sv = &types.InvalidMaxResultsException{} + } else { + sv = *v + } - return output -} + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } -func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ThrottlingException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + default: + _, _ = key, value - body := io.TeeReader(errorBody, 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 err } + *v = sv + return nil +} - err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) +func awsRestjson1_deserializeDocumentInvalidNextTokenException(v **types.InvalidNextTokenException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - 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 + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - errorBody.Seek(0, io.SeekStart) + var sv *types.InvalidNextTokenException + if *v == nil { + sv = &types.InvalidNextTokenException{} + } else { + sv = *v + } - return output -} + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } -func awsRestjson1_deserializeErrorUnknownResourceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.UnknownResourceException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + default: + _, _ = key, value - body := io.TeeReader(errorBody, 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 err } + *v = sv + return nil +} - err := awsRestjson1_deserializeDocumentUnknownResourceException(&output, shape) +func awsRestjson1_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - 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 + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - errorBody.Seek(0, io.SeekStart) + var sv *types.InvalidParameterException + if *v == nil { + sv = &types.InvalidParameterException{} + } else { + sv = *v + } - return output + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func awsRestjson1_deserializeDocumentIdempotentParameterMismatchException(v **types.IdempotentParameterMismatchException, value interface{}) error { +func awsRestjson1_deserializeDocumentInvalidPolicyException(v **types.InvalidPolicyException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5051,9 +7228,9 @@ func awsRestjson1_deserializeDocumentIdempotentParameterMismatchException(v **ty return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.IdempotentParameterMismatchException + var sv *types.InvalidPolicyException if *v == nil { - sv = &types.IdempotentParameterMismatchException{} + sv = &types.InvalidPolicyException{} } else { sv = *v } @@ -5078,7 +7255,7 @@ func awsRestjson1_deserializeDocumentIdempotentParameterMismatchException(v **ty return nil } -func awsRestjson1_deserializeDocumentInvalidClientTokenException(v **types.InvalidClientTokenException, value interface{}) error { +func awsRestjson1_deserializeDocumentInvalidResourceTypeException(v **types.InvalidResourceTypeException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5091,9 +7268,9 @@ func awsRestjson1_deserializeDocumentInvalidClientTokenException(v **types.Inval return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidClientTokenException + var sv *types.InvalidResourceTypeException if *v == nil { - sv = &types.InvalidClientTokenException{} + sv = &types.InvalidResourceTypeException{} } else { sv = *v } @@ -5118,7 +7295,7 @@ func awsRestjson1_deserializeDocumentInvalidClientTokenException(v **types.Inval return nil } -func awsRestjson1_deserializeDocumentInvalidMaxResultsException(v **types.InvalidMaxResultsException, value interface{}) error { +func awsRestjson1_deserializeDocumentInvalidStateTransitionException(v **types.InvalidStateTransitionException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5131,9 +7308,9 @@ func awsRestjson1_deserializeDocumentInvalidMaxResultsException(v **types.Invali return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidMaxResultsException + var sv *types.InvalidStateTransitionException if *v == nil { - sv = &types.InvalidMaxResultsException{} + sv = &types.InvalidStateTransitionException{} } else { sv = *v } @@ -5158,7 +7335,7 @@ func awsRestjson1_deserializeDocumentInvalidMaxResultsException(v **types.Invali return nil } -func awsRestjson1_deserializeDocumentInvalidNextTokenException(v **types.InvalidNextTokenException, value interface{}) error { +func awsRestjson1_deserializeDocumentMalformedArnException(v **types.MalformedArnException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5171,9 +7348,9 @@ func awsRestjson1_deserializeDocumentInvalidNextTokenException(v **types.Invalid return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidNextTokenException + var sv *types.MalformedArnException if *v == nil { - sv = &types.InvalidNextTokenException{} + sv = &types.MalformedArnException{} } else { sv = *v } @@ -5198,7 +7375,7 @@ func awsRestjson1_deserializeDocumentInvalidNextTokenException(v **types.Invalid return nil } -func awsRestjson1_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, value interface{}) error { +func awsRestjson1_deserializeDocumentMalformedPolicyTemplateException(v **types.MalformedPolicyTemplateException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5211,9 +7388,9 @@ func awsRestjson1_deserializeDocumentInvalidParameterException(v **types.Invalid return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidParameterException + var sv *types.MalformedPolicyTemplateException if *v == nil { - sv = &types.InvalidParameterException{} + sv = &types.MalformedPolicyTemplateException{} } else { sv = *v } @@ -5238,7 +7415,7 @@ func awsRestjson1_deserializeDocumentInvalidParameterException(v **types.Invalid return nil } -func awsRestjson1_deserializeDocumentInvalidResourceTypeException(v **types.InvalidResourceTypeException, value interface{}) error { +func awsRestjson1_deserializeDocumentMissingRequiredParameterException(v **types.MissingRequiredParameterException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5251,9 +7428,9 @@ func awsRestjson1_deserializeDocumentInvalidResourceTypeException(v **types.Inva return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidResourceTypeException + var sv *types.MissingRequiredParameterException if *v == nil { - sv = &types.InvalidResourceTypeException{} + sv = &types.MissingRequiredParameterException{} } else { sv = *v } @@ -5278,7 +7455,7 @@ func awsRestjson1_deserializeDocumentInvalidResourceTypeException(v **types.Inva return nil } -func awsRestjson1_deserializeDocumentInvalidStateTransitionException(v **types.InvalidStateTransitionException, value interface{}) error { +func awsRestjson1_deserializeDocumentOperationNotPermittedException(v **types.OperationNotPermittedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5291,9 +7468,9 @@ func awsRestjson1_deserializeDocumentInvalidStateTransitionException(v **types.I return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidStateTransitionException + var sv *types.OperationNotPermittedException if *v == nil { - sv = &types.InvalidStateTransitionException{} + sv = &types.OperationNotPermittedException{} } else { sv = *v } @@ -5318,7 +7495,7 @@ func awsRestjson1_deserializeDocumentInvalidStateTransitionException(v **types.I return nil } -func awsRestjson1_deserializeDocumentMalformedArnException(v **types.MalformedArnException, value interface{}) error { +func awsRestjson1_deserializeDocumentPermissionAlreadyExistsException(v **types.PermissionAlreadyExistsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5331,9 +7508,9 @@ func awsRestjson1_deserializeDocumentMalformedArnException(v **types.MalformedAr return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MalformedArnException + var sv *types.PermissionAlreadyExistsException if *v == nil { - sv = &types.MalformedArnException{} + sv = &types.PermissionAlreadyExistsException{} } else { sv = *v } @@ -5358,7 +7535,7 @@ func awsRestjson1_deserializeDocumentMalformedArnException(v **types.MalformedAr return nil } -func awsRestjson1_deserializeDocumentMissingRequiredParameterException(v **types.MissingRequiredParameterException, value interface{}) error { +func awsRestjson1_deserializeDocumentPermissionLimitExceededException(v **types.PermissionLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5371,9 +7548,9 @@ func awsRestjson1_deserializeDocumentMissingRequiredParameterException(v **types return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MissingRequiredParameterException + var sv *types.PermissionLimitExceededException if *v == nil { - sv = &types.MissingRequiredParameterException{} + sv = &types.PermissionLimitExceededException{} } else { sv = *v } @@ -5398,7 +7575,7 @@ func awsRestjson1_deserializeDocumentMissingRequiredParameterException(v **types return nil } -func awsRestjson1_deserializeDocumentOperationNotPermittedException(v **types.OperationNotPermittedException, value interface{}) error { +func awsRestjson1_deserializeDocumentPermissionVersionsLimitExceededException(v **types.PermissionVersionsLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5411,9 +7588,9 @@ func awsRestjson1_deserializeDocumentOperationNotPermittedException(v **types.Op return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.OperationNotPermittedException + var sv *types.PermissionVersionsLimitExceededException if *v == nil { - sv = &types.OperationNotPermittedException{} + sv = &types.PermissionVersionsLimitExceededException{} } else { sv = *v } @@ -5598,6 +7775,166 @@ func awsRestjson1_deserializeDocumentPrincipalList(v *[]types.Principal, value i return nil } +func awsRestjson1_deserializeDocumentReplacePermissionAssociationsWork(v **types.ReplacePermissionAssociationsWork, 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.ReplacePermissionAssociationsWork + if *v == nil { + sv = &types.ReplacePermissionAssociationsWork{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "fromPermissionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FromPermissionArn = ptr.String(jtv) + } + + case "fromPermissionVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FromPermissionVersion = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "lastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplacePermissionAssociationsWorkStatus to be of type string, got %T instead", value) + } + sv.Status = types.ReplacePermissionAssociationsWorkStatus(jtv) + } + + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "toPermissionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ToPermissionArn = ptr.String(jtv) + } + + case "toPermissionVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ToPermissionVersion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentReplacePermissionAssociationsWorkList(v *[]types.ReplacePermissionAssociationsWork, 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.ReplacePermissionAssociationsWork + if *v == nil { + cv = []types.ReplacePermissionAssociationsWork{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ReplacePermissionAssociationsWork + destAddr := &col + if err := awsRestjson1_deserializeDocumentReplacePermissionAssociationsWork(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentResource(v **types.Resource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6528,6 +8865,15 @@ func awsRestjson1_deserializeDocumentResourceSharePermissionDetail(v **types.Res sv.DefaultVersion = ptr.Bool(jtv) } + case "featureSet": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PermissionFeatureSet to be of type string, got %T instead", value) + } + sv.FeatureSet = types.PermissionFeatureSet(jtv) + } + case "isResourceTypeDefault": if value != nil { jtv, ok := value.(bool) @@ -6571,6 +8917,15 @@ func awsRestjson1_deserializeDocumentResourceSharePermissionDetail(v **types.Res sv.Permission = ptr.String(jtv) } + case "permissionType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PermissionType to be of type string, got %T instead", value) + } + sv.PermissionType = types.PermissionType(jtv) + } + case "resourceType": if value != nil { jtv, ok := value.(string) @@ -6580,6 +8935,20 @@ func awsRestjson1_deserializeDocumentResourceSharePermissionDetail(v **types.Res sv.ResourceType = ptr.String(jtv) } + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PermissionStatus to be of type string, got %T instead", value) + } + sv.Status = types.PermissionStatus(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + case "version": if value != nil { jtv, ok := value.(string) @@ -6688,6 +9057,15 @@ func awsRestjson1_deserializeDocumentResourceSharePermissionSummary(v **types.Re sv.DefaultVersion = ptr.Bool(jtv) } + case "featureSet": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PermissionFeatureSet to be of type string, got %T instead", value) + } + sv.FeatureSet = types.PermissionFeatureSet(jtv) + } + case "isResourceTypeDefault": if value != nil { jtv, ok := value.(bool) @@ -6722,6 +9100,15 @@ func awsRestjson1_deserializeDocumentResourceSharePermissionSummary(v **types.Re sv.Name = ptr.String(jtv) } + case "permissionType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PermissionType to be of type string, got %T instead", value) + } + sv.PermissionType = types.PermissionType(jtv) + } + case "resourceType": if value != nil { jtv, ok := value.(string) @@ -6740,6 +9127,11 @@ func awsRestjson1_deserializeDocumentResourceSharePermissionSummary(v **types.Re sv.Status = ptr.String(jtv) } + case "tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + case "version": if value != nil { jtv, ok := value.(string) @@ -7172,3 +9564,43 @@ func awsRestjson1_deserializeDocumentUnknownResourceException(v **types.UnknownR *v = sv return nil } + +func awsRestjson1_deserializeDocumentUnmatchedPolicyPermissionException(v **types.UnmatchedPolicyPermissionException, 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.UnmatchedPolicyPermissionException + if *v == nil { + sv = &types.UnmatchedPolicyPermissionException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/ram/doc.go b/service/ram/doc.go index c9bce89b18e..c53b97047a0 100644 --- a/service/ram/doc.go +++ b/service/ram/doc.go @@ -5,13 +5,12 @@ // // This is the Resource Access Manager API Reference. This documentation provides // descriptions and syntax for each of the actions and data types in RAM. RAM is a -// service that helps you securely share your Amazon Web Services resources across -// Amazon Web Services accounts. If you have multiple Amazon Web Services accounts, -// you can use RAM to share those resources with other accounts. If you use -// Organizations to manage your accounts, then you share your resources with your -// organization or organizational units (OUs). For supported resource types, you -// can also share resources with individual Identity and Access Management (IAM) -// roles an users. To learn more about RAM, see the following resources: +// service that helps you securely share your Amazon Web Services resources to +// other Amazon Web Services accounts. If you use Organizations to manage your +// accounts, then you can share your resources with your entire organization or to +// organizational units (OUs). For supported resource types, you can also share +// resources with individual Identity and Access Management (IAM) roles and users. +// To learn more about RAM, see the following resources: // - Resource Access Manager product page (http://aws.amazon.com/ram) // - Resource Access Manager User Guide (https://docs.aws.amazon.com/ram/latest/userguide/) package ram diff --git a/service/ram/generated.json b/service/ram/generated.json index c670d57cb2f..71cb626d12d 100644 --- a/service/ram/generated.json +++ b/service/ram/generated.json @@ -11,7 +11,11 @@ "api_op_AcceptResourceShareInvitation.go", "api_op_AssociateResourceShare.go", "api_op_AssociateResourceSharePermission.go", + "api_op_CreatePermission.go", + "api_op_CreatePermissionVersion.go", "api_op_CreateResourceShare.go", + "api_op_DeletePermission.go", + "api_op_DeletePermissionVersion.go", "api_op_DeleteResourceShare.go", "api_op_DisassociateResourceShare.go", "api_op_DisassociateResourceSharePermission.go", @@ -22,14 +26,19 @@ "api_op_GetResourceShareInvitations.go", "api_op_GetResourceShares.go", "api_op_ListPendingInvitationResources.go", + "api_op_ListPermissionAssociations.go", "api_op_ListPermissionVersions.go", "api_op_ListPermissions.go", "api_op_ListPrincipals.go", + "api_op_ListReplacePermissionAssociationsWork.go", "api_op_ListResourceSharePermissions.go", "api_op_ListResourceTypes.go", "api_op_ListResources.go", + "api_op_PromotePermissionCreatedFromPolicy.go", "api_op_PromoteResourceShareCreatedFromPolicy.go", "api_op_RejectResourceShareInvitation.go", + "api_op_ReplacePermissionAssociations.go", + "api_op_SetDefaultPermissionVersion.go", "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateResourceShare.go", diff --git a/service/ram/serializers.go b/service/ram/serializers.go index 7bdeb572d42..79d33869136 100644 --- a/service/ram/serializers.go +++ b/service/ram/serializers.go @@ -262,6 +262,174 @@ func awsRestjson1_serializeOpDocumentAssociateResourceSharePermissionInput(v *As return nil } +type awsRestjson1_serializeOpCreatePermission struct { +} + +func (*awsRestjson1_serializeOpCreatePermission) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreatePermission) 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.(*CreatePermissionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/createpermission") + 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_serializeOpDocumentCreatePermissionInput(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_serializeOpHttpBindingsCreatePermissionInput(v *CreatePermissionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreatePermissionInput(v *CreatePermissionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.PolicyTemplate != nil { + ok := object.Key("policyTemplate") + ok.String(*v.PolicyTemplate) + } + + if v.ResourceType != nil { + ok := object.Key("resourceType") + ok.String(*v.ResourceType) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreatePermissionVersion struct { +} + +func (*awsRestjson1_serializeOpCreatePermissionVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreatePermissionVersion) 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.(*CreatePermissionVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/createpermissionversion") + 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_serializeOpDocumentCreatePermissionVersionInput(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_serializeOpHttpBindingsCreatePermissionVersionInput(v *CreatePermissionVersionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreatePermissionVersionInput(v *CreatePermissionVersionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.PermissionArn != nil { + ok := object.Key("permissionArn") + ok.String(*v.PermissionArn) + } + + if v.PolicyTemplate != nil { + ok := object.Key("policyTemplate") + ok.String(*v.PolicyTemplate) + } + + return nil +} + type awsRestjson1_serializeOpCreateResourceShare struct { } @@ -368,6 +536,124 @@ func awsRestjson1_serializeOpDocumentCreateResourceShareInput(v *CreateResourceS return nil } +type awsRestjson1_serializeOpDeletePermission struct { +} + +func (*awsRestjson1_serializeOpDeletePermission) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeletePermission) 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.(*DeletePermissionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/deletepermission") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + 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_serializeOpHttpBindingsDeletePermissionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeletePermissionInput(v *DeletePermissionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClientToken != nil { + encoder.SetQuery("clientToken").String(*v.ClientToken) + } + + if v.PermissionArn != nil { + encoder.SetQuery("permissionArn").String(*v.PermissionArn) + } + + return nil +} + +type awsRestjson1_serializeOpDeletePermissionVersion struct { +} + +func (*awsRestjson1_serializeOpDeletePermissionVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeletePermissionVersion) 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.(*DeletePermissionVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/deletepermissionversion") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + 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_serializeOpHttpBindingsDeletePermissionVersionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeletePermissionVersionInput(v *DeletePermissionVersionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClientToken != nil { + encoder.SetQuery("clientToken").String(*v.ClientToken) + } + + if v.PermissionArn != nil { + encoder.SetQuery("permissionArn").String(*v.PermissionArn) + } + + if v.PermissionVersion != nil { + encoder.SetQuery("permissionVersion").Integer(*v.PermissionVersion) + } + + return nil +} + type awsRestjson1_serializeOpDeleteResourceShare struct { } @@ -1060,6 +1346,11 @@ func awsRestjson1_serializeOpDocumentGetResourceSharesInput(v *GetResourceShares ok.String(*v.PermissionArn) } + if v.PermissionVersion != nil { + ok := object.Key("permissionVersion") + ok.Integer(*v.PermissionVersion) + } + if len(v.ResourceOwner) > 0 { ok := object.Key("resourceOwner") ok.String(string(v.ResourceOwner)) @@ -1170,14 +1461,14 @@ func awsRestjson1_serializeOpDocumentListPendingInvitationResourcesInput(v *List return nil } -type awsRestjson1_serializeOpListPermissions struct { +type awsRestjson1_serializeOpListPermissionAssociations struct { } -func (*awsRestjson1_serializeOpListPermissions) ID() string { +func (*awsRestjson1_serializeOpListPermissionAssociations) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListPermissionAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1185,7 +1476,110 @@ func (m *awsRestjson1_serializeOpListPermissions) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListPermissionsInput) + input, ok := in.Parameters.(*ListPermissionAssociationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/listpermissionassociations") + 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_serializeOpDocumentListPermissionAssociationsInput(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_serializeOpHttpBindingsListPermissionAssociationsInput(v *ListPermissionAssociationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListPermissionAssociationsInput(v *ListPermissionAssociationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AssociationStatus) > 0 { + ok := object.Key("associationStatus") + ok.String(string(v.AssociationStatus)) + } + + if v.DefaultVersion != nil { + ok := object.Key("defaultVersion") + ok.Boolean(*v.DefaultVersion) + } + + if len(v.FeatureSet) > 0 { + ok := object.Key("featureSet") + ok.String(string(v.FeatureSet)) + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.PermissionArn != nil { + ok := object.Key("permissionArn") + ok.String(*v.PermissionArn) + } + + if v.PermissionVersion != nil { + ok := object.Key("permissionVersion") + ok.Integer(*v.PermissionVersion) + } + + if v.ResourceType != nil { + ok := object.Key("resourceType") + ok.String(*v.ResourceType) + } + + return nil +} + +type awsRestjson1_serializeOpListPermissions struct { +} + +func (*awsRestjson1_serializeOpListPermissions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListPermissions) 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.(*ListPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1240,6 +1634,11 @@ func awsRestjson1_serializeOpDocumentListPermissionsInput(v *ListPermissionsInpu ok.String(*v.NextToken) } + if len(v.PermissionType) > 0 { + ok := object.Key("permissionType") + ok.String(string(v.PermissionType)) + } + if v.ResourceType != nil { ok := object.Key("resourceType") ok.String(*v.ResourceType) @@ -1428,6 +1827,91 @@ func awsRestjson1_serializeOpDocumentListPrincipalsInput(v *ListPrincipalsInput, return nil } +type awsRestjson1_serializeOpListReplacePermissionAssociationsWork struct { +} + +func (*awsRestjson1_serializeOpListReplacePermissionAssociationsWork) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListReplacePermissionAssociationsWork) 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.(*ListReplacePermissionAssociationsWorkInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/listreplacepermissionassociationswork") + 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_serializeOpDocumentListReplacePermissionAssociationsWorkInput(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_serializeOpHttpBindingsListReplacePermissionAssociationsWorkInput(v *ListReplacePermissionAssociationsWorkInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListReplacePermissionAssociationsWorkInput(v *ListReplacePermissionAssociationsWorkInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.Status) > 0 { + ok := object.Key("status") + ok.String(string(v.Status)) + } + + if v.WorkIds != nil { + ok := object.Key("workIds") + if err := awsRestjson1_serializeDocumentReplacePermissionAssociationsWorkIdList(v.WorkIds, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpListResources struct { } @@ -1691,6 +2175,84 @@ func awsRestjson1_serializeOpDocumentListResourceTypesInput(v *ListResourceTypes return nil } +type awsRestjson1_serializeOpPromotePermissionCreatedFromPolicy struct { +} + +func (*awsRestjson1_serializeOpPromotePermissionCreatedFromPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPromotePermissionCreatedFromPolicy) 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.(*PromotePermissionCreatedFromPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/promotepermissioncreatedfrompolicy") + 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_serializeOpDocumentPromotePermissionCreatedFromPolicyInput(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_serializeOpHttpBindingsPromotePermissionCreatedFromPolicyInput(v *PromotePermissionCreatedFromPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPromotePermissionCreatedFromPolicyInput(v *PromotePermissionCreatedFromPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.PermissionArn != nil { + ok := object.Key("permissionArn") + ok.String(*v.PermissionArn) + } + + return nil +} + type awsRestjson1_serializeOpPromoteResourceShareCreatedFromPolicy struct { } @@ -1817,6 +2379,167 @@ func awsRestjson1_serializeOpDocumentRejectResourceShareInvitationInput(v *Rejec return nil } +type awsRestjson1_serializeOpReplacePermissionAssociations struct { +} + +func (*awsRestjson1_serializeOpReplacePermissionAssociations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpReplacePermissionAssociations) 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.(*ReplacePermissionAssociationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/replacepermissionassociations") + 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_serializeOpDocumentReplacePermissionAssociationsInput(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_serializeOpHttpBindingsReplacePermissionAssociationsInput(v *ReplacePermissionAssociationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentReplacePermissionAssociationsInput(v *ReplacePermissionAssociationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.FromPermissionArn != nil { + ok := object.Key("fromPermissionArn") + ok.String(*v.FromPermissionArn) + } + + if v.FromPermissionVersion != nil { + ok := object.Key("fromPermissionVersion") + ok.Integer(*v.FromPermissionVersion) + } + + if v.ToPermissionArn != nil { + ok := object.Key("toPermissionArn") + ok.String(*v.ToPermissionArn) + } + + return nil +} + +type awsRestjson1_serializeOpSetDefaultPermissionVersion struct { +} + +func (*awsRestjson1_serializeOpSetDefaultPermissionVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSetDefaultPermissionVersion) 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.(*SetDefaultPermissionVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/setdefaultpermissionversion") + 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_serializeOpDocumentSetDefaultPermissionVersionInput(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_serializeOpHttpBindingsSetDefaultPermissionVersionInput(v *SetDefaultPermissionVersionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSetDefaultPermissionVersionInput(v *SetDefaultPermissionVersionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.PermissionArn != nil { + ok := object.Key("permissionArn") + ok.String(*v.PermissionArn) + } + + if v.PermissionVersion != nil { + ok := object.Key("permissionVersion") + ok.Integer(*v.PermissionVersion) + } + + return nil +} + type awsRestjson1_serializeOpTagResource struct { } @@ -1877,6 +2600,11 @@ func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value object := value.Object() defer object.Close() + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + if v.ResourceShareArn != nil { ok := object.Key("resourceShareArn") ok.String(*v.ResourceShareArn) @@ -1952,6 +2680,11 @@ func awsRestjson1_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, v object := value.Object() defer object.Close() + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + if v.ResourceShareArn != nil { ok := object.Key("resourceShareArn") ok.String(*v.ResourceShareArn) @@ -2072,6 +2805,17 @@ func awsRestjson1_serializeDocumentPrincipalArnOrIdList(v []string, value smithy return nil } +func awsRestjson1_serializeDocumentReplacePermissionAssociationsWorkIdList(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_serializeDocumentResourceArnList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/ram/types/enums.go b/service/ram/types/enums.go index d0206b0d350..ec3d2ace37e 100644 --- a/service/ram/types/enums.go +++ b/service/ram/types/enums.go @@ -2,6 +2,107 @@ package types +type PermissionFeatureSet string + +// Enum values for PermissionFeatureSet +const ( + PermissionFeatureSetCreatedFromPolicy PermissionFeatureSet = "CREATED_FROM_POLICY" + PermissionFeatureSetPromotingToStandard PermissionFeatureSet = "PROMOTING_TO_STANDARD" + PermissionFeatureSetStandard PermissionFeatureSet = "STANDARD" +) + +// Values returns all known values for PermissionFeatureSet. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PermissionFeatureSet) Values() []PermissionFeatureSet { + return []PermissionFeatureSet{ + "CREATED_FROM_POLICY", + "PROMOTING_TO_STANDARD", + "STANDARD", + } +} + +type PermissionStatus string + +// Enum values for PermissionStatus +const ( + PermissionStatusAttachable PermissionStatus = "ATTACHABLE" + PermissionStatusUnattachable PermissionStatus = "UNATTACHABLE" + PermissionStatusDeleting PermissionStatus = "DELETING" + PermissionStatusDeleted PermissionStatus = "DELETED" +) + +// Values returns all known values for PermissionStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PermissionStatus) Values() []PermissionStatus { + return []PermissionStatus{ + "ATTACHABLE", + "UNATTACHABLE", + "DELETING", + "DELETED", + } +} + +type PermissionType string + +// Enum values for PermissionType +const ( + PermissionTypeCustomerManaged PermissionType = "CUSTOMER_MANAGED" + PermissionTypeAwsManaged PermissionType = "AWS_MANAGED" +) + +// Values returns all known values for PermissionType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PermissionType) Values() []PermissionType { + return []PermissionType{ + "CUSTOMER_MANAGED", + "AWS_MANAGED", + } +} + +type PermissionTypeFilter string + +// Enum values for PermissionTypeFilter +const ( + PermissionTypeFilterAll PermissionTypeFilter = "ALL" + PermissionTypeFilterAwsManaged PermissionTypeFilter = "AWS_MANAGED" + PermissionTypeFilterCustomerManaged PermissionTypeFilter = "CUSTOMER_MANAGED" +) + +// Values returns all known values for PermissionTypeFilter. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PermissionTypeFilter) Values() []PermissionTypeFilter { + return []PermissionTypeFilter{ + "ALL", + "AWS_MANAGED", + "CUSTOMER_MANAGED", + } +} + +type ReplacePermissionAssociationsWorkStatus string + +// Enum values for ReplacePermissionAssociationsWorkStatus +const ( + ReplacePermissionAssociationsWorkStatusInProgress ReplacePermissionAssociationsWorkStatus = "IN_PROGRESS" + ReplacePermissionAssociationsWorkStatusCompleted ReplacePermissionAssociationsWorkStatus = "COMPLETED" + ReplacePermissionAssociationsWorkStatusFailed ReplacePermissionAssociationsWorkStatus = "FAILED" +) + +// Values returns all known values for ReplacePermissionAssociationsWorkStatus. +// Note that this can be expanded in the future, and so it is only as up to date as +// the client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (ReplacePermissionAssociationsWorkStatus) Values() []ReplacePermissionAssociationsWorkStatus { + return []ReplacePermissionAssociationsWorkStatus{ + "IN_PROGRESS", + "COMPLETED", + "FAILED", + } +} + type ResourceOwner string // Enum values for ResourceOwner diff --git a/service/ram/types/errors.go b/service/ram/types/errors.go index e3a9906b642..a60579801d6 100644 --- a/service/ram/types/errors.go +++ b/service/ram/types/errors.go @@ -7,9 +7,9 @@ import ( smithy "github.com/aws/smithy-go" ) -// The client token input parameter was matched one used with a previous call to -// the operation, but at least one of the other input parameters is different from -// the previous call. +// The operation failed because the client token input parameter matched one that +// was used with a previous call to the operation, but at least one of the other +// input parameters is different from the previous call. type IdempotentParameterMismatchException struct { Message *string @@ -37,7 +37,7 @@ func (e *IdempotentParameterMismatchException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The client token is not valid. +// The operation failed because the specified client token isn't valid. type InvalidClientTokenException struct { Message *string @@ -63,7 +63,7 @@ func (e *InvalidClientTokenException) ErrorCode() string { } func (e *InvalidClientTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The specified value for MaxResults is not valid. +// The operation failed because the specified value for MaxResults isn't valid. type InvalidMaxResultsException struct { Message *string @@ -89,7 +89,9 @@ func (e *InvalidMaxResultsException) ErrorCode() string { } func (e *InvalidMaxResultsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The specified value for NextToken is not valid. +// The operation failed because the specified value for NextToken isn't valid. You +// must specify a value you received in the NextToken response of a previous call +// to this operation. type InvalidNextTokenException struct { Message *string @@ -115,7 +117,7 @@ func (e *InvalidNextTokenException) ErrorCode() string { } func (e *InvalidNextTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// A parameter is not valid. +// The operation failed because a parameter you specified isn't valid. type InvalidParameterException struct { Message *string @@ -141,7 +143,33 @@ func (e *InvalidParameterException) ErrorCode() string { } func (e *InvalidParameterException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The specified resource type is not valid. +// The operation failed because a policy you specified isn't valid. +type InvalidPolicyException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidPolicyException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidPolicyException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidPolicyException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidPolicyException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidPolicyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The operation failed because the specified resource type isn't valid. type InvalidResourceTypeException struct { Message *string @@ -167,7 +195,8 @@ func (e *InvalidResourceTypeException) ErrorCode() string { } func (e *InvalidResourceTypeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The requested state transition is not valid. +// The operation failed because the requested operation isn't valid for the +// resource share in its current state. type InvalidStateTransitionException struct { Message *string @@ -193,7 +222,8 @@ func (e *InvalidStateTransitionException) ErrorCode() string { } func (e *InvalidStateTransitionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The format of an Amazon Resource Name (ARN) is not valid. +// The operation failed because the specified Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) +// has a format that isn't valid. type MalformedArnException struct { Message *string @@ -219,7 +249,33 @@ func (e *MalformedArnException) ErrorCode() string { } func (e *MalformedArnException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// A required input parameter is missing. +// The operation failed because the policy template that you provided isn't valid. +type MalformedPolicyTemplateException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *MalformedPolicyTemplateException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *MalformedPolicyTemplateException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *MalformedPolicyTemplateException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "MalformedPolicyTemplateException" + } + return *e.ErrorCodeOverride +} +func (e *MalformedPolicyTemplateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The operation failed because a required input parameter is missing. type MissingRequiredParameterException struct { Message *string @@ -245,7 +301,7 @@ func (e *MissingRequiredParameterException) ErrorCode() string { } func (e *MissingRequiredParameterException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The requested operation is not permitted. +// The operation failed because the requested operation isn't permitted. type OperationNotPermittedException struct { Message *string @@ -271,7 +327,95 @@ func (e *OperationNotPermittedException) ErrorCode() string { } func (e *OperationNotPermittedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The specified Amazon Resource Name (ARN) was not found. +// The operation failed because a permission with the specified name already +// exists in the requested Amazon Web Services Region. Choose a different name. +type PermissionAlreadyExistsException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *PermissionAlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PermissionAlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PermissionAlreadyExistsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PermissionAlreadyExistsException" + } + return *e.ErrorCodeOverride +} +func (e *PermissionAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The operation failed because it would exceed the maximum number of permissions +// you can create in each Amazon Web Services Region. To view the limits for your +// Amazon Web Services account, see the RAM page in the Service Quotas console (https://console.aws.amazon.com/servicequotas/home/services/ram/quotas) +// . +type PermissionLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *PermissionLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PermissionLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PermissionLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PermissionLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *PermissionLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The operation failed because it would exceed the limit for the number of +// versions you can have for a permission. To view the limits for your Amazon Web +// Services account, see the RAM page in the Service Quotas console (https://console.aws.amazon.com/servicequotas/home/services/ram/quotas) +// . +type PermissionVersionsLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *PermissionVersionsLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PermissionVersionsLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PermissionVersionsLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PermissionVersionsLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *PermissionVersionsLimitExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The operation failed because the specified Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) +// was not found. type ResourceArnNotFoundException struct { Message *string @@ -297,7 +441,7 @@ func (e *ResourceArnNotFoundException) ErrorCode() string { } func (e *ResourceArnNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The specified invitation was already accepted. +// The operation failed because the specified invitation was already accepted. type ResourceShareInvitationAlreadyAcceptedException struct { Message *string @@ -325,7 +469,7 @@ func (e *ResourceShareInvitationAlreadyAcceptedException) ErrorFault() smithy.Er return smithy.FaultClient } -// The specified invitation was already rejected. +// The operation failed because the specified invitation was already rejected. type ResourceShareInvitationAlreadyRejectedException struct { Message *string @@ -353,7 +497,8 @@ func (e *ResourceShareInvitationAlreadyRejectedException) ErrorFault() smithy.Er return smithy.FaultClient } -// The specified Amazon Resource Name (ARN) for an invitation was not found. +// The operation failed because the specified Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) +// for an invitation was not found. type ResourceShareInvitationArnNotFoundException struct { Message *string @@ -381,7 +526,8 @@ func (e *ResourceShareInvitationArnNotFoundException) ErrorFault() smithy.ErrorF return smithy.FaultClient } -// The specified invitation is expired. +// The operation failed because the specified invitation is past its expiration +// date and time. type ResourceShareInvitationExpiredException struct { Message *string @@ -409,7 +555,10 @@ func (e *ResourceShareInvitationExpiredException) ErrorFault() smithy.ErrorFault return smithy.FaultClient } -// This request would exceed the limit for resource shares for your account. +// The operation failed because it would exceed the limit for resource shares for +// your account. To view the limits for your Amazon Web Services account, see the +// RAM page in the Service Quotas console (https://console.aws.amazon.com/servicequotas/home/services/ram/quotas) +// . type ResourceShareLimitExceededException struct { Message *string @@ -437,7 +586,8 @@ func (e *ResourceShareLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The service could not respond to the request due to an internal problem. +// The operation failed because the service could not respond to the request due +// to an internal problem. Try again later. type ServerInternalException struct { Message *string @@ -463,7 +613,7 @@ func (e *ServerInternalException) ErrorCode() string { } func (e *ServerInternalException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// The service is not available. +// The operation failed because the service isn't available. Try again later. type ServiceUnavailableException struct { Message *string @@ -489,7 +639,8 @@ func (e *ServiceUnavailableException) ErrorCode() string { } func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// This request would exceed the limit for tags for your account. +// The operation failed because it would exceed the limit for tags for your Amazon +// Web Services account. type TagLimitExceededException struct { Message *string @@ -515,7 +666,8 @@ func (e *TagLimitExceededException) ErrorCode() string { } func (e *TagLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The specified tag key is a reserved word and can't be used. +// The operation failed because the specified tag key is a reserved word and can't +// be used. type TagPolicyViolationException struct { Message *string @@ -541,8 +693,8 @@ func (e *TagPolicyViolationException) ErrorCode() string { } func (e *TagPolicyViolationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// You exceeded the rate at which you are allowed to perform this operation. -// Please try again later. +// The operation failed because it exceeded the rate at which you are allowed to +// perform this operation. Please try again later. type ThrottlingException struct { Message *string @@ -568,7 +720,7 @@ func (e *ThrottlingException) ErrorCode() string { } func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// A specified resource was not found. +// The operation failed because a specified resource couldn't be found. type UnknownResourceException struct { Message *string @@ -593,3 +745,33 @@ func (e *UnknownResourceException) ErrorCode() string { return *e.ErrorCodeOverride } func (e *UnknownResourceException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// There isn't an existing managed permission defined in RAM that has the same IAM +// permissions as the resource-based policy attached to the resource. You should +// first run PromotePermissionCreatedFromPolicy to create that managed permission. +type UnmatchedPolicyPermissionException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnmatchedPolicyPermissionException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnmatchedPolicyPermissionException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnmatchedPolicyPermissionException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnmatchedPolicyPermissionException" + } + return *e.ErrorCodeOverride +} +func (e *UnmatchedPolicyPermissionException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} diff --git a/service/ram/types/types.go b/service/ram/types/types.go index 6649f5b03df..69a0f401781 100644 --- a/service/ram/types/types.go +++ b/service/ram/types/types.go @@ -7,43 +7,150 @@ import ( "time" ) +// An object that describes a managed permission associated with a resource share. +type AssociatedPermission struct { + + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the associated managed permission. + Arn *string + + // Indicates whether the associated resource share is using the default version of + // the permission. + DefaultVersion *bool + + // Indicates what features are available for this resource share. This parameter + // can have one of the following values: + // - STANDARD – A resource share that supports all functionality. These resource + // shares are visible to all principals you share the resource share with. You can + // modify these resource shares in RAM using the console or APIs. This resource + // share might have been created by RAM, or it might have been CREATED_FROM_POLICY + // and then promoted. + // - CREATED_FROM_POLICY – The customer manually shared a resource by attaching + // a resource-based policy. That policy did not match any existing managed + // permissions, so RAM created this customer managed permission automatically on + // the customer's behalf based on the attached policy document. This type of + // resource share is visible only to the Amazon Web Services account that created + // it. You can't modify it in RAM unless you promote it. For more information, see + // PromoteResourceShareCreatedFromPolicy . + // - PROMOTING_TO_STANDARD – This resource share was originally + // CREATED_FROM_POLICY , but the customer ran the + // PromoteResourceShareCreatedFromPolicy and that operation is still in progress. + // This value changes to STANDARD when complete. + FeatureSet PermissionFeatureSet + + // The date and time when the association between the permission and the resource + // share was last updated. + LastUpdatedTime *time.Time + + // The version of the permission currently associated with the resource share. + PermissionVersion *string + + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of a resource share associated with this permission. + ResourceShareArn *string + + // The resource type to which this permission applies. + ResourceType *string + + // The current status of the association between the permission and the resource + // share. The following are the possible values: + // - ATTACHABLE – This permission or version can be associated with resource + // shares. + // - UNATTACHABLE – This permission or version can't currently be associated with + // resource shares. + // - DELETING – This permission or version is in the process of being deleted. + // - DELETED – This permission or version is deleted. + Status *string + + noSmithyDocumentSerde +} + // Describes a principal for use with Resource Access Manager. type Principal struct { // The date and time when the principal was associated with the resource share. CreationTime *time.Time - // Indicates whether the principal belongs to the same organization in - // Organizations as the Amazon Web Services account that owns the resource share. + // Indicates the relationship between the Amazon Web Services account the + // principal belongs to and the account that owns the resource share: + // - True – The two accounts belong to same organization. + // - False – The two accounts do not belong to the same organization. External *bool - // The ID of the principal. + // The ID of the principal that can be associated with a resource share. Id *string - // The date and time when the association was last updated. + // The date and time when the association between the resource share and the + // principal was last updated. LastUpdatedTime *time.Time - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of a resource share the principal is associated with. ResourceShareArn *string noSmithyDocumentSerde } +// A structure that represents the background work that RAM performs when you +// invoke the ReplacePermissionAssociations operation. +type ReplacePermissionAssociationsWork struct { + + // The date and time when this asynchronous background task was created. + CreationTime *time.Time + + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the managed permission that this background task is replacing. + FromPermissionArn *string + + // The version of the managed permission that this background task is replacing. + FromPermissionVersion *string + + // The unique identifier for the background task associated with one + // ReplacePermissionAssociations request. + Id *string + + // The date and time when the status of this background task was last updated. + LastUpdatedTime *time.Time + + // Specifies the current status of the background tasks for the specified ID. The + // output is one of the following strings: + // - IN_PROGRESS + // - COMPLETED + // - FAILED + Status ReplacePermissionAssociationsWorkStatus + + // Specifies the reason for a FAILED status. This field is present only when there + // status is FAILED . + StatusMessage *string + + // The ARN of the managed permission that this background task is associating with + // the resource shares in place of the managed permission and version specified in + // fromPermissionArn and fromPermissionVersion . + ToPermissionArn *string + + // The version of the managed permission that this background task is associating + // with the resource shares. This is always the version that is currently the + // default for this managed permission. + ToPermissionVersion *string + + noSmithyDocumentSerde +} + // Describes a resource associated with a resource share in RAM. type Resource struct { - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the resource. Arn *string // The date and time when the resource was associated with the resource share. CreationTime *time.Time - // The date an time when the association was last updated. + // The date an time when the association between the resource and the resource + // share was last updated. LastUpdatedTime *time.Time - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the resource group. This value is available only if the resource is part of a // resource group. ResourceGroupArn *string @@ -54,7 +161,7 @@ type Resource struct { // - GLOBAL – The resource can be accessed from any Amazon Web Services Region. ResourceRegionScope ResourceRegionScope - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the resource share this resource is associated with. ResourceShareArn *string @@ -64,7 +171,9 @@ type Resource struct { // A message about the status of the resource. StatusMessage *string - // The resource type. This takes the form of: service-code : resource-code + // The resource type. This takes the form of: service-code : resource-code , and is + // case-insensitive. For example, an Amazon EC2 Subnet would be represented by the + // string ec2:subnet . Type *string noSmithyDocumentSerde @@ -75,23 +184,33 @@ type ResourceShare struct { // Indicates whether principals outside your organization in Organizations can be // associated with a resource share. + // - True – the resource share can be shared with any Amazon Web Services + // account. + // - False – the resource share can be shared with only accounts in the same + // organization as the account that owns the resource share. AllowExternalPrincipals *bool // The date and time when the resource share was created. CreationTime *time.Time - // Indicates how the resource share was created. Possible values include: - // - CREATED_FROM_POLICY - Indicates that the resource share was created from an - // Identity and Access Management (IAM) resource-based permission policy attached - // to the resource. This type of resource share is visible only to the Amazon Web - // Services account that created it. You can't modify it in RAM unless you promote - // it. For more information, see PromoteResourceShareCreatedFromPolicy . - // - PROMOTING_TO_STANDARD - The resource share is in the process of being - // promoted. For more information, see PromoteResourceShareCreatedFromPolicy . - // - STANDARD - Indicates that the resource share was created in RAM using the - // console or APIs. These resource shares are visible to all principals you share - // the resource share with. You can modify these resource shares in RAM using the - // console or APIs. + // Indicates what features are available for this resource share. This parameter + // can have one of the following values: + // - STANDARD – A resource share that supports all functionality. These resource + // shares are visible to all principals you share the resource share with. You can + // modify these resource shares in RAM using the console or APIs. This resource + // share might have been created by RAM, or it might have been CREATED_FROM_POLICY + // and then promoted. + // - CREATED_FROM_POLICY – The customer manually shared a resource by attaching + // a resource-based policy. That policy did not match any existing managed + // permissions, so RAM created this customer managed permission automatically on + // the customer's behalf based on the attached policy document. This type of + // resource share is visible only to the Amazon Web Services account that created + // it. You can't modify it in RAM unless you promote it. For more information, see + // PromoteResourceShareCreatedFromPolicy . + // - PROMOTING_TO_STANDARD – This resource share was originally + // CREATED_FROM_POLICY , but the customer ran the + // PromoteResourceShareCreatedFromPolicy and that operation is still in progress. + // This value changes to STANDARD when complete. FeatureSet ResourceShareFeatureSet // The date and time when the resource share was last updated. @@ -103,7 +222,7 @@ type ResourceShare struct { // The ID of the Amazon Web Services account that owns the resource share. OwningAccountId *string - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the resource share ResourceShareArn *string @@ -119,16 +238,16 @@ type ResourceShare struct { noSmithyDocumentSerde } -// Describes an association with a resource share and either a principal or a +// Describes an association between a resource share and either a principal or a // resource. type ResourceShareAssociation struct { // The associated entity. This can be either of the following: - // - For a resource association, this is the Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // - For a resource association, this is the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the resource. // - For principal associations, this is one of the following: // - The ID of an Amazon Web Services account - // - The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // - The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of an organization in Organizations // - The ARN of an organizational unit (OU) in Organizations // - The ARN of an IAM role @@ -148,7 +267,7 @@ type ResourceShareAssociation struct { // The date and time when the association was last updated. LastUpdatedTime *time.Time - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the resource share. ResourceShareArn *string @@ -174,11 +293,11 @@ type ResourceShareInvitation struct { // The ID of the Amazon Web Services account that received the invitation. ReceiverAccountId *string - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the IAM user or role that received the invitation. ReceiverArn *string - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the resource share ResourceShareArn *string @@ -188,7 +307,7 @@ type ResourceShareInvitation struct { // Deprecated: This member has been deprecated. Use ListPendingInvitationResources. ResourceShareAssociations []ResourceShareAssociation - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the invitation. ResourceShareInvitationArn *string @@ -204,22 +323,42 @@ type ResourceShareInvitation struct { noSmithyDocumentSerde } -// Information about an RAM permission. +// Information about a RAM managed permission. type ResourceSharePermissionDetail struct { - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // of this RAM permission. + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of this RAM managed permission. Arn *string // The date and time when the permission was created. CreationTime *time.Time - // Specifies whether the version of the permission represented in this structure - // is the default version for this permission. + // Specifies whether the version of the permission represented in this response is + // the default version for this permission. DefaultVersion *bool - // Specifies whether the version of the permission represented in this structure - // is the default version for all resources of this resource type. + // Indicates what features are available for this resource share. This parameter + // can have one of the following values: + // - STANDARD – A resource share that supports all functionality. These resource + // shares are visible to all principals you share the resource share with. You can + // modify these resource shares in RAM using the console or APIs. This resource + // share might have been created by RAM, or it might have been CREATED_FROM_POLICY + // and then promoted. + // - CREATED_FROM_POLICY – The customer manually shared a resource by attaching + // a resource-based policy. That policy did not match any existing managed + // permissions, so RAM created this customer managed permission automatically on + // the customer's behalf based on the attached policy document. This type of + // resource share is visible only to the Amazon Web Services account that created + // it. You can't modify it in RAM unless you promote it. For more information, see + // PromoteResourceShareCreatedFromPolicy . + // - PROMOTING_TO_STANDARD – This resource share was originally + // CREATED_FROM_POLICY , but the customer ran the + // PromoteResourceShareCreatedFromPolicy and that operation is still in progress. + // This value changes to STANDARD when complete. + FeatureSet PermissionFeatureSet + + // Specifies whether the version of the permission represented in this response is + // the default version for all resources of this resource type. IsResourceTypeDefault *bool // The date and time when the permission was last updated. @@ -233,47 +372,102 @@ type ResourceSharePermissionDetail struct { // operations to which the principal is granted or denied access. Permission *string + // The type of managed permission. This can be one of the following values: + // - AWS_MANAGED – Amazon Web Services created and manages this managed + // permission. You can associate it with your resource shares, but you can't modify + // it. + // - CUSTOMER_MANAGED – You, or another principal in your account created this + // managed permission. You can associate it with your resource shares and create + // new versions that have different permissions. + PermissionType PermissionType + // The resource type to which this permission applies. ResourceType *string - // The version of the permission represented in this structure. + // The current status of the association between the permission and the resource + // share. The following are the possible values: + // - ATTACHABLE – This permission or version can be associated with resource + // shares. + // - UNATTACHABLE – This permission or version can't currently be associated with + // resource shares. + // - DELETING – This permission or version is in the process of being deleted. + // - DELETED – This permission or version is deleted. + Status PermissionStatus + + // The tag key and value pairs attached to the resource share. + Tags []Tag + + // The version of the permission described in this response. Version *string noSmithyDocumentSerde } -// Information about an RAM permission that is associated with a resource share -// and any of its resources of a specified type. +// Information about an RAM permission. type ResourceSharePermissionSummary struct { - // The Amazon Resoure Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // The Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the permission you want information about. Arn *string // The date and time when the permission was created. CreationTime *time.Time - // Specifies whether the version of the permission represented in this structure - // is the default version for this permission. + // Specifies whether the version of the managed permission used by this resource + // share is the default version for this managed permission. DefaultVersion *bool - // Specifies whether the version of the permission represented in this structure - // is the default version for all resources of this resource type. + // Indicates what features are available for this resource share. This parameter + // can have one of the following values: + // - STANDARD – A resource share that supports all functionality. These resource + // shares are visible to all principals you share the resource share with. You can + // modify these resource shares in RAM using the console or APIs. This resource + // share might have been created by RAM, or it might have been CREATED_FROM_POLICY + // and then promoted. + // - CREATED_FROM_POLICY – The customer manually shared a resource by attaching + // a resource-based policy. That policy did not match any existing managed + // permissions, so RAM created this customer managed permission automatically on + // the customer's behalf based on the attached policy document. This type of + // resource share is visible only to the Amazon Web Services account that created + // it. You can't modify it in RAM unless you promote it. For more information, see + // PromoteResourceShareCreatedFromPolicy . + // - PROMOTING_TO_STANDARD – This resource share was originally + // CREATED_FROM_POLICY , but the customer ran the + // PromoteResourceShareCreatedFromPolicy and that operation is still in progress. + // This value changes to STANDARD when complete. + FeatureSet PermissionFeatureSet + + // Specifies whether the managed permission associated with this resource share is + // the default managed permission for all resources of this resource type. IsResourceTypeDefault *bool // The date and time when the permission was last updated. LastUpdatedTime *time.Time - // The name of this permission. + // The name of this managed permission. Name *string - // The type of resource to which this permission applies. + // The type of managed permission. This can be one of the following values: + // - AWS_MANAGED – Amazon Web Services created and manages this managed + // permission. You can associate it with your resource shares, but you can't modify + // it. + // - CUSTOMER_MANAGED – You, or another principal in your account created this + // managed permission. You can associate it with your resource shares and create + // new versions that have different permissions. + PermissionType PermissionType + + // The type of resource to which this permission applies. This takes the form of: + // service-code : resource-code , and is case-insensitive. For example, an Amazon + // EC2 Subnet would be represented by the string ec2:subnet . ResourceType *string // The current status of the permission. Status *string - // The version of the permission represented in this structure. + // A list of the tag key value pairs currently attached to the permission. + Tags []Tag + + // The version of the permission associated with this resource share. Version *string noSmithyDocumentSerde @@ -289,7 +483,9 @@ type ServiceNameAndResourceType struct { // - GLOBAL – The resource can be accessed from any Amazon Web Services Region. ResourceRegionScope ResourceRegionScope - // The type of the resource. + // The type of the resource. This takes the form of: service-code : resource-code , + // and is case-insensitive. For example, an Amazon EC2 Subnet would be represented + // by the string ec2:subnet . ResourceType *string // The name of the Amazon Web Services service to which resources of this type diff --git a/service/ram/validators.go b/service/ram/validators.go index 66ec8c68087..a0c6a5e55f7 100644 --- a/service/ram/validators.go +++ b/service/ram/validators.go @@ -69,6 +69,46 @@ func (m *validateOpAssociateResourceSharePermission) HandleInitialize(ctx contex return next.HandleInitialize(ctx, in) } +type validateOpCreatePermission struct { +} + +func (*validateOpCreatePermission) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreatePermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreatePermissionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreatePermissionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreatePermissionVersion struct { +} + +func (*validateOpCreatePermissionVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreatePermissionVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreatePermissionVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreatePermissionVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateResourceShare struct { } @@ -89,6 +129,46 @@ func (m *validateOpCreateResourceShare) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDeletePermission struct { +} + +func (*validateOpDeletePermission) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeletePermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeletePermissionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeletePermissionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeletePermissionVersion struct { +} + +func (*validateOpDeletePermissionVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeletePermissionVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeletePermissionVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeletePermissionVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteResourceShare struct { } @@ -329,6 +409,26 @@ func (m *validateOpListResources) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpPromotePermissionCreatedFromPolicy struct { +} + +func (*validateOpPromotePermissionCreatedFromPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPromotePermissionCreatedFromPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PromotePermissionCreatedFromPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPromotePermissionCreatedFromPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpPromoteResourceShareCreatedFromPolicy struct { } @@ -369,6 +469,46 @@ func (m *validateOpRejectResourceShareInvitation) HandleInitialize(ctx context.C return next.HandleInitialize(ctx, in) } +type validateOpReplacePermissionAssociations struct { +} + +func (*validateOpReplacePermissionAssociations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpReplacePermissionAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ReplacePermissionAssociationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpReplacePermissionAssociationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSetDefaultPermissionVersion struct { +} + +func (*validateOpSetDefaultPermissionVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSetDefaultPermissionVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SetDefaultPermissionVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSetDefaultPermissionVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpTagResource struct { } @@ -441,10 +581,26 @@ func addOpAssociateResourceSharePermissionValidationMiddleware(stack *middleware return stack.Initialize.Add(&validateOpAssociateResourceSharePermission{}, middleware.After) } +func addOpCreatePermissionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreatePermission{}, middleware.After) +} + +func addOpCreatePermissionVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreatePermissionVersion{}, middleware.After) +} + func addOpCreateResourceShareValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateResourceShare{}, middleware.After) } +func addOpDeletePermissionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeletePermission{}, middleware.After) +} + +func addOpDeletePermissionVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeletePermissionVersion{}, middleware.After) +} + func addOpDeleteResourceShareValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteResourceShare{}, middleware.After) } @@ -493,6 +649,10 @@ func addOpListResourcesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListResources{}, middleware.After) } +func addOpPromotePermissionCreatedFromPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPromotePermissionCreatedFromPolicy{}, middleware.After) +} + func addOpPromoteResourceShareCreatedFromPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPromoteResourceShareCreatedFromPolicy{}, middleware.After) } @@ -501,6 +661,14 @@ func addOpRejectResourceShareInvitationValidationMiddleware(stack *middleware.St return stack.Initialize.Add(&validateOpRejectResourceShareInvitation{}, middleware.After) } +func addOpReplacePermissionAssociationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpReplacePermissionAssociations{}, middleware.After) +} + +func addOpSetDefaultPermissionVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSetDefaultPermissionVersion{}, middleware.After) +} + func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } @@ -561,6 +729,45 @@ func validateOpAssociateResourceSharePermissionInput(v *AssociateResourceSharePe } } +func validateOpCreatePermissionInput(v *CreatePermissionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreatePermissionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.ResourceType == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.PolicyTemplate == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyTemplate")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreatePermissionVersionInput(v *CreatePermissionVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreatePermissionVersionInput"} + if v.PermissionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PermissionArn")) + } + if v.PolicyTemplate == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyTemplate")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateResourceShareInput(v *CreateResourceShareInput) error { if v == nil { return nil @@ -576,6 +783,39 @@ func validateOpCreateResourceShareInput(v *CreateResourceShareInput) error { } } +func validateOpDeletePermissionInput(v *DeletePermissionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeletePermissionInput"} + if v.PermissionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PermissionArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeletePermissionVersionInput(v *DeletePermissionVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeletePermissionVersionInput"} + if v.PermissionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PermissionArn")) + } + if v.PermissionVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("PermissionVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteResourceShareInput(v *DeleteResourceShareInput) error { if v == nil { return nil @@ -759,6 +999,24 @@ func validateOpListResourcesInput(v *ListResourcesInput) error { } } +func validateOpPromotePermissionCreatedFromPolicyInput(v *PromotePermissionCreatedFromPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PromotePermissionCreatedFromPolicyInput"} + if v.PermissionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PermissionArn")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpPromoteResourceShareCreatedFromPolicyInput(v *PromoteResourceShareCreatedFromPolicyInput) error { if v == nil { return nil @@ -789,14 +1047,47 @@ func validateOpRejectResourceShareInvitationInput(v *RejectResourceShareInvitati } } +func validateOpReplacePermissionAssociationsInput(v *ReplacePermissionAssociationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ReplacePermissionAssociationsInput"} + if v.FromPermissionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("FromPermissionArn")) + } + if v.ToPermissionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ToPermissionArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSetDefaultPermissionVersionInput(v *SetDefaultPermissionVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SetDefaultPermissionVersionInput"} + if v.PermissionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PermissionArn")) + } + if v.PermissionVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("PermissionVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} - if v.ResourceShareArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceShareArn")) - } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } @@ -812,9 +1103,6 @@ func validateOpUntagResourceInput(v *UntagResourceInput) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} - if v.ResourceShareArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceShareArn")) - } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } diff --git a/service/rds/api_op_CreateCustomDBEngineVersion.go b/service/rds/api_op_CreateCustomDBEngineVersion.go index 9008f054514..60ea4c5e012 100644 --- a/service/rds/api_op_CreateCustomDBEngineVersion.go +++ b/service/rds/api_op_CreateCustomDBEngineVersion.go @@ -56,8 +56,12 @@ type CreateCustomDBEngineVersionInput struct { // An optional description of your CEV. Description *string - // The ID of the AMI. An AMI ID is required to create a CEV for RDS Custom for SQL - // Server. + // The ID of the Amazon Machine Image (AMI). For RDS Custom for SQL Server, an AMI + // ID is required to create a CEV. For RDS Custom for Oracle, the default is the + // most recent AMI available, but you can specify an AMI ID that was used in a + // different Oracle CEV. Find the AMIs used by your CEVs by calling the + // DescribeDBEngineVersions (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBEngineVersions.html) + // operation. ImageId *string // The Amazon Web Services KMS key identifier for an encrypted CEV. A symmetric diff --git a/service/rds/api_op_CreateDBClusterParameterGroup.go b/service/rds/api_op_CreateDBClusterParameterGroup.go index fee93d32200..4c4b5759a85 100644 --- a/service/rds/api_op_CreateDBClusterParameterGroup.go +++ b/service/rds/api_op_CreateDBClusterParameterGroup.go @@ -66,17 +66,16 @@ type CreateDBClusterParameterGroupInput struct { // associated with one and only one DB cluster parameter group family, and can be // applied only to a DB cluster running a database engine and engine version // compatible with that DB cluster parameter group family. Aurora MySQL Example: - // aurora5.6 , aurora-mysql5.7 , aurora-mysql8.0 Aurora PostgreSQL Example: - // aurora-postgresql9.6 RDS for MySQL Example: mysql8.0 RDS for PostgreSQL - // Example: postgres12 To list all of the available parameter group families for a - // DB engine, use the following command: aws rds describe-db-engine-versions - // --query "DBEngineVersions[].DBParameterGroupFamily" --engine For example, to - // list all of the available parameter group families for the Aurora PostgreSQL DB - // engine, use the following command: aws rds describe-db-engine-versions --query + // aurora-mysql5.7 , aurora-mysql8.0 Aurora PostgreSQL Example: aurora-postgresql14 + // RDS for MySQL Example: mysql8.0 RDS for PostgreSQL Example: postgres12 To list + // all of the available parameter group families for a DB engine, use the following + // command: aws rds describe-db-engine-versions --query + // "DBEngineVersions[].DBParameterGroupFamily" --engine For example, to list all + // of the available parameter group families for the Aurora PostgreSQL DB engine, + // use the following command: aws rds describe-db-engine-versions --query // "DBEngineVersions[].DBParameterGroupFamily" --engine aurora-postgresql The // output contains duplicates. The following are the valid DB engine values: - // - aurora (for MySQL 5.6-compatible Aurora) - // - aurora-mysql (for MySQL 5.7-compatible and MySQL 8.0-compatible Aurora) + // - aurora-mysql // - aurora-postgresql // - mysql // - postgres diff --git a/service/rds/api_op_CreateDBInstance.go b/service/rds/api_op_CreateDBInstance.go index f0b4fa38fbd..2bf9f5d8c8f 100644 --- a/service/rds/api_op_CreateDBInstance.go +++ b/service/rds/api_op_CreateDBInstance.go @@ -59,9 +59,8 @@ type CreateDBInstanceInput struct { // The name of the database engine to be used for this instance. Not every // database engine is available for every Amazon Web Services Region. Valid Values: // - // - aurora (for MySQL 5.6-compatible Aurora) - // - aurora-mysql (for MySQL 5.7-compatible and MySQL 8.0-compatible Aurora) - // - aurora-postgresql + // - aurora-mysql (for Aurora MySQL DB instances) + // - aurora-postgresql (for Aurora PostgreSQL DB instances) // - custom-oracle-ee (for RDS Custom for Oracle DB instances) // - custom-oracle-ee-cdb (for RDS Custom for Oracle DB instances) // - custom-sqlserver-ee (for RDS Custom for SQL Server DB instances) diff --git a/service/rds/api_op_CreateDBParameterGroup.go b/service/rds/api_op_CreateDBParameterGroup.go index f8348e84df5..aaf7e506831 100644 --- a/service/rds/api_op_CreateDBParameterGroup.go +++ b/service/rds/api_op_CreateDBParameterGroup.go @@ -56,8 +56,7 @@ type CreateDBParameterGroupInput struct { // the following command: aws rds describe-db-engine-versions --query // "DBEngineVersions[].DBParameterGroupFamily" --engine mysql The output contains // duplicates. The following are the valid DB engine values: - // - aurora (for MySQL 5.6-compatible Aurora) - // - aurora-mysql (for MySQL 5.7-compatible and MySQL 8.0-compatible Aurora) + // - aurora-mysql // - aurora-postgresql // - mariadb // - mysql diff --git a/service/rds/api_op_DescribeDBEngineVersions.go b/service/rds/api_op_DescribeDBEngineVersions.go index 4923b2f4a8e..a25ff593dd6 100644 --- a/service/rds/api_op_DescribeDBEngineVersions.go +++ b/service/rds/api_op_DescribeDBEngineVersions.go @@ -40,8 +40,9 @@ type DescribeDBEngineVersionsInput struct { DefaultOnly bool // The database engine to return. Valid Values: - // - aurora-mysql (for MySQL 5.7-compatible and MySQL 8.0-compatible Aurora) + // - aurora-mysql // - aurora-postgresql + // - custom-oracle-ee // - mariadb // - mysql // - oracle-ee diff --git a/service/rds/api_op_DescribeEngineDefaultParameters.go b/service/rds/api_op_DescribeEngineDefaultParameters.go index 76cce1fdc42..ca0ac32623b 100644 --- a/service/rds/api_op_DescribeEngineDefaultParameters.go +++ b/service/rds/api_op_DescribeEngineDefaultParameters.go @@ -32,7 +32,6 @@ func (c *Client) DescribeEngineDefaultParameters(ctx context.Context, params *De type DescribeEngineDefaultParametersInput struct { // The name of the DB parameter group family. Valid Values: - // - aurora5.6 // - aurora-mysql5.7 // - aurora-mysql8.0 // - aurora-postgresql10 diff --git a/service/rds/api_op_DescribeOrderableDBInstanceOptions.go b/service/rds/api_op_DescribeOrderableDBInstanceOptions.go index e71ec5da5b0..dfbf3def246 100644 --- a/service/rds/api_op_DescribeOrderableDBInstanceOptions.go +++ b/service/rds/api_op_DescribeOrderableDBInstanceOptions.go @@ -32,8 +32,9 @@ func (c *Client) DescribeOrderableDBInstanceOptions(ctx context.Context, params type DescribeOrderableDBInstanceOptionsInput struct { // The name of the engine to retrieve DB instance options for. Valid Values: - // - aurora-mysql (for MySQL 5.7-compatible and MySQL 8.0-compatible Aurora) + // - aurora-mysql // - aurora-postgresql + // - custom-oracle-ee // - mariadb // - mysql // - oracle-ee diff --git a/service/rds/api_op_ModifyDBCluster.go b/service/rds/api_op_ModifyDBCluster.go index bfebe2dbfe2..3040126cd89 100644 --- a/service/rds/api_op_ModifyDBCluster.go +++ b/service/rds/api_op_ModifyDBCluster.go @@ -188,12 +188,8 @@ type ModifyDBClusterInput struct { // next maintenance window unless ApplyImmediately is enabled. If the cluster that // you're modifying has one or more read replicas, all replicas must be running an // engine version that's the same or later than the version you specify. To list - // all of the available engine versions for Aurora MySQL version 2 (5.7-compatible) - // and version 3 (MySQL 8.0-compatible), use the following command: aws rds - // describe-db-engine-versions --engine aurora-mysql --query - // "DBEngineVersions[].EngineVersion" To list all of the available engine versions - // for MySQL 5.6-compatible Aurora, use the following command: aws rds - // describe-db-engine-versions --engine aurora --query + // all of the available engine versions for Aurora MySQL, use the following + // command: aws rds describe-db-engine-versions --engine aurora-mysql --query // "DBEngineVersions[].EngineVersion" To list all of the available engine versions // for Aurora PostgreSQL, use the following command: aws rds // describe-db-engine-versions --engine aurora-postgresql --query diff --git a/service/rds/api_op_ModifyGlobalCluster.go b/service/rds/api_op_ModifyGlobalCluster.go index 72bc73e3165..dd190513ace 100644 --- a/service/rds/api_op_ModifyGlobalCluster.go +++ b/service/rds/api_op_ModifyGlobalCluster.go @@ -49,16 +49,14 @@ type ModifyGlobalClusterInput struct { // The version number of the database engine to which you want to upgrade. // Changing this parameter results in an outage. The change is applied during the // next maintenance window unless ApplyImmediately is enabled. To list all of the - // available engine versions for aurora (for MySQL 5.6-compatible Aurora), use the - // following command: aws rds describe-db-engine-versions --engine aurora --query - // '*[]|[?SupportsGlobalDatabases == `true`].[EngineVersion]' To list all of the - // available engine versions for aurora-mysql (for MySQL 5.7-compatible and MySQL - // 8.0-compatible Aurora), use the following command: aws rds - // describe-db-engine-versions --engine aurora-mysql --query - // '*[]|[?SupportsGlobalDatabases == `true`].[EngineVersion]' To list all of the - // available engine versions for aurora-postgresql , use the following command: - // aws rds describe-db-engine-versions --engine aurora-postgresql --query - // '*[]|[?SupportsGlobalDatabases == `true`].[EngineVersion]' + // available engine versions for aurora-mysql (for MySQL-based Aurora global + // databases), use the following command: aws rds describe-db-engine-versions + // --engine aurora-mysql --query '*[]|[?SupportsGlobalDatabases == + // `true`].[EngineVersion]' To list all of the available engine versions for + // aurora-postgresql (for PostgreSQL-based Aurora global databases), use the + // following command: aws rds describe-db-engine-versions --engine + // aurora-postgresql --query '*[]|[?SupportsGlobalDatabases == + // `true`].[EngineVersion]' EngineVersion *string // The DB cluster identifier for the global cluster being modified. This parameter diff --git a/service/rds/api_op_RestoreDBClusterFromS3.go b/service/rds/api_op_RestoreDBClusterFromS3.go index aa98a81e0b3..46cf0a83631 100644 --- a/service/rds/api_op_RestoreDBClusterFromS3.go +++ b/service/rds/api_op_RestoreDBClusterFromS3.go @@ -52,7 +52,7 @@ type RestoreDBClusterFromS3Input struct { DBClusterIdentifier *string // The name of the database engine to be used for this DB cluster. Valid Values: - // aurora-mysql (for MySQL 5.7-compatible and MySQL 8.0-compatible Aurora) + // aurora-mysql (for Aurora MySQL) // // This member is required. Engine *string @@ -115,7 +115,8 @@ type RestoreDBClusterFromS3Input struct { CopyTagsToSnapshot *bool // The name of the DB cluster parameter group to associate with the restored DB - // cluster. If this argument is omitted, default.aurora5.6 is used. Constraints: + // cluster. If this argument is omitted, the default parameter group for the engine + // version is used. Constraints: // - If supplied, must match the name of an existing DBClusterParameterGroup. DBClusterParameterGroupName *string @@ -158,10 +159,10 @@ type RestoreDBClusterFromS3Input struct { EnableIAMDatabaseAuthentication *bool // The version number of the database engine to use. To list all of the available - // engine versions for aurora-mysql (MySQL 5.7-compatible and MySQL 8.0-compatible - // Aurora), use the following command: aws rds describe-db-engine-versions - // --engine aurora-mysql --query "DBEngineVersions[].EngineVersion" Aurora MySQL - // Examples: 5.7.mysql_aurora.2.07.1 , 8.0.mysql_aurora.3.02.0 + // engine versions for aurora-mysql (Aurora MySQL), use the following command: aws + // rds describe-db-engine-versions --engine aurora-mysql --query + // "DBEngineVersions[].EngineVersion" Aurora MySQL Examples: + // 5.7.mysql_aurora.2.07.1 , 8.0.mysql_aurora.3.02.0 EngineVersion *string // The Amazon Web Services KMS key identifier for an encrypted DB cluster. The diff --git a/service/rds/api_op_RestoreDBClusterFromSnapshot.go b/service/rds/api_op_RestoreDBClusterFromSnapshot.go index fdfcb1dbd8b..06b8602e4f7 100644 --- a/service/rds/api_op_RestoreDBClusterFromSnapshot.go +++ b/service/rds/api_op_RestoreDBClusterFromSnapshot.go @@ -149,17 +149,16 @@ type RestoreDBClusterFromSnapshotInput struct { // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only EnableIAMDatabaseAuthentication *bool - // The DB engine mode of the DB cluster, either provisioned , serverless , - // parallelquery , global , or multimaster . For more information, see - // CreateDBCluster (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html) + // The DB engine mode of the DB cluster, either provisioned or serverless . For + // more information, see CreateDBCluster (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html) // . Valid for: Aurora DB clusters only EngineMode *string // The version of the database engine to use for the new DB cluster. If you don't // specify an engine version, the default version for the database engine in the // Amazon Web Services Region is used. To list all of the available engine versions - // for MySQL 5.7-compatible and MySQL 8.0-compatible Aurora, use the following - // command: aws rds describe-db-engine-versions --engine aurora-mysql --query + // for Aurora MySQL, use the following command: aws rds + // describe-db-engine-versions --engine aurora-mysql --query // "DBEngineVersions[].EngineVersion" To list all of the available engine versions // for Aurora PostgreSQL, use the following command: aws rds // describe-db-engine-versions --engine aurora-postgresql --query diff --git a/service/rds/api_op_RestoreDBClusterToPointInTime.go b/service/rds/api_op_RestoreDBClusterToPointInTime.go index 5fb78a3000c..84e093bd152 100644 --- a/service/rds/api_op_RestoreDBClusterToPointInTime.go +++ b/service/rds/api_op_RestoreDBClusterToPointInTime.go @@ -223,10 +223,9 @@ type RestoreDBClusterToPointInTimeInput struct { // cluster. // - copy-on-write - The new DB cluster is restored as a clone of the source DB // cluster. - // Constraints: You can't specify copy-on-write if the engine version of the - // source DB cluster is earlier than 1.11. If you don't specify a RestoreType - // value, then the new DB cluster is restored as a full copy of the source DB - // cluster. Valid for: Aurora DB clusters and Multi-AZ DB clusters + // If you don't specify a RestoreType value, then the new DB cluster is restored + // as a full copy of the source DB cluster. Valid for: Aurora DB clusters and + // Multi-AZ DB clusters RestoreType *string // For DB clusters in serverless DB engine mode, the scaling properties of the DB diff --git a/service/rds/types/types.go b/service/rds/types/types.go index b7dbc6a00e8..41b950ef31e 100644 --- a/service/rds/types/types.go +++ b/service/rds/types/types.go @@ -1379,11 +1379,9 @@ type DBInstance struct { // True if mapping of Amazon Web Services Identity and Access Management (IAM) // accounts to database accounts is enabled, and otherwise false. IAM database - // authentication can be enabled for the following database engines - // - For MySQL 5.6, minor version 5.6.34 or higher - // - For MySQL 5.7, minor version 5.7.16 or higher - // - Aurora 5.6 or higher. To enable IAM database authentication for Aurora, see - // DBCluster Type. + // authentication can be enabled for the following database engines: + // - For MySQL 5.7, minor version 5.7.16 or higher. + // - For Amazon Aurora, all versions of Aurora MySQL and Aurora PostgreSQL. IAMDatabaseAuthenticationEnabled bool // Provides the date and time the DB instance was created. diff --git a/service/s3/api_op_AbortMultipartUpload.go b/service/s3/api_op_AbortMultipartUpload.go index 0e51d4acebb..871a628a20d 100644 --- a/service/s3/api_op_AbortMultipartUpload.go +++ b/service/s3/api_op_AbortMultipartUpload.go @@ -53,13 +53,13 @@ type AbortMultipartUploadInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_CompleteMultipartUpload.go b/service/s3/api_op_CompleteMultipartUpload.go index f8e9956e91c..a063c20962c 100644 --- a/service/s3/api_op_CompleteMultipartUpload.go +++ b/service/s3/api_op_CompleteMultipartUpload.go @@ -25,16 +25,10 @@ import ( // minutes to complete. After Amazon S3 begins processing the request, it sends an // HTTP response header that specifies a 200 OK response. While processing is in // progress, Amazon S3 periodically sends white space characters to keep the -// connection from timing out. A request could fail after the initial 200 OK -// response has been sent. This means that a 200 OK response can contain either a -// success or an error. If you call the S3 API directly, make sure to design your -// application to parse the contents of the response and handle it appropriately. -// If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect -// the embedded error and apply error handling per your configuration settings -// (including automatically retrying the request as appropriate). If the condition -// persists, the SDKs throws an exception (or, for the SDKs that don't use -// exceptions, they return the error). Note that if CompleteMultipartUpload fails, -// applications should be prepared to retry the failed requests. For more +// connection from timing out. Because a request could fail after the initial 200 +// OK response has been sent, it is important that you check the response body to +// determine whether the request succeeded. Note that if CompleteMultipartUpload +// fails, applications should be prepared to retry the failed requests. For more // information, see Amazon S3 Error Best Practices (https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html) // . You cannot use Content-Type: application/x-www-form-urlencoded with Complete // Multipart Upload requests. Also, if you do not provide a Content-Type header, @@ -91,13 +85,13 @@ type CompleteMultipartUploadInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. @@ -187,13 +181,13 @@ type CompleteMultipartUploadOutput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. Bucket *string @@ -254,12 +248,14 @@ type CompleteMultipartUploadOutput struct { RequestCharged types.RequestCharged // If present, specifies the ID of the Amazon Web Services Key Management Service - // (Amazon Web Services KMS) symmetric encryption customer managed key that was - // used for the object. + // (Amazon Web Services KMS) symmetric customer managed key that was used for the + // object. SSEKMSKeyId *string - // The server-side encryption algorithm used when storing this object in Amazon S3 - // (for example, AES256, aws:kms ). + // If you specified server-side encryption either with an Amazon S3-managed + // encryption key or an Amazon Web Services KMS key in your initiate multipart + // upload request, the response includes this header. It confirms the encryption + // algorithm that Amazon S3 used to encrypt the object. ServerSideEncryption types.ServerSideEncryption // Version ID of the newly created object, in case the bucket has versioning diff --git a/service/s3/api_op_CopyObject.go b/service/s3/api_op_CopyObject.go index b80be013548..6b895914bc9 100644 --- a/service/s3/api_op_CopyObject.go +++ b/service/s3/api_op_CopyObject.go @@ -28,13 +28,8 @@ import ( // S3 is copying the files. If the error occurs before the copy action starts, you // receive a standard Amazon S3 error. If the error occurs during the copy // operation, the error response is embedded in the 200 OK response. This means -// that a 200 OK response can contain either a success or an error. If you call -// the S3 API directly, make sure to design your application to parse the contents -// of the response and handle it appropriately. If you use Amazon Web Services -// SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply -// error handling per your configuration settings (including automatically retrying -// the request as appropriate). If the condition persists, the SDKs throws an -// exception (or, for the SDKs that don't use exceptions, they return the error). +// that a 200 OK response can contain either a success or an error. Design your +// application to parse the contents of the response and handle it appropriately. // If the copy is successful, you receive a response with information about the // copied object. If the request is an HTTP 1.1 request, the response is chunk // encoded. If it were not, it would not contain the content-length, and you would @@ -56,11 +51,9 @@ import ( // Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html) // in the Amazon S3 User Guide. For a complete list of Amazon S3-specific condition // keys, see Actions, Resources, and Condition Keys for Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html) -// . x-amz-website-redirect-location is unique to each object and must be -// specified in the request headers to copy the value. x-amz-copy-source-if Headers -// To only copy an object under certain conditions, such as whether the Etag -// matches or whether the object was modified before or after a specified date, use -// the following request parameters: +// . x-amz-copy-source-if Headers To only copy an object under certain conditions, +// such as whether the Etag matches or whether the object was modified before or +// after a specified date, use the following request parameters: // - x-amz-copy-source-if-match // - x-amz-copy-source-if-none-match // - x-amz-copy-source-if-unmodified-since @@ -80,28 +73,13 @@ import ( // - x-amz-copy-source-if-modified-since condition evaluates to true // // All headers with the x-amz- prefix, including x-amz-copy-source , must be -// signed. Server-side encryption Amazon S3 automatically encrypts all new objects -// that are copied to an S3 bucket. When copying an object, if you don't specify -// encryption information in your copy request, the encryption setting of the -// target object is set to the default encryption configuration of the destination -// bucket. By default, all buckets have a base level of encryption configuration -// that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the -// destination bucket has a default encryption configuration that uses server-side -// encryption with an Key Management Service (KMS) key (SSE-KMS), or a -// customer-provided encryption key (SSE-C), Amazon S3 uses the corresponding KMS -// key, or a customer-provided key to encrypt the target object copy. When you -// perform a CopyObject operation, if you want to use a different type of -// encryption setting for the target object, you can use other appropriate -// encryption-related headers to encrypt the target object with a KMS key, an -// Amazon S3 managed key, or a customer-provided key. With server-side encryption, -// Amazon S3 encrypts your data as it writes it to disks in its data centers and -// decrypts the data when you access it. If the encryption setting in your request -// is different from the default encryption configuration of the destination -// bucket, the encryption setting in your request takes precedence. If the source -// object for the copy is stored in Amazon S3 using SSE-C, you must provide the -// necessary encryption information in your request so that Amazon S3 can decrypt -// the object for copying. For more information about server-side encryption, see -// Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) +// signed. Server-side encryption When you perform a CopyObject operation, you can +// optionally use the appropriate encryption-related headers to encrypt the object +// using server-side encryption with Amazon Web Services managed encryption keys +// (SSE-S3 or SSE-KMS) or a customer-provided encryption key. With server-side +// encryption, Amazon S3 encrypts your data as it writes it to disks in its data +// centers and decrypts the data when you access it. For more information about +// server-side encryption, see Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) // . If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the // object. For more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) // in the Amazon S3 User Guide. Access Control List (ACL)-Specific Request Headers @@ -170,13 +148,13 @@ type CopyObjectInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. @@ -361,7 +339,7 @@ type CopyObjectInput struct { SSEKMSKeyId *string // The server-side encryption algorithm used when storing this object in Amazon S3 - // (for example, AES256, aws:kms ). + // (for example, AES256, aws:kms). ServerSideEncryption types.ServerSideEncryption // By default, Amazon S3 uses the STANDARD Storage Class to store newly created @@ -383,9 +361,7 @@ type CopyObjectInput struct { // If the bucket is configured as a website, redirects requests for this object to // another object in the same bucket or to an external URL. Amazon S3 stores the - // value of this header in the object metadata. This value is unique to each object - // and is not copied when using the x-amz-metadata-directive header. Instead, you - // may opt to provide this header in combination with the directive. + // value of this header in the object metadata. WebsiteRedirectLocation *string noSmithyDocumentSerde @@ -426,12 +402,12 @@ type CopyObjectOutput struct { SSEKMSEncryptionContext *string // If present, specifies the ID of the Amazon Web Services Key Management Service - // (Amazon Web Services KMS) symmetric encryption customer managed key that was - // used for the object. + // (Amazon Web Services KMS) symmetric customer managed key that was used for the + // object. SSEKMSKeyId *string // The server-side encryption algorithm used when storing this object in Amazon S3 - // (for example, AES256, aws:kms ). + // (for example, AES256, aws:kms). ServerSideEncryption types.ServerSideEncryption // Version ID of the newly created copy. diff --git a/service/s3/api_op_CreateMultipartUpload.go b/service/s3/api_op_CreateMultipartUpload.go index ef8fc296d23..76e3d2a49ae 100644 --- a/service/s3/api_op_CreateMultipartUpload.go +++ b/service/s3/api_op_CreateMultipartUpload.go @@ -38,37 +38,20 @@ import ( // being charged for storing the uploaded parts, you must either complete or abort // the multipart upload. Amazon S3 frees up the space used to store the parts and // stop charging you for storing them only after you either complete or abort a -// multipart upload. Server-side encryption is for data encryption at rest. Amazon -// S3 encrypts your data as it writes it to disks in its data centers and decrypts -// it when you access it. Amazon S3 automatically encrypts all new objects that are -// uploaded to an S3 bucket. When doing a multipart upload, if you don't specify -// encryption information in your request, the encryption setting of the uploaded -// parts is set to the default encryption configuration of the destination bucket. -// By default, all buckets have a base level of encryption configuration that uses -// server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination -// bucket has a default encryption configuration that uses server-side encryption -// with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided -// encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a -// customer-provided key to encrypt the uploaded parts. When you perform a -// CreateMultipartUpload operation, if you want to use a different type of -// encryption setting for the uploaded parts, you can request that Amazon S3 -// encrypts the object with a KMS key, an Amazon S3 managed key, or a -// customer-provided key. If the encryption setting in your request is different -// from the default encryption configuration of the destination bucket, the -// encryption setting in your request takes precedence. If you choose to provide -// your own encryption key, the request headers you provide in UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) +// multipart upload. You can optionally request server-side encryption. For +// server-side encryption, Amazon S3 encrypts your data as it writes it to disks in +// its data centers and decrypts it when you access it. You can provide your own +// encryption key, or use Amazon Web Services KMS keys or Amazon S3-managed +// encryption keys. If you choose to provide your own encryption key, the request +// headers you provide in UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) // and UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html) // requests must match the headers you used in the request to initiate the upload -// by using CreateMultipartUpload . you can request that Amazon S3 save the -// uploaded parts encrypted with server-side encryption with an Amazon S3 managed -// key (SSE-S3), an Key Management Service (KMS) key (SSE-KMS), or a -// customer-provided encryption key (SSE-C). To perform a multipart upload with -// encryption by using an Amazon Web Services KMS key, the requester must have -// permission to the kms:Decrypt and kms:GenerateDataKey* actions on the key. -// These permissions are required because Amazon S3 must decrypt and read data from -// the encrypted file parts before it completes the multipart upload. For more -// information, see Multipart upload API and permissions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions) -// and Protecting data using server-side encryption with Amazon Web Services KMS (https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html) +// by using CreateMultipartUpload . To perform a multipart upload with encryption +// using an Amazon Web Services KMS key, the requester must have permission to the +// kms:Decrypt and kms:GenerateDataKey* actions on the key. These permissions are +// required because Amazon S3 must decrypt and read data from the encrypted file +// parts before it completes the multipart upload. For more information, see +// Multipart upload API and permissions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions) // in the Amazon S3 User Guide. If your Identity and Access Management (IAM) user // or role is in the same Amazon Web Services account as the KMS key, then you must // have these permissions on the key policy. If your IAM user or role belongs to a @@ -88,37 +71,34 @@ import ( // . // // You can use either a canned ACL or specify access permissions explicitly. You -// cannot do both. Server-Side- Encryption-Specific Request Headers Amazon S3 -// encrypts data by using server-side encryption with an Amazon S3 managed key -// (SSE-S3) by default. Server-side encryption is for data encryption at rest. -// Amazon S3 encrypts your data as it writes it to disks in its data centers and -// decrypts it when you access it. You can request that Amazon S3 encrypts data at -// rest by using server-side encryption with other key options. The option you use -// depends on whether you want to use KMS keys (SSE-KMS) or provide your own -// encryption keys (SSE-C). -// - Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key ( -// aws/s3 ) and KMS customer managed keys stored in Key Management Service (KMS) -// – If you want Amazon Web Services to manage the keys used to encrypt data, -// specify the following headers in the request. +// cannot do both. Server-Side- Encryption-Specific Request Headers You can +// optionally tell Amazon S3 to encrypt data at rest using server-side encryption. +// Server-side encryption is for data encryption at rest. Amazon S3 encrypts your +// data as it writes it to disks in its data centers and decrypts it when you +// access it. The option you use depends on whether you want to use Amazon Web +// Services managed encryption keys or provide your own encryption key. +// - Use encryption keys managed by Amazon S3 or customer managed key stored in +// Amazon Web Services Key Management Service (Amazon Web Services KMS) – If you +// want Amazon Web Services to manage the keys used to encrypt data, specify the +// following headers in the request. // - x-amz-server-side-encryption // - x-amz-server-side-encryption-aws-kms-key-id // - x-amz-server-side-encryption-context If you specify // x-amz-server-side-encryption:aws:kms , but don't provide // x-amz-server-side-encryption-aws-kms-key-id , Amazon S3 uses the Amazon Web -// Services managed key ( aws/s3 key) in KMS to protect the data. All GET and PUT -// requests for an object protected by KMS fail if you don't make them by using -// Secure Sockets Layer (SSL), Transport Layer Security (TLS), or Signature Version -// 4. For more information about server-side encryption with KMS keys (SSE-KMS), -// see Protecting Data Using Server-Side Encryption with KMS keys (https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html) +// Services managed key in Amazon Web Services KMS to protect the data. All GET and +// PUT requests for an object protected by Amazon Web Services KMS fail if you +// don't make them with SSL or by using SigV4. For more information about +// server-side encryption with KMS key (SSE-KMS), see Protecting Data Using +// Server-Side Encryption with KMS keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) // . -// - Use customer-provided encryption keys (SSE-C) – If you want to manage your -// own encryption keys, provide all the following headers in the request. +// - Use customer-provided encryption keys – If you want to manage your own +// encryption keys, provide all the following headers in the request. // - x-amz-server-side-encryption-customer-algorithm // - x-amz-server-side-encryption-customer-key // - x-amz-server-side-encryption-customer-key-MD5 For more information about -// server-side encryption with customer-provided encryption keys (SSE-C), see -// Protecting data using server-side encryption with customer-provided encryption -// keys (SSE-C) (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html) +// server-side encryption with KMS keys (SSE-KMS), see Protecting Data Using +// Server-Side Encryption with KMS keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) // . // // Access-Control-List (ACL)-Specific Request Headers You also can use the @@ -197,13 +177,13 @@ type CreateMultipartUploadInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. @@ -311,17 +291,17 @@ type CreateMultipartUploadInput struct { // JSON with the encryption context key-value pairs. SSEKMSEncryptionContext *string - // Specifies the ID of the symmetric encryption customer managed key to use for - // object encryption. All GET and PUT requests for an object protected by Amazon - // Web Services KMS will fail if not made via SSL or using SigV4. For information - // about configuring using any of the officially supported Amazon Web Services SDKs - // and Amazon Web Services CLI, see Specifying the Signature Version in Request + // Specifies the ID of the symmetric customer managed key to use for object + // encryption. All GET and PUT requests for an object protected by Amazon Web + // Services KMS will fail if not made via SSL or using SigV4. For information about + // configuring using any of the officially supported Amazon Web Services SDKs and + // Amazon Web Services CLI, see Specifying the Signature Version in Request // Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version) // in the Amazon S3 User Guide. SSEKMSKeyId *string // The server-side encryption algorithm used when storing this object in Amazon S3 - // (for example, AES256, aws:kms ). + // (for example, AES256, aws:kms). ServerSideEncryption types.ServerSideEncryption // By default, Amazon S3 uses the STANDARD Storage Class to store newly created @@ -368,13 +348,13 @@ type CreateMultipartUploadOutput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. Bucket *string @@ -408,12 +388,12 @@ type CreateMultipartUploadOutput struct { SSEKMSEncryptionContext *string // If present, specifies the ID of the Amazon Web Services Key Management Service - // (Amazon Web Services KMS) symmetric encryption customer managed key that was - // used for the object. + // (Amazon Web Services KMS) symmetric customer managed key that was used for the + // object. SSEKMSKeyId *string // The server-side encryption algorithm used when storing this object in Amazon S3 - // (for example, AES256, aws:kms ). + // (for example, AES256, aws:kms). ServerSideEncryption types.ServerSideEncryption // ID for the initiated multipart upload. diff --git a/service/s3/api_op_DeleteBucketEncryption.go b/service/s3/api_op_DeleteBucketEncryption.go index 4570b61e179..5bb9a0e8983 100644 --- a/service/s3/api_op_DeleteBucketEncryption.go +++ b/service/s3/api_op_DeleteBucketEncryption.go @@ -11,10 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This implementation of the DELETE action resets the default encryption for the -// bucket as server-side encryption with Amazon S3 managed keys (SSE-S3). For -// information about the bucket default encryption feature, see Amazon S3 Bucket -// Default Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) +// This implementation of the DELETE action removes default encryption from the +// bucket. For information about the Amazon S3 default encryption feature, see +// Amazon S3 Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) // in the Amazon S3 User Guide. To use this operation, you must have permissions to // perform the s3:PutEncryptionConfiguration action. The bucket owner has this // permission by default. The bucket owner can grant this permission to others. For diff --git a/service/s3/api_op_DeleteBucketMetricsConfiguration.go b/service/s3/api_op_DeleteBucketMetricsConfiguration.go index 81b9d191fe3..6a83153dc6a 100644 --- a/service/s3/api_op_DeleteBucketMetricsConfiguration.go +++ b/service/s3/api_op_DeleteBucketMetricsConfiguration.go @@ -48,8 +48,7 @@ type DeleteBucketMetricsConfigurationInput struct { // This member is required. Bucket *string - // The ID used to identify the metrics configuration. The ID has a 64 character - // limit and can only contain letters, numbers, periods, dashes, and underscores. + // The ID used to identify the metrics configuration. // // This member is required. Id *string diff --git a/service/s3/api_op_DeleteObject.go b/service/s3/api_op_DeleteObject.go index 77552248076..659e3c8d694 100644 --- a/service/s3/api_op_DeleteObject.go +++ b/service/s3/api_op_DeleteObject.go @@ -15,14 +15,14 @@ import ( // Removes the null version (if there is one) of an object and inserts a delete // marker, which becomes the latest version of the object. If there isn't a null // version, Amazon S3 does not remove any objects but will still respond that the -// command was successful. To remove a specific version, you must use the version -// Id subresource. Using this subresource permanently deletes the version. If the -// object deleted is a delete marker, Amazon S3 sets the response header, -// x-amz-delete-marker , to true. If the object you want to delete is in a bucket -// where the bucket versioning configuration is MFA Delete enabled, you must -// include the x-amz-mfa request header in the DELETE versionId request. Requests -// that include x-amz-mfa must use HTTPS. For more information about MFA Delete, -// see Using MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html) +// command was successful. To remove a specific version, you must be the bucket +// owner and you must use the version Id subresource. Using this subresource +// permanently deletes the version. If the object deleted is a delete marker, +// Amazon S3 sets the response header, x-amz-delete-marker , to true. If the object +// you want to delete is in a bucket where the bucket versioning configuration is +// MFA Delete enabled, you must include the x-amz-mfa request header in the DELETE +// versionId request. Requests that include x-amz-mfa must use HTTPS. For more +// information about MFA Delete, see Using MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html) // . To see sample requests that use versioning, see Sample Request (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete) // . You can delete objects by explicitly calling DELETE Object or configure its // lifecycle ( PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html) @@ -55,13 +55,13 @@ type DeleteObjectInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_DeleteObjectTagging.go b/service/s3/api_op_DeleteObjectTagging.go index 74e1c12b7b5..6f78a9f7b8d 100644 --- a/service/s3/api_op_DeleteObjectTagging.go +++ b/service/s3/api_op_DeleteObjectTagging.go @@ -17,7 +17,7 @@ import ( // s3:DeleteObjectTagging action. To delete tags of a specific object version, add // the versionId query parameter in the request. You will need permission for the // s3:DeleteObjectVersionTagging action. The following operations are related to -// DeleteObjectTagging : +// DeleteBucketMetricsConfiguration : // - PutObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html) // - GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html) func (c *Client) DeleteObjectTagging(ctx context.Context, params *DeleteObjectTaggingInput, optFns ...func(*Options)) (*DeleteObjectTaggingOutput, error) { @@ -44,13 +44,13 @@ type DeleteObjectTaggingInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_DeleteObjects.go b/service/s3/api_op_DeleteObjects.go index 9e63422334f..0315ccdada2 100644 --- a/service/s3/api_op_DeleteObjects.go +++ b/service/s3/api_op_DeleteObjects.go @@ -67,13 +67,13 @@ type DeleteObjectsInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_GetBucketAcl.go b/service/s3/api_op_GetBucketAcl.go index 7918dbf2f67..8d42fbd3802 100644 --- a/service/s3/api_op_GetBucketAcl.go +++ b/service/s3/api_op_GetBucketAcl.go @@ -16,12 +16,11 @@ import ( // access control list (ACL) of a bucket. To use GET to return the ACL of the // bucket, you must have READ_ACP access to the bucket. If READ_ACP permission is // granted to the anonymous user, you can return the ACL of the bucket without -// using an authorization header. To use this API against an access point, provide -// the alias of the access point in place of the bucket name. If your bucket uses -// the bucket owner enforced setting for S3 Object Ownership, requests to read ACLs -// are still supported and return the bucket-owner-full-control ACL with the owner -// being the account that created the bucket. For more information, see -// Controlling object ownership and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) +// using an authorization header. If your bucket uses the bucket owner enforced +// setting for S3 Object Ownership, requests to read ACLs are still supported and +// return the bucket-owner-full-control ACL with the owner being the account that +// created the bucket. For more information, see Controlling object ownership and +// disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) // in the Amazon S3 User Guide. Related Resources // - ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html) func (c *Client) GetBucketAcl(ctx context.Context, params *GetBucketAclInput, optFns ...func(*Options)) (*GetBucketAclOutput, error) { diff --git a/service/s3/api_op_GetBucketCors.go b/service/s3/api_op_GetBucketCors.go index 32c753b090a..9d67fc8b01a 100644 --- a/service/s3/api_op_GetBucketCors.go +++ b/service/s3/api_op_GetBucketCors.go @@ -15,9 +15,8 @@ import ( // Returns the Cross-Origin Resource Sharing (CORS) configuration information set // for the bucket. To use this operation, you must have permission to perform the // s3:GetBucketCORS action. By default, the bucket owner has this permission and -// can grant it to others. To use this API against an access point, provide the -// alias of the access point in place of the bucket name. For more information -// about CORS, see Enabling Cross-Origin Resource Sharing (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) +// can grant it to others. For more information about CORS, see Enabling +// Cross-Origin Resource Sharing (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) // . The following operations are related to GetBucketCors : // - PutBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html) // - DeleteBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html) diff --git a/service/s3/api_op_GetBucketEncryption.go b/service/s3/api_op_GetBucketEncryption.go index 50ff039a7be..e33585ac239 100644 --- a/service/s3/api_op_GetBucketEncryption.go +++ b/service/s3/api_op_GetBucketEncryption.go @@ -12,16 +12,16 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns the default encryption configuration for an Amazon S3 bucket. By -// default, all buckets have a default encryption configuration that uses -// server-side encryption with Amazon S3 managed keys (SSE-S3). For information -// about the bucket default encryption feature, see Amazon S3 Bucket Default +// Returns the default encryption configuration for an Amazon S3 bucket. If the +// bucket does not have a default encryption configuration, GetBucketEncryption +// returns ServerSideEncryptionConfigurationNotFoundError . For information about +// the Amazon S3 default encryption feature, see Amazon S3 Default Bucket // Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) -// in the Amazon S3 User Guide. To use this operation, you must have permission to -// perform the s3:GetEncryptionConfiguration action. The bucket owner has this -// permission by default. The bucket owner can grant this permission to others. For -// more information about permissions, see Permissions Related to Bucket -// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// . To use this operation, you must have permission to perform the +// s3:GetEncryptionConfiguration action. The bucket owner has this permission by +// default. The bucket owner can grant this permission to others. For more +// information about permissions, see Permissions Related to Bucket Subresource +// Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) // . The following operations are related to GetBucketEncryption : // - PutBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html) diff --git a/service/s3/api_op_GetBucketLocation.go b/service/s3/api_op_GetBucketLocation.go index 491837bb564..4f86836029a 100644 --- a/service/s3/api_op_GetBucketLocation.go +++ b/service/s3/api_op_GetBucketLocation.go @@ -24,10 +24,8 @@ import ( // information, see CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) // . To use this implementation of the operation, you must be the bucket owner. To // use this API against an access point, provide the alias of the access point in -// place of the bucket name. For requests made using Amazon Web Services Signature -// Version 4 (SigV4), we recommend that you use HeadBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html) -// to return the bucket Region instead of GetBucketLocation. The following -// operations are related to GetBucketLocation : +// place of the bucket name. The following operations are related to +// GetBucketLocation : // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) func (c *Client) GetBucketLocation(ctx context.Context, params *GetBucketLocationInput, optFns ...func(*Options)) (*GetBucketLocationOutput, error) { diff --git a/service/s3/api_op_GetBucketLogging.go b/service/s3/api_op_GetBucketLogging.go index 896894501b9..9ca6349ac57 100644 --- a/service/s3/api_op_GetBucketLogging.go +++ b/service/s3/api_op_GetBucketLogging.go @@ -13,8 +13,8 @@ import ( ) // Returns the logging status of a bucket and the permissions users have to view -// and modify that status. The following operations are related to GetBucketLogging -// : +// and modify that status. To use GET, you must be the bucket owner. The following +// operations are related to GetBucketLogging : // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) // - PutBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html) func (c *Client) GetBucketLogging(ctx context.Context, params *GetBucketLoggingInput, optFns ...func(*Options)) (*GetBucketLoggingOutput, error) { diff --git a/service/s3/api_op_GetBucketMetricsConfiguration.go b/service/s3/api_op_GetBucketMetricsConfiguration.go index d7117d3793c..8b0a34cece5 100644 --- a/service/s3/api_op_GetBucketMetricsConfiguration.go +++ b/service/s3/api_op_GetBucketMetricsConfiguration.go @@ -49,8 +49,7 @@ type GetBucketMetricsConfigurationInput struct { // This member is required. Bucket *string - // The ID used to identify the metrics configuration. The ID has a 64 character - // limit and can only contain letters, numbers, periods, dashes, and underscores. + // The ID used to identify the metrics configuration. // // This member is required. Id *string diff --git a/service/s3/api_op_GetBucketNotificationConfiguration.go b/service/s3/api_op_GetBucketNotificationConfiguration.go index 929c19400b0..3a41220c9c0 100644 --- a/service/s3/api_op_GetBucketNotificationConfiguration.go +++ b/service/s3/api_op_GetBucketNotificationConfiguration.go @@ -17,10 +17,9 @@ import ( // element. By default, you must be the bucket owner to read the notification // configuration of a bucket. However, the bucket owner can use a bucket policy to // grant permission to other users to read this configuration with the -// s3:GetBucketNotification permission. To use this API against an access point, -// provide the alias of the access point in place of the bucket name. For more -// information about setting and reading the notification configuration on a -// bucket, see Setting Up Notification of Bucket Events (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) +// s3:GetBucketNotification permission. For more information about setting and +// reading the notification configuration on a bucket, see Setting Up Notification +// of Bucket Events (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) // . For more information about bucket policies, see Using Bucket Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html) // . The following action is related to GetBucketNotification : // - PutBucketNotification (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotification.html) diff --git a/service/s3/api_op_GetBucketPolicy.go b/service/s3/api_op_GetBucketPolicy.go index d2a26441c32..5749933a2e3 100644 --- a/service/s3/api_op_GetBucketPolicy.go +++ b/service/s3/api_op_GetBucketPolicy.go @@ -21,9 +21,8 @@ import ( // Method Not Allowed error. As a security precaution, the root user of the Amazon // Web Services account that owns a bucket can always use this operation, even if // the policy explicitly denies the root user the ability to perform this action. -// To use this API against an access point, provide the alias of the access point -// in place of the bucket name. For more information about bucket policies, see -// Using Bucket Policies and User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html) +// For more information about bucket policies, see Using Bucket Policies and User +// Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html) // . The following action is related to GetBucketPolicy : // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) func (c *Client) GetBucketPolicy(ctx context.Context, params *GetBucketPolicyInput, optFns ...func(*Options)) (*GetBucketPolicyOutput, error) { diff --git a/service/s3/api_op_GetObject.go b/service/s3/api_op_GetObject.go index f2b73874571..8d7c116ac4b 100644 --- a/service/s3/api_op_GetObject.go +++ b/service/s3/api_op_GetObject.go @@ -34,8 +34,8 @@ import ( // Deep Archive storage class, or S3 Intelligent-Tiering Archive or S3 // Intelligent-Tiering Deep Archive tiers, before you can retrieve the object you // must first restore a copy using RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html) -// . Otherwise, this action returns an InvalidObjectState error. For information -// about restoring archived objects, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html) +// . Otherwise, this action returns an InvalidObjectStateError error. For +// information about restoring archived objects, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html) // . Encryption request headers, like x-amz-server-side-encryption , should not be // sent for GET requests if your object uses server-side encryption with KMS keys // (SSE-KMS) or server-side encryption with Amazon S3–managed encryption keys @@ -66,9 +66,7 @@ import ( // To return a different version, use the versionId subresource. // - If you supply a versionId , you need the s3:GetObjectVersion permission to // access a specific version of an object. If you request a specific version, you -// do not need to have the s3:GetObject permission. If you request the current -// version without a specific version ID, only s3:GetObject permission is -// required. s3:GetObjectVersion permission won't be required. +// do not need to have the s3:GetObject permission. // - If the current version of the object is a delete marker, Amazon S3 behaves // as if the object was deleted and includes x-amz-delete-marker: true in the // response. @@ -132,13 +130,13 @@ type GetObjectInput struct { // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon S3 User Guide. When using an Object Lambda access point the // hostname takes the form - // AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com. When you use - // this action with Amazon S3 on Outposts, you must direct requests to the S3 on + // AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com. When using this + // action with Amazon S3 on Outposts, you must direct requests to the S3 on // Outposts hostname. The S3 on Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. @@ -180,7 +178,7 @@ type GetObjectInput struct { // Downloads the specified range bytes of an object. For more information about // the HTTP Range header, see - // https://www.rfc-editor.org/rfc/rfc9110.html#name-range (https://www.rfc-editor.org/rfc/rfc9110.html#name-range) + // https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35 (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35) // . Amazon S3 doesn't support retrieving multiple ranges of data per GET request. Range *string @@ -362,12 +360,12 @@ type GetObjectOutput struct { SSECustomerKeyMD5 *string // If present, specifies the ID of the Amazon Web Services Key Management Service - // (Amazon Web Services KMS) symmetric encryption customer managed key that was - // used for the object. + // (Amazon Web Services KMS) symmetric customer managed key that was used for the + // object. SSEKMSKeyId *string // The server-side encryption algorithm used when storing this object in Amazon S3 - // (for example, AES256, aws:kms ). + // (for example, AES256, aws:kms). ServerSideEncryption types.ServerSideEncryption // Provides storage class information of the object. Amazon S3 returns this header diff --git a/service/s3/api_op_GetObjectAttributes.go b/service/s3/api_op_GetObjectAttributes.go index eb5d1cee8d3..2371f84b5d5 100644 --- a/service/s3/api_op_GetObjectAttributes.go +++ b/service/s3/api_op_GetObjectAttributes.go @@ -16,12 +16,14 @@ import ( // Retrieves all the metadata from an object without returning the object itself. // This action is useful if you're interested only in an object's metadata. To use // GetObjectAttributes , you must have READ access to the object. -// GetObjectAttributes combines the functionality of HeadObject and ListParts . All -// of the data returned with each of those individual calls can be returned with a -// single call to GetObjectAttributes . If you encrypt an object by using -// server-side encryption with customer-provided encryption keys (SSE-C) when you -// store the object in Amazon S3, then when you retrieve the metadata from the -// object, you must use the following headers: +// GetObjectAttributes combines the functionality of GetObjectAcl , +// GetObjectLegalHold , GetObjectLockConfiguration , GetObjectRetention , +// GetObjectTagging , HeadObject , and ListParts . All of the data returned with +// each of those individual calls can be returned with a single call to +// GetObjectAttributes . If you encrypt an object by using server-side encryption +// with customer-provided encryption keys (SSE-C) when you store the object in +// Amazon S3, then when you retrieve the metadata from the object, you must use the +// following headers: // - x-amz-server-side-encryption-customer-algorithm // - x-amz-server-side-encryption-customer-key // - x-amz-server-side-encryption-customer-key-MD5 @@ -32,9 +34,9 @@ import ( // - Encryption request headers, such as x-amz-server-side-encryption , should // not be sent for GET requests if your object uses server-side encryption with // Amazon Web Services KMS keys stored in Amazon Web Services Key Management -// Service (SSE-KMS) or server-side encryption with Amazon S3 managed keys -// (SSE-S3). If your object does use these types of keys, you'll get an HTTP 400 -// Bad Request error. +// Service (SSE-KMS) or server-side encryption with Amazon S3 managed encryption +// keys (SSE-S3). If your object does use these types of keys, you'll get an HTTP +// 400 Bad Request error. // - The last modified property in this case is the creation date of the object. // // Consider the following when using request headers: @@ -97,13 +99,13 @@ type GetObjectAttributesInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_GetObjectTagging.go b/service/s3/api_op_GetObjectTagging.go index cadd2245670..452fa8cac22 100644 --- a/service/s3/api_op_GetObjectTagging.go +++ b/service/s3/api_op_GetObjectTagging.go @@ -49,13 +49,13 @@ type GetObjectTaggingInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_GetObjectTorrent.go b/service/s3/api_op_GetObjectTorrent.go index 17ef063dd43..647d7ab7076 100644 --- a/service/s3/api_op_GetObjectTorrent.go +++ b/service/s3/api_op_GetObjectTorrent.go @@ -14,11 +14,13 @@ import ( ) // Returns torrent files from a bucket. BitTorrent can save you bandwidth when -// you're distributing large files. You can get torrent only for objects that are -// less than 5 GB in size, and that are not encrypted using server-side encryption -// with a customer-provided encryption key. To use GET, you must have READ access -// to the object. This action is not supported by Amazon S3 on Outposts. The -// following action is related to GetObjectTorrent : +// you're distributing large files. For more information about BitTorrent, see +// Using BitTorrent with Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html) +// . You can get torrent only for objects that are less than 5 GB in size, and that +// are not encrypted using server-side encryption with a customer-provided +// encryption key. To use GET, you must have READ access to the object. This action +// is not supported by Amazon S3 on Outposts. The following action is related to +// GetObjectTorrent : // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) func (c *Client) GetObjectTorrent(ctx context.Context, params *GetObjectTorrentInput, optFns ...func(*Options)) (*GetObjectTorrentOutput, error) { if params == nil { diff --git a/service/s3/api_op_HeadBucket.go b/service/s3/api_op_HeadBucket.go index 7477354a036..3403835cf00 100644 --- a/service/s3/api_op_HeadBucket.go +++ b/service/s3/api_op_HeadBucket.go @@ -20,11 +20,11 @@ import ( // This action is useful to determine if a bucket exists and you have permission // to access it. The action returns a 200 OK if the bucket exists and you have // permission to access it. If the bucket does not exist or you do not have -// permission to access it, the HEAD request returns a generic 400 Bad Request , -// 403 Forbidden or 404 Not Found code. A message body is not included, so you -// cannot determine the exception beyond these error codes. To use this operation, -// you must have permissions to perform the s3:ListBucket action. The bucket owner -// has this permission by default and can grant this permission to others. For more +// permission to access it, the HEAD request returns a generic 404 Not Found or +// 403 Forbidden code. A message body is not included, so you cannot determine the +// exception beyond these error codes. To use this operation, you must have +// permissions to perform the s3:ListBucket action. The bucket owner has this +// permission by default and can grant this permission to others. For more // information about permissions, see Permissions Related to Bucket Subresource // Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) @@ -59,13 +59,13 @@ type HeadBucketInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_HeadObject.go b/service/s3/api_op_HeadObject.go index 87430d01d6f..762f8470f50 100644 --- a/service/s3/api_op_HeadObject.go +++ b/service/s3/api_op_HeadObject.go @@ -23,12 +23,12 @@ import ( // To use HEAD, you must have READ access to the object. A HEAD request has the // same options as a GET action on an object. The response is identical to the GET // response except that there is no response body. Because of this, if the HEAD -// request generates an error, it returns a generic 400 Bad Request , 403 Forbidden -// or 404 Not Found code. It is not possible to retrieve the exact exception -// beyond these error codes. If you encrypt an object by using server-side -// encryption with customer-provided encryption keys (SSE-C) when you store the -// object in Amazon S3, then when you retrieve the metadata from the object, you -// must use the following headers: +// request generates an error, it returns a generic 404 Not Found or 403 Forbidden +// code. It is not possible to retrieve the exact exception beyond these error +// codes. If you encrypt an object by using server-side encryption with +// customer-provided encryption keys (SSE-C) when you store the object in Amazon +// S3, then when you retrieve the metadata from the object, you must use the +// following headers: // - x-amz-server-side-encryption-customer-algorithm // - x-amz-server-side-encryption-customer-key // - x-amz-server-side-encryption-customer-key-MD5 @@ -94,13 +94,13 @@ type HeadObjectInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. @@ -144,9 +144,8 @@ type HeadObjectInput struct { // object. PartNumber int32 - // HeadObject returns only the metadata for an object. If the Range is - // satisfiable, only the ContentLength is affected in the response. If the Range - // is not satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error. + // Because HeadObject returns only the metadata for an object, this parameter has + // no effect. Range *string // Confirms that the requester knows that they will be charged for the request. @@ -346,12 +345,14 @@ type HeadObjectOutput struct { SSECustomerKeyMD5 *string // If present, specifies the ID of the Amazon Web Services Key Management Service - // (Amazon Web Services KMS) symmetric encryption customer managed key that was - // used for the object. + // (Amazon Web Services KMS) symmetric customer managed key that was used for the + // object. SSEKMSKeyId *string - // The server-side encryption algorithm used when storing this object in Amazon S3 - // (for example, AES256, aws:kms ). + // If the object is stored using server-side encryption either with an Amazon Web + // Services KMS key or an Amazon S3-managed encryption key, the response includes + // this header with the value of the server-side encryption algorithm used when + // storing this object in Amazon S3 (for example, AES256, aws:kms). ServerSideEncryption types.ServerSideEncryption // Provides storage class information of the object. Amazon S3 returns this header diff --git a/service/s3/api_op_ListBuckets.go b/service/s3/api_op_ListBuckets.go index 9638d4326ca..7a3de38f428 100644 --- a/service/s3/api_op_ListBuckets.go +++ b/service/s3/api_op_ListBuckets.go @@ -13,10 +13,7 @@ import ( ) // Returns a list of all buckets owned by the authenticated sender of the request. -// To use this operation, you must have the s3:ListAllMyBuckets permission. For -// information about Amazon S3 buckets, see Creating, configuring, and working -// with Amazon S3 buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html) -// . +// To use this operation, you must have the s3:ListAllMyBuckets permission. func (c *Client) ListBuckets(ctx context.Context, params *ListBucketsInput, optFns ...func(*Options)) (*ListBucketsOutput, error) { if params == nil { params = &ListBucketsInput{} diff --git a/service/s3/api_op_ListMultipartUploads.go b/service/s3/api_op_ListMultipartUploads.go index 45f876f7acb..b4789251390 100644 --- a/service/s3/api_op_ListMultipartUploads.go +++ b/service/s3/api_op_ListMultipartUploads.go @@ -59,13 +59,13 @@ type ListMultipartUploadsInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_ListObjects.go b/service/s3/api_op_ListObjects.go index 4b4c6f0ea61..f6b19be654d 100644 --- a/service/s3/api_op_ListObjects.go +++ b/service/s3/api_op_ListObjects.go @@ -49,13 +49,13 @@ type ListObjectsInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_ListObjectsV2.go b/service/s3/api_op_ListObjectsV2.go index 9d2d9f59148..162b7906e23 100644 --- a/service/s3/api_op_ListObjectsV2.go +++ b/service/s3/api_op_ListObjectsV2.go @@ -59,13 +59,13 @@ type ListObjectsV2Input struct { // using this action with an access point through the Amazon Web Services SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. @@ -148,8 +148,8 @@ type ListObjectsV2Output struct { IsTruncated bool // KeyCount is the number of keys returned with this request. KeyCount will always - // be less than or equal to the MaxKeys field. Say you ask for 50 keys, your - // result will include 50 keys or fewer. + // be less than or equals to MaxKeys field. Say you ask for 50 keys, your result + // will include less than equals 50 keys KeyCount int32 // Sets the maximum number of keys returned in the response. By default the action @@ -163,13 +163,13 @@ type ListObjectsV2Output struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. Name *string diff --git a/service/s3/api_op_ListParts.go b/service/s3/api_op_ListParts.go index 1d1fae9354d..6daa417902f 100644 --- a/service/s3/api_op_ListParts.go +++ b/service/s3/api_op_ListParts.go @@ -60,13 +60,13 @@ type ListPartsInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_PutBucketAcl.go b/service/s3/api_op_PutBucketAcl.go index 08e7d46ace2..60709861d9d 100644 --- a/service/s3/api_op_PutBucketAcl.go +++ b/service/s3/api_op_PutBucketAcl.go @@ -76,10 +76,10 @@ import ( // - By the person's ID: <>ID<><>GranteesEmail<> DisplayName is optional and // ignored in the request // - By URI: <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<> -// - By Email address: <>Grantees@email.com<>& The grantee is resolved to the -// CanonicalUser and, in a response to a GET Object acl request, appears as the -// CanonicalUser. Using email addresses to specify a grantee is only supported in -// the following Amazon Web Services Regions: +// - By Email address: <>Grantees@email.com<>lt;/Grantee> The grantee is resolved +// to the CanonicalUser and, in a response to a GET Object acl request, appears as +// the CanonicalUser. Using email addresses to specify a grantee is only supported +// in the following Amazon Web Services Regions: // - US East (N. Virginia) // - US West (N. California) // - US West (Oregon) diff --git a/service/s3/api_op_PutBucketEncryption.go b/service/s3/api_op_PutBucketEncryption.go index db30e008cbb..ef18f911952 100644 --- a/service/s3/api_op_PutBucketEncryption.go +++ b/service/s3/api_op_PutBucketEncryption.go @@ -14,13 +14,14 @@ import ( ) // This action uses the encryption subresource to configure default encryption and -// Amazon S3 Bucket Keys for an existing bucket. By default, all buckets have a -// default encryption configuration that uses server-side encryption with Amazon S3 -// managed keys (SSE-S3). You can optionally configure default encryption for a -// bucket by using server-side encryption with an Amazon Web Services KMS key -// (SSE-KMS) or a customer-provided key (SSE-C). If you specify default encryption -// by using SSE-KMS, you can also configure Amazon S3 Bucket Keys. For information -// about bucket default encryption, see Amazon S3 bucket default encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) +// Amazon S3 Bucket Key for an existing bucket. Default encryption for a bucket can +// use server-side encryption with Amazon S3-managed keys (SSE-S3) or customer +// managed keys (SSE-KMS). If you specify default encryption using SSE-KMS, you can +// also configure Amazon S3 Bucket Key. When the default encryption is SSE-KMS, if +// you upload an object to the bucket and do not specify the KMS key to use for +// encryption, Amazon S3 uses the default Amazon Web Services managed KMS key for +// your account. For information about default encryption, see Amazon S3 default +// bucket encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) // in the Amazon S3 User Guide. For more information about S3 Bucket Keys, see // Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) // in the Amazon S3 User Guide. This action requires Amazon Web Services Signature @@ -53,12 +54,9 @@ func (c *Client) PutBucketEncryption(ctx context.Context, params *PutBucketEncry type PutBucketEncryptionInput struct { // Specifies default encryption for a bucket using server-side encryption with - // different key options. By default, all buckets have a default encryption - // configuration that uses server-side encryption with Amazon S3 managed keys - // (SSE-S3). You can optionally configure default encryption for a bucket by using - // server-side encryption with an Amazon Web Services KMS key (SSE-KMS) or a - // customer-provided key (SSE-C). For information about the bucket default - // encryption feature, see Amazon S3 Bucket Default Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) + // Amazon S3-managed keys (SSE-S3) or customer managed keys (SSE-KMS). For + // information about the Amazon S3 default encryption feature, see Amazon S3 + // Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_PutBucketInventoryConfiguration.go b/service/s3/api_op_PutBucketInventoryConfiguration.go index 6152de860af..24025954e3b 100644 --- a/service/s3/api_op_PutBucketInventoryConfiguration.go +++ b/service/s3/api_op_PutBucketInventoryConfiguration.go @@ -29,20 +29,11 @@ import ( // bucket to grant permissions to Amazon S3 to write objects to the bucket in the // defined location. For an example policy, see Granting Permissions for Amazon S3 // Inventory and Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9) -// . Permissions To use this operation, you must have permission to perform the +// . To use this operation, you must have permissions to perform the // s3:PutInventoryConfiguration action. The bucket owner has this permission by -// default and can grant this permission to others. The -// s3:PutInventoryConfiguration permission allows a user to create an S3 Inventory (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-inventory.html) -// report that includes all object metadata fields available and to specify the -// destination bucket to store the inventory. A user with read access to objects in -// the destination bucket can also access all object metadata fields that are -// available in the inventory report. To restrict access to an inventory report, -// see Restricting access to an Amazon S3 Inventory report (https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html#example-bucket-policies-use-case-10) -// in the Amazon S3 User Guide. For more information about the metadata fields -// available in S3 Inventory, see Amazon S3 Inventory lists (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-inventory.html#storage-inventory-contents) -// in the Amazon S3 User Guide. For more information about permissions, see -// Permissions related to bucket subresource operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Identity and access management in Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) +// default and can grant this permission to others. For more information about +// permissions, see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) // in the Amazon S3 User Guide. Special Errors // - HTTP 400 Bad Request Error // - Code: InvalidArgument diff --git a/service/s3/api_op_PutBucketMetricsConfiguration.go b/service/s3/api_op_PutBucketMetricsConfiguration.go index ed5603b8dca..1dee6519a2a 100644 --- a/service/s3/api_op_PutBucketMetricsConfiguration.go +++ b/service/s3/api_op_PutBucketMetricsConfiguration.go @@ -56,8 +56,7 @@ type PutBucketMetricsConfigurationInput struct { // This member is required. Bucket *string - // The ID used to identify the metrics configuration. The ID has a 64 character - // limit and can only contain letters, numbers, periods, dashes, and underscores. + // The ID used to identify the metrics configuration. // // This member is required. Id *string diff --git a/service/s3/api_op_PutObject.go b/service/s3/api_op_PutObject.go index a59d1b22b1c..b8f52cec2e5 100644 --- a/service/s3/api_op_PutObject.go +++ b/service/s3/api_op_PutObject.go @@ -18,42 +18,39 @@ import ( // Adds an object to a bucket. You must have WRITE permissions on a bucket to add // an object to it. Amazon S3 never adds partial objects; if you receive a success -// response, Amazon S3 added the entire object to the bucket. You cannot use -// PutObject to only update a single piece of metadata for an existing object. You -// must put the entire object with updated metadata if you want to update some -// values. Amazon S3 is a distributed system. If it receives multiple write -// requests for the same object simultaneously, it overwrites all but the last -// object written. To prevent objects from being deleted or overwritten, you can -// use Amazon S3 Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html) -// . To ensure that data is not corrupted traversing the network, use the -// Content-MD5 header. When you use this header, Amazon S3 checks the object -// against the provided MD5 value and, if they do not match, returns an error. -// Additionally, you can calculate the MD5 while putting an object to Amazon S3 and -// compare the returned ETag to the calculated MD5 value. +// response, Amazon S3 added the entire object to the bucket. Amazon S3 is a +// distributed system. If it receives multiple write requests for the same object +// simultaneously, it overwrites all but the last object written. Amazon S3 does +// not provide object locking; if you need this, make sure to build it into your +// application layer or use versioning instead. To ensure that data is not +// corrupted traversing the network, use the Content-MD5 header. When you use this +// header, Amazon S3 checks the object against the provided MD5 value and, if they +// do not match, returns an error. Additionally, you can calculate the MD5 while +// putting an object to Amazon S3 and compare the returned ETag to the calculated +// MD5 value. // - To successfully complete the PutObject request, you must have the // s3:PutObject in your IAM permissions. // - To successfully change the objects acl of your PutObject request, you must // have the s3:PutObjectAcl in your IAM permissions. -// - To successfully set the tag-set with your PutObject request, you must have -// the s3:PutObjectTagging in your IAM permissions. // - The Content-MD5 header is required for any request to upload an object with // a retention period configured using Amazon S3 Object Lock. For more information // about Amazon S3 Object Lock, see Amazon S3 Object Lock Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html) // in the Amazon S3 User Guide. // -// You have three mutually exclusive options to protect data using server-side -// encryption in Amazon S3, depending on how you choose to manage the encryption -// keys. Specifically, the encryption key options are Amazon S3 managed keys -// (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and customer-provided keys -// (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 -// managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt -// data at by rest using server-side encryption with other key options. For more -// information, see Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html) -// . When adding a new object, you can use headers to grant ACL-based permissions -// to individual Amazon Web Services accounts or to predefined groups defined by -// Amazon S3. These permissions are then added to the ACL on the object. By -// default, all objects are private. Only the owner has full access control. For -// more information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) +// Server-side Encryption You can optionally request server-side encryption. With +// server-side encryption, Amazon S3 encrypts your data as it writes it to disks in +// its data centers and decrypts the data when you access it. You have the option +// to provide your own encryption key or use Amazon Web Services managed encryption +// keys (SSE-S3 or SSE-KMS). For more information, see Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html) +// . If you request server-side encryption using Amazon Web Services Key Management +// Service (SSE-KMS), you can enable an S3 Bucket Key at the object-level. For more +// information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) +// in the Amazon S3 User Guide. Access Control List (ACL)-Specific Request Headers +// You can use headers to grant ACL- based permissions. By default, all objects are +// private. Only the owner has full access control. When adding a new object, you +// can grant permissions to individual Amazon Web Services accounts or to +// predefined groups defined by Amazon S3. These permissions are then added to the +// ACL on the object. For more information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) // and Managing ACLs Using the REST API (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html) // . If the bucket that you're uploading objects to uses the bucket owner enforced // setting for S3 Object Ownership, ACLs are disabled and no longer affect @@ -66,20 +63,21 @@ import ( // see Controlling ownership of objects and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) // in the Amazon S3 User Guide. If your bucket uses the bucket owner enforced // setting for Object Ownership, all objects written to the bucket by any account -// will be owned by the bucket owner. By default, Amazon S3 uses the STANDARD -// Storage Class to store newly created objects. The STANDARD storage class -// provides high durability and high availability. Depending on performance needs, -// you can specify a different Storage Class. Amazon S3 on Outposts only uses the -// OUTPOSTS Storage Class. For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) -// in the Amazon S3 User Guide. If you enable versioning for a bucket, Amazon S3 -// automatically generates a unique version ID for the object being stored. Amazon -// S3 returns this ID in the response. When you enable versioning for a bucket, if -// Amazon S3 receives multiple write requests for the same object simultaneously, -// it stores all of the objects. For more information about versioning, see Adding -// Objects to Versioning Enabled Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html) +// will be owned by the bucket owner. Storage Class Options By default, Amazon S3 +// uses the STANDARD Storage Class to store newly created objects. The STANDARD +// storage class provides high durability and high availability. Depending on +// performance needs, you can specify a different Storage Class. Amazon S3 on +// Outposts only uses the OUTPOSTS Storage Class. For more information, see +// Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) +// in the Amazon S3 User Guide. Versioning If you enable versioning for a bucket, +// Amazon S3 automatically generates a unique version ID for the object being +// stored. Amazon S3 returns this ID in the response. When you enable versioning +// for a bucket, if Amazon S3 receives multiple write requests for the same object +// simultaneously, it stores all of the objects. For more information about +// versioning, see Adding Objects to Versioning Enabled Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html) // . For information about returning the versioning state of a bucket, see // GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html) -// . For more information about related Amazon S3 APIs, see the following: +// . Related Resources // - CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html) // - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html) func (c *Client) PutObject(ctx context.Context, params *PutObjectInput, optFns ...func(*Options)) (*PutObjectOutput, error) { @@ -106,13 +104,13 @@ type PutObjectInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. @@ -181,14 +179,14 @@ type PutObjectInput struct { ChecksumSHA256 *string // Specifies presentational information for the object. For more information, see - // https://www.rfc-editor.org/rfc/rfc6266#section-4 (https://www.rfc-editor.org/rfc/rfc6266#section-4) + // http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) // . ContentDisposition *string // Specifies what content encodings have been applied to the object and thus what // decoding mechanisms must be applied to obtain the media-type referenced by the // Content-Type header field. For more information, see - // https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding (https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding) + // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) // . ContentEncoding *string @@ -197,7 +195,7 @@ type PutObjectInput struct { // Size of the body in bytes. This parameter is useful when the size of the body // cannot be determined automatically. For more information, see - // https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length (https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length) + // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13) // . ContentLength int64 @@ -211,7 +209,7 @@ type PutObjectInput struct { ContentMD5 *string // A standard MIME type describing the format of the contents. For more - // information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type (https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type) + // information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17) // . ContentType *string @@ -221,7 +219,7 @@ type PutObjectInput struct { ExpectedBucketOwner *string // The date and time at which the object is no longer cacheable. For more - // information, see https://www.rfc-editor.org/rfc/rfc7234#section-5.3 (https://www.rfc-editor.org/rfc/rfc7234#section-5.3) + // information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21) // . Expires *time.Time @@ -281,14 +279,12 @@ type PutObjectInput struct { // Specifies the Amazon Web Services KMS Encryption Context to use for object // encryption. The value of this header is a base64-encoded UTF-8 string holding - // JSON with the encryption context key-value pairs. This value is stored as object - // metadata and automatically gets passed on to Amazon Web Services KMS for future - // GetObject or CopyObject operations on this object. + // JSON with the encryption context key-value pairs. SSEKMSEncryptionContext *string - // If x-amz-server-side-encryption has a valid value of aws:kms , this header - // specifies the ID of the Amazon Web Services Key Management Service (Amazon Web - // Services KMS) symmetric encryption customer managed key that was used for the + // If x-amz-server-side-encryption is present and has the value of aws:kms , this + // header specifies the ID of the Amazon Web Services Key Management Service + // (Amazon Web Services KMS) symmetrical customer managed key that was used for the // object. If you specify x-amz-server-side-encryption:aws:kms , but do not provide // x-amz-server-side-encryption-aws-kms-key-id , Amazon S3 uses the Amazon Web // Services managed key to protect the data. If the KMS key does not exist in the @@ -296,7 +292,7 @@ type PutObjectInput struct { SSEKMSKeyId *string // The server-side encryption algorithm used when storing this object in Amazon S3 - // (for example, AES256, aws:kms ). + // (for example, AES256, aws:kms). ServerSideEncryption types.ServerSideEncryption // By default, Amazon S3 uses the STANDARD Storage Class to store newly created @@ -388,19 +384,19 @@ type PutObjectOutput struct { // If present, specifies the Amazon Web Services KMS Encryption Context to use for // object encryption. The value of this header is a base64-encoded UTF-8 string - // holding JSON with the encryption context key-value pairs. This value is stored - // as object metadata and automatically gets passed on to Amazon Web Services KMS - // for future GetObject or CopyObject operations on this object. + // holding JSON with the encryption context key-value pairs. SSEKMSEncryptionContext *string - // If x-amz-server-side-encryption is has a valid value of aws:kms , this header - // specifies the ID of the Amazon Web Services Key Management Service (Amazon Web - // Services KMS) symmetric encryption customer managed key that was used for the + // If x-amz-server-side-encryption is present and has the value of aws:kms , this + // header specifies the ID of the Amazon Web Services Key Management Service + // (Amazon Web Services KMS) symmetric customer managed key that was used for the // object. SSEKMSKeyId *string - // The server-side encryption algorithm used when storing this object in Amazon S3 - // (for example, AES256, aws:kms ). + // If you specified server-side encryption either with an Amazon Web Services KMS + // key or Amazon S3-managed encryption key in your PUT request, the response + // includes this header. It confirms the encryption algorithm that Amazon S3 used + // to encrypt the object. ServerSideEncryption types.ServerSideEncryption // Version of the object. diff --git a/service/s3/api_op_PutObjectAcl.go b/service/s3/api_op_PutObjectAcl.go index 7a5bf17c381..00aee5ff35b 100644 --- a/service/s3/api_op_PutObjectAcl.go +++ b/service/s3/api_op_PutObjectAcl.go @@ -129,13 +129,13 @@ type PutObjectAclInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_PutObjectTagging.go b/service/s3/api_op_PutObjectTagging.go index 5a671012f9f..9a1f88305ee 100644 --- a/service/s3/api_op_PutObjectTagging.go +++ b/service/s3/api_op_PutObjectTagging.go @@ -67,13 +67,13 @@ type PutObjectTaggingInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_RestoreObject.go b/service/s3/api_op_RestoreObject.go index eb665882bd6..e4d9c4ec21a 100644 --- a/service/s3/api_op_RestoreObject.go +++ b/service/s3/api_op_RestoreObject.go @@ -24,8 +24,23 @@ import ( // permission to others. For more information about permissions, see Permissions // Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) -// in the Amazon S3 User Guide. For more information about the S3 structure in the -// request body, see the following: +// in the Amazon S3 User Guide. Querying Archives with Select Requests You use a +// select type of request to perform SQL queries on archived objects. The archived +// objects that are being queried by the select request must be formatted as +// uncompressed comma-separated values (CSV) files. You can run queries and custom +// analytics on your archived data without having to restore your data to a hotter +// Amazon S3 tier. For an overview about select requests, see Querying Archived +// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html) +// in the Amazon S3 User Guide. When making a select request, do the following: +// - Define an output location for the select query's output. This must be an +// Amazon S3 bucket in the same Amazon Web Services Region as the bucket that +// contains the archive object that is being queried. The Amazon Web Services +// account that initiates the job must have permissions to write to the S3 bucket. +// You can specify the storage class and encryption for the output objects stored +// in the bucket. For more information about output, see Querying Archived +// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html) +// in the Amazon S3 User Guide. For more information about the S3 structure in +// the request body, see the following: // - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) // - Managing Access with ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html) // in the Amazon S3 User Guide @@ -45,7 +60,10 @@ import ( // You cannot mix ordinal positions with header column names. SELECT s.Id, // s.FirstName, s.SSN FROM S3Object s // -// When making a select request, you can also do the following: +// For more information about using SQL with S3 Glacier Select restore, see SQL +// Reference for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html) +// in the Amazon S3 User Guide. When making a select request, you can also do the +// following: // - To expedite your queries, specify the Expedited tier. For more information // about tiers, see "Restoring Archives," later in this topic. // - Specify details about the data serialization format of both the input @@ -58,51 +76,48 @@ import ( // they are stored until explicitly deleted-manually or through a lifecycle policy. // // - You can issue more than one select request on the same Amazon S3 object. -// Amazon S3 doesn't duplicate requests, so avoid issuing duplicate requests. +// Amazon S3 doesn't deduplicate requests, so avoid issuing duplicate requests. // // - Amazon S3 accepts a select request even if the object has already been // restored. A select request doesn’t return error response 409 . // -// Restoring objects Objects that you archive to the S3 Glacier Flexible Retrieval -// or S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or -// S3 Intelligent-Tiering Deep Archive tiers, are not accessible in real time. For -// objects in the S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage -// classes, you must first initiate a restore request, and then wait until a -// temporary copy of the object is available. If you want a permanent copy of the -// object, create a copy of it in the Amazon S3 Standard storage class in your S3 -// bucket. To access an archived object, you must restore the object for the -// duration (number of days) that you specify. For objects in the Archive Access or -// Deep Archive Access tiers of S3 Intelligent-Tiering, you must first initiate a +// Restoring objects Objects that you archive to the S3 Glacier or S3 Glacier Deep +// Archive storage class, and S3 Intelligent-Tiering Archive or S3 +// Intelligent-Tiering Deep Archive tiers are not accessible in real time. For +// objects in Archive Access or Deep Archive Access tiers you must first initiate a // restore request, and then wait until the object is moved into the Frequent -// Access tier. To restore a specific object version, you can provide a version ID. -// If you don't provide a version ID, Amazon S3 restores the current version. When -// restoring an archived object, you can specify one of the following data access -// tier options in the Tier element of the request body: +// Access tier. For objects in S3 Glacier or S3 Glacier Deep Archive storage +// classes you must first initiate a restore request, and then wait until a +// temporary copy of the object is available. To access an archived object, you +// must restore the object for the duration (number of days) that you specify. To +// restore a specific object version, you can provide a version ID. If you don't +// provide a version ID, Amazon S3 restores the current version. When restoring an +// archived object (or using a select request), you can specify one of the +// following data access tier options in the Tier element of the request body: // - Expedited - Expedited retrievals allow you to quickly access your data -// stored in the S3 Glacier Flexible Retrieval storage class or S3 -// Intelligent-Tiering Archive tier when occasional urgent requests for a subset of -// archives are required. For all but the largest archived objects (250 MB+), data -// accessed using Expedited retrievals is typically made available within 1–5 -// minutes. Provisioned capacity ensures that retrieval capacity for Expedited -// retrievals is available when you need it. Expedited retrievals and provisioned -// capacity are not available for objects stored in the S3 Glacier Deep Archive -// storage class or S3 Intelligent-Tiering Deep Archive tier. +// stored in the S3 Glacier storage class or S3 Intelligent-Tiering Archive tier +// when occasional urgent requests for a subset of archives are required. For all +// but the largest archived objects (250 MB+), data accessed using Expedited +// retrievals is typically made available within 1–5 minutes. Provisioned capacity +// ensures that retrieval capacity for Expedited retrievals is available when you +// need it. Expedited retrievals and provisioned capacity are not available for +// objects stored in the S3 Glacier Deep Archive storage class or S3 +// Intelligent-Tiering Deep Archive tier. // - Standard - Standard retrievals allow you to access any of your archived // objects within several hours. This is the default option for retrieval requests // that do not specify the retrieval option. Standard retrievals typically finish -// within 3–5 hours for objects stored in the S3 Glacier Flexible Retrieval storage -// class or S3 Intelligent-Tiering Archive tier. They typically finish within 12 -// hours for objects stored in the S3 Glacier Deep Archive storage class or S3 +// within 3–5 hours for objects stored in the S3 Glacier storage class or S3 +// Intelligent-Tiering Archive tier. They typically finish within 12 hours for +// objects stored in the S3 Glacier Deep Archive storage class or S3 // Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects // stored in S3 Intelligent-Tiering. -// - Bulk - Bulk retrievals free for objects stored in the S3 Glacier Flexible -// Retrieval and S3 Intelligent-Tiering storage classes, enabling you to retrieve -// large amounts, even petabytes, of data at no cost. Bulk retrievals typically -// finish within 5–12 hours for objects stored in the S3 Glacier Flexible Retrieval -// storage class or S3 Intelligent-Tiering Archive tier. Bulk retrievals are also -// the lowest-cost retrieval option when restoring objects from S3 Glacier Deep -// Archive. They typically finish within 48 hours for objects stored in the S3 -// Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier. +// - Bulk - Bulk retrievals are the lowest-cost retrieval option in S3 Glacier, +// enabling you to retrieve large amounts, even petabytes, of data inexpensively. +// Bulk retrievals typically finish within 5–12 hours for objects stored in the S3 +// Glacier storage class or S3 Intelligent-Tiering Archive tier. They typically +// finish within 48 hours for objects stored in the S3 Glacier Deep Archive storage +// class or S3 Intelligent-Tiering Deep Archive tier. Bulk retrievals are free for +// objects stored in S3 Intelligent-Tiering. // // For more information about archive retrieval options and provisioned capacity // for Expedited data access, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html) @@ -150,6 +165,8 @@ import ( // Related Resources // - PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html) // - GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html) +// - SQL Reference for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html) +// in the Amazon S3 User Guide func (c *Client) RestoreObject(ctx context.Context, params *RestoreObjectInput, optFns ...func(*Options)) (*RestoreObjectOutput, error) { if params == nil { params = &RestoreObjectInput{} @@ -174,13 +191,13 @@ type RestoreObjectInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3/api_op_SelectObjectContent.go b/service/s3/api_op_SelectObjectContent.go index 6c9120a7627..abcc01f6c87 100644 --- a/service/s3/api_op_SelectObjectContent.go +++ b/service/s3/api_op_SelectObjectContent.go @@ -23,6 +23,8 @@ import ( // action is not supported by Amazon S3 on Outposts. For more information about // Amazon S3 Select, see Selecting Content from Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/selecting-content-from-objects.html) // and SELECT Command (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-glacier-select-sql-reference-select.html) +// in the Amazon S3 User Guide. For more information about using SQL with Amazon S3 +// Select, see SQL Reference for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html) // in the Amazon S3 User Guide. Permissions You must have s3:GetObject permission // for this operation. Amazon S3 Select does not support anonymous access. For more // information about permissions, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) @@ -42,10 +44,10 @@ import ( // . For more information about SSE-C, see Server-Side Encryption (Using // Customer-Provided Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) // in the Amazon S3 User Guide. For objects that are encrypted with Amazon S3 -// managed keys (SSE-S3) and Amazon Web Services KMS keys (SSE-KMS), server-side -// encryption is handled transparently, so you don't need to specify anything. For -// more information about server-side encryption, including SSE-S3 and SSE-KMS, see -// Protecting Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) +// managed encryption keys (SSE-S3) and Amazon Web Services KMS keys (SSE-KMS), +// server-side encryption is handled transparently, so you don't need to specify +// anything. For more information about server-side encryption, including SSE-S3 +// and SSE-KMS, see Protecting Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) // in the Amazon S3 User Guide. // // Working with the Response Body Given the response size is unknown, Amazon S3 diff --git a/service/s3/api_op_UploadPart.go b/service/s3/api_op_UploadPart.go index afbbe7224b9..ff64e9a0fce 100644 --- a/service/s3/api_op_UploadPart.go +++ b/service/s3/api_op_UploadPart.go @@ -44,31 +44,23 @@ import ( // Multipart Upload Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html) // in the Amazon S3 User Guide . For information on the permissions required to use // the multipart upload API, go to Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) -// in the Amazon S3 User Guide. Server-side encryption is for data encryption at -// rest. Amazon S3 encrypts your data as it writes it to disks in its data centers -// and decrypts it when you access it. You have three mutually exclusive options to -// protect data using server-side encryption in Amazon S3, depending on how you -// choose to manage the encryption keys. Specifically, the encryption key options -// are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and -// Customer-Provided Keys (SSE-C). Amazon S3 encrypts data with server-side -// encryption using Amazon S3 managed keys (SSE-S3) by default. You can optionally -// tell Amazon S3 to encrypt data at rest using server-side encryption with other -// key options. The option you use depends on whether you want to use KMS keys -// (SSE-KMS) or provide your own encryption key (SSE-C). If you choose to provide -// your own encryption key, the request headers you provide in the request must -// match the headers you used in the request to initiate the upload by using -// CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) +// in the Amazon S3 User Guide. You can optionally request server-side encryption +// where Amazon S3 encrypts your data as it writes it to disks in its data centers +// and decrypts it for you when you access it. You have the option of providing +// your own encryption key, or you can use the Amazon Web Services managed +// encryption keys. If you choose to provide your own encryption key, the request +// headers you provide in the request must match the headers you used in the +// request to initiate the upload by using CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) // . For more information, go to Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html) // in the Amazon S3 User Guide. Server-side encryption is supported by the S3 // Multipart Upload actions. Unless you are using a customer-provided encryption -// key (SSE-C), you don't need to specify the encryption parameters in each -// UploadPart request. Instead, you only need to specify the server-side encryption -// parameters in the initial Initiate Multipart request. For more information, see +// key, you don't need to specify the encryption parameters in each UploadPart +// request. Instead, you only need to specify the server-side encryption parameters +// in the initial Initiate Multipart request. For more information, see // CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) // . If you requested server-side encryption using a customer-provided encryption -// key (SSE-C) in your initiate multipart upload request, you must provide -// identical encryption information in each part upload using the following -// headers. +// key in your initiate multipart upload request, you must provide identical +// encryption information in each part upload using the following headers. // - x-amz-server-side-encryption-customer-algorithm // - x-amz-server-side-encryption-customer-key // - x-amz-server-side-encryption-customer-key-MD5 @@ -110,13 +102,13 @@ type UploadPartInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. @@ -274,12 +266,12 @@ type UploadPartOutput struct { SSECustomerKeyMD5 *string // If present, specifies the ID of the Amazon Web Services Key Management Service - // (Amazon Web Services KMS) symmetric encryption customer managed key was used for - // the object. + // (Amazon Web Services KMS) symmetric customer managed key was used for the + // object. SSEKMSKeyId *string // The server-side encryption algorithm used when storing this object in Amazon S3 - // (for example, AES256, aws:kms ). + // (for example, AES256, aws:kms). ServerSideEncryption types.ServerSideEncryption // Metadata pertaining to the operation's result. diff --git a/service/s3/api_op_UploadPartCopy.go b/service/s3/api_op_UploadPartCopy.go index c835cfb716d..2e2d25071c3 100644 --- a/service/s3/api_op_UploadPartCopy.go +++ b/service/s3/api_op_UploadPartCopy.go @@ -104,13 +104,13 @@ type UploadPartCopyInput struct { // action with an access point through the Amazon Web Services SDKs, you provide // the access point ARN in place of the bucket name. For more information about // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. When you use this action with Amazon S3 on - // Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - // Outposts hostname takes the form - // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you - // use this action with S3 on Outposts through the Amazon Web Services SDKs, you - // provide the Outposts access point ARN in place of the bucket name. For more - // information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, + // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts + // hostname takes the form + // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When + // using this action with S3 on Outposts through the Amazon Web Services SDKs, you + // provide the Outposts bucket ARN in place of the bucket name. For more + // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // This member is required. @@ -263,12 +263,12 @@ type UploadPartCopyOutput struct { SSECustomerKeyMD5 *string // If present, specifies the ID of the Amazon Web Services Key Management Service - // (Amazon Web Services KMS) symmetric encryption customer managed key that was - // used for the object. + // (Amazon Web Services KMS) symmetric customer managed key that was used for the + // object. SSEKMSKeyId *string // The server-side encryption algorithm used when storing this object in Amazon S3 - // (for example, AES256, aws:kms ). + // (for example, AES256, aws:kms). ServerSideEncryption types.ServerSideEncryption // Metadata pertaining to the operation's result. diff --git a/service/s3/api_op_WriteGetObjectResponse.go b/service/s3/api_op_WriteGetObjectResponse.go index 5ae50436b6e..74dc5b4006f 100644 --- a/service/s3/api_op_WriteGetObjectResponse.go +++ b/service/s3/api_op_WriteGetObjectResponse.go @@ -237,12 +237,12 @@ type WriteGetObjectResponseInput struct { SSECustomerKeyMD5 *string // If present, specifies the ID of the Amazon Web Services Key Management Service - // (Amazon Web Services KMS) symmetric encryption customer managed key that was - // used for stored in Amazon S3 object. + // (Amazon Web Services KMS) symmetric customer managed key that was used for + // stored in Amazon S3 object. SSEKMSKeyId *string // The server-side encryption algorithm used when storing requested object in - // Amazon S3 (for example, AES256, aws:kms ). + // Amazon S3 (for example, AES256, aws:kms). ServerSideEncryption types.ServerSideEncryption // The integer status code for an HTTP response of a corresponding GetObject diff --git a/service/s3/types/enums.go b/service/s3/types/enums.go index 095ad898b9c..e28e6b7cbfb 100644 --- a/service/s3/types/enums.go +++ b/service/s3/types/enums.go @@ -811,6 +811,7 @@ const ( ObjectStorageClassDeepArchive ObjectStorageClass = "DEEP_ARCHIVE" ObjectStorageClassOutposts ObjectStorageClass = "OUTPOSTS" ObjectStorageClassGlacierIr ObjectStorageClass = "GLACIER_IR" + ObjectStorageClassSnow ObjectStorageClass = "SNOW" ) // Values returns all known values for ObjectStorageClass. Note that this can be @@ -827,6 +828,7 @@ func (ObjectStorageClass) Values() []ObjectStorageClass { "DEEP_ARCHIVE", "OUTPOSTS", "GLACIER_IR", + "SNOW", } } @@ -1114,6 +1116,7 @@ const ( StorageClassDeepArchive StorageClass = "DEEP_ARCHIVE" StorageClassOutposts StorageClass = "OUTPOSTS" StorageClassGlacierIr StorageClass = "GLACIER_IR" + StorageClassSnow StorageClass = "SNOW" ) // Values returns all known values for StorageClass. Note that this can be @@ -1130,6 +1133,7 @@ func (StorageClass) Values() []StorageClass { "DEEP_ARCHIVE", "OUTPOSTS", "GLACIER_IR", + "SNOW", } } diff --git a/service/s3/types/types.go b/service/s3/types/types.go index a5aa64e33ca..a0f47e11004 100644 --- a/service/s3/types/types.go +++ b/service/s3/types/types.go @@ -492,7 +492,7 @@ type CSVInput struct { // A single character used to indicate that a row should be ignored when the // character is present at the start of that row. You can specify any character to - // indicate a comment line. The default character is # . Default: # + // indicate a comment line. Comments *string // A single character used to separate individual fields in a record. You can @@ -709,7 +709,7 @@ type Destination struct { type Encryption struct { // The server-side encryption algorithm used when storing job results in Amazon S3 - // (for example, AES256, aws:kms ). + // (for example, AES256, aws:kms). // // This member is required. EncryptionType ServerSideEncryption @@ -719,9 +719,9 @@ type Encryption struct { KMSContext *string // If the encryption type is aws:kms , this optional value specifies the ID of the - // symmetric encryption customer managed key to use for encryption of job results. - // Amazon S3 only supports symmetric encryption KMS keys. For more information, see - // Asymmetric keys in Amazon Web Services KMS (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) + // symmetric customer managed key to use for encryption of job results. Amazon S3 + // only supports symmetric keys. For more information, see Using symmetric and + // asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) // in the Amazon Web Services Key Management Service Developer Guide. KMSKeyId *string @@ -735,8 +735,8 @@ type EncryptionConfiguration struct { // Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web // Services KMS key stored in Amazon Web Services Key Management Service (KMS) for // the destination bucket. Amazon S3 uses this key to encrypt replica objects. - // Amazon S3 only supports symmetric encryption KMS keys. For more information, see - // Asymmetric keys in Amazon Web Services KMS (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) + // Amazon S3 only supports symmetric, customer managed KMS keys. For more + // information, see Using symmetric and asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) // in the Amazon Web Services Key Management Service Developer Guide. ReplicaKmsKeyID *string @@ -1129,7 +1129,7 @@ type Error struct { // - HTTP Status Code: 403 Forbidden // - SOAP Fault Code Prefix: Client // - Code: ServiceUnavailable - // - Description: Service is unable to handle request. + // - Description: Reduce your request rate. // - HTTP Status Code: 503 Service Unavailable // - SOAP Fault Code Prefix: Server // - Code: SlowDown @@ -1206,7 +1206,7 @@ type EventBridgeConfiguration struct { // in the Amazon S3 User Guide. type ExistingObjectReplication struct { - // Specifies whether Amazon S3 replicates existing source bucket objects. + // // // This member is required. Status ExistingObjectReplicationStatus @@ -1603,9 +1603,7 @@ type LambdaFunctionConfiguration struct { noSmithyDocumentSerde } -// Container for the expiration for the lifecycle of the object. For more -// information see, Managing your storage lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html) -// in the Amazon S3 User Guide. +// Container for the expiration for the lifecycle of the object. type LifecycleExpiration struct { // Indicates at what date the object is to be moved or deleted. Should be in GMT @@ -1625,9 +1623,7 @@ type LifecycleExpiration struct { noSmithyDocumentSerde } -// A lifecycle rule for individual objects in an Amazon S3 bucket. For more -// information see, Managing your storage lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html) -// in the Amazon S3 User Guide. +// A lifecycle rule for individual objects in an Amazon S3 bucket. type LifecycleRule struct { // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is @@ -1854,8 +1850,7 @@ type MetricsAndOperator struct { // . type MetricsConfiguration struct { - // The ID used to identify the metrics configuration. The ID has a 64 character - // limit and can only contain letters, numbers, periods, dashes, and underscores. + // The ID used to identify the metrics configuration. // // This member is required. Id *string @@ -2242,16 +2237,7 @@ type OutputSerialization struct { // Container for the owner's display name and ID. type Owner struct { - // Container for the display name of the owner. This value is only supported in - // the following Amazon Web Services Regions: - // - US East (N. Virginia) - // - US West (N. California) - // - US West (Oregon) - // - Asia Pacific (Singapore) - // - Asia Pacific (Sydney) - // - Asia Pacific (Tokyo) - // - Europe (Ireland) - // - South America (São Paulo) + // Container for the display name of the owner. DisplayName *string // Container for the ID of the owner. @@ -2575,9 +2561,7 @@ type ReplicationRule struct { // . DeleteMarkerReplication *DeleteMarkerReplication - // Optional configuration to replicate existing source bucket objects. For more - // information, see Replicating Existing Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication) - // in the Amazon S3 User Guide. + // ExistingObjectReplication *ExistingObjectReplication // A filter that identifies the subset of objects to which the replication rule @@ -2965,8 +2949,8 @@ type ServerSideEncryptionByDefault struct { // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab // - Key ARN: // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // Amazon S3 only supports symmetric encryption KMS keys. For more information, - // see Asymmetric keys in Amazon Web Services KMS (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) + // Amazon S3 only supports symmetric KMS keys and not asymmetric KMS keys. For + // more information, see Using symmetric and asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) // in the Amazon Web Services Key Management Service Developer Guide. KMSMasterKeyID *string @@ -3032,8 +3016,8 @@ type SourceSelectionCriteria struct { type SSEKMS struct { // Specifies the ID of the Amazon Web Services Key Management Service (Amazon Web - // Services KMS) symmetric encryption customer managed key to use for encrypting - // inventory reports. + // Services KMS) symmetric customer managed key to use for encrypting inventory + // reports. // // This member is required. KeyId *string diff --git a/service/secretsmanager/api_op_CreateSecret.go b/service/secretsmanager/api_op_CreateSecret.go index 830a53b24e8..da0469004f6 100644 --- a/service/secretsmanager/api_op_CreateSecret.go +++ b/service/secretsmanager/api_op_CreateSecret.go @@ -106,7 +106,7 @@ type CreateSecretInput struct { Description *string // Specifies whether to overwrite a secret with the same name in the destination - // Region. + // Region. By default, secrets aren't overwritten. ForceOverwriteReplicaSecret bool // The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt diff --git a/service/secretsmanager/api_op_DeleteSecret.go b/service/secretsmanager/api_op_DeleteSecret.go index 20eab045d0b..5042df7ca5e 100644 --- a/service/secretsmanager/api_op_DeleteSecret.go +++ b/service/secretsmanager/api_op_DeleteSecret.go @@ -67,22 +67,22 @@ type DeleteSecretInput struct { // Specifies whether to delete the secret without any recovery window. You can't // use both this parameter and RecoveryWindowInDays in the same call. If you don't - // use either, then Secrets Manager defaults to a 30 day recovery window. Secrets - // Manager performs the actual deletion with an asynchronous background process, so - // there might be a short delay before the secret is permanently deleted. If you - // delete a secret and then immediately create a secret with the same name, use - // appropriate back off and retry logic. Use this parameter with caution. This - // parameter causes the operation to skip the normal recovery window before the - // permanent deletion that Secrets Manager would normally impose with the - // RecoveryWindowInDays parameter. If you delete a secret with the + // use either, then by default Secrets Manager uses a 30 day recovery window. + // Secrets Manager performs the actual deletion with an asynchronous background + // process, so there might be a short delay before the secret is permanently + // deleted. If you delete a secret and then immediately create a secret with the + // same name, use appropriate back off and retry logic. Use this parameter with + // caution. This parameter causes the operation to skip the normal recovery window + // before the permanent deletion that Secrets Manager would normally impose with + // the RecoveryWindowInDays parameter. If you delete a secret with the // ForceDeleteWithoutRecovery parameter, then you have no opportunity to recover // the secret. You lose the secret permanently. ForceDeleteWithoutRecovery *bool // The number of days from 7 to 30 that Secrets Manager waits before permanently // deleting the secret. You can't use both this parameter and - // ForceDeleteWithoutRecovery in the same call. If you don't use either, then - // Secrets Manager defaults to a 30 day recovery window. + // ForceDeleteWithoutRecovery in the same call. If you don't use either, then by + // default Secrets Manager uses a 30 day recovery window. RecoveryWindowInDays *int64 noSmithyDocumentSerde diff --git a/service/secretsmanager/api_op_ListSecretVersionIds.go b/service/secretsmanager/api_op_ListSecretVersionIds.go index 38a675e4643..d3551b16f90 100644 --- a/service/secretsmanager/api_op_ListSecretVersionIds.go +++ b/service/secretsmanager/api_op_ListSecretVersionIds.go @@ -50,7 +50,8 @@ type ListSecretVersionIdsInput struct { // Specifies whether to include versions of secrets that don't have any staging // labels attached to them. Versions without staging labels are considered - // deprecated and are subject to deletion by Secrets Manager. + // deprecated and are subject to deletion by Secrets Manager. By default, versions + // without staging labels aren't included. IncludeDeprecated *bool // The number of results to include in the response. If there are more results diff --git a/service/secretsmanager/api_op_ListSecrets.go b/service/secretsmanager/api_op_ListSecrets.go index a21326b8dfe..d1cdb9ed911 100644 --- a/service/secretsmanager/api_op_ListSecrets.go +++ b/service/secretsmanager/api_op_ListSecrets.go @@ -47,7 +47,8 @@ type ListSecretsInput struct { // The filters to apply to the list of secrets. Filters []types.Filter - // Specifies whether to include secrets scheduled for deletion. + // Specifies whether to include secrets scheduled for deletion. By default, + // secrets scheduled for deletion aren't included. IncludePlannedDeletion *bool // The number of results to include in the response. If there are more results diff --git a/service/secretsmanager/api_op_PutResourcePolicy.go b/service/secretsmanager/api_op_PutResourcePolicy.go index 7872b0a7bf6..afda45a43c7 100644 --- a/service/secretsmanager/api_op_PutResourcePolicy.go +++ b/service/secretsmanager/api_op_PutResourcePolicy.go @@ -55,7 +55,8 @@ type PutResourcePolicyInput struct { SecretId *string // Specifies whether to block resource-based policies that allow broad access to - // the secret, for example those that use a wildcard for the principal. + // the secret, for example those that use a wildcard for the principal. By default, + // public policies aren't blocked. BlockPublicPolicy *bool noSmithyDocumentSerde diff --git a/service/secretsmanager/api_op_ReplicateSecretToRegions.go b/service/secretsmanager/api_op_ReplicateSecretToRegions.go index dcd3ea62465..25b08f12c64 100644 --- a/service/secretsmanager/api_op_ReplicateSecretToRegions.go +++ b/service/secretsmanager/api_op_ReplicateSecretToRegions.go @@ -47,7 +47,7 @@ type ReplicateSecretToRegionsInput struct { SecretId *string // Specifies whether to overwrite a secret with the same name in the destination - // Region. + // Region. By default, secrets aren't overwritten. ForceOverwriteReplicaSecret bool noSmithyDocumentSerde diff --git a/service/secretsmanager/api_op_RotateSecret.go b/service/secretsmanager/api_op_RotateSecret.go index e05fa89b4ab..07e31409303 100644 --- a/service/secretsmanager/api_op_RotateSecret.go +++ b/service/secretsmanager/api_op_RotateSecret.go @@ -82,8 +82,8 @@ type RotateSecretInput struct { // function to rotate, if you don't immediately rotate the secret, Secrets Manager // tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) // of the Lambda rotation function. The test creates an AWSPENDING version of the - // secret and then removes it. If you don't specify this value, then by default, - // Secrets Manager rotates the secret immediately. + // secret and then removes it. By default, Secrets Manager rotates the secret + // immediately. RotateImmediately *bool // For secrets that use a Lambda rotation function to rotate, the ARN of the diff --git a/service/secretsmanager/api_op_ValidateResourcePolicy.go b/service/secretsmanager/api_op_ValidateResourcePolicy.go index df141e1eb31..93b79ce0560 100644 --- a/service/secretsmanager/api_op_ValidateResourcePolicy.go +++ b/service/secretsmanager/api_op_ValidateResourcePolicy.go @@ -24,8 +24,9 @@ import ( // Secrets Manager generates a CloudTrail log entry when you call this action. Do // not include sensitive information in request parameters because it might be // logged. For more information, see Logging Secrets Manager events with CloudTrail (https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html) -// . Required permissions: secretsmanager:ValidateResourcePolicy . For more -// information, see IAM policy actions for Secrets Manager (https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions) +// . Required permissions: secretsmanager:ValidateResourcePolicy and +// secretsmanager:PutResourcePolicy . For more information, see IAM policy +// actions for Secrets Manager (https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions) // and Authentication and access control in Secrets Manager (https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html) // . func (c *Client) ValidateResourcePolicy(ctx context.Context, params *ValidateResourcePolicyInput, optFns ...func(*Options)) (*ValidateResourcePolicyOutput, error) {