diff --git a/.changelog/65e4e2a3f8f149d591c9c73b012b0703.json b/.changelog/65e4e2a3f8f149d591c9c73b012b0703.json new file mode 100644 index 00000000000..5f98c62e2f9 --- /dev/null +++ b/.changelog/65e4e2a3f8f149d591c9c73b012b0703.json @@ -0,0 +1,8 @@ +{ + "id": "65e4e2a3-f8f1-49d5-91c9-c73b012b0703", + "type": "feature", + "description": "The latest update introduces two new attributes, VaultType and VaultState, to the DescribeBackupVault and ListBackupVaults APIs. The VaultState attribute reflects the current status of the vault, while the VaultType attribute indicates the specific category of the vault.", + "modules": [ + "service/backup" + ] +} \ No newline at end of file diff --git a/.changelog/75f4c0c83e57466f8cb6cd996af0e8e3.json b/.changelog/75f4c0c83e57466f8cb6cd996af0e8e3.json new file mode 100644 index 00000000000..529f1568f44 --- /dev/null +++ b/.changelog/75f4c0c83e57466f8cb6cd996af0e8e3.json @@ -0,0 +1,8 @@ +{ + "id": "75f4c0c8-3e57-466f-8cb6-cd996af0e8e3", + "type": "feature", + "description": "The release include the new Redshift DataAPI feature for session use, customer execute query with --session-keep-alive-seconds parameter and can submit follow-up queries to same sessions with returned`session-id`", + "modules": [ + "service/redshiftdata" + ] +} \ No newline at end of file diff --git a/.changelog/ad03994f9af5422997d4845e3d45ca6a.json b/.changelog/ad03994f9af5422997d4845e3d45ca6a.json new file mode 100644 index 00000000000..7765d426843 --- /dev/null +++ b/.changelog/ad03994f9af5422997d4845e3d45ca6a.json @@ -0,0 +1,8 @@ +{ + "id": "ad03994f-9af5-4229-97d4-845e3d45ca6a", + "type": "feature", + "description": "This release introduces a new optional parameter: Entity, in PutLogEvents request", + "modules": [ + "service/cloudwatchlogs" + ] +} \ No newline at end of file diff --git a/.changelog/e9d011fb60414aaabef476a452caca73.json b/.changelog/e9d011fb60414aaabef476a452caca73.json new file mode 100644 index 00000000000..e3f6559b5fd --- /dev/null +++ b/.changelog/e9d011fb60414aaabef476a452caca73.json @@ -0,0 +1,8 @@ +{ + "id": "e9d011fb-6041-4aaa-bef4-76a452caca73", + "type": "feature", + "description": "Amazon DataZone now adds new governance capabilities of Domain Units for organization within your Data Domains, and Authorization Policies for tighter controls.", + "modules": [ + "service/datazone" + ] +} \ No newline at end of file diff --git a/service/backup/api_op_CancelLegalHold.go b/service/backup/api_op_CancelLegalHold.go index e1862f2518c..c24bf5511e7 100644 --- a/service/backup/api_op_CancelLegalHold.go +++ b/service/backup/api_op_CancelLegalHold.go @@ -10,8 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This action removes the specified legal hold on a recovery point. This action -// can only be performed by a user with sufficient permissions. +// Removes the specified legal hold on a recovery point. This action can only be +// performed by a user with sufficient permissions. func (c *Client) CancelLegalHold(ctx context.Context, params *CancelLegalHoldInput, optFns ...func(*Options)) (*CancelLegalHoldOutput, error) { if params == nil { params = &CancelLegalHoldInput{} @@ -29,18 +29,17 @@ func (c *Client) CancelLegalHold(ctx context.Context, params *CancelLegalHoldInp type CancelLegalHoldInput struct { - // String describing the reason for removing the legal hold. + // A string the describes the reason for removing the legal hold. // // This member is required. CancelDescription *string - // Legal hold ID required to remove the specified legal hold on a recovery point. + // The ID of the legal hold. // // This member is required. LegalHoldId *string - // The integer amount in days specifying amount of days after this API operation - // to remove legal hold. + // The integer amount, in days, after which to remove legal hold. RetainRecordInDays *int64 noSmithyDocumentSerde diff --git a/service/backup/api_op_CreateBackupPlan.go b/service/backup/api_op_CreateBackupPlan.go index 1da208ca5cb..a725cbf224f 100644 --- a/service/backup/api_op_CreateBackupPlan.go +++ b/service/backup/api_op_CreateBackupPlan.go @@ -35,15 +35,13 @@ func (c *Client) CreateBackupPlan(ctx context.Context, params *CreateBackupPlanI type CreateBackupPlanInput struct { - // Specifies the body of a backup plan. Includes a BackupPlanName and one or more - // sets of Rules . + // The body of a backup plan. Includes a BackupPlanName and one or more sets of + // Rules . // // This member is required. BackupPlan *types.BackupPlanInput - // To help organize your resources, you can assign your own metadata to the - // resources that you create. Each tag is a key-value pair. The specified tags are - // assigned to all backups created with this plan. + // The tags to assign to the backup plan. BackupPlanTags map[string]string // Identifies the request and allows failed requests to be retried without the @@ -59,8 +57,8 @@ type CreateBackupPlanInput struct { type CreateBackupPlanOutput struct { - // A list of BackupOptions settings for a resource type. This option is only - // available for Windows Volume Shadow Copy Service (VSS) backup jobs. + // The settings for a resource type. This option is only available for Windows + // Volume Shadow Copy Service (VSS) backup jobs. AdvancedBackupSettings []types.AdvancedBackupSetting // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for @@ -68,7 +66,7 @@ type CreateBackupPlanOutput struct { // arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50 . BackupPlanArn *string - // Uniquely identifies a backup plan. + // The ID of the backup plan. BackupPlanId *string // The date and time that a backup plan is created, in Unix format and Coordinated diff --git a/service/backup/api_op_CreateBackupSelection.go b/service/backup/api_op_CreateBackupSelection.go index 31c88e8fd70..4fa0bd95049 100644 --- a/service/backup/api_op_CreateBackupSelection.go +++ b/service/backup/api_op_CreateBackupSelection.go @@ -33,13 +33,12 @@ func (c *Client) CreateBackupSelection(ctx context.Context, params *CreateBackup type CreateBackupSelectionInput struct { - // Uniquely identifies the backup plan to be associated with the selection of - // resources. + // The ID of the backup plan. // // This member is required. BackupPlanId *string - // Specifies the body of a request to assign a set of resources to a backup plan. + // The body of a request to assign a set of resources to a backup plan. // // This member is required. BackupSelection *types.BackupSelection @@ -56,7 +55,7 @@ type CreateBackupSelectionInput struct { type CreateBackupSelectionOutput struct { - // Uniquely identifies a backup plan. + // The ID of the backup plan. BackupPlanId *string // The date and time a backup selection is created, in Unix format and Coordinated diff --git a/service/backup/api_op_CreateBackupVault.go b/service/backup/api_op_CreateBackupVault.go index 25682d9c776..07558ccd1f2 100644 --- a/service/backup/api_op_CreateBackupVault.go +++ b/service/backup/api_op_CreateBackupVault.go @@ -42,8 +42,7 @@ type CreateBackupVaultInput struct { // This member is required. BackupVaultName *string - // Metadata that you can assign to help organize the resources that you create. - // Each tag is a key-value pair. + // The tags to assign to the backup vault. BackupVaultTags map[string]string // A unique string that identifies the request and allows failed requests to be @@ -64,7 +63,7 @@ type CreateBackupVaultInput struct { type CreateBackupVaultOutput struct { // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . BackupVaultArn *string // The name of a logical container where backups are stored. Backup vaults are diff --git a/service/backup/api_op_CreateFramework.go b/service/backup/api_op_CreateFramework.go index dd92872ddd6..58e49ee5a1e 100644 --- a/service/backup/api_op_CreateFramework.go +++ b/service/backup/api_op_CreateFramework.go @@ -33,8 +33,8 @@ func (c *Client) CreateFramework(ctx context.Context, params *CreateFrameworkInp type CreateFrameworkInput struct { - // A list of the controls that make up the framework. Each control in the list has - // a name, input parameters, and scope. + // The controls that make up the framework. Each control in the list has a name, + // input parameters, and scope. // // This member is required. FrameworkControls []types.FrameworkControl @@ -49,8 +49,7 @@ type CreateFrameworkInput struct { // An optional description of the framework with a maximum of 1,024 characters. FrameworkDescription *string - // Metadata that you can assign to help organize the frameworks that you create. - // Each tag is a key-value pair. + // The tags to assign to the framework. FrameworkTags map[string]string // A customer-chosen string that you can use to distinguish between otherwise diff --git a/service/backup/api_op_CreateLegalHold.go b/service/backup/api_op_CreateLegalHold.go index ef870be4b0f..3d4cce59e29 100644 --- a/service/backup/api_op_CreateLegalHold.go +++ b/service/backup/api_op_CreateLegalHold.go @@ -12,10 +12,10 @@ import ( "time" ) -// This action creates a legal hold on a recovery point (backup). A legal hold is -// a restraint on altering or deleting a backup until an authorized user cancels -// the legal hold. Any actions to delete or disassociate a recovery point will fail -// with an error if one or more active legal holds are on the recovery point. +// Creates a legal hold on a recovery point (backup). A legal hold is a restraint +// on altering or deleting a backup until an authorized user cancels the legal +// hold. Any actions to delete or disassociate a recovery point will fail with an +// error if one or more active legal holds are on the recovery point. func (c *Client) CreateLegalHold(ctx context.Context, params *CreateLegalHoldInput, optFns ...func(*Options)) (*CreateLegalHoldOutput, error) { if params == nil { params = &CreateLegalHoldInput{} @@ -33,12 +33,12 @@ func (c *Client) CreateLegalHold(ctx context.Context, params *CreateLegalHoldInp type CreateLegalHoldInput struct { - // This is the string description of the legal hold. + // The description of the legal hold. // // This member is required. Description *string - // This is the string title of the legal hold. + // The title of the legal hold. // // This member is required. Title *string @@ -48,8 +48,8 @@ type CreateLegalHoldInput struct { // a success message with no action taken. IdempotencyToken *string - // This specifies criteria to assign a set of resources, such as resource types or - // backup vaults. + // The criteria to assign a set of resources, such as resource types or backup + // vaults. RecoveryPointSelection *types.RecoveryPointSelection // Optional tags to include. A tag is a key-value pair you can use to manage, @@ -62,28 +62,26 @@ type CreateLegalHoldInput struct { type CreateLegalHoldOutput struct { - // Time in number format when legal hold was created. + // The time when the legal hold was created. CreationDate *time.Time - // This is the returned string description of the legal hold. + // The description of the legal hold. Description *string - // This is the ARN (Amazon Resource Number) of the created legal hold. + // The Amazon Resource Name (ARN) of the legal hold. LegalHoldArn *string - // Legal hold ID returned for the specified legal hold on a recovery point. + // The ID of the legal hold. LegalHoldId *string - // This specifies criteria to assign a set of resources, such as resource types or - // backup vaults. + // The criteria to assign to a set of resources, such as resource types or backup + // vaults. RecoveryPointSelection *types.RecoveryPointSelection - // This displays the status of the legal hold returned after creating the legal - // hold. Statuses can be ACTIVE , PENDING , CANCELED , CANCELING , or FAILED . + // The status of the legal hold. Status types.LegalHoldStatus - // This is the string title of the legal hold returned after creating the legal - // hold. + // The title of the legal hold. Title *string // Metadata pertaining to the operation's result. diff --git a/service/backup/api_op_CreateLogicallyAirGappedBackupVault.go b/service/backup/api_op_CreateLogicallyAirGappedBackupVault.go index 8dda68ca5bc..ed016dbec92 100644 --- a/service/backup/api_op_CreateLogicallyAirGappedBackupVault.go +++ b/service/backup/api_op_CreateLogicallyAirGappedBackupVault.go @@ -12,7 +12,7 @@ import ( "time" ) -// This request creates a logical container to where backups may be copied. +// Creates a logical container to where backups may be copied. // // This request includes a name, the Region, the maximum number of retention days, // the minimum number of retention days, and optionally can include tags and a @@ -37,42 +37,30 @@ func (c *Client) CreateLogicallyAirGappedBackupVault(ctx context.Context, params type CreateLogicallyAirGappedBackupVaultInput struct { - // This is the name of the vault that is being created. + // The name of a logical container where backups are stored. Logically air-gapped + // backup vaults are identified by names that are unique to the account used to + // create them and the Region where they are created. // // This member is required. BackupVaultName *string - // This is the setting that specifies the maximum retention period that the vault - // retains its recovery points. If this parameter is not specified, Backup does not - // enforce a maximum retention period on the recovery points in the vault (allowing - // indefinite storage). - // - // If specified, any backup or copy job to the vault must have a lifecycle policy - // with a retention period equal to or shorter than the maximum retention period. - // If the job retention period is longer than that maximum retention period, then - // the vault fails the backup or copy job, and you should either modify your - // lifecycle settings or use a different vault. + // The maximum retention period that the vault retains its recovery points. // // This member is required. MaxRetentionDays *int64 // This setting specifies the minimum retention period that the vault retains its - // recovery points. If this parameter is not specified, no minimum retention period - // is enforced. + // recovery points. // - // If specified, any backup or copy job to the vault must have a lifecycle policy - // with a retention period equal to or longer than the minimum retention period. If - // a job retention period is shorter than that minimum retention period, then the - // vault fails the backup or copy job, and you should either modify your lifecycle - // settings or use a different vault. + // The minimum value accepted is 7 days. // // This member is required. MinRetentionDays *int64 - // These are the tags that will be included in the newly-created vault. + // The tags to assign to the vault. BackupVaultTags map[string]string - // This is the ID of the creation request. + // The ID of the creation request. // // This parameter is optional. If used, this parameter must contain 1 to 50 // alphanumeric or '-_.' characters. @@ -83,13 +71,12 @@ type CreateLogicallyAirGappedBackupVaultInput struct { type CreateLogicallyAirGappedBackupVaultOutput struct { - // This is the ARN (Amazon Resource Name) of the vault being created. + // The ARN (Amazon Resource Name) of the vault. BackupVaultArn *string // The name of a logical container where backups are stored. Logically air-gapped // backup vaults are identified by names that are unique to the account used to - // create them and the Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // create them and the Region where they are created. BackupVaultName *string // The date and time when the vault was created. @@ -99,7 +86,7 @@ type CreateLogicallyAirGappedBackupVaultOutput struct { // 26, 2018 12:11:30.087 AM. CreationDate *time.Time - // This is the current state of the vault. + // The current state of the vault. VaultState types.VaultState // Metadata pertaining to the operation's result. diff --git a/service/backup/api_op_CreateReportPlan.go b/service/backup/api_op_CreateReportPlan.go index 47b52a12c7f..dcb5cef590e 100644 --- a/service/backup/api_op_CreateReportPlan.go +++ b/service/backup/api_op_CreateReportPlan.go @@ -69,8 +69,7 @@ type CreateReportPlanInput struct { // An optional description of the report plan with a maximum of 1,024 characters. ReportPlanDescription *string - // Metadata that you can assign to help organize the report plans that you create. - // Each tag is a key-value pair. + // The tags to assign to the report plan. ReportPlanTags map[string]string noSmithyDocumentSerde diff --git a/service/backup/api_op_CreateRestoreTestingPlan.go b/service/backup/api_op_CreateRestoreTestingPlan.go index f393d396ce6..b258be6d3ee 100644 --- a/service/backup/api_op_CreateRestoreTestingPlan.go +++ b/service/backup/api_op_CreateRestoreTestingPlan.go @@ -12,12 +12,10 @@ import ( "time" ) -// This is the first of two steps to create a restore testing plan; once this -// request is successful, finish the procedure with request -// CreateRestoreTestingSelection. +// Creates a restore testing plan. // -// You must include the parameter RestoreTestingPlan. You may optionally include -// CreatorRequestId and Tags. +// The first of two steps to create a restore testing plan. After this request is +// successful, finish the procedure using CreateRestoreTestingSelection. func (c *Client) CreateRestoreTestingPlan(ctx context.Context, params *CreateRestoreTestingPlanInput, optFns ...func(*Options)) (*CreateRestoreTestingPlanOutput, error) { if params == nil { params = &CreateRestoreTestingPlanInput{} @@ -52,9 +50,7 @@ type CreateRestoreTestingPlanInput struct { // characters. CreatorRequestId *string - // Optional tags to include. A tag is a key-value pair you can use to manage, - // filter, and search for your resources. Allowed characters include UTF-8 - // letters,numbers, spaces, and the following characters: + - = . _ : /. + // The tags to assign to the restore testing plan. Tags map[string]string noSmithyDocumentSerde diff --git a/service/backup/api_op_CreateRestoreTestingSelection.go b/service/backup/api_op_CreateRestoreTestingSelection.go index 032fd307061..8cf223b65aa 100644 --- a/service/backup/api_op_CreateRestoreTestingSelection.go +++ b/service/backup/api_op_CreateRestoreTestingSelection.go @@ -82,18 +82,18 @@ type CreateRestoreTestingSelectionInput struct { type CreateRestoreTestingSelectionOutput struct { - // This is the time the resource testing selection was created successfully. + // The time that the resource testing selection was created. // // This member is required. CreationTime *time.Time - // This is the ARN of the restore testing plan with which the restore testing - // selection is associated. + // The ARN of the restore testing plan with which the restore testing selection is + // associated. // // This member is required. RestoreTestingPlanArn *string - // Unique string that is the name of the restore testing plan. + // The name of the restore testing plan. // // The name cannot be changed after creation. The name consists of only // alphanumeric characters and underscores. Maximum length is 50. @@ -101,8 +101,7 @@ type CreateRestoreTestingSelectionOutput struct { // This member is required. RestoreTestingPlanName *string - // This is the unique name of the restore testing selection that belongs to the - // related restore testing plan. + // The name of the restore testing selection for the related restore testing plan. // // This member is required. RestoreTestingSelectionName *string diff --git a/service/backup/api_op_DeleteBackupVault.go b/service/backup/api_op_DeleteBackupVault.go index ba10d71372e..130a27ea2a5 100644 --- a/service/backup/api_op_DeleteBackupVault.go +++ b/service/backup/api_op_DeleteBackupVault.go @@ -31,8 +31,7 @@ type DeleteBackupVaultInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // This member is required. BackupVaultName *string diff --git a/service/backup/api_op_DeleteBackupVaultNotifications.go b/service/backup/api_op_DeleteBackupVaultNotifications.go index 050aa012f00..a51df543488 100644 --- a/service/backup/api_op_DeleteBackupVaultNotifications.go +++ b/service/backup/api_op_DeleteBackupVaultNotifications.go @@ -30,8 +30,7 @@ type DeleteBackupVaultNotificationsInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Region where they are created. They consist of lowercase letters, numbers, and - // hyphens. + // Region where they are created. // // This member is required. BackupVaultName *string diff --git a/service/backup/api_op_DeleteRecoveryPoint.go b/service/backup/api_op_DeleteRecoveryPoint.go index e3913f9a270..be36171ea5c 100644 --- a/service/backup/api_op_DeleteRecoveryPoint.go +++ b/service/backup/api_op_DeleteRecoveryPoint.go @@ -45,8 +45,7 @@ type DeleteRecoveryPointInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // This member is required. BackupVaultName *string diff --git a/service/backup/api_op_DescribeBackupJob.go b/service/backup/api_op_DescribeBackupJob.go index 20a102694fc..dfabe3377f4 100644 --- a/service/backup/api_op_DescribeBackupJob.go +++ b/service/backup/api_op_DescribeBackupJob.go @@ -59,13 +59,12 @@ type DescribeBackupJobOutput struct { BackupType *string // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . BackupVaultArn *string // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. BackupVaultName *string // The size in bytes transferred to a backup vault at the time that the job status @@ -102,13 +101,13 @@ type DescribeBackupJobOutput struct { // example, arn:aws:iam::123456789012:role/S3Access . IamRoleArn *string - // This is the date a backup job was initiated. + // The date a backup job was initiated. InitiationDate *time.Time // This returns the boolean value that a backup job is a parent (composite) job. IsParent bool - // This is the job count for the specified message category. + // The job count for the specified message category. // // Example strings may include AccessDenied , SUCCESS , AGGREGATE_ALL , and // INVALIDPARAMETERS . View [Monitoring] for a list of accepted MessageCategory strings. @@ -135,8 +134,7 @@ type DescribeBackupJobOutput struct { // on the resource type. ResourceArn *string - // This is the non-unique name of the resource that belongs to the specified - // backup. + // The non-unique name of the resource that belongs to the specified backup. ResourceName *string // The type of Amazon Web Services resource to be backed up; for example, an diff --git a/service/backup/api_op_DescribeBackupVault.go b/service/backup/api_op_DescribeBackupVault.go index afc62fa773f..1b7bc04e26f 100644 --- a/service/backup/api_op_DescribeBackupVault.go +++ b/service/backup/api_op_DescribeBackupVault.go @@ -32,13 +32,12 @@ type DescribeBackupVaultInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // This member is required. BackupVaultName *string - // This is the account ID of the specified backup vault. + // The account ID of the specified backup vault. BackupVaultAccountId *string noSmithyDocumentSerde @@ -47,13 +46,12 @@ type DescribeBackupVaultInput struct { type DescribeBackupVaultOutput struct { // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . BackupVaultArn *string // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Region where they are created. They consist of lowercase letters, numbers, and - // hyphens. + // Region where they are created. BackupVaultName *string // The date and time that a backup vault is created, in Unix format and @@ -105,7 +103,7 @@ type DescribeBackupVaultOutput struct { // The Backup Vault Lock setting that specifies the minimum retention period that // the vault retains its recovery points. If this parameter is not specified, Vault - // Lock does not enforce a minimum retention period. + // Lock will not enforce a minimum retention period. // // If specified, any backup or copy job to the vault must have a lifecycle policy // with a retention period equal to or longer than the minimum retention period. If @@ -118,7 +116,10 @@ type DescribeBackupVaultOutput struct { // The number of recovery points that are stored in a backup vault. NumberOfRecoveryPoints int64 - // This is the type of vault described. + // The current state of the vault.-> + VaultState types.VaultState + + // The type of vault described. VaultType types.VaultType // Metadata pertaining to the operation's result. diff --git a/service/backup/api_op_DescribeFramework.go b/service/backup/api_op_DescribeFramework.go index 1df6b8ce951..ccebd21b5ae 100644 --- a/service/backup/api_op_DescribeFramework.go +++ b/service/backup/api_op_DescribeFramework.go @@ -56,8 +56,8 @@ type DescribeFrameworkOutput struct { // of the ARN depends on the resource type. FrameworkArn *string - // A list of the controls that make up the framework. Each control in the list has - // a name, input parameters, and scope. + // The controls that make up the framework. Each control in the list has a name, + // input parameters, and scope. FrameworkControls []types.FrameworkControl // An optional description of the framework. diff --git a/service/backup/api_op_DescribeProtectedResource.go b/service/backup/api_op_DescribeProtectedResource.go index 5d874e6a103..9c8a743622a 100644 --- a/service/backup/api_op_DescribeProtectedResource.go +++ b/service/backup/api_op_DescribeProtectedResource.go @@ -48,28 +48,27 @@ type DescribeProtectedResourceOutput struct { // 26, 2018 12:11:30.087 AM. LastBackupTime *time.Time - // This is the ARN (Amazon Resource Name) of the backup vault that contains the - // most recent backup recovery point. + // The ARN (Amazon Resource Name) of the backup vault that contains the most + // recent backup recovery point. LastBackupVaultArn *string - // This is the ARN (Amazon Resource Name) of the most recent recovery point. + // The ARN (Amazon Resource Name) of the most recent recovery point. LastRecoveryPointArn *string - // This is the time in minutes the most recent restore job took to complete. + // The time, in minutes, that the most recent restore job took to complete. LatestRestoreExecutionTimeMinutes *int64 - // This is the creation date of the most recent restore job. + // The creation date of the most recent restore job. LatestRestoreJobCreationDate *time.Time - // This is the date the most recent recovery point was created. + // The date the most recent recovery point was created. LatestRestoreRecoveryPointCreationDate *time.Time // An ARN that uniquely identifies a resource. The format of the ARN depends on // the resource type. ResourceArn *string - // This is the non-unique name of the resource that belongs to the specified - // backup. + // The name of the resource that belongs to the specified backup. ResourceName *string // The type of Amazon Web Services resource saved as a recovery point; for diff --git a/service/backup/api_op_DescribeRecoveryPoint.go b/service/backup/api_op_DescribeRecoveryPoint.go index 1d3fe47a5d1..8269c1e15e6 100644 --- a/service/backup/api_op_DescribeRecoveryPoint.go +++ b/service/backup/api_op_DescribeRecoveryPoint.go @@ -33,8 +33,7 @@ type DescribeRecoveryPointInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // This member is required. BackupVaultName *string @@ -47,7 +46,7 @@ type DescribeRecoveryPointInput struct { // This member is required. RecoveryPointArn *string - // This is the account ID of the specified backup vault. + // The account ID of the specified backup vault. BackupVaultAccountId *string noSmithyDocumentSerde @@ -59,13 +58,12 @@ type DescribeRecoveryPointOutput struct { BackupSizeInBytes *int64 // An ARN that uniquely identifies a backup vault; for example, - // arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . BackupVaultArn *string // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Region where they are created. They consist of lowercase letters, numbers, and - // hyphens. + // Region where they are created. BackupVaultName *string // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt @@ -78,9 +76,9 @@ type DescribeRecoveryPointOutput struct { // Friday, January 26, 2018 12:11:30.087 AM. CompletionDate *time.Time - // This is the identifier of a resource within a composite group, such as nested - // (child) recovery point belonging to a composite (parent) stack. The ID is - // transferred from the [logical ID]within a stack. + // The identifier of a resource within a composite group, such as nested (child) + // recovery point belonging to a composite (parent) stack. The ID is transferred + // from the [logical ID]within a stack. // // [logical ID]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html#resources-section-structure-syntax CompositeMemberIdentifier *string @@ -128,11 +126,10 @@ type DescribeRecoveryPointOutput struct { // cold after days” setting cannot be changed after a backup has been transitioned // to cold. // - // Resource types that are able to be transitioned to cold storage are listed in - // the "Lifecycle to cold storage" section of the [Feature availability by resource]table. Backup ignores this - // expression for other resource types. + // Resource types that can transition to cold storage are listed in the [Feature availability by resource] table. + // Backup ignores this expression for other resource types. // - // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource + // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource Lifecycle *types.Lifecycle // This is an ARN that uniquely identifies a parent (composite) recovery point; @@ -150,8 +147,7 @@ type DescribeRecoveryPointOutput struct { // on the resource type. ResourceArn *string - // This is the non-unique name of the resource that belongs to the specified - // backup. + // The name of the resource that belongs to the specified backup. ResourceName *string // The type of Amazon Web Services resource to save as a recovery point; for @@ -161,9 +157,9 @@ type DescribeRecoveryPointOutput struct { // An Amazon Resource Name (ARN) that uniquely identifies the source vault where // the resource was originally backed up in; for example, - // arn:aws:backup:us-east-1:123456789012:vault:BackupVault . If the recovery is - // restored to the same Amazon Web Services account or Region, this value will be - // null . + // arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . If the + // recovery is restored to the same Amazon Web Services account or Region, this + // value will be null . SourceBackupVaultArn *string // A status code specifying the state of the recovery point. @@ -182,6 +178,8 @@ type DescribeRecoveryPointOutput struct { // that causes the continuous backup to be disabled. This can be caused by the // removal of permissions, turning off versioning, turning off events being sent to // EventBridge, or disabling the EventBridge rules that are put in place by Backup. + // For recovery points of Amazon S3, Amazon RDS, and Amazon Aurora resources, this + // status occurs when the retention period of a continuous backup rule is changed. // // To resolve STOPPED status, ensure that all requested permissions are in place // and that versioning is enabled on the S3 bucket. Once these conditions are met, @@ -205,7 +203,7 @@ type DescribeRecoveryPointOutput struct { // . StorageClass types.StorageClass - // This is the type of vault in which the described recovery point is stored. + // The type of vault in which the described recovery point is stored. VaultType types.VaultType // Metadata pertaining to the operation's result. diff --git a/service/backup/api_op_DescribeRegionSettings.go b/service/backup/api_op_DescribeRegionSettings.go index da772711ced..06b8645ffcf 100644 --- a/service/backup/api_op_DescribeRegionSettings.go +++ b/service/backup/api_op_DescribeRegionSettings.go @@ -47,11 +47,11 @@ type DescribeRegionSettingsOutput struct { // by enabling [Backup's advanced DynamoDB backup features]. // // [Full Backup management]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#full-management - // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource + // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource // [Backup's advanced DynamoDB backup features]: https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html#advanced-ddb-backup-enable-cli ResourceTypeManagementPreference map[string]bool - // Returns a list of all services along with the opt-in preferences in the Region. + // The services along with the opt-in preferences in the Region. ResourceTypeOptInPreference map[string]bool // Metadata pertaining to the operation's result. diff --git a/service/backup/api_op_DescribeReportJob.go b/service/backup/api_op_DescribeReportJob.go index 7fb46e86140..b1dc99868ab 100644 --- a/service/backup/api_op_DescribeReportJob.go +++ b/service/backup/api_op_DescribeReportJob.go @@ -42,7 +42,7 @@ type DescribeReportJobInput struct { type DescribeReportJobOutput struct { - // A list of information about a report job, including its completion and creation + // The information about a report job, including its completion and creation // times, report destination, unique report job ID, Amazon Resource Name (ARN), // report template, status, and status message. ReportJob *types.ReportJob diff --git a/service/backup/api_op_DescribeRestoreJob.go b/service/backup/api_op_DescribeRestoreJob.go index 4636e1adc54..9ace1106ef5 100644 --- a/service/backup/api_op_DescribeRestoreJob.go +++ b/service/backup/api_op_DescribeRestoreJob.go @@ -55,9 +55,10 @@ type DescribeRestoreJobOutput struct { // Contains identifying information about the creation of a restore job. CreatedBy *types.RestoreJobCreator - // An Amazon Resource Name (ARN) that uniquely identifies a resource whose - // recovery point is being restored. The format of the ARN depends on the resource - // type of the backed-up resource. + // The Amazon Resource Name (ARN) of the resource that was created by the restore + // job. + // + // The format of the ARN depends on the resource type of the backed-up resource. CreatedResourceArn *string // The date and time that a restore job is created, in Unix format and Coordinated @@ -66,8 +67,7 @@ type DescribeRestoreJobOutput struct { // 12:11:30.087 AM. CreationDate *time.Time - // This notes the status of the data generated by the restore test. The status may - // be Deleting , Failed , or Successful . + // The status of the data generated by the restore test. DeletionStatus types.RestoreDeletionStatus // This describes the restore job deletion status. @@ -90,8 +90,7 @@ type DescribeRestoreJobOutput struct { // . RecoveryPointArn *string - // This is the creation date of the recovery point made by the specifed restore - // job. + // The creation date of the recovery point made by the specifed restore job. RecoveryPointCreationDate *time.Time // Returns metadata associated with a restore job listed by resource type. @@ -107,10 +106,10 @@ type DescribeRestoreJobOutput struct { // A message showing the status of a job to restore a recovery point. StatusMessage *string - // This is the status of validation run on the indicated restore job. + // The status of validation run on the indicated restore job. ValidationStatus types.RestoreValidationStatus - // This describes the status of validation run on the indicated restore job. + // The status message. ValidationStatusMessage *string // Metadata pertaining to the operation's result. diff --git a/service/backup/api_op_DisassociateRecoveryPointFromParent.go b/service/backup/api_op_DisassociateRecoveryPointFromParent.go index 9be8351c6f3..a8623f416fa 100644 --- a/service/backup/api_op_DisassociateRecoveryPointFromParent.go +++ b/service/backup/api_op_DisassociateRecoveryPointFromParent.go @@ -30,16 +30,15 @@ func (c *Client) DisassociateRecoveryPointFromParent(ctx context.Context, params type DisassociateRecoveryPointFromParentInput struct { - // This is the name of a logical container where the child (nested) recovery point - // is stored. Backup vaults are identified by names that are unique to the account + // The name of a logical container where the child (nested) recovery point is + // stored. Backup vaults are identified by names that are unique to the account // used to create them and the Amazon Web Services Region where they are created. - // They consist of lowercase letters, numbers, and hyphens. // // This member is required. BackupVaultName *string - // This is the Amazon Resource Name (ARN) that uniquely identifies the child - // (nested) recovery point; for example, + // The Amazon Resource Name (ARN) that uniquely identifies the child (nested) + // recovery point; for example, // arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. // // This member is required. diff --git a/service/backup/api_op_GetBackupPlan.go b/service/backup/api_op_GetBackupPlan.go index c0f64660a18..4e5e6701f6e 100644 --- a/service/backup/api_op_GetBackupPlan.go +++ b/service/backup/api_op_GetBackupPlan.go @@ -77,10 +77,10 @@ type GetBackupPlanOutput struct { // 12:11:30.087 AM. DeletionDate *time.Time - // The last time a job to back up resources was run with this backup plan. A date - // and time, in Unix format and Coordinated Universal Time (UTC). The value of - // LastExecutionDate is accurate to milliseconds. For example, the value - // 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. + // The last time this backup plan was run. A date and time, in Unix format and + // Coordinated Universal Time (UTC). The value of LastExecutionDate is accurate to + // milliseconds. For example, the value 1516925490.087 represents Friday, January + // 26, 2018 12:11:30.087 AM. LastExecutionDate *time.Time // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most diff --git a/service/backup/api_op_GetBackupVaultAccessPolicy.go b/service/backup/api_op_GetBackupVaultAccessPolicy.go index 621c4d32c3b..e5dcc0e8a0b 100644 --- a/service/backup/api_op_GetBackupVaultAccessPolicy.go +++ b/service/backup/api_op_GetBackupVaultAccessPolicy.go @@ -31,8 +31,7 @@ type GetBackupVaultAccessPolicyInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // This member is required. BackupVaultName *string @@ -43,13 +42,12 @@ type GetBackupVaultAccessPolicyInput struct { type GetBackupVaultAccessPolicyOutput struct { // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . BackupVaultArn *string // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Region where they are created. They consist of lowercase letters, numbers, and - // hyphens. + // Region where they are created. BackupVaultName *string // The backup vault access policy document in JSON format. diff --git a/service/backup/api_op_GetBackupVaultNotifications.go b/service/backup/api_op_GetBackupVaultNotifications.go index a7c1f5756f5..cf2ce8dec6b 100644 --- a/service/backup/api_op_GetBackupVaultNotifications.go +++ b/service/backup/api_op_GetBackupVaultNotifications.go @@ -31,8 +31,7 @@ type GetBackupVaultNotificationsInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // This member is required. BackupVaultName *string @@ -43,7 +42,7 @@ type GetBackupVaultNotificationsInput struct { type GetBackupVaultNotificationsOutput struct { // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . BackupVaultArn *string // An array of events that indicate the status of jobs to back up resources to the @@ -52,8 +51,7 @@ type GetBackupVaultNotificationsOutput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Region where they are created. They consist of lowercase letters, numbers, and - // hyphens. + // Region where they are created. BackupVaultName *string // An ARN that uniquely identifies an Amazon Simple Notification Service (Amazon diff --git a/service/backup/api_op_GetLegalHold.go b/service/backup/api_op_GetLegalHold.go index 2ba00752fd7..cd38b421961 100644 --- a/service/backup/api_op_GetLegalHold.go +++ b/service/backup/api_op_GetLegalHold.go @@ -31,8 +31,7 @@ func (c *Client) GetLegalHold(ctx context.Context, params *GetLegalHoldInput, op type GetLegalHoldInput struct { - // This is the ID required to use GetLegalHold . This unique ID is associated with - // a specific legal hold. + // The ID of the legal hold. // // This member is required. LegalHoldId *string @@ -42,38 +41,36 @@ type GetLegalHoldInput struct { type GetLegalHoldOutput struct { - // String describing the reason for removing the legal hold. + // The reason for removing the legal hold. CancelDescription *string - // Time in number when legal hold was cancelled. + // The time when the legal hold was cancelled. CancellationDate *time.Time - // Time in number format when legal hold was created. + // The time when the legal hold was created. CreationDate *time.Time - // This is the returned string description of the legal hold. + // The description of the legal hold. Description *string - // This is the returned framework ARN for the specified legal hold. An Amazon - // Resource Name (ARN) uniquely identifies a resource. The format of the ARN - // depends on the resource type. + // The framework ARN for the specified legal hold. The format of the ARN depends + // on the resource type. LegalHoldArn *string - // This is the returned ID associated with a specified legal hold. + // The ID of the legal hold. LegalHoldId *string - // This specifies criteria to assign a set of resources, such as resource types or - // backup vaults. + // The criteria to assign a set of resources, such as resource types or backup + // vaults. RecoveryPointSelection *types.RecoveryPointSelection - // This is the date and time until which the legal hold record will be retained. + // The date and time until which the legal hold record is retained. RetainRecordUntil *time.Time - // This is the status of the legal hold. Statuses can be ACTIVE , CREATING , - // CANCELED , and CANCELING . + // The status of the legal hold. Status types.LegalHoldStatus - // This is the string title of the legal hold. + // The title of the legal hold. Title *string // Metadata pertaining to the operation's result. diff --git a/service/backup/api_op_GetRecoveryPointRestoreMetadata.go b/service/backup/api_op_GetRecoveryPointRestoreMetadata.go index cbbd439d30f..07a770ff4a2 100644 --- a/service/backup/api_op_GetRecoveryPointRestoreMetadata.go +++ b/service/backup/api_op_GetRecoveryPointRestoreMetadata.go @@ -30,8 +30,7 @@ type GetRecoveryPointRestoreMetadataInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // This member is required. BackupVaultName *string @@ -44,7 +43,7 @@ type GetRecoveryPointRestoreMetadataInput struct { // This member is required. RecoveryPointArn *string - // This is the account ID of the specified backup vault. + // The account ID of the specified backup vault. BackupVaultAccountId *string noSmithyDocumentSerde @@ -53,7 +52,7 @@ type GetRecoveryPointRestoreMetadataInput struct { type GetRecoveryPointRestoreMetadataOutput struct { // An ARN that uniquely identifies a backup vault; for example, - // arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . BackupVaultArn *string // An ARN that uniquely identifies a recovery point; for example, @@ -61,7 +60,7 @@ type GetRecoveryPointRestoreMetadataOutput struct { // . RecoveryPointArn *string - // This is the resource type associated with the recovery point. + // The resource type of the recovery point. ResourceType *string // The set of metadata key-value pairs that describe the original configuration of diff --git a/service/backup/api_op_GetRestoreTestingInferredMetadata.go b/service/backup/api_op_GetRestoreTestingInferredMetadata.go index f0cf9a01adc..4ee496e1b84 100644 --- a/service/backup/api_op_GetRestoreTestingInferredMetadata.go +++ b/service/backup/api_op_GetRestoreTestingInferredMetadata.go @@ -46,7 +46,7 @@ type GetRestoreTestingInferredMetadataInput struct { // This member is required. RecoveryPointArn *string - // This is the account ID of the specified backup vault. + // The account ID of the specified backup vault. BackupVaultAccountId *string noSmithyDocumentSerde diff --git a/service/backup/api_op_GetSupportedResourceTypes.go b/service/backup/api_op_GetSupportedResourceTypes.go index edb272454c0..733035d0a2b 100644 --- a/service/backup/api_op_GetSupportedResourceTypes.go +++ b/service/backup/api_op_GetSupportedResourceTypes.go @@ -36,6 +36,10 @@ type GetSupportedResourceTypesOutput struct { // // - Aurora for Amazon Aurora // + // - CloudFormation for CloudFormation + // + // - DocumentDB for Amazon DocumentDB (with MongoDB compatibility) + // // - DynamoDB for Amazon DynamoDB // // - EBS for Amazon Elastic Block Store @@ -44,15 +48,24 @@ type GetSupportedResourceTypesOutput struct { // // - EFS for Amazon Elastic File System // - // - FSX for Amazon FSx + // - FSx for Amazon FSx + // + // - Neptune for Amazon Neptune // // - RDS for Amazon Relational Database Service // + // - Redshift for Amazon Redshift + // + // - S3 for Amazon Simple Storage Service (Amazon S3) + // + // - SAP HANA on Amazon EC2 for SAP HANA databases on Amazon Elastic Compute + // Cloud instances + // // - Storage Gateway for Storage Gateway // - // - DocDB for Amazon DocumentDB (with MongoDB compatibility) + // - Timestream for Amazon Timestream // - // - Neptune for Amazon Neptune + // - VirtualMachine for VMware virtual machines ResourceTypes []string // Metadata pertaining to the operation's result. diff --git a/service/backup/api_op_ListBackupJobSummaries.go b/service/backup/api_op_ListBackupJobSummaries.go index 99f7733e329..8f599ed757a 100644 --- a/service/backup/api_op_ListBackupJobSummaries.go +++ b/service/backup/api_op_ListBackupJobSummaries.go @@ -46,18 +46,16 @@ type ListBackupJobSummariesInput struct { // organization, then returns the sum. AccountId *string - // This is the period that sets the boundaries for returned results. + // The period for the returned results. // - // Acceptable values include + // - ONE_DAY - The daily job count for the prior 14 days. // - // - ONE_DAY for daily job count for the prior 14 days. + // - SEVEN_DAYS - The aggregated job count for the prior 7 days. // - // - SEVEN_DAYS for the aggregated job count for the prior 7 days. - // - // - FOURTEEN_DAYS for aggregated job count for prior 14 days. + // - FOURTEEN_DAYS - The aggregated job count for prior 14 days. AggregationPeriod types.AggregationPeriod - // This parameter sets the maximum number of items to be returned. + // The maximum number of items to be returned. // // The value is an integer. Range of accepted values is from 1 to 500. MaxResults *int32 @@ -116,17 +114,16 @@ type ListBackupJobSummariesInput struct { type ListBackupJobSummariesOutput struct { - // This is the period that sets the boundaries for returned results. + // The period for the returned results. // - // - ONE_DAY for daily job count for the prior 14 days. + // - ONE_DAY - The daily job count for the prior 14 days. // - // - SEVEN_DAYS for the aggregated job count for the prior 7 days. + // - SEVEN_DAYS - The aggregated job count for the prior 7 days. // - // - FOURTEEN_DAYS for aggregated job count for prior 14 days. + // - FOURTEEN_DAYS - The aggregated job count for prior 14 days. AggregationPeriod *string - // This request returns a summary that contains Region, Account, State, - // ResourceType, MessageCategory, StartTime, EndTime, and Count of included jobs. + // The summary information. BackupJobSummaries []types.BackupJobSummary // The next item following a partial list of returned resources. For example, if a @@ -226,7 +223,7 @@ func (c *Client) addOperationListBackupJobSummariesMiddlewares(stack *middleware // ListBackupJobSummariesPaginatorOptions is the paginator options for // ListBackupJobSummaries type ListBackupJobSummariesPaginatorOptions struct { - // This parameter sets the maximum number of items to be returned. + // The maximum number of items to be returned. // // The value is an integer. Range of accepted values is from 1 to 500. Limit int32 diff --git a/service/backup/api_op_ListBackupJobs.go b/service/backup/api_op_ListBackupJobs.go index 589058bf254..7dea79eb3cd 100644 --- a/service/backup/api_op_ListBackupJobs.go +++ b/service/backup/api_op_ListBackupJobs.go @@ -42,8 +42,7 @@ type ListBackupJobsInput struct { // Returns only backup jobs that will be stored in the specified backup vault. // Backup vaults are identified by names that are unique to the account used to - // create them and the Amazon Web Services Region where they are created. They - // consist of lowercase letters, numbers, and hyphens. + // create them and the Amazon Web Services Region where they are created. ByBackupVaultName *string // Returns only backup jobs completed after a date expressed in Unix format and @@ -103,19 +102,20 @@ type ListBackupJobsInput struct { // // - Neptune for Amazon Neptune // + // - RDS for Amazon Relational Database Service + // // - Redshift for Amazon Redshift // - // - RDS for Amazon Relational Database Service + // - S3 for Amazon Simple Storage Service (Amazon S3) // - // - SAP HANA on Amazon EC2 for SAP HANA databases + // - SAP HANA on Amazon EC2 for SAP HANA databases on Amazon Elastic Compute + // Cloud instances // // - Storage Gateway for Storage Gateway // - // - S3 for Amazon S3 - // // - Timestream for Amazon Timestream // - // - VirtualMachine for virtual machines + // - VirtualMachine for VMware virtual machines ByResourceType *string // Returns only backup jobs that are in the specified state. diff --git a/service/backup/api_op_ListBackupPlanTemplates.go b/service/backup/api_op_ListBackupPlanTemplates.go index 33f3685f9a1..95b23037747 100644 --- a/service/backup/api_op_ListBackupPlanTemplates.go +++ b/service/backup/api_op_ListBackupPlanTemplates.go @@ -11,8 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns metadata of your saved backup plan templates, including the template -// ID, name, and the creation and deletion dates. +// Lists the backup plan templates. func (c *Client) ListBackupPlanTemplates(ctx context.Context, params *ListBackupPlanTemplatesInput, optFns ...func(*Options)) (*ListBackupPlanTemplatesOutput, error) { if params == nil { params = &ListBackupPlanTemplatesInput{} @@ -30,7 +29,7 @@ func (c *Client) ListBackupPlanTemplates(ctx context.Context, params *ListBackup type ListBackupPlanTemplatesInput struct { - // The maximum number of items to be returned. + // The maximum number of items to return. MaxResults *int32 // The next item following a partial list of returned items. For example, if a @@ -144,7 +143,7 @@ func (c *Client) addOperationListBackupPlanTemplatesMiddlewares(stack *middlewar // ListBackupPlanTemplatesPaginatorOptions is the paginator options for // ListBackupPlanTemplates type ListBackupPlanTemplatesPaginatorOptions struct { - // The maximum number of items to be returned. + // The maximum number of items to return. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/backup/api_op_ListBackupPlans.go b/service/backup/api_op_ListBackupPlans.go index 79ff8806dad..87b0b8ab33c 100644 --- a/service/backup/api_op_ListBackupPlans.go +++ b/service/backup/api_op_ListBackupPlans.go @@ -11,9 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of all active backup plans for an authenticated account. The -// list contains information such as Amazon Resource Names (ARNs), plan IDs, -// creation and deletion dates, version IDs, plan names, and creator request IDs. +// Lists the active backup plans for the account. func (c *Client) ListBackupPlans(ctx context.Context, params *ListBackupPlansInput, optFns ...func(*Options)) (*ListBackupPlansOutput, error) { if params == nil { params = &ListBackupPlansInput{} @@ -49,8 +47,7 @@ type ListBackupPlansInput struct { type ListBackupPlansOutput struct { - // An array of backup plan list items containing metadata about your saved backup - // plans. + // Information about the backup plans. BackupPlansList []types.BackupPlansListMember // The next item following a partial list of returned items. For example, if a diff --git a/service/backup/api_op_ListCopyJobSummaries.go b/service/backup/api_op_ListCopyJobSummaries.go index 54c8685e701..747e7f0f024 100644 --- a/service/backup/api_op_ListCopyJobSummaries.go +++ b/service/backup/api_op_ListCopyJobSummaries.go @@ -46,13 +46,13 @@ type ListCopyJobSummariesInput struct { // organization, then returns the sum. AccountId *string - // This is the period that sets the boundaries for returned results. + // The period for the returned results. // - // - ONE_DAY for daily job count for the prior 14 days. + // - ONE_DAY - The daily job count for the prior 14 days. // - // - SEVEN_DAYS for the aggregated job count for the prior 7 days. + // - SEVEN_DAYS - The aggregated job count for the prior 7 days. // - // - FOURTEEN_DAYS for aggregated job count for prior 14 days. + // - FOURTEEN_DAYS - The aggregated job count for prior 14 days. AggregationPeriod types.AggregationPeriod // This parameter sets the maximum number of items to be returned. @@ -103,13 +103,13 @@ type ListCopyJobSummariesInput struct { type ListCopyJobSummariesOutput struct { - // This is the period that sets the boundaries for returned results. + // The period for the returned results. // - // - ONE_DAY for daily job count for the prior 14 days. + // - ONE_DAY - The daily job count for the prior 14 days. // - // - SEVEN_DAYS for the aggregated job count for the prior 7 days. + // - SEVEN_DAYS - The aggregated job count for the prior 7 days. // - // - FOURTEEN_DAYS for aggregated job count for prior 14 days. + // - FOURTEEN_DAYS - The aggregated job count for prior 14 days. AggregationPeriod *string // This return shows a summary that contains Region, Account, State, ResourceType, diff --git a/service/backup/api_op_ListCopyJobs.go b/service/backup/api_op_ListCopyJobs.go index 7d5fc7c26c4..9fb96f3e52d 100644 --- a/service/backup/api_op_ListCopyJobs.go +++ b/service/backup/api_op_ListCopyJobs.go @@ -49,8 +49,8 @@ type ListCopyJobsInput struct { ByCreatedBefore *time.Time // An Amazon Resource Name (ARN) that uniquely identifies a source backup vault to - // copy from; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault - // . + // copy from; for example, + // arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . ByDestinationVaultArn *string // This is an optional parameter that can be used to filter out jobs with a @@ -96,19 +96,20 @@ type ListCopyJobsInput struct { // // - Neptune for Amazon Neptune // + // - RDS for Amazon Relational Database Service + // // - Redshift for Amazon Redshift // - // - RDS for Amazon Relational Database Service + // - S3 for Amazon Simple Storage Service (Amazon S3) // - // - SAP HANA on Amazon EC2 for SAP HANA databases + // - SAP HANA on Amazon EC2 for SAP HANA databases on Amazon Elastic Compute + // Cloud instances // // - Storage Gateway for Storage Gateway // - // - S3 for Amazon S3 - // // - Timestream for Amazon Timestream // - // - VirtualMachine for virtual machines + // - VirtualMachine for VMware virtual machines ByResourceType *string // Returns only copy jobs that are in the specified state. diff --git a/service/backup/api_op_ListFrameworks.go b/service/backup/api_op_ListFrameworks.go index df9dc7b4301..b5a36542579 100644 --- a/service/backup/api_op_ListFrameworks.go +++ b/service/backup/api_op_ListFrameworks.go @@ -43,9 +43,9 @@ type ListFrameworksInput struct { type ListFrameworksOutput struct { - // A list of frameworks with details for each framework, including the framework - // name, Amazon Resource Name (ARN), description, number of controls, creation - // time, and deployment status. + // The frameworks with details for each framework, including the framework name, + // Amazon Resource Name (ARN), description, number of controls, creation time, and + // deployment status. Frameworks []types.Framework // An identifier that was returned from the previous call to this operation, which diff --git a/service/backup/api_op_ListProtectedResourcesByBackupVault.go b/service/backup/api_op_ListProtectedResourcesByBackupVault.go index a54ad9514b4..bfe51d115e3 100644 --- a/service/backup/api_op_ListProtectedResourcesByBackupVault.go +++ b/service/backup/api_op_ListProtectedResourcesByBackupVault.go @@ -29,14 +29,14 @@ func (c *Client) ListProtectedResourcesByBackupVault(ctx context.Context, params type ListProtectedResourcesByBackupVaultInput struct { - // This is the list of protected resources by backup vault within the vault(s) you - // specify by name. + // The list of protected resources by backup vault within the vault(s) you specify + // by name. // // This member is required. BackupVaultName *string - // This is the list of protected resources by backup vault within the vault(s) you - // specify by account ID. + // The list of protected resources by backup vault within the vault(s) you specify + // by account ID. BackupVaultAccountId *string // The maximum number of items to be returned. diff --git a/service/backup/api_op_ListRecoveryPointsByBackupVault.go b/service/backup/api_op_ListRecoveryPointsByBackupVault.go index 98996f5893e..62ad66fa4fd 100644 --- a/service/backup/api_op_ListRecoveryPointsByBackupVault.go +++ b/service/backup/api_op_ListRecoveryPointsByBackupVault.go @@ -32,8 +32,7 @@ type ListRecoveryPointsByBackupVaultInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // Backup vault name might not be available when a supported service creates the // backup. @@ -81,19 +80,20 @@ type ListRecoveryPointsByBackupVaultInput struct { // // - Neptune for Amazon Neptune // + // - RDS for Amazon Relational Database Service + // // - Redshift for Amazon Redshift // - // - RDS for Amazon Relational Database Service + // - S3 for Amazon Simple Storage Service (Amazon S3) // - // - SAP HANA on Amazon EC2 for SAP HANA databases + // - SAP HANA on Amazon EC2 for SAP HANA databases on Amazon Elastic Compute + // Cloud instances // // - Storage Gateway for Storage Gateway // - // - S3 for Amazon S3 - // // - Timestream for Amazon Timestream // - // - VirtualMachine for virtual machines + // - VirtualMachine for VMware virtual machines ByResourceType *string // The maximum number of items to be returned. diff --git a/service/backup/api_op_ListRecoveryPointsByLegalHold.go b/service/backup/api_op_ListRecoveryPointsByLegalHold.go index 1ccd2c24dd9..3664c1adbde 100644 --- a/service/backup/api_op_ListRecoveryPointsByLegalHold.go +++ b/service/backup/api_op_ListRecoveryPointsByLegalHold.go @@ -30,18 +30,18 @@ func (c *Client) ListRecoveryPointsByLegalHold(ctx context.Context, params *List type ListRecoveryPointsByLegalHoldInput struct { - // This is the ID of the legal hold. + // The ID of the legal hold. // // This member is required. LegalHoldId *string - // This is the maximum number of resource list items to be returned. + // The maximum number of resource list items to be returned. MaxResults *int32 - // This is the next item following a partial list of returned resources. For - // example, if a request is made to return MaxResults number of resources, - // NextToken allows you to return more items in your list starting at the location - // pointed to by the next token. + // The next item following a partial list of returned resources. For example, if a + // request is made to return MaxResults number of resources, NextToken allows you + // to return more items in your list starting at the location pointed to by the + // next token. NextToken *string noSmithyDocumentSerde @@ -49,10 +49,10 @@ type ListRecoveryPointsByLegalHoldInput struct { type ListRecoveryPointsByLegalHoldOutput struct { - // This return is the next item following a partial list of returned resources. + // The next item following a partial list of returned resources. NextToken *string - // This is a list of the recovery points returned by ListRecoveryPointsByLegalHold . + // The recovery points. RecoveryPoints []types.RecoveryPointMember // Metadata pertaining to the operation's result. @@ -149,7 +149,7 @@ func (c *Client) addOperationListRecoveryPointsByLegalHoldMiddlewares(stack *mid // ListRecoveryPointsByLegalHoldPaginatorOptions is the paginator options for // ListRecoveryPointsByLegalHold type ListRecoveryPointsByLegalHoldPaginatorOptions struct { - // This is the maximum number of resource list items to be returned. + // The maximum number of resource list items to be returned. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/backup/api_op_ListRecoveryPointsByResource.go b/service/backup/api_op_ListRecoveryPointsByResource.go index 064e70a0311..2baf7c61043 100644 --- a/service/backup/api_op_ListRecoveryPointsByResource.go +++ b/service/backup/api_op_ListRecoveryPointsByResource.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns detailed information about all the recovery points of the type -// specified by a resource Amazon Resource Name (ARN). +// The information about the recovery points of the type specified by a resource +// Amazon Resource Name (ARN). // // For Amazon EFS and Amazon EC2, this action only lists recovery points created // by Backup. diff --git a/service/backup/api_op_ListReportPlans.go b/service/backup/api_op_ListReportPlans.go index 2c9d1e935d1..faaf93ac4b1 100644 --- a/service/backup/api_op_ListReportPlans.go +++ b/service/backup/api_op_ListReportPlans.go @@ -47,10 +47,10 @@ type ListReportPlansOutput struct { // can be used to return the next set of items in the list. NextToken *string - // A list of your report plans with detailed information for each plan. This - // information includes the Amazon Resource Name (ARN), report plan name, - // description, settings, delivery channel, deployment status, creation time, and - // last times the report plan attempted to and successfully ran. + // The report plans with detailed information for each plan. This information + // includes the Amazon Resource Name (ARN), report plan name, description, + // settings, delivery channel, deployment status, creation time, and last times the + // report plan attempted to and successfully ran. ReportPlans []types.ReportPlan // Metadata pertaining to the operation's result. diff --git a/service/backup/api_op_ListRestoreJobSummaries.go b/service/backup/api_op_ListRestoreJobSummaries.go index cd1fb874112..f3953e4fa52 100644 --- a/service/backup/api_op_ListRestoreJobSummaries.go +++ b/service/backup/api_op_ListRestoreJobSummaries.go @@ -46,15 +46,13 @@ type ListRestoreJobSummariesInput struct { // organization, then returns the sum. AccountId *string - // This is the period that sets the boundaries for returned results. + // The period for the returned results. // - // Acceptable values include + // - ONE_DAY - The daily job count for the prior 14 days. // - // - ONE_DAY for daily job count for the prior 14 days. + // - SEVEN_DAYS - The aggregated job count for the prior 7 days. // - // - SEVEN_DAYS for the aggregated job count for the prior 7 days. - // - // - FOURTEEN_DAYS for aggregated job count for prior 14 days. + // - FOURTEEN_DAYS - The aggregated job count for prior 14 days. AggregationPeriod types.AggregationPeriod // This parameter sets the maximum number of items to be returned. @@ -92,13 +90,13 @@ type ListRestoreJobSummariesInput struct { type ListRestoreJobSummariesOutput struct { - // This is the period that sets the boundaries for returned results. + // The period for the returned results. // - // - ONE_DAY for daily job count for the prior 14 days. + // - ONE_DAY - The daily job count for the prior 14 days. // - // - SEVEN_DAYS for the aggregated job count for the prior 7 days. + // - SEVEN_DAYS - The aggregated job count for the prior 7 days. // - // - FOURTEEN_DAYS for aggregated job count for prior 14 days. + // - FOURTEEN_DAYS - The aggregated job count for prior 14 days. AggregationPeriod *string // The next item following a partial list of returned resources. For example, if a diff --git a/service/backup/api_op_ListRestoreJobs.go b/service/backup/api_op_ListRestoreJobs.go index f3122bce4b7..c211412a799 100644 --- a/service/backup/api_op_ListRestoreJobs.go +++ b/service/backup/api_op_ListRestoreJobs.go @@ -69,19 +69,20 @@ type ListRestoreJobsInput struct { // // - Neptune for Amazon Neptune // + // - RDS for Amazon Relational Database Service + // // - Redshift for Amazon Redshift // - // - RDS for Amazon Relational Database Service + // - S3 for Amazon Simple Storage Service (Amazon S3) // - // - SAP HANA on Amazon EC2 for SAP HANA databases + // - SAP HANA on Amazon EC2 for SAP HANA databases on Amazon Elastic Compute + // Cloud instances // // - Storage Gateway for Storage Gateway // - // - S3 for Amazon S3 - // // - Timestream for Amazon Timestream // - // - VirtualMachine for virtual machines + // - VirtualMachine for VMware virtual machines ByResourceType *string // This returns only restore testing jobs that match the specified resource Amazon diff --git a/service/backup/api_op_ListTags.go b/service/backup/api_op_ListTags.go index 53f714fc1c3..2639da9559a 100644 --- a/service/backup/api_op_ListTags.go +++ b/service/backup/api_op_ListTags.go @@ -10,14 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of key-value pairs assigned to a target recovery point, backup -// plan, or backup vault. -// -// ListTags only works for resource types that support full Backup management of -// their backups. Those resource types are listed in the "Full Backup management" -// section of the [Feature availability by resource]table. -// -// [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource +// Returns the tags assigned to the resource, such as a target recovery point, +// backup plan, or backup vault. func (c *Client) ListTags(ctx context.Context, params *ListTagsInput, optFns ...func(*Options)) (*ListTagsOutput, error) { if params == nil { params = &ListTagsInput{} @@ -62,8 +56,7 @@ type ListTagsOutput struct { // token. NextToken *string - // To help organize your resources, you can assign your own metadata to the - // resources you create. Each tag is a key-value pair. + // Information about the tags. Tags map[string]string // Metadata pertaining to the operation's result. diff --git a/service/backup/api_op_PutBackupVaultAccessPolicy.go b/service/backup/api_op_PutBackupVaultAccessPolicy.go index 6fc23c05a3f..3840f1a87de 100644 --- a/service/backup/api_op_PutBackupVaultAccessPolicy.go +++ b/service/backup/api_op_PutBackupVaultAccessPolicy.go @@ -32,8 +32,7 @@ type PutBackupVaultAccessPolicyInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // This member is required. BackupVaultName *string diff --git a/service/backup/api_op_PutBackupVaultLockConfiguration.go b/service/backup/api_op_PutBackupVaultLockConfiguration.go index 21549370133..6873bfeafa5 100644 --- a/service/backup/api_op_PutBackupVaultLockConfiguration.go +++ b/service/backup/api_op_PutBackupVaultLockConfiguration.go @@ -20,7 +20,12 @@ import ( // Backup Vault Lock has been assessed by Cohasset Associates for use in // environments that are subject to SEC 17a-4, CFTC, and FINRA regulations. For // more information about how Backup Vault Lock relates to these regulations, see -// the Cohasset Associates Compliance Assessment. +// the [Cohasset Associates Compliance Assessment.] +// +// For more information, see [Backup Vault Lock]. +// +// [Cohasset Associates Compliance Assessment.]: https://docs.aws.amazon.com/aws-backup/latest/devguide/samples/cohassetreport.zip +// [Backup Vault Lock]: https://docs.aws.amazon.com/aws-backup/latest/devguide/vault-lock.html func (c *Client) PutBackupVaultLockConfiguration(ctx context.Context, params *PutBackupVaultLockConfigurationInput, optFns ...func(*Options)) (*PutBackupVaultLockConfigurationOutput, error) { if params == nil { params = &PutBackupVaultLockConfigurationInput{} @@ -86,8 +91,9 @@ type PutBackupVaultLockConfigurationInput struct { // example, your organization's policies require you to retain certain data for at // least seven years (2555 days). // - // If this parameter is not specified, Vault Lock will not enforce a minimum - // retention period. + // This parameter is required when a vault lock is created through CloudFormation; + // otherwise, this parameter is optional. If this parameter is not specified, Vault + // Lock will not enforce a minimum retention period. // // If this parameter is specified, any backup or copy job to the vault must have a // lifecycle policy with a retention period equal to or longer than the minimum diff --git a/service/backup/api_op_PutBackupVaultNotifications.go b/service/backup/api_op_PutBackupVaultNotifications.go index 3ab578baf52..15d4bef02aa 100644 --- a/service/backup/api_op_PutBackupVaultNotifications.go +++ b/service/backup/api_op_PutBackupVaultNotifications.go @@ -44,9 +44,9 @@ type PutBackupVaultNotificationsInput struct { // // - S3_BACKUP_OBJECT_FAILED | S3_RESTORE_OBJECT_FAILED // - // The list below shows items that are deprecated events (for reference) and are - // no longer in use. They are no longer supported and will not return statuses or - // notifications. Refer to the list above for current supported events. + // The list below includes both supported events and deprecated events that are no + // longer in use (for reference). Deprecated events do not return statuses or + // notifications. Refer to the list above for the supported events. // // [Using Amazon SNS to track Backup events]: https://docs.aws.amazon.com/aws-backup/latest/devguide/sns-notifications.html // @@ -55,8 +55,7 @@ type PutBackupVaultNotificationsInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // This member is required. BackupVaultName *string diff --git a/service/backup/api_op_PutRestoreValidationResult.go b/service/backup/api_op_PutRestoreValidationResult.go index 43d74c35724..a95b1b1c7e5 100644 --- a/service/backup/api_op_PutRestoreValidationResult.go +++ b/service/backup/api_op_PutRestoreValidationResult.go @@ -36,7 +36,7 @@ type PutRestoreValidationResultInput struct { // This member is required. RestoreJobId *string - // This is the status of your restore validation. + // The status of your restore validation. // // This member is required. ValidationStatus types.RestoreValidationStatus diff --git a/service/backup/api_op_StartBackupJob.go b/service/backup/api_op_StartBackupJob.go index f71f2540356..138a6d20b42 100644 --- a/service/backup/api_op_StartBackupJob.go +++ b/service/backup/api_op_StartBackupJob.go @@ -32,8 +32,7 @@ type StartBackupJobInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // This member is required. BackupVaultName *string @@ -50,8 +49,8 @@ type StartBackupJobInput struct { // This member is required. ResourceArn *string - // Specifies the backup option for a selected resource. This option is only - // available for Windows Volume Shadow Copy Service (VSS) backup jobs. + // The backup option for a selected resource. This option is only available for + // Windows Volume Shadow Copy Service (VSS) backup jobs. // // Valid values: Set to "WindowsVSS":"enabled" to enable the WindowsVSS backup // option and create a Windows VSS backup. Set to "WindowsVSS""disabled" to create @@ -81,17 +80,15 @@ type StartBackupJobInput struct { // than the “transition to cold after days” setting. The “transition to cold after // days” setting cannot be changed after a backup has been transitioned to cold. // - // Resource types that are able to be transitioned to cold storage are listed in - // the "Lifecycle to cold storage" section of the [Feature availability by resource]table. Backup ignores this - // expression for other resource types. + // Resource types that can transition to cold storage are listed in the [Feature availability by resource] table. + // Backup ignores this expression for other resource types. // // This parameter has a maximum value of 100 years (36,500 days). // - // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource + // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource Lifecycle *types.Lifecycle - // To help organize your resources, you can assign your own metadata to the - // resources that you create. Each tag is a key-value pair. + // The tags to assign to the resources. RecoveryPointTags map[string]string // A value in minutes after a backup is scheduled before a job will be canceled if diff --git a/service/backup/api_op_StartCopyJob.go b/service/backup/api_op_StartCopyJob.go index a662fab30aa..35ca89d9791 100644 --- a/service/backup/api_op_StartCopyJob.go +++ b/service/backup/api_op_StartCopyJob.go @@ -34,7 +34,7 @@ type StartCopyJobInput struct { // An Amazon Resource Name (ARN) that uniquely identifies a destination backup // vault to copy to; for example, - // arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . // // This member is required. DestinationBackupVaultArn *string @@ -54,8 +54,7 @@ type StartCopyJobInput struct { // The name of a logical source container where backups are stored. Backup vaults // are identified by names that are unique to the account used to create them and - // the Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // the Amazon Web Services Region where they are created. // // This member is required. SourceBackupVaultName *string @@ -65,20 +64,23 @@ type StartCopyJobInput struct { // idempotency token results in a success message with no action taken. IdempotencyToken *string - // Contains an array of Transition objects specifying how long in days before a - // recovery point transitions to cold storage or is deleted. + // Specifies the time period, in days, before a recovery point transitions to cold + // storage or is deleted. // // Backups transitioned to cold storage must be stored in cold storage for a - // minimum of 90 days. Therefore, on the console, the “retention” setting must be - // 90 days greater than the “transition to cold after days” setting. The - // “transition to cold after days” setting cannot be changed after a backup has - // been transitioned to cold. + // minimum of 90 days. Therefore, on the console, the retention setting must be 90 + // days greater than the transition to cold after days setting. The transition to + // cold after days setting can't be changed after a backup has been transitioned to + // cold. // - // Resource types that are able to be transitioned to cold storage are listed in - // the "Lifecycle to cold storage" section of the [Feature availability by resource]table. Backup ignores this - // expression for other resource types. + // Resource types that can transition to cold storage are listed in the [Feature availability by resource] table. + // Backup ignores this expression for other resource types. // - // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource + // To remove the existing lifecycle and retention periods and keep your recovery + // points indefinitely, specify -1 for MoveToColdStorageAfterDays and + // DeleteAfterDays . + // + // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource Lifecycle *types.Lifecycle noSmithyDocumentSerde diff --git a/service/backup/api_op_StartRestoreJob.go b/service/backup/api_op_StartRestoreJob.go index cacd687b7ed..f9719d6e5c6 100644 --- a/service/backup/api_op_StartRestoreJob.go +++ b/service/backup/api_op_StartRestoreJob.go @@ -28,8 +28,7 @@ func (c *Client) StartRestoreJob(ctx context.Context, params *StartRestoreJobInp type StartRestoreJobInput struct { - // A set of metadata key-value pairs. Contains information, such as a resource - // name, required to restore a recovery point. + // A set of metadata key-value pairs. // // You can get configuration metadata about a resource at the time it was backed // up by calling GetRecoveryPointRestoreMetadata . However, values in addition to @@ -37,32 +36,53 @@ type StartRestoreJobInput struct { // a resource. For example, you might need to provide a new resource name if the // original already exists. // - // You need to specify specific metadata to restore an Amazon Elastic File System - // (Amazon EFS) instance: + // For more information about the metadata for each resource, see the following: // - // - file-system-id : The ID of the Amazon EFS file system that is backed up by - // Backup. Returned in GetRecoveryPointRestoreMetadata . + // [Metadata for Amazon Aurora] // - // - Encrypted : A Boolean value that, if true, specifies that the file system is - // encrypted. If KmsKeyId is specified, Encrypted must be set to true . + // [Metadata for Amazon DocumentDB] // - // - KmsKeyId : Specifies the Amazon Web Services KMS key that is used to encrypt - // the restored file system. You can specify a key from another Amazon Web Services - // account provided that key it is properly shared with your account via Amazon Web - // Services KMS. + // [Metadata for CloudFormation] // - // - PerformanceMode : Specifies the throughput mode of the file system. + // [Metadata for Amazon DynamoDB] // - // - CreationToken : A user-supplied value that ensures the uniqueness - // (idempotency) of the request. + // [Metadata for Amazon EBS] // - // - newFileSystem : A Boolean value that, if true, specifies that the recovery - // point is restored to a new Amazon EFS file system. + // [Metadata for Amazon EC2] // - // - ItemsToRestore : An array of one to five strings where each string is a file - // path. Use ItemsToRestore to restore specific files or directories rather than - // the entire file system. This parameter is optional. For example, - // "itemsToRestore":"[\"/my.test\"]" . + // [Metadata for Amazon EFS] + // + // [Metadata for Amazon FSx] + // + // [Metadata for Amazon Neptune] + // + // [Metadata for Amazon RDS] + // + // [Metadata for Amazon Redshift] + // + // [Metadata for Storage Gateway] + // + // [Metadata for Amazon S3] + // + // [Metadata for Amazon Timestream] + // + // [Metadata for virtual machines] + // + // [Metadata for Amazon Aurora]: https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-aur.html#aur-restore-cli + // [Metadata for Amazon RDS]: https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-rds.html#rds-restore-cli + // [Metadata for Storage Gateway]: https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-storage-gateway.html#restoring-sgw-cli + // [Metadata for Amazon EC2]: https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-ec2.html#restoring-ec2-cli + // [Metadata for Amazon Timestream]: https://docs.aws.amazon.com/aws-backup/latest/devguide/timestream-restore.html#timestream-restore-api + // [Metadata for Amazon EBS]: https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-ebs.html#ebs-restore-cli + // [Metadata for Amazon Redshift]: https://docs.aws.amazon.com/aws-backup/latest/devguide/redshift-restores.html#redshift-restore-api + // [Metadata for Amazon DynamoDB]: https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-dynamodb.html#ddb-restore-cli + // [Metadata for Amazon Neptune]: https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-nep.html#nep-restore-cli + // [Metadata for Amazon S3]: https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-s3.html#s3-restore-cli + // [Metadata for Amazon EFS]: https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-efs.html#efs-restore-cli + // [Metadata for virtual machines]: https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-vm.html#vm-restore-cli + // [Metadata for CloudFormation]: https://docs.aws.amazon.com/aws-backup/latest/devguide/restore-application-stacks.html#restoring-cfn-cli + // [Metadata for Amazon FSx]: https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-fsx.html#fsx-restore-cli + // [Metadata for Amazon DocumentDB]: https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-docdb.html#docdb-restore-cli // // This member is required. Metadata map[string]string @@ -91,35 +111,35 @@ type StartRestoreJobInput struct { // Starts a job to restore a recovery point for one of the following resources: // - // - Aurora for Amazon Aurora + // - Aurora - Amazon Aurora // - // - DocumentDB for Amazon DocumentDB (with MongoDB compatibility) + // - DocumentDB - Amazon DocumentDB // - // - CloudFormation for CloudFormation + // - CloudFormation - CloudFormation // - // - DynamoDB for Amazon DynamoDB + // - DynamoDB - Amazon DynamoDB // - // - EBS for Amazon Elastic Block Store + // - EBS - Amazon Elastic Block Store // - // - EC2 for Amazon Elastic Compute Cloud + // - EC2 - Amazon Elastic Compute Cloud // - // - EFS for Amazon Elastic File System + // - EFS - Amazon Elastic File System // - // - FSx for Amazon FSx + // - FSx - Amazon FSx // - // - Neptune for Amazon Neptune + // - Neptune - Amazon Neptune // - // - RDS for Amazon Relational Database Service + // - RDS - Amazon Relational Database Service // - // - Redshift for Amazon Redshift + // - Redshift - Amazon Redshift // - // - Storage Gateway for Storage Gateway + // - Storage Gateway - Storage Gateway // - // - S3 for Amazon S3 + // - S3 - Amazon Simple Storage Service // - // - Timestream for Amazon Timestream + // - Timestream - Amazon Timestream // - // - VirtualMachine for virtual machines + // - VirtualMachine - Virtual machines ResourceType *string noSmithyDocumentSerde diff --git a/service/backup/api_op_StopBackupJob.go b/service/backup/api_op_StopBackupJob.go index 3aac5a8f593..a53aaac0829 100644 --- a/service/backup/api_op_StopBackupJob.go +++ b/service/backup/api_op_StopBackupJob.go @@ -13,7 +13,7 @@ import ( // Attempts to cancel a job to create a one-time backup of a resource. // // This action is not supported for the following services: Amazon FSx for Windows -// File Server, Amazon FSx for Lustre, Amazon FSx for NetApp ONTAP , Amazon FSx for +// File Server, Amazon FSx for Lustre, Amazon FSx for NetApp ONTAP, Amazon FSx for // OpenZFS, Amazon DocumentDB (with MongoDB compatibility), Amazon RDS, Amazon // Aurora, and Amazon Neptune. func (c *Client) StopBackupJob(ctx context.Context, params *StopBackupJobInput, optFns ...func(*Options)) (*StopBackupJobOutput, error) { diff --git a/service/backup/api_op_TagResource.go b/service/backup/api_op_TagResource.go index e2fb70aead9..ef009a186a0 100644 --- a/service/backup/api_op_TagResource.go +++ b/service/backup/api_op_TagResource.go @@ -12,6 +12,9 @@ import ( // Assigns a set of key-value pairs to a recovery point, backup plan, or backup // vault identified by an Amazon Resource Name (ARN). +// +// This API is supported for recovery points for resource types including Aurora, +// Amazon DocumentDB. Amazon EBS, Amazon FSx, Neptune, and Amazon RDS. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} @@ -32,6 +35,11 @@ type TagResourceInput struct { // An ARN that uniquely identifies a resource. The format of the ARN depends on // the type of the tagged resource. // + // ARNs that do not include backup are incompatible with tagging. TagResource and + // UntagResource with invalid ARNs will result in an error. Acceptable ARN content + // can include arn:aws:backup:us-east . Invalid ARN content may look like + // arn:aws:ec2:us-east . + // // This member is required. ResourceArn *string diff --git a/service/backup/api_op_UntagResource.go b/service/backup/api_op_UntagResource.go index 3692161c0af..59679c107fd 100644 --- a/service/backup/api_op_UntagResource.go +++ b/service/backup/api_op_UntagResource.go @@ -12,6 +12,9 @@ import ( // Removes a set of key-value pairs from a recovery point, backup plan, or backup // vault identified by an Amazon Resource Name (ARN) +// +// This API is not supported for recovery points for resource types including +// Aurora, Amazon DocumentDB. Amazon EBS, Amazon FSx, Neptune, and Amazon RDS. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} @@ -32,10 +35,15 @@ type UntagResourceInput struct { // An ARN that uniquely identifies a resource. The format of the ARN depends on // the type of the tagged resource. // + // ARNs that do not include backup are incompatible with tagging. TagResource and + // UntagResource with invalid ARNs will result in an error. Acceptable ARN content + // can include arn:aws:backup:us-east . Invalid ARN content may look like + // arn:aws:ec2:us-east . + // // This member is required. ResourceArn *string - // A list of keys to identify which key-value tags to remove from a resource. + // The keys to identify which key-value tags to remove from a resource. // // This member is required. TagKeyList []string diff --git a/service/backup/api_op_UpdateBackupPlan.go b/service/backup/api_op_UpdateBackupPlan.go index 40efd553f43..6ea843483c7 100644 --- a/service/backup/api_op_UpdateBackupPlan.go +++ b/service/backup/api_op_UpdateBackupPlan.go @@ -12,8 +12,8 @@ import ( "time" ) -// Updates an existing backup plan identified by its backupPlanId with the input -// document in JSON format. The new version is uniquely identified by a VersionId . +// Updates the specified backup plan. The new version is uniquely identified by +// its ID. func (c *Client) UpdateBackupPlan(ctx context.Context, params *UpdateBackupPlanInput, optFns ...func(*Options)) (*UpdateBackupPlanOutput, error) { if params == nil { params = &UpdateBackupPlanInput{} @@ -31,13 +31,13 @@ func (c *Client) UpdateBackupPlan(ctx context.Context, params *UpdateBackupPlanI type UpdateBackupPlanInput struct { - // Specifies the body of a backup plan. Includes a BackupPlanName and one or more - // sets of Rules . + // The body of a backup plan. Includes a BackupPlanName and one or more sets of + // Rules . // // This member is required. BackupPlan *types.BackupPlanInput - // Uniquely identifies a backup plan. + // The ID of the backup plan. // // This member is required. BackupPlanId *string diff --git a/service/backup/api_op_UpdateFramework.go b/service/backup/api_op_UpdateFramework.go index 925d210549e..64f26e323c5 100644 --- a/service/backup/api_op_UpdateFramework.go +++ b/service/backup/api_op_UpdateFramework.go @@ -12,8 +12,7 @@ import ( "time" ) -// Updates an existing framework identified by its FrameworkName with the input -// document in JSON format. +// Updates the specified framework. func (c *Client) UpdateFramework(ctx context.Context, params *UpdateFrameworkInput, optFns ...func(*Options)) (*UpdateFrameworkOutput, error) { if params == nil { params = &UpdateFrameworkInput{} @@ -38,8 +37,8 @@ type UpdateFrameworkInput struct { // This member is required. FrameworkName *string - // A list of the controls that make up the framework. Each control in the list has - // a name, input parameters, and scope. + // The controls that make up the framework. Each control in the list has a name, + // input parameters, and scope. FrameworkControls []types.FrameworkControl // An optional description of the framework with a maximum 1,024 characters. diff --git a/service/backup/api_op_UpdateRecoveryPointLifecycle.go b/service/backup/api_op_UpdateRecoveryPointLifecycle.go index 51c1dfb74f2..c7547f89e06 100644 --- a/service/backup/api_op_UpdateRecoveryPointLifecycle.go +++ b/service/backup/api_op_UpdateRecoveryPointLifecycle.go @@ -17,18 +17,22 @@ import ( // and when it expires. Backup transitions and expires backups automatically // according to the lifecycle that you define. // +// Resource types that can transition to cold storage are listed in the [Feature availability by resource] table. +// Backup ignores this expression for other resource types. +// // Backups transitioned to cold storage must be stored in cold storage for a // minimum of 90 days. Therefore, the “retention” setting must be 90 days greater // than the “transition to cold after days” setting. The “transition to cold after // days” setting cannot be changed after a backup has been transitioned to cold. // -// Resource types that are able to be transitioned to cold storage are listed in -// the "Lifecycle to cold storage" section of the [Feature availability by resource]table. Backup ignores this -// expression for other resource types. +// If your lifecycle currently uses the parameters DeleteAfterDays and +// MoveToColdStorageAfterDays , include these parameters and their values when you +// call this operation. Not including them may result in your plan updating with +// null values. // // This operation does not support continuous backups. // -// [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource +// [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource func (c *Client) UpdateRecoveryPointLifecycle(ctx context.Context, params *UpdateRecoveryPointLifecycleInput, optFns ...func(*Options)) (*UpdateRecoveryPointLifecycleOutput, error) { if params == nil { params = &UpdateRecoveryPointLifecycleInput{} @@ -48,8 +52,7 @@ type UpdateRecoveryPointLifecycleInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // This member is required. BackupVaultName *string @@ -78,7 +81,7 @@ type UpdateRecoveryPointLifecycleInput struct { type UpdateRecoveryPointLifecycleOutput struct { // An ARN that uniquely identifies a backup vault; for example, - // arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . BackupVaultArn *string // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt @@ -94,11 +97,10 @@ type UpdateRecoveryPointLifecycleOutput struct { // than the “transition to cold after days” setting. The “transition to cold after // days” setting cannot be changed after a backup has been transitioned to cold. // - // Resource types that are able to be transitioned to cold storage are listed in - // the "Lifecycle to cold storage" section of the [Feature availability by resource]table. Backup ignores this - // expression for other resource types. + // Resource types that can transition to cold storage are listed in the [Feature availability by resource] table. + // Backup ignores this expression for other resource types. // - // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource + // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource Lifecycle *types.Lifecycle // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for diff --git a/service/backup/api_op_UpdateReportPlan.go b/service/backup/api_op_UpdateReportPlan.go index 056d2cb54cb..5af02d38fff 100644 --- a/service/backup/api_op_UpdateReportPlan.go +++ b/service/backup/api_op_UpdateReportPlan.go @@ -12,8 +12,7 @@ import ( "time" ) -// Updates an existing report plan identified by its ReportPlanName with the input -// document in JSON format. +// Updates the specified report plan. func (c *Client) UpdateReportPlan(ctx context.Context, params *UpdateReportPlanInput, optFns ...func(*Options)) (*UpdateReportPlanOutput, error) { if params == nil { params = &UpdateReportPlanInput{} @@ -43,16 +42,15 @@ type UpdateReportPlanInput struct { // the same idempotency token results in a success message with no action taken. IdempotencyToken *string - // A structure that contains information about where to deliver your reports, - // specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your - // reports. + // The information about where to deliver your reports, specifically your Amazon + // S3 bucket name, S3 key prefix, and the formats of your reports. ReportDeliveryChannel *types.ReportDeliveryChannel // An optional description of the report plan with a maximum 1,024 characters. ReportPlanDescription *string - // Identifies the report template for the report. Reports are built using a report - // template. The report templates are: + // The report template for the report. Reports are built using a report template. + // The report templates are: // // RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | // COPY_JOB_REPORT | RESTORE_JOB_REPORT diff --git a/service/backup/api_op_UpdateRestoreTestingPlan.go b/service/backup/api_op_UpdateRestoreTestingPlan.go index 44ef477acdb..22ad0208a8b 100644 --- a/service/backup/api_op_UpdateRestoreTestingPlan.go +++ b/service/backup/api_op_UpdateRestoreTestingPlan.go @@ -48,7 +48,7 @@ type UpdateRestoreTestingPlanInput struct { // This member is required. RestoreTestingPlan *types.RestoreTestingPlanForUpdate - // This is the restore testing plan name you wish to update. + // The name of the restore testing plan name. // // This member is required. RestoreTestingPlanName *string @@ -58,7 +58,7 @@ type UpdateRestoreTestingPlanInput struct { type UpdateRestoreTestingPlanOutput struct { - // This is the time the resource testing plan was created. + // The time the resource testing plan was created. // // This member is required. CreationTime *time.Time @@ -74,7 +74,7 @@ type UpdateRestoreTestingPlanOutput struct { // This member is required. RestoreTestingPlanName *string - // This is the time the update completed for the restore testing plan. + // The time the update completed for the restore testing plan. // // This member is required. UpdateTime *time.Time diff --git a/service/backup/api_op_UpdateRestoreTestingSelection.go b/service/backup/api_op_UpdateRestoreTestingSelection.go index aea0ab0468a..4c53bfd061b 100644 --- a/service/backup/api_op_UpdateRestoreTestingSelection.go +++ b/service/backup/api_op_UpdateRestoreTestingSelection.go @@ -12,12 +12,12 @@ import ( "time" ) +// Updates the specified restore testing selection. +// // Most elements except the RestoreTestingSelectionName can be updated with this // request. // -// RestoreTestingSelection can use either protected resource ARNs or conditions, -// but not both. That is, if your selection has ProtectedResourceArns , requesting -// an update with the parameter ProtectedResourceConditions will be unsuccessful. +// You can use either protected resource ARNs or conditions, but not both. func (c *Client) UpdateRestoreTestingSelection(ctx context.Context, params *UpdateRestoreTestingSelectionInput, optFns ...func(*Options)) (*UpdateRestoreTestingSelectionOutput, error) { if params == nil { params = &UpdateRestoreTestingSelectionInput{} @@ -48,8 +48,8 @@ type UpdateRestoreTestingSelectionInput struct { // This member is required. RestoreTestingSelection *types.RestoreTestingSelectionForUpdate - // This is the required restore testing selection name of the restore testing - // selection you wish to update. + // The required restore testing selection name of the restore testing selection + // you wish to update. // // This member is required. RestoreTestingSelectionName *string @@ -59,7 +59,7 @@ type UpdateRestoreTestingSelectionInput struct { type UpdateRestoreTestingSelectionOutput struct { - // This is the time the resource testing selection was updated successfully. + // The time the resource testing selection was updated successfully. // // This member is required. CreationTime *time.Time @@ -69,18 +69,18 @@ type UpdateRestoreTestingSelectionOutput struct { // This member is required. RestoreTestingPlanArn *string - // This is the restore testing plan with which the updated restore testing - // selection is associated. + // The restore testing plan with which the updated restore testing selection is + // associated. // // This member is required. RestoreTestingPlanName *string - // This is the returned restore testing selection name. + // The returned restore testing selection name. // // This member is required. RestoreTestingSelectionName *string - // This is the time the update completed for the restore testing selection. + // The time the update completed for the restore testing selection. // // This member is required. UpdateTime *time.Time diff --git a/service/backup/deserializers.go b/service/backup/deserializers.go index c7a11e1a997..b8d4d598e33 100644 --- a/service/backup/deserializers.go +++ b/service/backup/deserializers.go @@ -3743,6 +3743,15 @@ func awsRestjson1_deserializeOpDocumentDescribeBackupVaultOutput(v **DescribeBac sv.NumberOfRecoveryPoints = i64 } + case "VaultState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VaultState to be of type string, got %T instead", value) + } + sv.VaultState = types.VaultState(jtv) + } + case "VaultType": if value != nil { jtv, ok := value.(string) @@ -17124,6 +17133,24 @@ func awsRestjson1_deserializeDocumentBackupVaultListMember(v **types.BackupVault sv.NumberOfRecoveryPoints = i64 } + case "VaultState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VaultState to be of type string, got %T instead", value) + } + sv.VaultState = types.VaultState(jtv) + } + + case "VaultType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VaultType to be of type string, got %T instead", value) + } + sv.VaultType = types.VaultType(jtv) + } + default: _, _ = key, value diff --git a/service/backup/types/types.go b/service/backup/types/types.go index d5b5ab99a53..b5728a36e2b 100644 --- a/service/backup/types/types.go +++ b/service/backup/types/types.go @@ -7,7 +7,7 @@ import ( "time" ) -// A list of backup options for each resource type. +// The backup options for each resource type. type AdvancedBackupSetting struct { // Specifies the backup option for a selected resource. This option is only @@ -66,13 +66,12 @@ type BackupJob struct { BackupType *string // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . BackupVaultArn *string // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. BackupVaultName *string // The size in bytes transferred to a backup vault at the time that the job status @@ -108,7 +107,7 @@ type BackupJob struct { // names without those strings lack permissions to perform backup jobs. IamRoleArn *string - // This is the date on which the backup job was initiated. + // The date on which the backup job was initiated. InitiationDate *time.Time // This is a boolean value indicating this is a parent (composite) backup job. @@ -144,8 +143,7 @@ type BackupJob struct { // the resource type. ResourceArn *string - // This is the non-unique name of the resource that belongs to the specified - // backup. + // The non-unique name of the resource that belongs to the specified backup. ResourceName *string // The type of Amazon Web Services resource to be backed up; for example, an @@ -230,8 +228,11 @@ type BackupJobSummary struct { // Services resources. type BackupPlan struct { - // The display name of a backup plan. Must contain 1 to 50 alphanumeric or '-_.' - // characters. + // The display name of a backup plan. Must contain only alphanumeric or '-_.' + // special characters. + // + // If this is set in the console, it can contain 1 to 50 characters; if this is + // set through CLI or API, it can contain 1 to 200 characters. // // This member is required. BackupPlanName *string @@ -308,10 +309,10 @@ type BackupPlansListMember struct { // 12:11:30.087 AM. DeletionDate *time.Time - // The last time a job to back up resources was run with this rule. A date and - // time, in Unix format and Coordinated Universal Time (UTC). The value of - // LastExecutionDate is accurate to milliseconds. For example, the value - // 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. + // The last time this backup plan was run. A date and time, in Unix format and + // Coordinated Universal Time (UTC). The value of LastExecutionDate is accurate to + // milliseconds. For example, the value 1516925490.087 represents Friday, January + // 26, 2018 12:11:30.087 AM. LastExecutionDate *time.Time // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most @@ -344,8 +345,7 @@ type BackupRule struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // This member is required. TargetBackupVaultName *string @@ -372,15 +372,14 @@ type BackupRule struct { // than the “transition to cold after days” setting. The “transition to cold after // days” setting cannot be changed after a backup has been transitioned to cold. // - // Resource types that are able to be transitioned to cold storage are listed in - // the "Lifecycle to cold storage" section of the [Feature availability by resource]table. Backup ignores this - // expression for other resource types. + // Resource types that can transition to cold storage are listed in the [Feature availability by resource] table. + // Backup ignores this expression for other resource types. // - // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource + // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource Lifecycle *Lifecycle - // An array of key-value pair strings that are assigned to resources that are - // associated with this rule when restored from backup. + // The tags that are assigned to resources that are associated with this rule when + // restored from backup. RecoveryPointTags map[string]string // Uniquely identifies a rule that is used to schedule the backup of a selection @@ -397,7 +396,7 @@ type BackupRule struct { // [Schedule Expressions for Rules]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html ScheduleExpression *string - // This is the timezone in which the schedule expression is set. By default, + // The timezone in which the schedule expression is set. By default, // ScheduleExpressions are in UTC. You can modify this to a specified timezone. ScheduleExpressionTimezone *string @@ -428,8 +427,7 @@ type BackupRuleInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. // // This member is required. TargetBackupVaultName *string @@ -454,25 +452,24 @@ type BackupRuleInput struct { // Backups transitioned to cold storage must be stored in cold storage for a // minimum of 90 days. Therefore, the “retention” setting must be 90 days greater // than the “transition to cold after days” setting. The “transition to cold after - // days” setting cannot be changed after a backup has been transitioned to cold. + // days” setting cannot be changed after a backup has been transitioned to cold + // storage. // - // Resource types that are able to be transitioned to cold storage are listed in - // the "Lifecycle to cold storage" section of the [Feature availability by resource]table. Backup ignores this - // expression for other resource types. + // Resource types that can transition to cold storage are listed in the [Feature availability by resource] table. + // Backup ignores this expression for other resource types. // // This parameter has a maximum value of 100 years (36,500 days). // - // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource + // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource Lifecycle *Lifecycle - // To help organize your resources, you can assign your own metadata to the - // resources that you create. Each tag is a key-value pair. + // The tags to assign to the resources. RecoveryPointTags map[string]string // A CRON expression in UTC specifying when Backup initiates a backup job. ScheduleExpression *string - // This is the timezone in which the schedule expression is set. By default, + // The timezone in which the schedule expression is set. By default, // ScheduleExpressions are in UTC. You can modify this to a specified timezone. ScheduleExpressionTimezone *string @@ -496,10 +493,13 @@ type BackupRuleInput struct { // Used to specify a set of resources to a backup plan. // -// Specifying your desired Conditions , ListOfTags , NotResources , and/or -// Resources is recommended. If none of these are specified, Backup will attempt to -// select all supported and opted-in storage resources, which could have unintended -// cost implications. +// We recommend that you specify conditions, tags, or resources to include or +// exclude. Otherwise, Backup attempts to select all supported and opted-in storage +// resources, which could have unintended cost implications. +// +// For more information, see [Assigning resources programmatically]. +// +// [Assigning resources programmatically]: https://docs.aws.amazon.com/aws-backup/latest/devguide/assigning-resources.html#assigning-resources-json type BackupSelection struct { // The ARN of the IAM role that Backup uses to authenticate when backing up the @@ -514,48 +514,45 @@ type BackupSelection struct { // This member is required. SelectionName *string - // A list of conditions that you define to assign resources to your backup plans - // using tags. For example, "StringEquals": { "Key": - // "aws:ResourceTag/CreatedByCryo", "Value": "true" }, . Condition operators are - // case sensitive. - // - // Conditions differs from ListOfTags as follows: + // The conditions that you define to assign resources to your backup plans using + // tags. For example, "StringEquals": { "ConditionKey": "aws:ResourceTag/backup", + // "ConditionValue": "daily" } . // - // - When you specify more than one condition, you only assign the resources - // that match ALL conditions (using AND logic). + // Conditions supports StringEquals , StringLike , StringNotEquals , and + // StringNotLike . Condition operators are case sensitive. // - // - Conditions supports StringEquals , StringLike , StringNotEquals , and - // StringNotLike . ListOfTags only supports StringEquals . + // If you specify multiple conditions, the resources much match all conditions + // (AND logic). Conditions *Conditions - // A list of conditions that you define to assign resources to your backup plans - // using tags. For example, "StringEquals": { "Key": - // "aws:ResourceTag/CreatedByCryo", "Value": "true" }, . Condition operators are - // case sensitive. + // The conditions that you define to assign resources to your backup plans using + // tags. For example, "StringEquals": { "ConditionKey": "backup", + // "ConditionValue": "daily"} . // - // ListOfTags differs from Conditions as follows: + // ListOfTags supports only StringEquals . Condition operators are case sensitive. // - // - When you specify more than one condition, you assign all resources that - // match AT LEAST ONE condition (using OR logic). - // - // - ListOfTags only supports StringEquals . Conditions supports StringEquals , - // StringLike , StringNotEquals , and StringNotLike . + // If you specify multiple conditions, the resources much match any of the + // conditions (OR logic). ListOfTags []Condition - // A list of Amazon Resource Names (ARNs) to exclude from a backup plan. The - // maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards. + // The Amazon Resource Names (ARNs) of the resources to exclude from a backup + // plan. The maximum number of ARNs is 500 without wildcards, or 30 ARNs with + // wildcards. // // If you need to exclude many resources from a backup plan, consider a different // resource selection strategy, such as assigning only one or a few resource types // or refining your resource selection using tags. NotResources []string - // A list of Amazon Resource Names (ARNs) to assign to a backup plan. The maximum - // number of ARNs is 500 without wildcards, or 30 ARNs with wildcards. + // The Amazon Resource Names (ARNs) of the resources to assign to a backup plan. + // The maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards. // // If you need to assign many resources to a backup plan, consider a different // resource selection strategy, such as assigning all resources of a resource type // or refining your resource selection using tags. + // + // If you specify multiple ARNs, the resources much match any of the ARNs (OR + // logic). Resources []string noSmithyDocumentSerde @@ -597,13 +594,12 @@ type BackupSelectionsListMember struct { type BackupVaultListMember struct { // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . BackupVaultArn *string // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. BackupVaultName *string // The date and time a resource backup is created, in Unix format and Coordinated @@ -677,6 +673,12 @@ type BackupVaultListMember struct { // The number of recovery points that are stored in a backup vault. NumberOfRecoveryPoints int64 + // The current state of the vault. + VaultState VaultState + + // The type of vault in which the described recovery point is stored. + VaultType VaultType + noSmithyDocumentSerde } @@ -692,11 +694,10 @@ type BackupVaultListMember struct { // than the “transition to cold after days” setting. The “transition to cold after // days” setting cannot be changed after a backup has been transitioned to cold. // -// Resource types that are able to be transitioned to cold storage are listed in -// the "Lifecycle to cold storage" section of the [Feature availability by resource]table. Backup ignores this -// expression for other resource types. +// Resource types that can transition to cold storage are listed in the [Feature availability by resource] table. +// Backup ignores this expression for other resource types. // -// [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource +// [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource type CalculatedLifecycle struct { // A timestamp that specifies when to delete a recovery point. @@ -740,6 +741,9 @@ type Condition struct { // Includes information about tags you define to assign tagged resources to a // backup plan. +// +// Include the prefix aws:ResourceTag in your tags. For example, +// "aws:ResourceTag/TagKey1": "Value1" . type ConditionParameter struct { // The key in a key-value pair. For example, in the tag Department: Accounting , @@ -777,8 +781,8 @@ type Conditions struct { noSmithyDocumentSerde } -// A list of parameters for a control. A control can have zero, one, or more than -// one parameter. An example of a control with two parameters is: "backup plan +// The parameters for a control. A control can have zero, one, or more than one +// parameter. An example of a control with two parameters is: "backup plan // frequency is at least daily and the retention period is at least 1 year ". The // first parameter is daily . The second parameter is 1 year . type ControlInputParameter struct { @@ -812,8 +816,11 @@ type ControlScope struct { // The tag key-value pair applied to those Amazon Web Services resources that you // want to trigger an evaluation for a rule. A maximum of one key-value pair can be - // provided. The tag value is optional, but it cannot be an empty string. The - // structure to assign a tag is: [{"Key":"string","Value":"string"}] . + // provided. The tag value is optional, but it cannot be an empty string if you are + // creating or editing a framework from the console (though the value can be an + // empty string when included in a CloudFormation template). + // + // The structure to assign a tag is: [{"Key":"string","Value":"string"}] . Tags map[string]string noSmithyDocumentSerde @@ -824,25 +831,28 @@ type CopyAction struct { // An Amazon Resource Name (ARN) that uniquely identifies the destination backup // vault for the copied backup. For example, - // arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . // // This member is required. DestinationBackupVaultArn *string - // Contains an array of Transition objects specifying how long in days before a - // recovery point transitions to cold storage or is deleted. + // Specifies the time period, in days, before a recovery point transitions to cold + // storage or is deleted. // // Backups transitioned to cold storage must be stored in cold storage for a - // minimum of 90 days. Therefore, on the console, the “retention” setting must be - // 90 days greater than the “transition to cold after days” setting. The - // “transition to cold after days” setting cannot be changed after a backup has - // been transitioned to cold. + // minimum of 90 days. Therefore, on the console, the retention setting must be 90 + // days greater than the transition to cold after days setting. The transition to + // cold after days setting can't be changed after a backup has been transitioned to + // cold. + // + // Resource types that can transition to cold storage are listed in the [Feature availability by resource] table. + // Backup ignores this expression for other resource types. // - // Resource types that are able to be transitioned to cold storage are listed in - // the "Lifecycle to cold storage" section of the [Feature availability by resource]table. Backup ignores this - // expression for other resource types. + // To remove the existing lifecycle and retention periods and keep your recovery + // points indefinitely, specify -1 for MoveToColdStorageAfterDays and + // DeleteAfterDays . // - // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource + // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource Lifecycle *Lifecycle noSmithyDocumentSerde @@ -866,9 +876,9 @@ type CopyJob struct { // 12:11:30.087 AM. CompletionDate *time.Time - // This is the identifier of a resource within a composite group, such as nested - // (child) recovery point belonging to a composite (parent) stack. The ID is - // transferred from the [logical ID]within a stack. + // The identifier of a resource within a composite group, such as nested (child) + // recovery point belonging to a composite (parent) stack. The ID is transferred + // from the [logical ID]within a stack. // // [logical ID]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html#resources-section-structure-syntax CompositeMemberIdentifier *string @@ -887,7 +897,8 @@ type CopyJob struct { CreationDate *time.Time // An Amazon Resource Name (ARN) that uniquely identifies a destination copy - // vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // vault; for example, + // arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . DestinationBackupVaultArn *string // An ARN that uniquely identifies a destination recovery point; for example, @@ -915,7 +926,7 @@ type CopyJob struct { // [Monitoring]: https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html MessageCategory *string - // This is the number of child (nested) copy jobs. + // The number of child (nested) copy jobs. NumberOfChildJobs *int64 // This uniquely identifies a request to Backup to copy a resource. The return @@ -927,8 +938,7 @@ type CopyJob struct { // RDS) database. ResourceArn *string - // This is the non-unique name of the resource that belongs to the specified - // backup. + // The non-unique name of the resource that belongs to the specified backup. ResourceName *string // The type of Amazon Web Services resource to be copied; for example, an Amazon @@ -937,7 +947,7 @@ type CopyJob struct { ResourceType *string // An Amazon Resource Name (ARN) that uniquely identifies a source copy vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . SourceBackupVaultArn *string // An ARN that uniquely identifies a source recovery point; for example, @@ -987,7 +997,7 @@ type CopyJobSummary struct { // [Monitoring]: https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html MessageCategory *string - // This is the Amazon Web Services Regions within the job summary. + // The Amazon Web Services Regions within the job summary. Region *string // This value is the job count for the specified resource type. The request @@ -1078,7 +1088,7 @@ type FrameworkControl struct { // This member is required. ControlName *string - // A list of ParameterName and ParameterValue pairs. + // The name/value pairs. ControlInputParameters []ControlInputParameter // The scope of a control. The control scope defines what the control will @@ -1128,61 +1138,62 @@ type KeyValue struct { // filtered by resource types and by resource IDs. type LegalHold struct { - // This is the time in number format when legal hold was cancelled. + // The time when the legal hold was cancelled. CancellationDate *time.Time - // This is the time in number format when legal hold was created. + // The time when the legal hold was created. CreationDate *time.Time - // This is the description of a legal hold. + // The description of a legal hold. Description *string - // This is an Amazon Resource Number (ARN) that uniquely identifies the legal - // hold; for example, + // The Amazon Resource Name (ARN) of the legal hold; for example, // arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45 // . LegalHoldArn *string - // ID of specific legal hold on one or more recovery points. + // The ID of the legal hold. LegalHoldId *string - // This is the status of the legal hold. Statuses can be ACTIVE , CREATING , - // CANCELED , and CANCELING . + // The status of the legal hold. Status LegalHoldStatus - // This is the title of a legal hold. + // The title of a legal hold. Title *string noSmithyDocumentSerde } -// Contains an array of Transition objects specifying how long in days before a -// recovery point transitions to cold storage or is deleted. +// Specifies the time period, in days, before a recovery point transitions to cold +// storage or is deleted. // // Backups transitioned to cold storage must be stored in cold storage for a -// minimum of 90 days. Therefore, on the console, the “retention” setting must be -// 90 days greater than the “transition to cold after days” setting. The -// “transition to cold after days” setting cannot be changed after a backup has -// been transitioned to cold. +// minimum of 90 days. Therefore, on the console, the retention setting must be 90 +// days greater than the transition to cold after days setting. The transition to +// cold after days setting can't be changed after a backup has been transitioned to +// cold. // -// Resource types that are able to be transitioned to cold storage are listed in -// the "Lifecycle to cold storage" section of the [Feature availability by resource]table. Backup ignores this -// expression for other resource types. +// Resource types that can transition to cold storage are listed in the [Feature availability by resource] table. +// Backup ignores this expression for other resource types. // -// [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource +// To remove the existing lifecycle and retention periods and keep your recovery +// points indefinitely, specify -1 for MoveToColdStorageAfterDays and +// DeleteAfterDays . +// +// [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource type Lifecycle struct { - // Specifies the number of days after creation that a recovery point is deleted. - // Must be greater than 90 days plus MoveToColdStorageAfterDays . + // The number of days after creation that a recovery point is deleted. This value + // must be at least 90 days after the number of days specified in + // MoveToColdStorageAfterDays . DeleteAfterDays *int64 - // Specifies the number of days after creation that a recovery point is moved to - // cold storage. + // The number of days after creation that a recovery point is moved to cold + // storage. MoveToColdStorageAfterDays *int64 - // Optional Boolean. If this is true, this setting will instruct your backup plan - // to transition supported resources to archive (cold) storage tier in accordance - // with your lifecycle settings. + // If the value is true, your backup plan transitions supported resources to + // archive (cold) storage tier in accordance with your lifecycle settings. OptInToArchiveForSupportedResources *bool noSmithyDocumentSerde @@ -1197,19 +1208,18 @@ type ProtectedResource struct { // 12:11:30.087 AM. LastBackupTime *time.Time - // This is the ARN (Amazon Resource Name) of the backup vault that contains the - // most recent backup recovery point. + // The ARN (Amazon Resource Name) of the backup vault that contains the most + // recent backup recovery point. LastBackupVaultArn *string - // This is the ARN (Amazon Resource Name) of the most recent recovery point. + // The ARN (Amazon Resource Name) of the most recent recovery point. LastRecoveryPointArn *string // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format // of the ARN depends on the resource type. ResourceArn *string - // This is the non-unique name of the resource that belongs to the specified - // backup. + // The non-unique name of the resource that belongs to the specified backup. ResourceName *string // The type of Amazon Web Services resource; for example, an Amazon Elastic Block @@ -1221,11 +1231,8 @@ type ProtectedResource struct { noSmithyDocumentSerde } -// A list of conditions that you define for resources in your restore testing plan -// using tags. -// -// For example, "StringEquals": { "Key": "aws:ResourceTag/CreatedByCryo", "Value": -// "true" }, . Condition operators are case sensitive. +// The conditions that you define for resources in your restore testing plan using +// tags. type ProtectedResourceConditions struct { // Filters the values of your tagged resources for only those resources that you @@ -1247,13 +1254,12 @@ type RecoveryPointByBackupVault struct { BackupSizeInBytes *int64 // An ARN that uniquely identifies a backup vault; for example, - // arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . + // arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault . BackupVaultArn *string // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. BackupVaultName *string // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt @@ -1266,9 +1272,9 @@ type RecoveryPointByBackupVault struct { // Friday, January 26, 2018 12:11:30.087 AM. CompletionDate *time.Time - // This is the identifier of a resource within a composite group, such as nested - // (child) recovery point belonging to a composite (parent) stack. The ID is - // transferred from the [logical ID]within a stack. + // The identifier of a resource within a composite group, such as nested (child) + // recovery point belonging to a composite (parent) stack. The ID is transferred + // from the [logical ID]within a stack. // // [logical ID]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html#resources-section-structure-syntax CompositeMemberIdentifier *string @@ -1315,14 +1321,13 @@ type RecoveryPointByBackupVault struct { // than the “transition to cold after days” setting. The “transition to cold after // days” setting cannot be changed after a backup has been transitioned to cold. // - // Resource types that are able to be transitioned to cold storage are listed in - // the "Lifecycle to cold storage" section of the [Feature availability by resource]table. Backup ignores this - // expression for other resource types. + // Resource types that can transition to cold storage are listed in the [Feature availability by resource] table. + // Backup ignores this expression for other resource types. // - // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource + // [Feature availability by resource]: https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource Lifecycle *Lifecycle - // This is the Amazon Resource Name (ARN) of the parent (composite) recovery point. + // The Amazon Resource Name (ARN) of the parent (composite) recovery point. ParentRecoveryPointArn *string // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for @@ -1335,8 +1340,7 @@ type RecoveryPointByBackupVault struct { // the resource type. ResourceArn *string - // This is the non-unique name of the resource that belongs to the specified - // backup. + // The non-unique name of the resource that belongs to the specified backup. ResourceName *string // The type of Amazon Web Services resource saved as a recovery point; for @@ -1352,10 +1356,10 @@ type RecoveryPointByBackupVault struct { // A status code specifying the state of the recovery point. Status RecoveryPointStatus - // A message explaining the reason of the recovery point deletion failure. + // A message explaining the current status of the recovery point. StatusMessage *string - // This is the type of vault in which the described recovery point is stored. + // The type of vault in which the described recovery point is stored. VaultType VaultType noSmithyDocumentSerde @@ -1369,8 +1373,7 @@ type RecoveryPointByResource struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the - // Amazon Web Services Region where they are created. They consist of lowercase - // letters, numbers, and hyphens. + // Amazon Web Services Region where they are created. BackupVaultName *string // The date and time a recovery point is created, in Unix format and Coordinated @@ -1387,7 +1390,7 @@ type RecoveryPointByResource struct { // This is a boolean value indicating this is a parent (composite) recovery point. IsParent bool - // This is the Amazon Resource Name (ARN) of the parent (composite) recovery point. + // The Amazon Resource Name (ARN) of the parent (composite) recovery point. ParentRecoveryPointArn *string // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for @@ -1396,17 +1399,16 @@ type RecoveryPointByResource struct { // . RecoveryPointArn *string - // This is the non-unique name of the resource that belongs to the specified - // backup. + // The non-unique name of the resource that belongs to the specified backup. ResourceName *string // A status code specifying the state of the recovery point. Status RecoveryPointStatus - // A message explaining the reason of the recovery point deletion failure. + // A message explaining the current status of the recovery point. StatusMessage *string - // This is the type of vault in which the described recovery point is stored. + // The type of vault in which the described recovery point is stored. VaultType VaultType noSmithyDocumentSerde @@ -1441,18 +1443,17 @@ type RecoveryPointCreator struct { // member. type RecoveryPointMember struct { - // This is the name of the backup vault (the logical container in which backups - // are stored). + // The name of the backup vault (the logical container in which backups are + // stored). BackupVaultName *string - // This is the Amazon Resource Name (ARN) of the parent (composite) recovery point. + // The Amazon Resource Name (ARN) of the parent (composite) recovery point. RecoveryPointArn *string - // This is the Amazon Resource Name (ARN) that uniquely identifies a saved - // resource. + // The Amazon Resource Name (ARN) that uniquely identifies a saved resource. ResourceArn *string - // This is the Amazon Web Services resource type that is saved as a recovery point. + // The Amazon Web Services resource type that is saved as a recovery point. ResourceType *string noSmithyDocumentSerde @@ -1491,8 +1492,8 @@ type ReportDeliveryChannel struct { // This member is required. S3BucketName *string - // A list of the format of your reports: CSV , JSON , or both. If not specified, - // the default format is CSV . + // The format of your reports: CSV , JSON , or both. If not specified, the default + // format is CSV . Formats []string // The prefix for where Backup Audit Manager delivers your reports to Amazon S3. @@ -1635,6 +1636,8 @@ type ReportSetting struct { ReportTemplate *string // These are the accounts to be included in the report. + // + // Use string value of ROOT to include all organizational units. Accounts []string // The Amazon Resource Names (ARNs) of the frameworks a report covers. @@ -1647,6 +1650,8 @@ type ReportSetting struct { OrganizationUnits []string // These are the Regions to be included in the report. + // + // Use the wildcard as the string value to include all Regions. Regions []string noSmithyDocumentSerde @@ -1701,8 +1706,8 @@ type RestoreJobsListMember struct { // to take. ExpectedCompletionTimeMinutes *int64 - // Specifies the IAM role ARN used to create the target recovery point; for - // example, arn:aws:iam::123456789012:role/S3Access . + // The IAM role ARN used to create the target recovery point; for example, + // arn:aws:iam::123456789012:role/S3Access . IamRoleArn *string // Contains an estimated percentage complete of a job at the time the job status @@ -1733,7 +1738,7 @@ type RestoreJobsListMember struct { // A detailed message explaining the status of the job to restore a recovery point. StatusMessage *string - // This is the status of validation run on the indicated restore job. + // The status of validation run on the indicated restore job. ValidationStatus RestoreValidationStatus // This describes the status of validation run on the indicated restore job. @@ -1785,9 +1790,32 @@ type RestoreJobSummary struct { // This contains metadata about a restore testing plan. type RestoreTestingPlanForCreate struct { - // Required: Algorithm; Required: Recovery point types; IncludeVaults (one or - // more). Optional: SelectionWindowDays ('30' if not specified); ExcludeVaults - // (list of selectors), defaults to empty list if not listed. + // RecoveryPointSelection has five parameters (three required and two optional). + // The values you specify determine which recovery point is included in the restore + // test. You must indicate with Algorithm if you want the latest recovery point + // within your SelectionWindowDays or if you want a random recovery point, and you + // must indicate through IncludeVaults from which vaults the recovery points can + // be chosen. + // + // Algorithm (required) Valid values: " LATEST_WITHIN_WINDOW " or " + // RANDOM_WITHIN_WINDOW ". + // + // Recovery point types (required) Valid values: " SNAPSHOT " and/or " CONTINUOUS + // ". Include SNAPSHOT to restore only snapshot recovery points; include CONTINUOUS + // to restore continuous recovery points (point in time restore / PITR); use both + // to restore either a snapshot or a continuous recovery point. The recovery point + // will be determined by the value for Algorithm . + // + // IncludeVaults (required). You must include one or more backup vaults. Use the + // wildcard ["*"] or specific ARNs. + // + // SelectionWindowDays (optional) Value must be an integer (in days) from 1 to + // 365. If not included, the value defaults to 30 . + // + // ExcludeVaults (optional). You can choose to input one or more specific backup + // vault ARNs to exclude those vaults' contents from restore eligibility. Or, you + // can include a list of selectors. If this parameter and its value are not + // included, it defaults to empty list. // // This member is required. RecoveryPointSelection *RestoreTestingRecoveryPointSelection @@ -1841,7 +1869,7 @@ type RestoreTestingPlanForGet struct { // This member is required. RestoreTestingPlanArn *string - // This is the restore testing plan name. + // The restore testing plan name. // // This member is required. RestoreTestingPlanName *string @@ -1902,7 +1930,7 @@ type RestoreTestingPlanForList struct { // This member is required. RestoreTestingPlanArn *string - // This is the restore testing plan name. + // The restore testing plan name. // // This member is required. RestoreTestingPlanName *string @@ -1966,9 +1994,32 @@ type RestoreTestingPlanForUpdate struct { noSmithyDocumentSerde } -// Required: Algorithm; Required: Recovery point types; IncludeVaults(one or -// more). Optional: SelectionWindowDays ('30' if not specified);ExcludeVaults (list -// of selectors), defaults to empty list if not listed. +// RecoveryPointSelection has five parameters (three required and two optional). +// The values you specify determine which recovery point is included in the restore +// test. You must indicate with Algorithm if you want the latest recovery point +// within your SelectionWindowDays or if you want a random recovery point, and you +// must indicate through IncludeVaults from which vaults the recovery points can +// be chosen. +// +// Algorithm (required) Valid values: " LATEST_WITHIN_WINDOW " or " +// RANDOM_WITHIN_WINDOW ". +// +// Recovery point types (required) Valid values: " SNAPSHOT " and/or " CONTINUOUS +// ". Include SNAPSHOT to restore only snapshot recovery points; include CONTINUOUS +// to restore continuous recovery points (point in time restore / PITR); use both +// to restore either a snapshot or a continuous recovery point. The recovery point +// will be determined by the value for Algorithm . +// +// IncludeVaults (required). You must include one or more backup vaults. Use the +// wildcard ["*"] or specific ARNs. +// +// SelectionWindowDays (optional) Value must be an integer (in days) from 1 to +// 365. If not included, the value defaults to 30 . +// +// ExcludeVaults (optional). You can choose to input one or more specific backup +// vault ARNs to exclude those vaults' contents from restore eligibility. Or, you +// can include a list of selectors. If this parameter and its value are not +// included, it defaults to empty list. type RestoreTestingRecoveryPointSelection struct { // Acceptable values include "LATEST_WITHIN_WINDOW" or "RANDOM_WITHIN_WINDOW" @@ -1984,6 +2035,11 @@ type RestoreTestingRecoveryPointSelection struct { IncludeVaults []string // These are the types of recovery points. + // + // Include SNAPSHOT to restore only snapshot recovery points; include CONTINUOUS + // to restore continuous recovery points (point in time restore / PITR); use both + // to restore either a snapshot or a continuous recovery point. The recovery point + // will be determined by the value for Algorithm . RecoveryPointTypes []RestoreTestingRecoveryPointType // Accepted values are integers from 1 to 365. @@ -2048,8 +2104,8 @@ type RestoreTestingSelectionForCreate struct { // This member is required. ProtectedResourceType *string - // This is the unique name of the restore testing selection that belongs to the - // related restore testing plan. + // The unique name of the restore testing selection that belongs to the related + // restore testing plan. // // This member is required. RestoreTestingSelectionName *string @@ -2110,8 +2166,8 @@ type RestoreTestingSelectionForGet struct { // This member is required. RestoreTestingPlanName *string - // This is the unique name of the restore testing selection that belongs to the - // related restore testing plan. + // The unique name of the restore testing selection that belongs to the related + // restore testing plan. // // This member is required. RestoreTestingSelectionName *string @@ -2153,10 +2209,10 @@ type RestoreTestingSelectionForGet struct { // This contains metadata about a restore testing selection. type RestoreTestingSelectionForList struct { - // This is the date and time that a restore testing selection was created, in Unix - // format and Coordinated Universal Time (UTC). The value of CreationTime is - // accurate to milliseconds. For example, the value 1516925490.087 represents - // Friday, January 26,2018 12:11:30.087 AM. + // The date and time that a restore testing selection was created, in Unix format + // and Coordinated Universal Time (UTC). The value of CreationTime is accurate to + // milliseconds. For example, the value 1516925490.087 represents Friday, January + // 26,2018 12:11:30.087 AM. // // This member is required. CreationTime *time.Time @@ -2208,11 +2264,8 @@ type RestoreTestingSelectionForUpdate struct { // ProtectedResourceArns: ["*"] , but not both. ProtectedResourceArns []string - // A list of conditions that you define for resources in your restore testing plan - // using tags. - // - // For example, "StringEquals": { "Key": "aws:ResourceTag/CreatedByCryo", "Value": - // "true" }, . Condition operators are case sensitive. + // The conditions that you define for resources in your restore testing plan using + // tags. ProtectedResourceConditions *ProtectedResourceConditions // You can override certain restore metadata keys by including the parameter diff --git a/service/cloudwatchlogs/api_op_FilterLogEvents.go b/service/cloudwatchlogs/api_op_FilterLogEvents.go index 8c859701975..c41f340d023 100644 --- a/service/cloudwatchlogs/api_op_FilterLogEvents.go +++ b/service/cloudwatchlogs/api_op_FilterLogEvents.go @@ -97,14 +97,13 @@ type FilterLogEventsInput struct { // Filters the results to include only events from log streams that have names // starting with this prefix. // - // If you specify a value for both logStreamNamePrefix and logStreamNames , but the - // value for logStreamNamePrefix does not match any log stream names specified in - // logStreamNames , the action returns an InvalidParameterException error. + // If you specify a value for both logStreamNamePrefix and logStreamNames , the + // action returns an InvalidParameterException error. LogStreamNamePrefix *string // Filters the results to only logs from the log streams in this list. // - // If you specify a value for both logStreamNamePrefix and logStreamNames , the + // If you specify a value for both logStreamNames and logStreamNamePrefix , the // action returns an InvalidParameterException error. LogStreamNames []string diff --git a/service/cloudwatchlogs/api_op_PutAccountPolicy.go b/service/cloudwatchlogs/api_op_PutAccountPolicy.go index 729d9f3f7c3..03b2f57bf12 100644 --- a/service/cloudwatchlogs/api_op_PutAccountPolicy.go +++ b/service/cloudwatchlogs/api_op_PutAccountPolicy.go @@ -74,10 +74,11 @@ import ( // cross-account delivery. Kinesis Data Streams and Firehose are supported as // logical destinations. // -// Each account can have one account-level subscription filter policy. If you are -// updating an existing filter, you must specify the correct name in PolicyName . -// To perform a PutAccountPolicy subscription filter operation for any destination -// except a Lambda function, you must also have the iam:PassRole permission. +// Each account can have one account-level subscription filter policy per Region. +// If you are updating an existing filter, you must specify the correct name in +// PolicyName . To perform a PutAccountPolicy subscription filter operation for +// any destination except a Lambda function, you must also have the iam:PassRole +// permission. // // [PutDestination]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html // [PutDataProtectionPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html @@ -166,7 +167,7 @@ type PutAccountPolicyInput struct { // - FilterPattern A filter pattern for subscribing to a filtered stream of log // events. // - // - DistributionThe method used to distribute log data to the destination. By + // - Distribution The method used to distribute log data to the destination. By // default, log data is grouped by log stream, but the grouping can be set to // Random for a more even distribution. This property is only applicable when the // destination is an Kinesis Data Streams data stream. diff --git a/service/cloudwatchlogs/api_op_PutDeliverySource.go b/service/cloudwatchlogs/api_op_PutDeliverySource.go index bc7ccc22754..1d87a166567 100644 --- a/service/cloudwatchlogs/api_op_PutDeliverySource.go +++ b/service/cloudwatchlogs/api_op_PutDeliverySource.go @@ -68,9 +68,11 @@ type PutDeliverySourceInput struct { // Defines the type of log that the source is sending. // + // - For Amazon Bedrock, the valid value is APPLICATION_LOGS . + // // - For Amazon CodeWhisperer, the valid value is EVENT_LOGS . // - // - For IAM Identity Centerr, the valid value is ERROR_LOGS . + // - For IAM Identity Center, the valid value is ERROR_LOGS . // // - For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS , // AUTHENTICATION_LOGS , WORKMAIL_AVAILABILITY_PROVIDER_LOGS , and diff --git a/service/cloudwatchlogs/api_op_PutLogEvents.go b/service/cloudwatchlogs/api_op_PutLogEvents.go index 9e66b633bbb..7abea2934c7 100644 --- a/service/cloudwatchlogs/api_op_PutLogEvents.go +++ b/service/cloudwatchlogs/api_op_PutLogEvents.go @@ -82,6 +82,9 @@ type PutLogEventsInput struct { // This member is required. LogStreamName *string + // Reserved for future use. + Entity *types.Entity + // The sequence token obtained from the response of the previous PutLogEvents call. // // The sequenceToken parameter is now ignored in PutLogEvents actions. PutLogEvents @@ -105,6 +108,9 @@ type PutLogEventsOutput struct { // nextSequenceToken value. NextSequenceToken *string + // Reserved for future use. + RejectedEntityInfo *types.RejectedEntityInfo + // The rejected events. RejectedLogEventsInfo *types.RejectedLogEventsInfo diff --git a/service/cloudwatchlogs/api_op_PutMetricFilter.go b/service/cloudwatchlogs/api_op_PutMetricFilter.go index 0b5166f64e2..f7130b2fb6b 100644 --- a/service/cloudwatchlogs/api_op_PutMetricFilter.go +++ b/service/cloudwatchlogs/api_op_PutMetricFilter.go @@ -18,6 +18,12 @@ import ( // The maximum number of metric filters that can be associated with a log group is // 100. // +// Using regular expressions to create metric filters is supported. For these +// filters, there is a quotas of quota of two regular expression patterns within a +// single filter pattern. There is also a quota of five regular expression patterns +// per log group. For more information about using regular expressions in metric +// filters, see [Filter pattern syntax for metric filters, subscription filters, filter log events, and Live Tail]. +// // When you create a metric filter, you can also optionally assign a unit and // dimensions to the metric that is created. // @@ -35,6 +41,7 @@ import ( // // [Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html // [PutLogEvents]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html +// [Filter pattern syntax for metric filters, subscription filters, filter log events, and Live Tail]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html func (c *Client) PutMetricFilter(ctx context.Context, params *PutMetricFilterInput, optFns ...func(*Options)) (*PutMetricFilterOutput, error) { if params == nil { params = &PutMetricFilterInput{} diff --git a/service/cloudwatchlogs/api_op_PutSubscriptionFilter.go b/service/cloudwatchlogs/api_op_PutSubscriptionFilter.go index 1f263b337e2..aec85bcd504 100644 --- a/service/cloudwatchlogs/api_op_PutSubscriptionFilter.go +++ b/service/cloudwatchlogs/api_op_PutSubscriptionFilter.go @@ -36,11 +36,18 @@ import ( // you are updating an existing filter, you must specify the correct name in // filterName . // +// Using regular expressions to create subscription filters is supported. For +// these filters, there is a quotas of quota of two regular expression patterns +// within a single filter pattern. There is also a quota of five regular expression +// patterns per log group. For more information about using regular expressions in +// subscription filters, see [Filter pattern syntax for metric filters, subscription filters, filter log events, and Live Tail]. +// // To perform a PutSubscriptionFilter operation for any destination except a // Lambda function, you must also have the iam:PassRole permission. // // [PutDestination]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html // [PutLogEvents]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html +// [Filter pattern syntax for metric filters, subscription filters, filter log events, and Live Tail]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html func (c *Client) PutSubscriptionFilter(ctx context.Context, params *PutSubscriptionFilterInput, optFns ...func(*Options)) (*PutSubscriptionFilterOutput, error) { if params == nil { params = &PutSubscriptionFilterInput{} diff --git a/service/cloudwatchlogs/api_op_StartLiveTail.go b/service/cloudwatchlogs/api_op_StartLiveTail.go index a08338fe3c5..31e7dfdcebe 100644 --- a/service/cloudwatchlogs/api_op_StartLiveTail.go +++ b/service/cloudwatchlogs/api_op_StartLiveTail.go @@ -58,8 +58,8 @@ import ( // [Use Live Tail to view logs in near real time]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs_LiveTail.html // [Start a Live Tail session using an Amazon Web Services SDK]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/example_cloudwatch-logs_StartLiveTail_section.html // -// [SessionTimeoutException]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_SessionTimeoutException.html -// [SessionStreamingException]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_SessionStreamingException.html +// [SessionTimeoutException]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartLiveTailResponseStream.html#CWL-Type-StartLiveTailResponseStream-SessionTimeoutException +// [SessionStreamingException]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartLiveTailResponseStream.html#CWL-Type-StartLiveTailResponseStream-SessionStreamingException func (c *Client) StartLiveTail(ctx context.Context, params *StartLiveTailInput, optFns ...func(*Options)) (*StartLiveTailOutput, error) { if params == nil { params = &StartLiveTailInput{} diff --git a/service/cloudwatchlogs/deserializers.go b/service/cloudwatchlogs/deserializers.go index d47d32632b8..21af5d58b5a 100644 --- a/service/cloudwatchlogs/deserializers.go +++ b/service/cloudwatchlogs/deserializers.go @@ -12901,6 +12901,46 @@ func awsAwsjson11_deserializeDocumentQueryStatistics(v **types.QueryStatistics, return nil } +func awsAwsjson11_deserializeDocumentRejectedEntityInfo(v **types.RejectedEntityInfo, 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.RejectedEntityInfo + if *v == nil { + sv = &types.RejectedEntityInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityRejectionErrorType to be of type string, got %T instead", value) + } + sv.ErrorType = types.EntityRejectionErrorType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentRejectedLogEventsInfo(v **types.RejectedLogEventsInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15494,6 +15534,11 @@ func awsAwsjson11_deserializeOpDocumentPutLogEventsOutput(v **PutLogEventsOutput sv.NextSequenceToken = ptr.String(jtv) } + case "rejectedEntityInfo": + if err := awsAwsjson11_deserializeDocumentRejectedEntityInfo(&sv.RejectedEntityInfo, value); err != nil { + return err + } + case "rejectedLogEventsInfo": if err := awsAwsjson11_deserializeDocumentRejectedLogEventsInfo(&sv.RejectedLogEventsInfo, value); err != nil { return err diff --git a/service/cloudwatchlogs/serializers.go b/service/cloudwatchlogs/serializers.go index 2c87537a6c4..0222edec73e 100644 --- a/service/cloudwatchlogs/serializers.go +++ b/service/cloudwatchlogs/serializers.go @@ -4119,6 +4119,49 @@ func awsAwsjson11_serializeDocumentDimensions(v map[string]string, value smithyj return nil } +func awsAwsjson11_serializeDocumentEntity(v *types.Entity, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Attributes != nil { + ok := object.Key("attributes") + if err := awsAwsjson11_serializeDocumentEntityAttributes(v.Attributes, ok); err != nil { + return err + } + } + + if v.KeyAttributes != nil { + ok := object.Key("keyAttributes") + if err := awsAwsjson11_serializeDocumentEntityKeyAttributes(v.KeyAttributes, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentEntityAttributes(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsAwsjson11_serializeDocumentEntityKeyAttributes(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + func awsAwsjson11_serializeDocumentInputLogEvent(v *types.InputLogEvent, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5572,6 +5615,13 @@ func awsAwsjson11_serializeOpDocumentPutLogEventsInput(v *PutLogEventsInput, val object := value.Object() defer object.Close() + if v.Entity != nil { + ok := object.Key("entity") + if err := awsAwsjson11_serializeDocumentEntity(v.Entity, ok); err != nil { + return err + } + } + if v.LogEvents != nil { ok := object.Key("logEvents") if err := awsAwsjson11_serializeDocumentInputLogEvents(v.LogEvents, ok); err != nil { diff --git a/service/cloudwatchlogs/types/enums.go b/service/cloudwatchlogs/types/enums.go index 46fd244a5ad..245f8740d7f 100644 --- a/service/cloudwatchlogs/types/enums.go +++ b/service/cloudwatchlogs/types/enums.go @@ -92,6 +92,35 @@ func (Distribution) Values() []Distribution { } } +type EntityRejectionErrorType string + +// Enum values for EntityRejectionErrorType +const ( + EntityRejectionErrorTypeInvalidEntity EntityRejectionErrorType = "InvalidEntity" + EntityRejectionErrorTypeInvalidTypeValue EntityRejectionErrorType = "InvalidTypeValue" + EntityRejectionErrorTypeInvalidKeyAttribute EntityRejectionErrorType = "InvalidKeyAttributes" + EntityRejectionErrorTypeInvalidAttributes EntityRejectionErrorType = "InvalidAttributes" + EntityRejectionErrorTypeEntitySizeTooLarge EntityRejectionErrorType = "EntitySizeTooLarge" + EntityRejectionErrorTypeUnsupportedLogGroupType EntityRejectionErrorType = "UnsupportedLogGroupType" + EntityRejectionErrorTypeMissingRequiredFields EntityRejectionErrorType = "MissingRequiredFields" +) + +// Values returns all known values for EntityRejectionErrorType. 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 (EntityRejectionErrorType) Values() []EntityRejectionErrorType { + return []EntityRejectionErrorType{ + "InvalidEntity", + "InvalidTypeValue", + "InvalidKeyAttributes", + "InvalidAttributes", + "EntitySizeTooLarge", + "UnsupportedLogGroupType", + "MissingRequiredFields", + } +} + type EvaluationFrequency string // Enum values for EvaluationFrequency diff --git a/service/cloudwatchlogs/types/types.go b/service/cloudwatchlogs/types/types.go index b3e33ce2e33..067a5fce923 100644 --- a/service/cloudwatchlogs/types/types.go +++ b/service/cloudwatchlogs/types/types.go @@ -388,6 +388,18 @@ type Destination struct { noSmithyDocumentSerde } +// Reserved for future use. +type Entity struct { + + // Reserved for future use. + Attributes map[string]string + + // Reserved for future use. + KeyAttributes map[string]string + + noSmithyDocumentSerde +} + // Represents an export task. type ExportTask struct { @@ -855,7 +867,7 @@ type OutputLogEvent struct { noSmithyDocumentSerde } -// A tructures that contains information about one pattern token related to an +// A structure that contains information about one pattern token related to an // anomaly. // // For more information about patterns and tokens, see [CreateLogAnomalyDetector]. @@ -980,6 +992,17 @@ type QueryStatistics struct { noSmithyDocumentSerde } +// Reserved for future use. +type RejectedEntityInfo struct { + + // Reserved for future use. + // + // This member is required. + ErrorType EntityRejectionErrorType + + noSmithyDocumentSerde +} + // Represents the rejected events. type RejectedLogEventsInfo struct { diff --git a/service/datazone/api_op_AddEntityOwner.go b/service/datazone/api_op_AddEntityOwner.go new file mode 100644 index 00000000000..9f5da1808e1 --- /dev/null +++ b/service/datazone/api_op_AddEntityOwner.go @@ -0,0 +1,193 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds the owner of an entity (a domain unit). +func (c *Client) AddEntityOwner(ctx context.Context, params *AddEntityOwnerInput, optFns ...func(*Options)) (*AddEntityOwnerOutput, error) { + if params == nil { + params = &AddEntityOwnerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddEntityOwner", params, optFns, c.addOperationAddEntityOwnerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddEntityOwnerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AddEntityOwnerInput struct { + + // The ID of the domain in which you want to add the entity owner. + // + // This member is required. + DomainIdentifier *string + + // The ID of the entity to which you want to add an owner. + // + // This member is required. + EntityIdentifier *string + + // The type of an entity. + // + // This member is required. + EntityType types.DataZoneEntityType + + // The owner that you want to add to the entity. + // + // This member is required. + Owner types.OwnerProperties + + // A unique, case-sensitive identifier that is provided to ensure the idempotency + // of the request. + ClientToken *string + + noSmithyDocumentSerde +} + +type AddEntityOwnerOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAddEntityOwnerMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpAddEntityOwner{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAddEntityOwner{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AddEntityOwner"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opAddEntityOwnerMiddleware(stack, options); err != nil { + return err + } + if err = addOpAddEntityOwnerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddEntityOwner(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpAddEntityOwner struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpAddEntityOwner) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpAddEntityOwner) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*AddEntityOwnerInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *AddEntityOwnerInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opAddEntityOwnerMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpAddEntityOwner{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opAddEntityOwner(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AddEntityOwner", + } +} diff --git a/service/datazone/api_op_AddPolicyGrant.go b/service/datazone/api_op_AddPolicyGrant.go new file mode 100644 index 00000000000..7ab18796b11 --- /dev/null +++ b/service/datazone/api_op_AddPolicyGrant.go @@ -0,0 +1,204 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds a policy grant (an authorization policy) to a specified entity, including +// domain units, environment blueprint configurations, or environment profiles. +func (c *Client) AddPolicyGrant(ctx context.Context, params *AddPolicyGrantInput, optFns ...func(*Options)) (*AddPolicyGrantOutput, error) { + if params == nil { + params = &AddPolicyGrantInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddPolicyGrant", params, optFns, c.addOperationAddPolicyGrantMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddPolicyGrantOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AddPolicyGrantInput struct { + + // The details of the policy grant. + // + // This member is required. + Detail types.PolicyGrantDetail + + // The ID of the domain where you want to add a policy grant. + // + // This member is required. + DomainIdentifier *string + + // The ID of the entity (resource) to which you want to add a policy grant. + // + // This member is required. + EntityIdentifier *string + + // The type of entity (resource) to which the grant is added. + // + // This member is required. + EntityType types.TargetEntityType + + // The type of policy that you want to grant. + // + // This member is required. + PolicyType types.ManagedPolicyType + + // The principal to whom the permissions are granted. + // + // This member is required. + Principal types.PolicyGrantPrincipal + + // A unique, case-sensitive identifier that is provided to ensure the idempotency + // of the request. + ClientToken *string + + noSmithyDocumentSerde +} + +type AddPolicyGrantOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAddPolicyGrantMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpAddPolicyGrant{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAddPolicyGrant{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AddPolicyGrant"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opAddPolicyGrantMiddleware(stack, options); err != nil { + return err + } + if err = addOpAddPolicyGrantValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddPolicyGrant(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpAddPolicyGrant struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpAddPolicyGrant) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpAddPolicyGrant) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*AddPolicyGrantInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *AddPolicyGrantInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opAddPolicyGrantMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpAddPolicyGrant{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opAddPolicyGrant(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AddPolicyGrant", + } +} diff --git a/service/datazone/api_op_CreateDomain.go b/service/datazone/api_op_CreateDomain.go index cd2703438da..10abe9c95d8 100644 --- a/service/datazone/api_op_CreateDomain.go +++ b/service/datazone/api_op_CreateDomain.go @@ -89,6 +89,9 @@ type CreateDomainOutput struct { // The URL of the data portal for this Amazon DataZone domain. PortalUrl *string + // The ID of the root domain unit. + RootDomainUnitId *string + // The single-sign on configuration of the Amazon DataZone domain. SingleSignOn *types.SingleSignOn diff --git a/service/datazone/api_op_CreateDomainUnit.go b/service/datazone/api_op_CreateDomainUnit.go new file mode 100644 index 00000000000..893abacb1ff --- /dev/null +++ b/service/datazone/api_op_CreateDomainUnit.go @@ -0,0 +1,230 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates a domain unit in Amazon DataZone. +func (c *Client) CreateDomainUnit(ctx context.Context, params *CreateDomainUnitInput, optFns ...func(*Options)) (*CreateDomainUnitOutput, error) { + if params == nil { + params = &CreateDomainUnitInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateDomainUnit", params, optFns, c.addOperationCreateDomainUnitMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateDomainUnitOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateDomainUnitInput struct { + + // The ID of the domain where you want to crate a domain unit. + // + // This member is required. + DomainIdentifier *string + + // The name of the domain unit. + // + // This member is required. + Name *string + + // The ID of the parent domain unit. + // + // This member is required. + ParentDomainUnitIdentifier *string + + // A unique, case-sensitive identifier that is provided to ensure the idempotency + // of the request. + ClientToken *string + + // The description of the domain unit. + Description *string + + noSmithyDocumentSerde +} + +type CreateDomainUnitOutput struct { + + // The IDs of the ancestor domain units. + // + // This member is required. + AncestorDomainUnitIds []string + + // The ID of the domain where the domain unit was created. + // + // This member is required. + DomainId *string + + // The ID of the domain unit. + // + // This member is required. + Id *string + + // The name of the domain unit. + // + // This member is required. + Name *string + + // The owners of the domain unit. + // + // This member is required. + Owners []types.DomainUnitOwnerProperties + + // The timestamp at which the domain unit was created. + CreatedAt *time.Time + + // The user who created the domain unit. + CreatedBy *string + + // The description of the domain unit. + Description *string + + // The ID of the parent domain unit. + ParentDomainUnitId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateDomainUnitMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateDomainUnit{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateDomainUnit{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateDomainUnit"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opCreateDomainUnitMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateDomainUnitValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDomainUnit(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateDomainUnit struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateDomainUnit) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateDomainUnit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateDomainUnitInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateDomainUnitInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateDomainUnitMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateDomainUnit{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateDomainUnit(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateDomainUnit", + } +} diff --git a/service/datazone/api_op_CreateProject.go b/service/datazone/api_op_CreateProject.go index b01ab9db5b6..c5970b0a8d0 100644 --- a/service/datazone/api_op_CreateProject.go +++ b/service/datazone/api_op_CreateProject.go @@ -43,6 +43,10 @@ type CreateProjectInput struct { // The description of the Amazon DataZone project. Description *string + // The ID of the domain unit. This parameter is not required and if it is not + // specified, then the project is created at the root domain unit level. + DomainUnitId *string + // The glossary terms that can be used in this Amazon DataZone project. GlossaryTerms []string @@ -77,6 +81,9 @@ type CreateProjectOutput struct { // The description of the project. Description *string + // The ID of the domain unit. + DomainUnitId *string + // Specifies the error message that is returned if the operation cannot be // successfully completed. FailureReasons []types.ProjectDeletionError diff --git a/service/datazone/api_op_DeleteDomainUnit.go b/service/datazone/api_op_DeleteDomainUnit.go new file mode 100644 index 00000000000..940e03ae69f --- /dev/null +++ b/service/datazone/api_op_DeleteDomainUnit.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a domain unit. +func (c *Client) DeleteDomainUnit(ctx context.Context, params *DeleteDomainUnitInput, optFns ...func(*Options)) (*DeleteDomainUnitOutput, error) { + if params == nil { + params = &DeleteDomainUnitInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteDomainUnit", params, optFns, c.addOperationDeleteDomainUnitMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteDomainUnitOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteDomainUnitInput struct { + + // The ID of the domain where you want to delete a domain unit. + // + // This member is required. + DomainIdentifier *string + + // The ID of the domain unit that you want to delete. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteDomainUnitOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteDomainUnitMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteDomainUnit{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteDomainUnit{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteDomainUnit"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDeleteDomainUnitValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDomainUnit(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteDomainUnit(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteDomainUnit", + } +} diff --git a/service/datazone/api_op_GetDomain.go b/service/datazone/api_op_GetDomain.go index e75592816aa..92d27cad6c9 100644 --- a/service/datazone/api_op_GetDomain.go +++ b/service/datazone/api_op_GetDomain.go @@ -77,6 +77,9 @@ type GetDomainOutput struct { // The URL of the data portal for this Amazon DataZone domain. PortalUrl *string + // The ID of the root domain in Amazon Datazone. + RootDomainUnitId *string + // The single sing-on option of the specified Amazon DataZone domain. SingleSignOn *types.SingleSignOn diff --git a/service/datazone/api_op_GetDomainUnit.go b/service/datazone/api_op_GetDomainUnit.go new file mode 100644 index 00000000000..ac047cffff2 --- /dev/null +++ b/service/datazone/api_op_GetDomainUnit.go @@ -0,0 +1,183 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Gets the details of the specified domain unit. +func (c *Client) GetDomainUnit(ctx context.Context, params *GetDomainUnitInput, optFns ...func(*Options)) (*GetDomainUnitOutput, error) { + if params == nil { + params = &GetDomainUnitInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDomainUnit", params, optFns, c.addOperationGetDomainUnitMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDomainUnitOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDomainUnitInput struct { + + // The ID of the domain where you want to get a domain unit. + // + // This member is required. + DomainIdentifier *string + + // The identifier of the domain unit that you want to get. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type GetDomainUnitOutput struct { + + // The ID of the domain in which the domain unit lives. + // + // This member is required. + DomainId *string + + // The ID of the domain unit. + // + // This member is required. + Id *string + + // The name of the domain unit. + // + // This member is required. + Name *string + + // The owners of the domain unit. + // + // This member is required. + Owners []types.DomainUnitOwnerProperties + + // The time stamp at which the domain unit was created. + CreatedAt *time.Time + + // The user who created the domain unit. + CreatedBy *string + + // The description of the domain unit. + Description *string + + // The timestamp at which the domain unit was last updated. + LastUpdatedAt *time.Time + + // The user who last updated the domain unit. + LastUpdatedBy *string + + // The ID of the parent domain unit. + ParentDomainUnitId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDomainUnitMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetDomainUnit{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetDomainUnit{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetDomainUnit"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetDomainUnitValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDomainUnit(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDomainUnit(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetDomainUnit", + } +} diff --git a/service/datazone/api_op_GetProject.go b/service/datazone/api_op_GetProject.go index d0da52769d4..989844e4d28 100644 --- a/service/datazone/api_op_GetProject.go +++ b/service/datazone/api_op_GetProject.go @@ -71,6 +71,9 @@ type GetProjectOutput struct { // The description of the project. Description *string + // The ID of the domain unit. + DomainUnitId *string + // Specifies the error message that is returned if the operation cannot be // successfully completed. FailureReasons []types.ProjectDeletionError diff --git a/service/datazone/api_op_ListDomainUnitsForParent.go b/service/datazone/api_op_ListDomainUnitsForParent.go new file mode 100644 index 00000000000..c6f1a716d6b --- /dev/null +++ b/service/datazone/api_op_ListDomainUnitsForParent.go @@ -0,0 +1,270 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists child domain units for the specified parent domain unit. +func (c *Client) ListDomainUnitsForParent(ctx context.Context, params *ListDomainUnitsForParentInput, optFns ...func(*Options)) (*ListDomainUnitsForParentOutput, error) { + if params == nil { + params = &ListDomainUnitsForParentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDomainUnitsForParent", params, optFns, c.addOperationListDomainUnitsForParentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDomainUnitsForParentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDomainUnitsForParentInput struct { + + // The ID of the domain in which you want to list domain units for a parent domain + // unit. + // + // This member is required. + DomainIdentifier *string + + // The ID of the parent domain unit. + // + // This member is required. + ParentDomainUnitIdentifier *string + + // The maximum number of domain units to return in a single call to + // ListDomainUnitsForParent. When the number of domain units to be listed is + // greater than the value of MaxResults, the response contains a NextToken value + // that you can use in a subsequent call to ListDomainUnitsForParent to list the + // next set of domain units. + MaxResults *int32 + + // When the number of domain units is greater than the default value for the + // MaxResults parameter, or if you explicitly specify a value for MaxResults that + // is less than the number of domain units, the response includes a pagination + // token named NextToken. You can specify this NextToken value in a subsequent call + // to ListDomainUnitsForParent to list the next set of domain units. + NextToken *string + + noSmithyDocumentSerde +} + +type ListDomainUnitsForParentOutput struct { + + // The results returned by this action. + // + // This member is required. + Items []types.DomainUnitSummary + + // When the number of domain units is greater than the default value for the + // MaxResults parameter, or if you explicitly specify a value for MaxResults that + // is less than the number of domain units, the response includes a pagination + // token named NextToken. You can specify this NextToken value in a subsequent call + // to ListDomainUnitsForParent to list the next set of domain units. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDomainUnitsForParentMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListDomainUnitsForParent{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListDomainUnitsForParent{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDomainUnitsForParent"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListDomainUnitsForParentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomainUnitsForParent(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListDomainUnitsForParentPaginatorOptions is the paginator options for +// ListDomainUnitsForParent +type ListDomainUnitsForParentPaginatorOptions struct { + // The maximum number of domain units to return in a single call to + // ListDomainUnitsForParent. When the number of domain units to be listed is + // greater than the value of MaxResults, the response contains a NextToken value + // that you can use in a subsequent call to ListDomainUnitsForParent to list the + // next set of domain units. + 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 +} + +// ListDomainUnitsForParentPaginator is a paginator for ListDomainUnitsForParent +type ListDomainUnitsForParentPaginator struct { + options ListDomainUnitsForParentPaginatorOptions + client ListDomainUnitsForParentAPIClient + params *ListDomainUnitsForParentInput + nextToken *string + firstPage bool +} + +// NewListDomainUnitsForParentPaginator returns a new +// ListDomainUnitsForParentPaginator +func NewListDomainUnitsForParentPaginator(client ListDomainUnitsForParentAPIClient, params *ListDomainUnitsForParentInput, optFns ...func(*ListDomainUnitsForParentPaginatorOptions)) *ListDomainUnitsForParentPaginator { + if params == nil { + params = &ListDomainUnitsForParentInput{} + } + + options := ListDomainUnitsForParentPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListDomainUnitsForParentPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListDomainUnitsForParentPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListDomainUnitsForParent page. +func (p *ListDomainUnitsForParentPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDomainUnitsForParentOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListDomainUnitsForParent(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 +} + +// ListDomainUnitsForParentAPIClient is a client that implements the +// ListDomainUnitsForParent operation. +type ListDomainUnitsForParentAPIClient interface { + ListDomainUnitsForParent(context.Context, *ListDomainUnitsForParentInput, ...func(*Options)) (*ListDomainUnitsForParentOutput, error) +} + +var _ ListDomainUnitsForParentAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListDomainUnitsForParent(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDomainUnitsForParent", + } +} diff --git a/service/datazone/api_op_ListEntityOwners.go b/service/datazone/api_op_ListEntityOwners.go new file mode 100644 index 00000000000..c3b56d881fe --- /dev/null +++ b/service/datazone/api_op_ListEntityOwners.go @@ -0,0 +1,270 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the entity (domain units) owners. +func (c *Client) ListEntityOwners(ctx context.Context, params *ListEntityOwnersInput, optFns ...func(*Options)) (*ListEntityOwnersOutput, error) { + if params == nil { + params = &ListEntityOwnersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEntityOwners", params, optFns, c.addOperationListEntityOwnersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEntityOwnersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEntityOwnersInput struct { + + // The ID of the domain where you want to list entity owners. + // + // This member is required. + DomainIdentifier *string + + // The ID of the entity that you want to list. + // + // This member is required. + EntityIdentifier *string + + // The type of the entity that you want to list. + // + // This member is required. + EntityType types.DataZoneEntityType + + // The maximum number of entities to return in a single call to ListEntityOwners . + // When the number of entities to be listed is greater than the value of MaxResults + // , the response contains a NextToken value that you can use in a subsequent call + // to ListEntityOwners to list the next set of entities. + MaxResults *int32 + + // When the number of entities is greater than the default value for the MaxResults + // parameter, or if you explicitly specify a value for MaxResults that is less + // than the number of entities, the response includes a pagination token named + // NextToken . You can specify this NextToken value in a subsequent call to + // ListEntityOwners to list the next set of entities. + NextToken *string + + noSmithyDocumentSerde +} + +type ListEntityOwnersOutput struct { + + // The owners of the entity. + // + // This member is required. + Owners []types.OwnerPropertiesOutput + + // When the number of entities is greater than the default value for the MaxResults + // parameter, or if you explicitly specify a value for MaxResults that is less + // than the number of entities, the response includes a pagination token named + // NextToken . You can specify this NextToken value in a subsequent call to + // ListEntityOwners to list the next set of entities. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEntityOwnersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListEntityOwners{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListEntityOwners{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListEntityOwners"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListEntityOwnersValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEntityOwners(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListEntityOwnersPaginatorOptions is the paginator options for ListEntityOwners +type ListEntityOwnersPaginatorOptions struct { + // The maximum number of entities to return in a single call to ListEntityOwners . + // When the number of entities to be listed is greater than the value of MaxResults + // , the response contains a NextToken value that you can use in a subsequent call + // to ListEntityOwners to list the next set of entities. + 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 +} + +// ListEntityOwnersPaginator is a paginator for ListEntityOwners +type ListEntityOwnersPaginator struct { + options ListEntityOwnersPaginatorOptions + client ListEntityOwnersAPIClient + params *ListEntityOwnersInput + nextToken *string + firstPage bool +} + +// NewListEntityOwnersPaginator returns a new ListEntityOwnersPaginator +func NewListEntityOwnersPaginator(client ListEntityOwnersAPIClient, params *ListEntityOwnersInput, optFns ...func(*ListEntityOwnersPaginatorOptions)) *ListEntityOwnersPaginator { + if params == nil { + params = &ListEntityOwnersInput{} + } + + options := ListEntityOwnersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEntityOwnersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEntityOwnersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListEntityOwners page. +func (p *ListEntityOwnersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEntityOwnersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListEntityOwners(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 +} + +// ListEntityOwnersAPIClient is a client that implements the ListEntityOwners +// operation. +type ListEntityOwnersAPIClient interface { + ListEntityOwners(context.Context, *ListEntityOwnersInput, ...func(*Options)) (*ListEntityOwnersOutput, error) +} + +var _ ListEntityOwnersAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListEntityOwners(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListEntityOwners", + } +} diff --git a/service/datazone/api_op_ListPolicyGrants.go b/service/datazone/api_op_ListPolicyGrants.go new file mode 100644 index 00000000000..2b54cc8451f --- /dev/null +++ b/service/datazone/api_op_ListPolicyGrants.go @@ -0,0 +1,275 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists policy grants. +func (c *Client) ListPolicyGrants(ctx context.Context, params *ListPolicyGrantsInput, optFns ...func(*Options)) (*ListPolicyGrantsOutput, error) { + if params == nil { + params = &ListPolicyGrantsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListPolicyGrants", params, optFns, c.addOperationListPolicyGrantsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListPolicyGrantsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListPolicyGrantsInput struct { + + // The ID of the domain where you want to list policy grants. + // + // This member is required. + DomainIdentifier *string + + // The ID of the entity for which you want to list policy grants. + // + // This member is required. + EntityIdentifier *string + + // The type of entity for which you want to list policy grants. + // + // This member is required. + EntityType types.TargetEntityType + + // The type of policy that you want to list. + // + // This member is required. + PolicyType types.ManagedPolicyType + + // The maximum number of grants to return in a single call to ListPolicyGrants . + // When the number of grants to be listed is greater than the value of MaxResults , + // the response contains a NextToken value that you can use in a subsequent call + // to ListPolicyGrants to list the next set of grants. + MaxResults *int32 + + // When the number of grants is greater than the default value for the MaxResults + // parameter, or if you explicitly specify a value for MaxResults that is less + // than the number of grants, the response includes a pagination token named + // NextToken . You can specify this NextToken value in a subsequent call to + // ListPolicyGrants to list the next set of grants. + NextToken *string + + noSmithyDocumentSerde +} + +type ListPolicyGrantsOutput struct { + + // The results of this action - the listed grants. + // + // This member is required. + GrantList []types.PolicyGrantMember + + // When the number of grants is greater than the default value for the MaxResults + // parameter, or if you explicitly specify a value for MaxResults that is less + // than the number of grants, the response includes a pagination token named + // NextToken . You can specify this NextToken value in a subsequent call to + // ListPolicyGrants to list the next set of grants. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListPolicyGrantsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListPolicyGrants{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListPolicyGrants{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListPolicyGrants"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListPolicyGrantsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicyGrants(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListPolicyGrantsPaginatorOptions is the paginator options for ListPolicyGrants +type ListPolicyGrantsPaginatorOptions struct { + // The maximum number of grants to return in a single call to ListPolicyGrants . + // When the number of grants to be listed is greater than the value of MaxResults , + // the response contains a NextToken value that you can use in a subsequent call + // to ListPolicyGrants to list the next set of grants. + 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 +} + +// ListPolicyGrantsPaginator is a paginator for ListPolicyGrants +type ListPolicyGrantsPaginator struct { + options ListPolicyGrantsPaginatorOptions + client ListPolicyGrantsAPIClient + params *ListPolicyGrantsInput + nextToken *string + firstPage bool +} + +// NewListPolicyGrantsPaginator returns a new ListPolicyGrantsPaginator +func NewListPolicyGrantsPaginator(client ListPolicyGrantsAPIClient, params *ListPolicyGrantsInput, optFns ...func(*ListPolicyGrantsPaginatorOptions)) *ListPolicyGrantsPaginator { + if params == nil { + params = &ListPolicyGrantsInput{} + } + + options := ListPolicyGrantsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListPolicyGrantsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListPolicyGrantsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListPolicyGrants page. +func (p *ListPolicyGrantsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPolicyGrantsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListPolicyGrants(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 +} + +// ListPolicyGrantsAPIClient is a client that implements the ListPolicyGrants +// operation. +type ListPolicyGrantsAPIClient interface { + ListPolicyGrants(context.Context, *ListPolicyGrantsInput, ...func(*Options)) (*ListPolicyGrantsOutput, error) +} + +var _ ListPolicyGrantsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListPolicyGrants(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListPolicyGrants", + } +} diff --git a/service/datazone/api_op_RemoveEntityOwner.go b/service/datazone/api_op_RemoveEntityOwner.go new file mode 100644 index 00000000000..a1f6bc62357 --- /dev/null +++ b/service/datazone/api_op_RemoveEntityOwner.go @@ -0,0 +1,193 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes an owner from an entity. +func (c *Client) RemoveEntityOwner(ctx context.Context, params *RemoveEntityOwnerInput, optFns ...func(*Options)) (*RemoveEntityOwnerOutput, error) { + if params == nil { + params = &RemoveEntityOwnerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RemoveEntityOwner", params, optFns, c.addOperationRemoveEntityOwnerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RemoveEntityOwnerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RemoveEntityOwnerInput struct { + + // The ID of the domain where you want to remove an owner from an entity. + // + // This member is required. + DomainIdentifier *string + + // The ID of the entity from which you want to remove an owner. + // + // This member is required. + EntityIdentifier *string + + // The type of the entity from which you want to remove an owner. + // + // This member is required. + EntityType types.DataZoneEntityType + + // The owner that you want to remove from an entity. + // + // This member is required. + Owner types.OwnerProperties + + // A unique, case-sensitive identifier that is provided to ensure the idempotency + // of the request. + ClientToken *string + + noSmithyDocumentSerde +} + +type RemoveEntityOwnerOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRemoveEntityOwnerMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpRemoveEntityOwner{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRemoveEntityOwner{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RemoveEntityOwner"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opRemoveEntityOwnerMiddleware(stack, options); err != nil { + return err + } + if err = addOpRemoveEntityOwnerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveEntityOwner(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpRemoveEntityOwner struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpRemoveEntityOwner) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpRemoveEntityOwner) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*RemoveEntityOwnerInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *RemoveEntityOwnerInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opRemoveEntityOwnerMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpRemoveEntityOwner{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opRemoveEntityOwner(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RemoveEntityOwner", + } +} diff --git a/service/datazone/api_op_RemovePolicyGrant.go b/service/datazone/api_op_RemovePolicyGrant.go new file mode 100644 index 00000000000..c2a4524d863 --- /dev/null +++ b/service/datazone/api_op_RemovePolicyGrant.go @@ -0,0 +1,198 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes a policy grant. +func (c *Client) RemovePolicyGrant(ctx context.Context, params *RemovePolicyGrantInput, optFns ...func(*Options)) (*RemovePolicyGrantOutput, error) { + if params == nil { + params = &RemovePolicyGrantInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RemovePolicyGrant", params, optFns, c.addOperationRemovePolicyGrantMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RemovePolicyGrantOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RemovePolicyGrantInput struct { + + // The ID of the domain where you want to remove a policy grant. + // + // This member is required. + DomainIdentifier *string + + // The ID of the entity from which you want to remove a policy grant. + // + // This member is required. + EntityIdentifier *string + + // The type of the entity from which you want to remove a policy grant. + // + // This member is required. + EntityType types.TargetEntityType + + // The type of the policy that you want to remove. + // + // This member is required. + PolicyType types.ManagedPolicyType + + // The principal from which you want to remove a policy grant. + // + // This member is required. + Principal types.PolicyGrantPrincipal + + // A unique, case-sensitive identifier that is provided to ensure the idempotency + // of the request. + ClientToken *string + + noSmithyDocumentSerde +} + +type RemovePolicyGrantOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRemovePolicyGrantMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpRemovePolicyGrant{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRemovePolicyGrant{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RemovePolicyGrant"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opRemovePolicyGrantMiddleware(stack, options); err != nil { + return err + } + if err = addOpRemovePolicyGrantValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemovePolicyGrant(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpRemovePolicyGrant struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpRemovePolicyGrant) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpRemovePolicyGrant) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*RemovePolicyGrantInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *RemovePolicyGrantInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opRemovePolicyGrantMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpRemovePolicyGrant{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opRemovePolicyGrant(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RemovePolicyGrant", + } +} diff --git a/service/datazone/api_op_UpdateDomain.go b/service/datazone/api_op_UpdateDomain.go index 8910ee2837d..f98a16d0826 100644 --- a/service/datazone/api_op_UpdateDomain.go +++ b/service/datazone/api_op_UpdateDomain.go @@ -73,6 +73,9 @@ type UpdateDomainOutput struct { // The name to be updated as part of the UpdateDomain action. Name *string + // The ID of the root domain unit. + RootDomainUnitId *string + // The single sign-on option of the Amazon DataZone domain. SingleSignOn *types.SingleSignOn diff --git a/service/datazone/api_op_UpdateDomainUnit.go b/service/datazone/api_op_UpdateDomainUnit.go new file mode 100644 index 00000000000..e3971d27885 --- /dev/null +++ b/service/datazone/api_op_UpdateDomainUnit.go @@ -0,0 +1,189 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates the domain unit. +func (c *Client) UpdateDomainUnit(ctx context.Context, params *UpdateDomainUnitInput, optFns ...func(*Options)) (*UpdateDomainUnitOutput, error) { + if params == nil { + params = &UpdateDomainUnitInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateDomainUnit", params, optFns, c.addOperationUpdateDomainUnitMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateDomainUnitOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateDomainUnitInput struct { + + // The ID of the domain where you want to update a domain unit. + // + // This member is required. + DomainIdentifier *string + + // The ID of the domain unit that you want to update. + // + // This member is required. + Identifier *string + + // The description of the domain unit that you want to update. + Description *string + + // The name of the domain unit that you want to update. + Name *string + + noSmithyDocumentSerde +} + +type UpdateDomainUnitOutput struct { + + // The ID of the domain where you want to update the domain unit. + // + // This member is required. + DomainId *string + + // The ID of the domain unit that you want to update. + // + // This member is required. + Id *string + + // The name of the domain unit that you want to update. + // + // This member is required. + Name *string + + // The owners of the domain unit that you want to update. + // + // This member is required. + Owners []types.DomainUnitOwnerProperties + + // The time stamp at which the domain unit that you want to update was created. + CreatedAt *time.Time + + // The user who created the domain unit that you want to update. + CreatedBy *string + + // The description of the domain unit that you want to update. + Description *string + + // The timestamp at which the domain unit was last updated. + LastUpdatedAt *time.Time + + // The user who last updated the domain unit. + LastUpdatedBy *string + + // The ID of the parent domain unit. + ParentDomainUnitId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateDomainUnitMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateDomainUnit{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateDomainUnit{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateDomainUnit"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateDomainUnitValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDomainUnit(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateDomainUnit(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateDomainUnit", + } +} diff --git a/service/datazone/api_op_UpdateProject.go b/service/datazone/api_op_UpdateProject.go index 85647b976de..00180a790e3 100644 --- a/service/datazone/api_op_UpdateProject.go +++ b/service/datazone/api_op_UpdateProject.go @@ -30,8 +30,7 @@ func (c *Client) UpdateProject(ctx context.Context, params *UpdateProjectInput, type UpdateProjectInput struct { - // The identifier of the Amazon DataZone domain in which a project is to be - // updated. + // The ID of the Amazon DataZone domain where a project is being updated. // // This member is required. DomainIdentifier *string @@ -81,6 +80,9 @@ type UpdateProjectOutput struct { // The description of the project that is to be updated. Description *string + // The ID of the domain unit. + DomainUnitId *string + // Specifies the error message that is returned if the operation cannot be // successfully completed. FailureReasons []types.ProjectDeletionError diff --git a/service/datazone/deserializers.go b/service/datazone/deserializers.go index 534bb76d1e3..71dd7aefdb4 100644 --- a/service/datazone/deserializers.go +++ b/service/datazone/deserializers.go @@ -490,14 +490,14 @@ func awsRestjson1_deserializeOpDocumentAcceptSubscriptionRequestOutput(v **Accep return nil } -type awsRestjson1_deserializeOpAssociateEnvironmentRole struct { +type awsRestjson1_deserializeOpAddEntityOwner struct { } -func (*awsRestjson1_deserializeOpAssociateEnvironmentRole) ID() string { +func (*awsRestjson1_deserializeOpAddEntityOwner) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAssociateEnvironmentRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAddEntityOwner) 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) @@ -511,15 +511,15 @@ func (m *awsRestjson1_deserializeOpAssociateEnvironmentRole) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAssociateEnvironmentRole(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAddEntityOwner(response, &metadata) } - output := &AssociateEnvironmentRoleOutput{} + output := &AddEntityOwnerOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorAssociateEnvironmentRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAddEntityOwner(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)} @@ -572,6 +572,9 @@ func awsRestjson1_deserializeOpErrorAssociateEnvironmentRole(response *smithyhtt case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -591,14 +594,14 @@ func awsRestjson1_deserializeOpErrorAssociateEnvironmentRole(response *smithyhtt } } -type awsRestjson1_deserializeOpCancelMetadataGenerationRun struct { +type awsRestjson1_deserializeOpAddPolicyGrant struct { } -func (*awsRestjson1_deserializeOpCancelMetadataGenerationRun) ID() string { +func (*awsRestjson1_deserializeOpAddPolicyGrant) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCancelMetadataGenerationRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAddPolicyGrant) 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) @@ -612,15 +615,15 @@ func (m *awsRestjson1_deserializeOpCancelMetadataGenerationRun) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCancelMetadataGenerationRun(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAddPolicyGrant(response, &metadata) } - output := &CancelMetadataGenerationRunOutput{} + output := &AddPolicyGrantOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorCancelMetadataGenerationRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAddPolicyGrant(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)} @@ -670,8 +673,8 @@ func awsRestjson1_deserializeOpErrorCancelMetadataGenerationRun(response *smithy case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -692,14 +695,14 @@ func awsRestjson1_deserializeOpErrorCancelMetadataGenerationRun(response *smithy } } -type awsRestjson1_deserializeOpCancelSubscription struct { +type awsRestjson1_deserializeOpAssociateEnvironmentRole struct { } -func (*awsRestjson1_deserializeOpCancelSubscription) ID() string { +func (*awsRestjson1_deserializeOpAssociateEnvironmentRole) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCancelSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAssociateEnvironmentRole) 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) @@ -713,43 +716,15 @@ func (m *awsRestjson1_deserializeOpCancelSubscription) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCancelSubscription(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAssociateEnvironmentRole(response, &metadata) } - output := &CancelSubscriptionOutput{} + output := &AssociateEnvironmentRoleOutput{} 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_deserializeOpDocumentCancelSubscriptionOutput(&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_deserializeOpErrorCancelSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAssociateEnvironmentRole(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)} @@ -821,150 +796,115 @@ func awsRestjson1_deserializeOpErrorCancelSubscription(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentCancelSubscriptionOutput(v **CancelSubscriptionOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil +type awsRestjson1_deserializeOpCancelMetadataGenerationRun struct { +} + +func (*awsRestjson1_deserializeOpCancelMetadataGenerationRun) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCancelMetadataGenerationRun) 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 } - shape, ok := value.(map[string]interface{}) + response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - var sv *CancelSubscriptionOutput - if *v == nil { - sv = &CancelSubscriptionOutput{} - } else { - sv = *v + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCancelMetadataGenerationRun(response, &metadata) } + output := &CancelMetadataGenerationRunOutput{} + out.Result = output - for key, value := range shape { - switch key { - case "createdAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected CreatedAt to be a JSON Number, got %T instead", value) - - } - } + return out, metadata, err +} - case "createdBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CreatedBy to be of type string, got %T instead", value) - } - sv.CreatedBy = ptr.String(jtv) - } +func awsRestjson1_deserializeOpErrorCancelMetadataGenerationRun(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()) - case "domainId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DomainId to be of type string, got %T instead", value) - } - sv.DomainId = ptr.String(jtv) - } + errorCode := "UnknownError" + errorMessage := errorCode - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } - case "retainPermissions": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.RetainPermissions = ptr.Bool(jtv) - } + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SubscriptionStatus to be of type string, got %T instead", value) - } - sv.Status = types.SubscriptionStatus(jtv) - } + 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 + } - case "subscribedListing": - if err := awsRestjson1_deserializeDocumentSubscribedListing(&sv.SubscribedListing, value); err != nil { - return err - } + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - case "subscribedPrincipal": - if err := awsRestjson1_deserializeDocumentSubscribedPrincipal(&sv.SubscribedPrincipal, value); err != nil { - return err - } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case "subscriptionRequestId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SubscriptionRequestId to be of type string, got %T instead", value) - } - sv.SubscriptionRequestId = ptr.String(jtv) - } + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case "updatedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - default: - return fmt.Errorf("expected UpdatedAt to be a JSON Number, got %T instead", value) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - } - } + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case "updatedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UpdatedBy to be of type string, got %T instead", value) - } - sv.UpdatedBy = ptr.String(jtv) - } + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) - default: - _, _ = key, value + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } + return genericError + } - *v = sv - return nil } -type awsRestjson1_deserializeOpCreateAsset struct { +type awsRestjson1_deserializeOpCancelSubscription struct { } -func (*awsRestjson1_deserializeOpCreateAsset) ID() string { +func (*awsRestjson1_deserializeOpCancelSubscription) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateAsset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCancelSubscription) 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) @@ -978,9 +918,9 @@ func (m *awsRestjson1_deserializeOpCreateAsset) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateAsset(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCancelSubscription(response, &metadata) } - output := &CreateAssetOutput{} + output := &CancelSubscriptionOutput{} out.Result = output var buff [1024]byte @@ -1001,7 +941,7 @@ func (m *awsRestjson1_deserializeOpCreateAsset) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateAssetOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCancelSubscriptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1014,7 +954,7 @@ func (m *awsRestjson1_deserializeOpCreateAsset) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateAsset(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCancelSubscription(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)} @@ -1067,9 +1007,6 @@ func awsRestjson1_deserializeOpErrorCreateAsset(response *smithyhttp.Response, m case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -1089,7 +1026,7 @@ func awsRestjson1_deserializeOpErrorCreateAsset(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentCreateAssetOutput(v **CreateAssetOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCancelSubscriptionOutput(v **CancelSubscriptionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1102,9 +1039,277 @@ func awsRestjson1_deserializeOpDocumentCreateAssetOutput(v **CreateAssetOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateAssetOutput + var sv *CancelSubscriptionOutput if *v == nil { - sv = &CreateAssetOutput{} + sv = &CancelSubscriptionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreatedAt to be a JSON Number, got %T instead", value) + + } + } + + case "createdBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreatedBy to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "domainId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainId to be of type string, got %T instead", value) + } + sv.DomainId = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "retainPermissions": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.RetainPermissions = ptr.Bool(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionStatus to be of type string, got %T instead", value) + } + sv.Status = types.SubscriptionStatus(jtv) + } + + case "subscribedListing": + if err := awsRestjson1_deserializeDocumentSubscribedListing(&sv.SubscribedListing, value); err != nil { + return err + } + + case "subscribedPrincipal": + if err := awsRestjson1_deserializeDocumentSubscribedPrincipal(&sv.SubscribedPrincipal, value); err != nil { + return err + } + + case "subscriptionRequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionRequestId to be of type string, got %T instead", value) + } + sv.SubscriptionRequestId = ptr.String(jtv) + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected UpdatedAt to be a JSON Number, got %T instead", value) + + } + } + + case "updatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdatedBy to be of type string, got %T instead", value) + } + sv.UpdatedBy = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateAsset struct { +} + +func (*awsRestjson1_deserializeOpCreateAsset) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateAsset) 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_deserializeOpErrorCreateAsset(response, &metadata) + } + output := &CreateAssetOutput{} + 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_deserializeOpDocumentCreateAssetOutput(&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_deserializeOpErrorCreateAsset(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateAssetOutput(v **CreateAssetOutput, 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 *CreateAssetOutput + if *v == nil { + sv = &CreateAssetOutput{} } else { sv = *v } @@ -3268,6 +3473,15 @@ func awsRestjson1_deserializeOpDocumentCreateDomainOutput(v **CreateDomainOutput sv.PortalUrl = ptr.String(jtv) } + case "rootDomainUnitId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.RootDomainUnitId = ptr.String(jtv) + } + case "singleSignOn": if err := awsRestjson1_deserializeDocumentSingleSignOn(&sv.SingleSignOn, value); err != nil { return err @@ -3296,6 +3510,246 @@ func awsRestjson1_deserializeOpDocumentCreateDomainOutput(v **CreateDomainOutput return nil } +type awsRestjson1_deserializeOpCreateDomainUnit struct { +} + +func (*awsRestjson1_deserializeOpCreateDomainUnit) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateDomainUnit) 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_deserializeOpErrorCreateDomainUnit(response, &metadata) + } + output := &CreateDomainUnitOutput{} + 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_deserializeOpDocumentCreateDomainUnitOutput(&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_deserializeOpErrorCreateDomainUnit(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateDomainUnitOutput(v **CreateDomainUnitOutput, 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 *CreateDomainUnitOutput + if *v == nil { + sv = &CreateDomainUnitOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ancestorDomainUnitIds": + if err := awsRestjson1_deserializeDocumentDomainUnitIds(&sv.AncestorDomainUnitIds, value); err != nil { + return err + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreatedAt to be a JSON Number, got %T instead", value) + + } + } + + case "createdBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreatedBy to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "domainId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainId to be of type string, got %T instead", value) + } + sv.DomainId = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "owners": + if err := awsRestjson1_deserializeDocumentDomainUnitOwners(&sv.Owners, value); err != nil { + return err + } + + case "parentDomainUnitId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.ParentDomainUnitId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateEnvironment struct { } @@ -5355,6 +5809,15 @@ func awsRestjson1_deserializeOpDocumentCreateProjectOutput(v **CreateProjectOutp sv.DomainId = ptr.String(jtv) } + case "domainUnitId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.DomainUnitId = ptr.String(jtv) + } + case "failureReasons": if err := awsRestjson1_deserializeDocumentFailureReasons(&sv.FailureReasons, value); err != nil { return err @@ -7465,14 +7928,14 @@ func awsRestjson1_deserializeOpDocumentDeleteDomainOutput(v **DeleteDomainOutput return nil } -type awsRestjson1_deserializeOpDeleteEnvironment struct { +type awsRestjson1_deserializeOpDeleteDomainUnit struct { } -func (*awsRestjson1_deserializeOpDeleteEnvironment) ID() string { +func (*awsRestjson1_deserializeOpDeleteDomainUnit) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteDomainUnit) 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) @@ -7486,21 +7949,15 @@ func (m *awsRestjson1_deserializeOpDeleteEnvironment) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteEnvironment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteDomainUnit(response, &metadata) } - output := &DeleteEnvironmentOutput{} + output := &DeleteDomainUnitOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteDomainUnit(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)} @@ -7544,6 +8001,9 @@ func awsRestjson1_deserializeOpErrorDeleteEnvironment(response *smithyhttp.Respo case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -7569,14 +8029,14 @@ func awsRestjson1_deserializeOpErrorDeleteEnvironment(response *smithyhttp.Respo } } -type awsRestjson1_deserializeOpDeleteEnvironmentAction struct { +type awsRestjson1_deserializeOpDeleteEnvironment struct { } -func (*awsRestjson1_deserializeOpDeleteEnvironmentAction) ID() string { +func (*awsRestjson1_deserializeOpDeleteEnvironment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteEnvironmentAction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteEnvironment) 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) @@ -7590,9 +8050,9 @@ func (m *awsRestjson1_deserializeOpDeleteEnvironmentAction) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteEnvironmentAction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteEnvironment(response, &metadata) } - output := &DeleteEnvironmentActionOutput{} + output := &DeleteEnvironmentOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -7604,7 +8064,111 @@ func (m *awsRestjson1_deserializeOpDeleteEnvironmentAction) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteEnvironmentAction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteEnvironmentAction struct { +} + +func (*awsRestjson1_deserializeOpDeleteEnvironmentAction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteEnvironmentAction) 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_deserializeOpErrorDeleteEnvironmentAction(response, &metadata) + } + output := &DeleteEnvironmentActionOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteEnvironmentAction(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)} @@ -11167,6 +11731,15 @@ func awsRestjson1_deserializeOpDocumentGetDomainOutput(v **GetDomainOutput, valu sv.PortalUrl = ptr.String(jtv) } + case "rootDomainUnitId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.RootDomainUnitId = ptr.String(jtv) + } + case "singleSignOn": if err := awsRestjson1_deserializeDocumentSingleSignOn(&sv.SingleSignOn, value); err != nil { return err @@ -11195,14 +11768,14 @@ func awsRestjson1_deserializeOpDocumentGetDomainOutput(v **GetDomainOutput, valu return nil } -type awsRestjson1_deserializeOpGetEnvironment struct { +type awsRestjson1_deserializeOpGetDomainUnit struct { } -func (*awsRestjson1_deserializeOpGetEnvironment) ID() string { +func (*awsRestjson1_deserializeOpGetDomainUnit) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetDomainUnit) 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) @@ -11216,9 +11789,9 @@ func (m *awsRestjson1_deserializeOpGetEnvironment) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetEnvironment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetDomainUnit(response, &metadata) } - output := &GetEnvironmentOutput{} + output := &GetDomainUnitOutput{} out.Result = output var buff [1024]byte @@ -11239,7 +11812,7 @@ func (m *awsRestjson1_deserializeOpGetEnvironment) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetEnvironmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetDomainUnitOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11252,7 +11825,7 @@ func (m *awsRestjson1_deserializeOpGetEnvironment) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetDomainUnit(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)} @@ -11321,7 +11894,7 @@ func awsRestjson1_deserializeOpErrorGetEnvironment(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentGetEnvironmentOutput(v **GetEnvironmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetDomainUnitOutput(v **GetDomainUnitOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11334,65 +11907,45 @@ func awsRestjson1_deserializeOpDocumentGetEnvironmentOutput(v **GetEnvironmentOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetEnvironmentOutput + var sv *GetDomainUnitOutput if *v == nil { - sv = &GetEnvironmentOutput{} + sv = &GetDomainUnitOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "awsAccountId": + case "createdAt": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) - } - sv.AwsAccountId = ptr.String(jtv) - } + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - case "awsAccountRegion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsRegion to be of type string, got %T instead", value) - } - sv.AwsAccountRegion = ptr.String(jtv) - } + default: + return fmt.Errorf("expected CreatedAt to be a JSON Number, got %T instead", value) - case "createdAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) } case "createdBy": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected CreatedBy to be of type string, got %T instead", value) } sv.CreatedBy = ptr.String(jtv) } - case "deploymentProperties": - if err := awsRestjson1_deserializeDocumentDeploymentProperties(&sv.DeploymentProperties, value); err != nil { - return err - } - case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) + return fmt.Errorf("expected DomainUnitDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -11406,110 +11959,61 @@ func awsRestjson1_deserializeOpDocumentGetEnvironmentOutput(v **GetEnvironmentOu sv.DomainId = ptr.String(jtv) } - case "environmentActions": - if err := awsRestjson1_deserializeDocumentEnvironmentActionList(&sv.EnvironmentActions, value); err != nil { - return err - } - - case "environmentBlueprintId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EnvironmentBlueprintId to be of type string, got %T instead", value) - } - sv.EnvironmentBlueprintId = ptr.String(jtv) - } - - case "environmentProfileId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EnvironmentProfileId to be of type string, got %T instead", value) - } - sv.EnvironmentProfileId = ptr.String(jtv) - } - - case "glossaryTerms": - if err := awsRestjson1_deserializeDocumentGlossaryTerms(&sv.GlossaryTerms, value); err != nil { - return err - } - case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } - case "lastDeployment": - if err := awsRestjson1_deserializeDocumentDeployment(&sv.LastDeployment, value); err != nil { - return err - } - - case "name": + case "lastUpdatedAt": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EnvironmentName to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected UpdatedAt to be a JSON Number, got %T instead", value) + } - sv.Name = ptr.String(jtv) } - case "projectId": + case "lastUpdatedBy": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ProjectId to be of type string, got %T instead", value) + return fmt.Errorf("expected UpdatedBy to be of type string, got %T instead", value) } - sv.ProjectId = ptr.String(jtv) + sv.LastUpdatedBy = ptr.String(jtv) } - case "provider": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected DomainUnitName to be of type string, got %T instead", value) } - sv.Provider = ptr.String(jtv) - } - - case "provisionedResources": - if err := awsRestjson1_deserializeDocumentResourceList(&sv.ProvisionedResources, value); err != nil { - return err + sv.Name = ptr.String(jtv) } - case "provisioningProperties": - if err := awsRestjson1_deserializeDocumentProvisioningProperties(&sv.ProvisioningProperties, value); err != nil { + case "owners": + if err := awsRestjson1_deserializeDocumentDomainUnitOwners(&sv.Owners, value); err != nil { return err } - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EnvironmentStatus to be of type string, got %T instead", value) - } - sv.Status = types.EnvironmentStatus(jtv) - } - - case "updatedAt": + case "parentDomainUnitId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.UpdatedAt = ptr.Time(t) - } - - case "userParameters": - if err := awsRestjson1_deserializeDocumentCustomParameterList(&sv.UserParameters, value); err != nil { - return err + sv.ParentDomainUnitId = ptr.String(jtv) } default: @@ -11521,14 +12025,14 @@ func awsRestjson1_deserializeOpDocumentGetEnvironmentOutput(v **GetEnvironmentOu return nil } -type awsRestjson1_deserializeOpGetEnvironmentAction struct { +type awsRestjson1_deserializeOpGetEnvironment struct { } -func (*awsRestjson1_deserializeOpGetEnvironmentAction) ID() string { +func (*awsRestjson1_deserializeOpGetEnvironment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetEnvironmentAction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetEnvironment) 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) @@ -11542,9 +12046,9 @@ func (m *awsRestjson1_deserializeOpGetEnvironmentAction) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetEnvironmentAction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetEnvironment(response, &metadata) } - output := &GetEnvironmentActionOutput{} + output := &GetEnvironmentOutput{} out.Result = output var buff [1024]byte @@ -11565,7 +12069,7 @@ func (m *awsRestjson1_deserializeOpGetEnvironmentAction) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetEnvironmentActionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetEnvironmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11578,7 +12082,7 @@ func (m *awsRestjson1_deserializeOpGetEnvironmentAction) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetEnvironmentAction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetEnvironment(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)} @@ -11647,7 +12151,7 @@ func awsRestjson1_deserializeOpErrorGetEnvironmentAction(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentGetEnvironmentActionOutput(v **GetEnvironmentActionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetEnvironmentOutput(v **GetEnvironmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11660,21 +12164,66 @@ func awsRestjson1_deserializeOpDocumentGetEnvironmentActionOutput(v **GetEnviron return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetEnvironmentActionOutput + var sv *GetEnvironmentOutput if *v == nil { - sv = &GetEnvironmentActionOutput{} + sv = &GetEnvironmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "description": + case "awsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + + case "awsAccountRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsRegion to be of type string, got %T instead", value) + } + sv.AwsAccountRegion = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "createdBy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } + sv.CreatedBy = ptr.String(jtv) + } + + case "deploymentProperties": + if err := awsRestjson1_deserializeDocumentDeploymentProperties(&sv.DeploymentProperties, value); err != nil { + return err + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } sv.Description = ptr.String(jtv) } @@ -11687,35 +12236,109 @@ func awsRestjson1_deserializeOpDocumentGetEnvironmentActionOutput(v **GetEnviron sv.DomainId = ptr.String(jtv) } - case "environmentId": + case "environmentActions": + if err := awsRestjson1_deserializeDocumentEnvironmentActionList(&sv.EnvironmentActions, value); err != nil { + return err + } + + case "environmentBlueprintId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + return fmt.Errorf("expected EnvironmentBlueprintId to be of type string, got %T instead", value) } - sv.EnvironmentId = ptr.String(jtv) + sv.EnvironmentBlueprintId = ptr.String(jtv) + } + + case "environmentProfileId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentProfileId to be of type string, got %T instead", value) + } + sv.EnvironmentProfileId = ptr.String(jtv) + } + + case "glossaryTerms": + if err := awsRestjson1_deserializeDocumentGlossaryTerms(&sv.GlossaryTerms, value); err != nil { + return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentActionId to be of type string, got %T instead", value) + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } + case "lastDeployment": + if err := awsRestjson1_deserializeDocumentDeployment(&sv.LastDeployment, value); err != nil { + return err + } + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected EnvironmentName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "parameters": - if err := awsRestjson1_deserializeDocumentActionParameters(&sv.Parameters, value); err != nil { + case "projectId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectId to be of type string, got %T instead", value) + } + sv.ProjectId = ptr.String(jtv) + } + + case "provider": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Provider = ptr.String(jtv) + } + + case "provisionedResources": + if err := awsRestjson1_deserializeDocumentResourceList(&sv.ProvisionedResources, value); err != nil { + return err + } + + case "provisioningProperties": + if err := awsRestjson1_deserializeDocumentProvisioningProperties(&sv.ProvisioningProperties, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentStatus to be of type string, got %T instead", value) + } + sv.Status = types.EnvironmentStatus(jtv) + } + + case "updatedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(t) + } + + case "userParameters": + if err := awsRestjson1_deserializeDocumentCustomParameterList(&sv.UserParameters, value); err != nil { return err } @@ -11728,14 +12351,14 @@ func awsRestjson1_deserializeOpDocumentGetEnvironmentActionOutput(v **GetEnviron return nil } -type awsRestjson1_deserializeOpGetEnvironmentBlueprint struct { +type awsRestjson1_deserializeOpGetEnvironmentAction struct { } -func (*awsRestjson1_deserializeOpGetEnvironmentBlueprint) ID() string { +func (*awsRestjson1_deserializeOpGetEnvironmentAction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetEnvironmentBlueprint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetEnvironmentAction) 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) @@ -11749,9 +12372,9 @@ func (m *awsRestjson1_deserializeOpGetEnvironmentBlueprint) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetEnvironmentBlueprint(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetEnvironmentAction(response, &metadata) } - output := &GetEnvironmentBlueprintOutput{} + output := &GetEnvironmentActionOutput{} out.Result = output var buff [1024]byte @@ -11772,7 +12395,7 @@ func (m *awsRestjson1_deserializeOpGetEnvironmentBlueprint) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetEnvironmentActionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11785,7 +12408,7 @@ func (m *awsRestjson1_deserializeOpGetEnvironmentBlueprint) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetEnvironmentBlueprint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetEnvironmentAction(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)} @@ -11854,7 +12477,7 @@ func awsRestjson1_deserializeOpErrorGetEnvironmentBlueprint(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintOutput(v **GetEnvironmentBlueprintOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetEnvironmentActionOutput(v **GetEnvironmentActionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11867,94 +12490,62 @@ func awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintOutput(v **GetEnvi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetEnvironmentBlueprintOutput + var sv *GetEnvironmentActionOutput if *v == nil { - sv = &GetEnvironmentBlueprintOutput{} + sv = &GetEnvironmentActionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "createdAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) - } - - case "deploymentProperties": - if err := awsRestjson1_deserializeDocumentDeploymentProperties(&sv.DeploymentProperties, value); err != nil { - return err - } - case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } - case "glossaryTerms": - if err := awsRestjson1_deserializeDocumentGlossaryTerms(&sv.GlossaryTerms, value); err != nil { - return err - } - - case "id": + case "domainId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentBlueprintId to be of type string, got %T instead", value) + return fmt.Errorf("expected DomainId to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.DomainId = ptr.String(jtv) } - case "name": + case "environmentId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentBlueprintName to be of type string, got %T instead", value) + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.EnvironmentId = ptr.String(jtv) } - case "provider": + 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) + return fmt.Errorf("expected EnvironmentActionId to be of type string, got %T instead", value) } - sv.Provider = ptr.String(jtv) - } - - case "provisioningProperties": - if err := awsRestjson1_deserializeDocumentProvisioningProperties(&sv.ProvisioningProperties, value); err != nil { - return err + sv.Id = ptr.String(jtv) } - case "updatedAt": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.UpdatedAt = ptr.Time(t) + sv.Name = ptr.String(jtv) } - case "userParameters": - if err := awsRestjson1_deserializeDocumentCustomParameterList(&sv.UserParameters, value); err != nil { + case "parameters": + if err := awsRestjson1_deserializeDocumentActionParameters(&sv.Parameters, value); err != nil { return err } @@ -11967,14 +12558,14 @@ func awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintOutput(v **GetEnvi return nil } -type awsRestjson1_deserializeOpGetEnvironmentBlueprintConfiguration struct { +type awsRestjson1_deserializeOpGetEnvironmentBlueprint struct { } -func (*awsRestjson1_deserializeOpGetEnvironmentBlueprintConfiguration) ID() string { +func (*awsRestjson1_deserializeOpGetEnvironmentBlueprint) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetEnvironmentBlueprintConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetEnvironmentBlueprint) 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) @@ -11988,9 +12579,9 @@ func (m *awsRestjson1_deserializeOpGetEnvironmentBlueprintConfiguration) HandleD } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetEnvironmentBlueprintConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetEnvironmentBlueprint(response, &metadata) } - output := &GetEnvironmentBlueprintConfigurationOutput{} + output := &GetEnvironmentBlueprintOutput{} out.Result = output var buff [1024]byte @@ -12011,7 +12602,7 @@ func (m *awsRestjson1_deserializeOpGetEnvironmentBlueprintConfiguration) HandleD return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12024,7 +12615,7 @@ func (m *awsRestjson1_deserializeOpGetEnvironmentBlueprintConfiguration) HandleD return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetEnvironmentBlueprintConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetEnvironmentBlueprint(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)} @@ -12093,7 +12684,7 @@ func awsRestjson1_deserializeOpErrorGetEnvironmentBlueprintConfiguration(respons } } -func awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintConfigurationOutput(v **GetEnvironmentBlueprintConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintOutput(v **GetEnvironmentBlueprintOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12106,9 +12697,9 @@ func awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintConfigurationOutpu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetEnvironmentBlueprintConfigurationOutput + var sv *GetEnvironmentBlueprintOutput if *v == nil { - sv = &GetEnvironmentBlueprintConfigurationOutput{} + sv = &GetEnvironmentBlueprintOutput{} } else { sv = *v } @@ -12128,54 +12719,54 @@ func awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintConfigurationOutpu sv.CreatedAt = ptr.Time(t) } - case "domainId": + case "deploymentProperties": + if err := awsRestjson1_deserializeDocumentDeploymentProperties(&sv.DeploymentProperties, value); err != nil { + return err + } + + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DomainId to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } - sv.DomainId = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - case "enabledRegions": - if err := awsRestjson1_deserializeDocumentEnabledRegionList(&sv.EnabledRegions, value); err != nil { + case "glossaryTerms": + if err := awsRestjson1_deserializeDocumentGlossaryTerms(&sv.GlossaryTerms, value); err != nil { return err } - case "environmentBlueprintId": + case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EnvironmentBlueprintId to be of type string, got %T instead", value) } - sv.EnvironmentBlueprintId = ptr.String(jtv) + sv.Id = ptr.String(jtv) } - case "manageAccessRoleArn": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + return fmt.Errorf("expected EnvironmentBlueprintName to be of type string, got %T instead", value) } - sv.ManageAccessRoleArn = ptr.String(jtv) - } - - case "provisioningConfigurations": - if err := awsRestjson1_deserializeDocumentProvisioningConfigurationList(&sv.ProvisioningConfigurations, value); err != nil { - return err + sv.Name = ptr.String(jtv) } - case "provisioningRoleArn": + case "provider": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ProvisioningRoleArn = ptr.String(jtv) + sv.Provider = ptr.String(jtv) } - case "regionalParameters": - if err := awsRestjson1_deserializeDocumentRegionalParameterMap(&sv.RegionalParameters, value); err != nil { + case "provisioningProperties": + if err := awsRestjson1_deserializeDocumentProvisioningProperties(&sv.ProvisioningProperties, value); err != nil { return err } @@ -12192,6 +12783,11 @@ func awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintConfigurationOutpu sv.UpdatedAt = ptr.Time(t) } + case "userParameters": + if err := awsRestjson1_deserializeDocumentCustomParameterList(&sv.UserParameters, value); err != nil { + return err + } + default: _, _ = key, value @@ -12201,14 +12797,14 @@ func awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintConfigurationOutpu return nil } -type awsRestjson1_deserializeOpGetEnvironmentCredentials struct { +type awsRestjson1_deserializeOpGetEnvironmentBlueprintConfiguration struct { } -func (*awsRestjson1_deserializeOpGetEnvironmentCredentials) ID() string { +func (*awsRestjson1_deserializeOpGetEnvironmentBlueprintConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetEnvironmentCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetEnvironmentBlueprintConfiguration) 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) @@ -12222,9 +12818,9 @@ func (m *awsRestjson1_deserializeOpGetEnvironmentCredentials) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetEnvironmentCredentials(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetEnvironmentBlueprintConfiguration(response, &metadata) } - output := &GetEnvironmentCredentialsOutput{} + output := &GetEnvironmentBlueprintConfigurationOutput{} out.Result = output var buff [1024]byte @@ -12245,7 +12841,7 @@ func (m *awsRestjson1_deserializeOpGetEnvironmentCredentials) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetEnvironmentCredentialsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12258,7 +12854,241 @@ func (m *awsRestjson1_deserializeOpGetEnvironmentCredentials) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetEnvironmentCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetEnvironmentBlueprintConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetEnvironmentBlueprintConfigurationOutput(v **GetEnvironmentBlueprintConfigurationOutput, 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 *GetEnvironmentBlueprintConfigurationOutput + if *v == nil { + sv = &GetEnvironmentBlueprintConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "domainId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainId to be of type string, got %T instead", value) + } + sv.DomainId = ptr.String(jtv) + } + + case "enabledRegions": + if err := awsRestjson1_deserializeDocumentEnabledRegionList(&sv.EnabledRegions, value); err != nil { + return err + } + + case "environmentBlueprintId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentBlueprintId to be of type string, got %T instead", value) + } + sv.EnvironmentBlueprintId = ptr.String(jtv) + } + + case "manageAccessRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.ManageAccessRoleArn = ptr.String(jtv) + } + + case "provisioningConfigurations": + if err := awsRestjson1_deserializeDocumentProvisioningConfigurationList(&sv.ProvisioningConfigurations, value); err != nil { + return err + } + + case "provisioningRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.ProvisioningRoleArn = ptr.String(jtv) + } + + case "regionalParameters": + if err := awsRestjson1_deserializeDocumentRegionalParameterMap(&sv.RegionalParameters, value); err != nil { + return err + } + + case "updatedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(t) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetEnvironmentCredentials struct { +} + +func (*awsRestjson1_deserializeOpGetEnvironmentCredentials) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetEnvironmentCredentials) 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_deserializeOpErrorGetEnvironmentCredentials(response, &metadata) + } + output := &GetEnvironmentCredentialsOutput{} + 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_deserializeOpDocumentGetEnvironmentCredentialsOutput(&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_deserializeOpErrorGetEnvironmentCredentials(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)} @@ -14825,6 +15655,15 @@ func awsRestjson1_deserializeOpDocumentGetProjectOutput(v **GetProjectOutput, va sv.DomainId = ptr.String(jtv) } + case "domainUnitId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.DomainUnitId = ptr.String(jtv) + } + case "failureReasons": if err := awsRestjson1_deserializeDocumentFailureReasons(&sv.FailureReasons, value); err != nil { return err @@ -17590,14 +18429,14 @@ func awsRestjson1_deserializeOpDocumentListDomainsOutput(v **ListDomainsOutput, return nil } -type awsRestjson1_deserializeOpListEnvironmentActions struct { +type awsRestjson1_deserializeOpListDomainUnitsForParent struct { } -func (*awsRestjson1_deserializeOpListEnvironmentActions) ID() string { +func (*awsRestjson1_deserializeOpListDomainUnitsForParent) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEnvironmentActions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDomainUnitsForParent) 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) @@ -17611,9 +18450,9 @@ func (m *awsRestjson1_deserializeOpListEnvironmentActions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEnvironmentActions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDomainUnitsForParent(response, &metadata) } - output := &ListEnvironmentActionsOutput{} + output := &ListDomainUnitsForParentOutput{} out.Result = output var buff [1024]byte @@ -17634,7 +18473,7 @@ func (m *awsRestjson1_deserializeOpListEnvironmentActions) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEnvironmentActionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDomainUnitsForParentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17647,7 +18486,7 @@ func (m *awsRestjson1_deserializeOpListEnvironmentActions) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEnvironmentActions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDomainUnitsForParent(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)} @@ -17713,7 +18552,7 @@ func awsRestjson1_deserializeOpErrorListEnvironmentActions(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListEnvironmentActionsOutput(v **ListEnvironmentActionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDomainUnitsForParentOutput(v **ListDomainUnitsForParentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17726,9 +18565,9 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentActionsOutput(v **ListEnvi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEnvironmentActionsOutput + var sv *ListDomainUnitsForParentOutput if *v == nil { - sv = &ListEnvironmentActionsOutput{} + sv = &ListDomainUnitsForParentOutput{} } else { sv = *v } @@ -17736,7 +18575,7 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentActionsOutput(v **ListEnvi for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentListEnvironmentActionSummaries(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentDomainUnitSummaries(&sv.Items, value); err != nil { return err } @@ -17758,14 +18597,14 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentActionsOutput(v **ListEnvi return nil } -type awsRestjson1_deserializeOpListEnvironmentBlueprintConfigurations struct { +type awsRestjson1_deserializeOpListEntityOwners struct { } -func (*awsRestjson1_deserializeOpListEnvironmentBlueprintConfigurations) ID() string { +func (*awsRestjson1_deserializeOpListEntityOwners) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEnvironmentBlueprintConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEntityOwners) 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) @@ -17779,9 +18618,9 @@ func (m *awsRestjson1_deserializeOpListEnvironmentBlueprintConfigurations) Handl } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEnvironmentBlueprintConfigurations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEntityOwners(response, &metadata) } - output := &ListEnvironmentBlueprintConfigurationsOutput{} + output := &ListEntityOwnersOutput{} out.Result = output var buff [1024]byte @@ -17802,7 +18641,7 @@ func (m *awsRestjson1_deserializeOpListEnvironmentBlueprintConfigurations) Handl return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintConfigurationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEntityOwnersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17815,7 +18654,7 @@ func (m *awsRestjson1_deserializeOpListEnvironmentBlueprintConfigurations) Handl return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEnvironmentBlueprintConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEntityOwners(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)} @@ -17862,9 +18701,6 @@ func awsRestjson1_deserializeOpErrorListEnvironmentBlueprintConfigurations(respo case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -17884,7 +18720,7 @@ func awsRestjson1_deserializeOpErrorListEnvironmentBlueprintConfigurations(respo } } -func awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintConfigurationsOutput(v **ListEnvironmentBlueprintConfigurationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEntityOwnersOutput(v **ListEntityOwnersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17897,20 +18733,15 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintConfigurationsOut return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEnvironmentBlueprintConfigurationsOutput + var sv *ListEntityOwnersOutput if *v == nil { - sv = &ListEnvironmentBlueprintConfigurationsOutput{} + sv = &ListEntityOwnersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "items": - if err := awsRestjson1_deserializeDocumentEnvironmentBlueprintConfigurations(&sv.Items, value); err != nil { - return err - } - case "nextToken": if value != nil { jtv, ok := value.(string) @@ -17920,6 +18751,11 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintConfigurationsOut sv.NextToken = ptr.String(jtv) } + case "owners": + if err := awsRestjson1_deserializeDocumentEntityOwners(&sv.Owners, value); err != nil { + return err + } + default: _, _ = key, value @@ -17929,14 +18765,14 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintConfigurationsOut return nil } -type awsRestjson1_deserializeOpListEnvironmentBlueprints struct { +type awsRestjson1_deserializeOpListEnvironmentActions struct { } -func (*awsRestjson1_deserializeOpListEnvironmentBlueprints) ID() string { +func (*awsRestjson1_deserializeOpListEnvironmentActions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEnvironmentBlueprints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEnvironmentActions) 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) @@ -17950,9 +18786,9 @@ func (m *awsRestjson1_deserializeOpListEnvironmentBlueprints) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEnvironmentBlueprints(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEnvironmentActions(response, &metadata) } - output := &ListEnvironmentBlueprintsOutput{} + output := &ListEnvironmentActionsOutput{} out.Result = output var buff [1024]byte @@ -17973,7 +18809,7 @@ func (m *awsRestjson1_deserializeOpListEnvironmentBlueprints) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEnvironmentActionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17986,7 +18822,7 @@ func (m *awsRestjson1_deserializeOpListEnvironmentBlueprints) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEnvironmentBlueprints(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEnvironmentActions(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)} @@ -18033,9 +18869,6 @@ func awsRestjson1_deserializeOpErrorListEnvironmentBlueprints(response *smithyht case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -18055,7 +18888,7 @@ func awsRestjson1_deserializeOpErrorListEnvironmentBlueprints(response *smithyht } } -func awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintsOutput(v **ListEnvironmentBlueprintsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEnvironmentActionsOutput(v **ListEnvironmentActionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18068,9 +18901,9 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintsOutput(v **ListE return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEnvironmentBlueprintsOutput + var sv *ListEnvironmentActionsOutput if *v == nil { - sv = &ListEnvironmentBlueprintsOutput{} + sv = &ListEnvironmentActionsOutput{} } else { sv = *v } @@ -18078,7 +18911,7 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintsOutput(v **ListE for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentEnvironmentBlueprintSummaries(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentListEnvironmentActionSummaries(&sv.Items, value); err != nil { return err } @@ -18100,14 +18933,14 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintsOutput(v **ListE return nil } -type awsRestjson1_deserializeOpListEnvironmentProfiles struct { +type awsRestjson1_deserializeOpListEnvironmentBlueprintConfigurations struct { } -func (*awsRestjson1_deserializeOpListEnvironmentProfiles) ID() string { +func (*awsRestjson1_deserializeOpListEnvironmentBlueprintConfigurations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEnvironmentProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEnvironmentBlueprintConfigurations) 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) @@ -18121,9 +18954,9 @@ func (m *awsRestjson1_deserializeOpListEnvironmentProfiles) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEnvironmentProfiles(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEnvironmentBlueprintConfigurations(response, &metadata) } - output := &ListEnvironmentProfilesOutput{} + output := &ListEnvironmentBlueprintConfigurationsOutput{} out.Result = output var buff [1024]byte @@ -18144,7 +18977,7 @@ func (m *awsRestjson1_deserializeOpListEnvironmentProfiles) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEnvironmentProfilesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintConfigurationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18157,7 +18990,7 @@ func (m *awsRestjson1_deserializeOpListEnvironmentProfiles) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEnvironmentProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEnvironmentBlueprintConfigurations(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)} @@ -18204,6 +19037,9 @@ func awsRestjson1_deserializeOpErrorListEnvironmentProfiles(response *smithyhttp case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -18223,7 +19059,7 @@ func awsRestjson1_deserializeOpErrorListEnvironmentProfiles(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentListEnvironmentProfilesOutput(v **ListEnvironmentProfilesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintConfigurationsOutput(v **ListEnvironmentBlueprintConfigurationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18236,9 +19072,9 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentProfilesOutput(v **ListEnv return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEnvironmentProfilesOutput + var sv *ListEnvironmentBlueprintConfigurationsOutput if *v == nil { - sv = &ListEnvironmentProfilesOutput{} + sv = &ListEnvironmentBlueprintConfigurationsOutput{} } else { sv = *v } @@ -18246,7 +19082,7 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentProfilesOutput(v **ListEnv for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentEnvironmentProfileSummaries(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentEnvironmentBlueprintConfigurations(&sv.Items, value); err != nil { return err } @@ -18268,14 +19104,14 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentProfilesOutput(v **ListEnv return nil } -type awsRestjson1_deserializeOpListEnvironments struct { +type awsRestjson1_deserializeOpListEnvironmentBlueprints struct { } -func (*awsRestjson1_deserializeOpListEnvironments) ID() string { +func (*awsRestjson1_deserializeOpListEnvironmentBlueprints) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEnvironments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEnvironmentBlueprints) 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) @@ -18289,9 +19125,9 @@ func (m *awsRestjson1_deserializeOpListEnvironments) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEnvironments(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEnvironmentBlueprints(response, &metadata) } - output := &ListEnvironmentsOutput{} + output := &ListEnvironmentBlueprintsOutput{} out.Result = output var buff [1024]byte @@ -18312,7 +19148,7 @@ func (m *awsRestjson1_deserializeOpListEnvironments) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEnvironmentsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18325,7 +19161,7 @@ func (m *awsRestjson1_deserializeOpListEnvironments) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEnvironments(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEnvironmentBlueprints(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)} @@ -18372,6 +19208,9 @@ func awsRestjson1_deserializeOpErrorListEnvironments(response *smithyhttp.Respon case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -18391,7 +19230,7 @@ func awsRestjson1_deserializeOpErrorListEnvironments(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListEnvironmentsOutput(v **ListEnvironmentsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEnvironmentBlueprintsOutput(v **ListEnvironmentBlueprintsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18404,9 +19243,9 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentsOutput(v **ListEnvironmen return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEnvironmentsOutput + var sv *ListEnvironmentBlueprintsOutput if *v == nil { - sv = &ListEnvironmentsOutput{} + sv = &ListEnvironmentBlueprintsOutput{} } else { sv = *v } @@ -18414,7 +19253,7 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentsOutput(v **ListEnvironmen for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentEnvironmentSummaries(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentEnvironmentBlueprintSummaries(&sv.Items, value); err != nil { return err } @@ -18436,14 +19275,14 @@ func awsRestjson1_deserializeOpDocumentListEnvironmentsOutput(v **ListEnvironmen return nil } -type awsRestjson1_deserializeOpListLineageNodeHistory struct { +type awsRestjson1_deserializeOpListEnvironmentProfiles struct { } -func (*awsRestjson1_deserializeOpListLineageNodeHistory) ID() string { +func (*awsRestjson1_deserializeOpListEnvironmentProfiles) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListLineageNodeHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEnvironmentProfiles) 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) @@ -18457,9 +19296,9 @@ func (m *awsRestjson1_deserializeOpListLineageNodeHistory) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListLineageNodeHistory(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEnvironmentProfiles(response, &metadata) } - output := &ListLineageNodeHistoryOutput{} + output := &ListEnvironmentProfilesOutput{} out.Result = output var buff [1024]byte @@ -18480,7 +19319,7 @@ func (m *awsRestjson1_deserializeOpListLineageNodeHistory) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListLineageNodeHistoryOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEnvironmentProfilesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18493,7 +19332,7 @@ func (m *awsRestjson1_deserializeOpListLineageNodeHistory) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListLineageNodeHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEnvironmentProfiles(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)} @@ -18540,9 +19379,6 @@ func awsRestjson1_deserializeOpErrorListLineageNodeHistory(response *smithyhttp. case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -18562,7 +19398,7 @@ func awsRestjson1_deserializeOpErrorListLineageNodeHistory(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListLineageNodeHistoryOutput(v **ListLineageNodeHistoryOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEnvironmentProfilesOutput(v **ListEnvironmentProfilesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18575,15 +19411,20 @@ func awsRestjson1_deserializeOpDocumentListLineageNodeHistoryOutput(v **ListLine return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListLineageNodeHistoryOutput + var sv *ListEnvironmentProfilesOutput if *v == nil { - sv = &ListLineageNodeHistoryOutput{} + sv = &ListEnvironmentProfilesOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "items": + if err := awsRestjson1_deserializeDocumentEnvironmentProfileSummaries(&sv.Items, value); err != nil { + return err + } + case "nextToken": if value != nil { jtv, ok := value.(string) @@ -18593,11 +19434,6 @@ func awsRestjson1_deserializeOpDocumentListLineageNodeHistoryOutput(v **ListLine sv.NextToken = ptr.String(jtv) } - case "nodes": - if err := awsRestjson1_deserializeDocumentLineageNodeSummaries(&sv.Nodes, value); err != nil { - return err - } - default: _, _ = key, value @@ -18607,14 +19443,14 @@ func awsRestjson1_deserializeOpDocumentListLineageNodeHistoryOutput(v **ListLine return nil } -type awsRestjson1_deserializeOpListMetadataGenerationRuns struct { +type awsRestjson1_deserializeOpListEnvironments struct { } -func (*awsRestjson1_deserializeOpListMetadataGenerationRuns) ID() string { +func (*awsRestjson1_deserializeOpListEnvironments) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListMetadataGenerationRuns) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEnvironments) 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) @@ -18628,9 +19464,9 @@ func (m *awsRestjson1_deserializeOpListMetadataGenerationRuns) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListMetadataGenerationRuns(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEnvironments(response, &metadata) } - output := &ListMetadataGenerationRunsOutput{} + output := &ListEnvironmentsOutput{} out.Result = output var buff [1024]byte @@ -18651,7 +19487,7 @@ func (m *awsRestjson1_deserializeOpListMetadataGenerationRuns) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListMetadataGenerationRunsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEnvironmentsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18664,7 +19500,7 @@ func (m *awsRestjson1_deserializeOpListMetadataGenerationRuns) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorListMetadataGenerationRuns(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEnvironments(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)} @@ -18711,9 +19547,6 @@ func awsRestjson1_deserializeOpErrorListMetadataGenerationRuns(response *smithyh case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -18733,7 +19566,7 @@ func awsRestjson1_deserializeOpErrorListMetadataGenerationRuns(response *smithyh } } -func awsRestjson1_deserializeOpDocumentListMetadataGenerationRunsOutput(v **ListMetadataGenerationRunsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEnvironmentsOutput(v **ListEnvironmentsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18746,9 +19579,9 @@ func awsRestjson1_deserializeOpDocumentListMetadataGenerationRunsOutput(v **List return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListMetadataGenerationRunsOutput + var sv *ListEnvironmentsOutput if *v == nil { - sv = &ListMetadataGenerationRunsOutput{} + sv = &ListEnvironmentsOutput{} } else { sv = *v } @@ -18756,7 +19589,7 @@ func awsRestjson1_deserializeOpDocumentListMetadataGenerationRunsOutput(v **List for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentMetadataGenerationRuns(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentEnvironmentSummaries(&sv.Items, value); err != nil { return err } @@ -18778,14 +19611,14 @@ func awsRestjson1_deserializeOpDocumentListMetadataGenerationRunsOutput(v **List return nil } -type awsRestjson1_deserializeOpListNotifications struct { +type awsRestjson1_deserializeOpListLineageNodeHistory struct { } -func (*awsRestjson1_deserializeOpListNotifications) ID() string { +func (*awsRestjson1_deserializeOpListLineageNodeHistory) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListNotifications) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListLineageNodeHistory) 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) @@ -18799,9 +19632,9 @@ func (m *awsRestjson1_deserializeOpListNotifications) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListNotifications(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListLineageNodeHistory(response, &metadata) } - output := &ListNotificationsOutput{} + output := &ListLineageNodeHistoryOutput{} out.Result = output var buff [1024]byte @@ -18822,7 +19655,7 @@ func (m *awsRestjson1_deserializeOpListNotifications) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListNotificationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListLineageNodeHistoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18835,7 +19668,7 @@ func (m *awsRestjson1_deserializeOpListNotifications) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListNotifications(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListLineageNodeHistory(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)} @@ -18904,7 +19737,7 @@ func awsRestjson1_deserializeOpErrorListNotifications(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentListNotificationsOutput(v **ListNotificationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListLineageNodeHistoryOutput(v **ListLineageNodeHistoryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18917,9 +19750,9 @@ func awsRestjson1_deserializeOpDocumentListNotificationsOutput(v **ListNotificat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListNotificationsOutput + var sv *ListLineageNodeHistoryOutput if *v == nil { - sv = &ListNotificationsOutput{} + sv = &ListLineageNodeHistoryOutput{} } else { sv = *v } @@ -18935,8 +19768,8 @@ func awsRestjson1_deserializeOpDocumentListNotificationsOutput(v **ListNotificat sv.NextToken = ptr.String(jtv) } - case "notifications": - if err := awsRestjson1_deserializeDocumentNotificationsList(&sv.Notifications, value); err != nil { + case "nodes": + if err := awsRestjson1_deserializeDocumentLineageNodeSummaries(&sv.Nodes, value); err != nil { return err } @@ -18949,14 +19782,14 @@ func awsRestjson1_deserializeOpDocumentListNotificationsOutput(v **ListNotificat return nil } -type awsRestjson1_deserializeOpListProjectMemberships struct { +type awsRestjson1_deserializeOpListMetadataGenerationRuns struct { } -func (*awsRestjson1_deserializeOpListProjectMemberships) ID() string { +func (*awsRestjson1_deserializeOpListMetadataGenerationRuns) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListProjectMemberships) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListMetadataGenerationRuns) 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) @@ -18970,9 +19803,9 @@ func (m *awsRestjson1_deserializeOpListProjectMemberships) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProjectMemberships(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListMetadataGenerationRuns(response, &metadata) } - output := &ListProjectMembershipsOutput{} + output := &ListMetadataGenerationRunsOutput{} out.Result = output var buff [1024]byte @@ -18993,7 +19826,7 @@ func (m *awsRestjson1_deserializeOpListProjectMemberships) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListProjectMembershipsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListMetadataGenerationRunsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19006,7 +19839,7 @@ func (m *awsRestjson1_deserializeOpListProjectMemberships) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListProjectMemberships(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListMetadataGenerationRuns(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)} @@ -19075,7 +19908,7 @@ func awsRestjson1_deserializeOpErrorListProjectMemberships(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListProjectMembershipsOutput(v **ListProjectMembershipsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListMetadataGenerationRunsOutput(v **ListMetadataGenerationRunsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19088,17 +19921,17 @@ func awsRestjson1_deserializeOpDocumentListProjectMembershipsOutput(v **ListProj return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListProjectMembershipsOutput + var sv *ListMetadataGenerationRunsOutput if *v == nil { - sv = &ListProjectMembershipsOutput{} + sv = &ListMetadataGenerationRunsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "members": - if err := awsRestjson1_deserializeDocumentProjectMembers(&sv.Members, value); err != nil { + case "items": + if err := awsRestjson1_deserializeDocumentMetadataGenerationRuns(&sv.Items, value); err != nil { return err } @@ -19120,14 +19953,14 @@ func awsRestjson1_deserializeOpDocumentListProjectMembershipsOutput(v **ListProj return nil } -type awsRestjson1_deserializeOpListProjects struct { +type awsRestjson1_deserializeOpListNotifications struct { } -func (*awsRestjson1_deserializeOpListProjects) ID() string { +func (*awsRestjson1_deserializeOpListNotifications) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListProjects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListNotifications) 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) @@ -19141,9 +19974,9 @@ func (m *awsRestjson1_deserializeOpListProjects) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProjects(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListNotifications(response, &metadata) } - output := &ListProjectsOutput{} + output := &ListNotificationsOutput{} out.Result = output var buff [1024]byte @@ -19164,7 +19997,7 @@ func (m *awsRestjson1_deserializeOpListProjects) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListProjectsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListNotificationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19177,7 +20010,7 @@ func (m *awsRestjson1_deserializeOpListProjects) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorListProjects(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListNotifications(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)} @@ -19224,6 +20057,9 @@ func awsRestjson1_deserializeOpErrorListProjects(response *smithyhttp.Response, case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -19243,7 +20079,7 @@ func awsRestjson1_deserializeOpErrorListProjects(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListNotificationsOutput(v **ListNotificationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19256,20 +20092,15 @@ func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListProjectsOutput + var sv *ListNotificationsOutput if *v == nil { - sv = &ListProjectsOutput{} + sv = &ListNotificationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "items": - if err := awsRestjson1_deserializeDocumentProjectSummaries(&sv.Items, value); err != nil { - return err - } - case "nextToken": if value != nil { jtv, ok := value.(string) @@ -19279,6 +20110,11 @@ func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput sv.NextToken = ptr.String(jtv) } + case "notifications": + if err := awsRestjson1_deserializeDocumentNotificationsList(&sv.Notifications, value); err != nil { + return err + } + default: _, _ = key, value @@ -19288,14 +20124,14 @@ func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput return nil } -type awsRestjson1_deserializeOpListSubscriptionGrants struct { +type awsRestjson1_deserializeOpListPolicyGrants struct { } -func (*awsRestjson1_deserializeOpListSubscriptionGrants) ID() string { +func (*awsRestjson1_deserializeOpListPolicyGrants) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSubscriptionGrants) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListPolicyGrants) 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) @@ -19309,9 +20145,9 @@ func (m *awsRestjson1_deserializeOpListSubscriptionGrants) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSubscriptionGrants(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListPolicyGrants(response, &metadata) } - output := &ListSubscriptionGrantsOutput{} + output := &ListPolicyGrantsOutput{} out.Result = output var buff [1024]byte @@ -19332,7 +20168,7 @@ func (m *awsRestjson1_deserializeOpListSubscriptionGrants) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSubscriptionGrantsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListPolicyGrantsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19345,7 +20181,7 @@ func (m *awsRestjson1_deserializeOpListSubscriptionGrants) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSubscriptionGrants(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListPolicyGrants(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)} @@ -19392,9 +20228,6 @@ func awsRestjson1_deserializeOpErrorListSubscriptionGrants(response *smithyhttp. case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -19414,7 +20247,7 @@ func awsRestjson1_deserializeOpErrorListSubscriptionGrants(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListSubscriptionGrantsOutput(v **ListSubscriptionGrantsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListPolicyGrantsOutput(v **ListPolicyGrantsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19427,17 +20260,17 @@ func awsRestjson1_deserializeOpDocumentListSubscriptionGrantsOutput(v **ListSubs return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSubscriptionGrantsOutput + var sv *ListPolicyGrantsOutput if *v == nil { - sv = &ListSubscriptionGrantsOutput{} + sv = &ListPolicyGrantsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "items": - if err := awsRestjson1_deserializeDocumentSubscriptionGrants(&sv.Items, value); err != nil { + case "grantList": + if err := awsRestjson1_deserializeDocumentPolicyGrantList(&sv.GrantList, value); err != nil { return err } @@ -19459,14 +20292,14 @@ func awsRestjson1_deserializeOpDocumentListSubscriptionGrantsOutput(v **ListSubs return nil } -type awsRestjson1_deserializeOpListSubscriptionRequests struct { +type awsRestjson1_deserializeOpListProjectMemberships struct { } -func (*awsRestjson1_deserializeOpListSubscriptionRequests) ID() string { +func (*awsRestjson1_deserializeOpListProjectMemberships) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSubscriptionRequests) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListProjectMemberships) 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) @@ -19480,9 +20313,9 @@ func (m *awsRestjson1_deserializeOpListSubscriptionRequests) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSubscriptionRequests(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListProjectMemberships(response, &metadata) } - output := &ListSubscriptionRequestsOutput{} + output := &ListProjectMembershipsOutput{} out.Result = output var buff [1024]byte @@ -19503,7 +20336,7 @@ func (m *awsRestjson1_deserializeOpListSubscriptionRequests) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSubscriptionRequestsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListProjectMembershipsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19516,7 +20349,7 @@ func (m *awsRestjson1_deserializeOpListSubscriptionRequests) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSubscriptionRequests(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListProjectMemberships(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)} @@ -19585,7 +20418,7 @@ func awsRestjson1_deserializeOpErrorListSubscriptionRequests(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentListSubscriptionRequestsOutput(v **ListSubscriptionRequestsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListProjectMembershipsOutput(v **ListProjectMembershipsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19598,9 +20431,177 @@ func awsRestjson1_deserializeOpDocumentListSubscriptionRequestsOutput(v **ListSu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSubscriptionRequestsOutput + var sv *ListProjectMembershipsOutput if *v == nil { - sv = &ListSubscriptionRequestsOutput{} + sv = &ListProjectMembershipsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "members": + if err := awsRestjson1_deserializeDocumentProjectMembers(&sv.Members, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListProjects struct { +} + +func (*awsRestjson1_deserializeOpListProjects) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListProjects) 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_deserializeOpErrorListProjects(response, &metadata) + } + output := &ListProjectsOutput{} + 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_deserializeOpDocumentListProjectsOutput(&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_deserializeOpErrorListProjects(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput, 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 *ListProjectsOutput + if *v == nil { + sv = &ListProjectsOutput{} } else { sv = *v } @@ -19608,7 +20609,7 @@ func awsRestjson1_deserializeOpDocumentListSubscriptionRequestsOutput(v **ListSu for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentSubscriptionRequests(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentProjectSummaries(&sv.Items, value); err != nil { return err } @@ -19630,14 +20631,14 @@ func awsRestjson1_deserializeOpDocumentListSubscriptionRequestsOutput(v **ListSu return nil } -type awsRestjson1_deserializeOpListSubscriptions struct { +type awsRestjson1_deserializeOpListSubscriptionGrants struct { } -func (*awsRestjson1_deserializeOpListSubscriptions) ID() string { +func (*awsRestjson1_deserializeOpListSubscriptionGrants) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSubscriptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSubscriptionGrants) 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) @@ -19651,9 +20652,9 @@ func (m *awsRestjson1_deserializeOpListSubscriptions) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSubscriptions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListSubscriptionGrants(response, &metadata) } - output := &ListSubscriptionsOutput{} + output := &ListSubscriptionGrantsOutput{} out.Result = output var buff [1024]byte @@ -19674,7 +20675,7 @@ func (m *awsRestjson1_deserializeOpListSubscriptions) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSubscriptionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSubscriptionGrantsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19687,7 +20688,7 @@ func (m *awsRestjson1_deserializeOpListSubscriptions) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSubscriptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSubscriptionGrants(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)} @@ -19756,7 +20757,7 @@ func awsRestjson1_deserializeOpErrorListSubscriptions(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentListSubscriptionsOutput(v **ListSubscriptionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListSubscriptionGrantsOutput(v **ListSubscriptionGrantsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19769,9 +20770,9 @@ func awsRestjson1_deserializeOpDocumentListSubscriptionsOutput(v **ListSubscript return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSubscriptionsOutput + var sv *ListSubscriptionGrantsOutput if *v == nil { - sv = &ListSubscriptionsOutput{} + sv = &ListSubscriptionGrantsOutput{} } else { sv = *v } @@ -19779,7 +20780,7 @@ func awsRestjson1_deserializeOpDocumentListSubscriptionsOutput(v **ListSubscript for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentSubscriptions(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentSubscriptionGrants(&sv.Items, value); err != nil { return err } @@ -19801,14 +20802,14 @@ func awsRestjson1_deserializeOpDocumentListSubscriptionsOutput(v **ListSubscript return nil } -type awsRestjson1_deserializeOpListSubscriptionTargets struct { +type awsRestjson1_deserializeOpListSubscriptionRequests struct { } -func (*awsRestjson1_deserializeOpListSubscriptionTargets) ID() string { +func (*awsRestjson1_deserializeOpListSubscriptionRequests) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSubscriptionTargets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSubscriptionRequests) 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) @@ -19822,9 +20823,9 @@ func (m *awsRestjson1_deserializeOpListSubscriptionTargets) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSubscriptionTargets(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListSubscriptionRequests(response, &metadata) } - output := &ListSubscriptionTargetsOutput{} + output := &ListSubscriptionRequestsOutput{} out.Result = output var buff [1024]byte @@ -19845,7 +20846,7 @@ func (m *awsRestjson1_deserializeOpListSubscriptionTargets) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSubscriptionTargetsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSubscriptionRequestsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19858,7 +20859,7 @@ func (m *awsRestjson1_deserializeOpListSubscriptionTargets) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSubscriptionTargets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSubscriptionRequests(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)} @@ -19927,7 +20928,7 @@ func awsRestjson1_deserializeOpErrorListSubscriptionTargets(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentListSubscriptionTargetsOutput(v **ListSubscriptionTargetsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListSubscriptionRequestsOutput(v **ListSubscriptionRequestsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19940,9 +20941,9 @@ func awsRestjson1_deserializeOpDocumentListSubscriptionTargetsOutput(v **ListSub return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSubscriptionTargetsOutput + var sv *ListSubscriptionRequestsOutput if *v == nil { - sv = &ListSubscriptionTargetsOutput{} + sv = &ListSubscriptionRequestsOutput{} } else { sv = *v } @@ -19950,7 +20951,7 @@ func awsRestjson1_deserializeOpDocumentListSubscriptionTargetsOutput(v **ListSub for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentSubscriptionTargets(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentSubscriptionRequests(&sv.Items, value); err != nil { return err } @@ -19972,14 +20973,14 @@ func awsRestjson1_deserializeOpDocumentListSubscriptionTargetsOutput(v **ListSub return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpListSubscriptions struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpListSubscriptions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSubscriptions) 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) @@ -19993,9 +20994,9 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListSubscriptions(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListSubscriptionsOutput{} out.Result = output var buff [1024]byte @@ -20016,7 +21017,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSubscriptionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20029,7 +21030,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSubscriptions(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)} @@ -20098,7 +21099,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListSubscriptionsOutput(v **ListSubscriptionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20111,20 +21112,29 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *ListSubscriptionsOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &ListSubscriptionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + case "items": + if err := awsRestjson1_deserializeDocumentSubscriptions(&sv.Items, value); err != nil { return err } + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -20134,14 +21144,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpListTimeSeriesDataPoints struct { +type awsRestjson1_deserializeOpListSubscriptionTargets struct { } -func (*awsRestjson1_deserializeOpListTimeSeriesDataPoints) ID() string { +func (*awsRestjson1_deserializeOpListSubscriptionTargets) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTimeSeriesDataPoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSubscriptionTargets) 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) @@ -20155,9 +21165,9 @@ func (m *awsRestjson1_deserializeOpListTimeSeriesDataPoints) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTimeSeriesDataPoints(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListSubscriptionTargets(response, &metadata) } - output := &ListTimeSeriesDataPointsOutput{} + output := &ListSubscriptionTargetsOutput{} out.Result = output var buff [1024]byte @@ -20178,7 +21188,7 @@ func (m *awsRestjson1_deserializeOpListTimeSeriesDataPoints) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTimeSeriesDataPointsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSubscriptionTargetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20191,7 +21201,340 @@ func (m *awsRestjson1_deserializeOpListTimeSeriesDataPoints) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTimeSeriesDataPoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSubscriptionTargets(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListSubscriptionTargetsOutput(v **ListSubscriptionTargetsOutput, 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 *ListSubscriptionTargetsOutput + if *v == nil { + sv = &ListSubscriptionTargetsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsRestjson1_deserializeDocumentSubscriptionTargets(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) 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_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + 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_deserializeOpDocumentListTagsForResourceOutput(&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_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, 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 *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTimeSeriesDataPoints struct { +} + +func (*awsRestjson1_deserializeOpListTimeSeriesDataPoints) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTimeSeriesDataPoints) 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_deserializeOpErrorListTimeSeriesDataPoints(response, &metadata) + } + output := &ListTimeSeriesDataPointsOutput{} + 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_deserializeOpDocumentListTimeSeriesDataPointsOutput(&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_deserializeOpErrorListTimeSeriesDataPoints(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)} @@ -21302,6 +22645,199 @@ func awsRestjson1_deserializeOpDocumentRejectSubscriptionRequestOutput(v **Rejec return nil } +type awsRestjson1_deserializeOpRemoveEntityOwner struct { +} + +func (*awsRestjson1_deserializeOpRemoveEntityOwner) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRemoveEntityOwner) 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_deserializeOpErrorRemoveEntityOwner(response, &metadata) + } + output := &RemoveEntityOwnerOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorRemoveEntityOwner(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpRemovePolicyGrant struct { +} + +func (*awsRestjson1_deserializeOpRemovePolicyGrant) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRemovePolicyGrant) 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_deserializeOpErrorRemovePolicyGrant(response, &metadata) + } + output := &RemovePolicyGrantOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorRemovePolicyGrant(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpRevokeSubscription struct { } @@ -23975,6 +25511,15 @@ func awsRestjson1_deserializeOpDocumentUpdateDomainOutput(v **UpdateDomainOutput sv.Name = ptr.String(jtv) } + case "rootDomainUnitId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.RootDomainUnitId = ptr.String(jtv) + } + case "singleSignOn": if err := awsRestjson1_deserializeDocumentSingleSignOn(&sv.SingleSignOn, value); err != nil { return err @@ -23989,14 +25534,14 @@ func awsRestjson1_deserializeOpDocumentUpdateDomainOutput(v **UpdateDomainOutput return nil } -type awsRestjson1_deserializeOpUpdateEnvironment struct { +type awsRestjson1_deserializeOpUpdateDomainUnit struct { } -func (*awsRestjson1_deserializeOpUpdateEnvironment) ID() string { +func (*awsRestjson1_deserializeOpUpdateDomainUnit) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateDomainUnit) 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) @@ -24010,9 +25555,9 @@ func (m *awsRestjson1_deserializeOpUpdateEnvironment) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateEnvironment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDomainUnit(response, &metadata) } - output := &UpdateEnvironmentOutput{} + output := &UpdateDomainUnitOutput{} out.Result = output var buff [1024]byte @@ -24033,7 +25578,7 @@ func (m *awsRestjson1_deserializeOpUpdateEnvironment) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateEnvironmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateDomainUnitOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24046,7 +25591,7 @@ func (m *awsRestjson1_deserializeOpUpdateEnvironment) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateDomainUnit(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)} @@ -24096,8 +25641,8 @@ func awsRestjson1_deserializeOpErrorUpdateEnvironment(response *smithyhttp.Respo case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -24118,7 +25663,7 @@ func awsRestjson1_deserializeOpErrorUpdateEnvironment(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentUpdateEnvironmentOutput(v **UpdateEnvironmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateDomainUnitOutput(v **UpdateDomainUnitOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24131,65 +25676,45 @@ func awsRestjson1_deserializeOpDocumentUpdateEnvironmentOutput(v **UpdateEnviron return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateEnvironmentOutput + var sv *UpdateDomainUnitOutput if *v == nil { - sv = &UpdateEnvironmentOutput{} + sv = &UpdateDomainUnitOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "awsAccountId": + case "createdAt": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) - } - sv.AwsAccountId = ptr.String(jtv) - } + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - case "awsAccountRegion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsRegion to be of type string, got %T instead", value) - } - sv.AwsAccountRegion = ptr.String(jtv) - } + default: + return fmt.Errorf("expected CreatedAt to be a JSON Number, got %T instead", value) - case "createdAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) } case "createdBy": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected CreatedBy to be of type string, got %T instead", value) } sv.CreatedBy = ptr.String(jtv) } - case "deploymentProperties": - if err := awsRestjson1_deserializeDocumentDeploymentProperties(&sv.DeploymentProperties, value); err != nil { - return err - } - case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) + return fmt.Errorf("expected DomainUnitDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -24203,110 +25728,61 @@ func awsRestjson1_deserializeOpDocumentUpdateEnvironmentOutput(v **UpdateEnviron sv.DomainId = ptr.String(jtv) } - case "environmentActions": - if err := awsRestjson1_deserializeDocumentEnvironmentActionList(&sv.EnvironmentActions, value); err != nil { - return err - } - - case "environmentBlueprintId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EnvironmentBlueprintId to be of type string, got %T instead", value) - } - sv.EnvironmentBlueprintId = ptr.String(jtv) - } - - case "environmentProfileId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EnvironmentProfileId to be of type string, got %T instead", value) - } - sv.EnvironmentProfileId = ptr.String(jtv) - } - - case "glossaryTerms": - if err := awsRestjson1_deserializeDocumentGlossaryTerms(&sv.GlossaryTerms, value); err != nil { - return err - } - case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } - case "lastDeployment": - if err := awsRestjson1_deserializeDocumentDeployment(&sv.LastDeployment, value); err != nil { - return err - } - - case "name": + case "lastUpdatedAt": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EnvironmentName to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected UpdatedAt to be a JSON Number, got %T instead", value) + } - sv.Name = ptr.String(jtv) } - case "projectId": + case "lastUpdatedBy": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ProjectId to be of type string, got %T instead", value) + return fmt.Errorf("expected UpdatedBy to be of type string, got %T instead", value) } - sv.ProjectId = ptr.String(jtv) + sv.LastUpdatedBy = ptr.String(jtv) } - case "provider": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected DomainUnitName to be of type string, got %T instead", value) } - sv.Provider = ptr.String(jtv) + sv.Name = ptr.String(jtv) } - case "provisionedResources": - if err := awsRestjson1_deserializeDocumentResourceList(&sv.ProvisionedResources, value); err != nil { + case "owners": + if err := awsRestjson1_deserializeDocumentDomainUnitOwners(&sv.Owners, value); err != nil { return err } - case "provisioningProperties": - if err := awsRestjson1_deserializeDocumentProvisioningProperties(&sv.ProvisioningProperties, value); err != nil { - return err - } - - case "status": + case "parentDomainUnitId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) } - sv.Status = types.EnvironmentStatus(jtv) - } - - case "updatedAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.UpdatedAt = ptr.Time(t) - } - - case "userParameters": - if err := awsRestjson1_deserializeDocumentCustomParameterList(&sv.UserParameters, value); err != nil { - return err + sv.ParentDomainUnitId = ptr.String(jtv) } default: @@ -24318,14 +25794,14 @@ func awsRestjson1_deserializeOpDocumentUpdateEnvironmentOutput(v **UpdateEnviron return nil } -type awsRestjson1_deserializeOpUpdateEnvironmentAction struct { +type awsRestjson1_deserializeOpUpdateEnvironment struct { } -func (*awsRestjson1_deserializeOpUpdateEnvironmentAction) ID() string { +func (*awsRestjson1_deserializeOpUpdateEnvironment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateEnvironmentAction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateEnvironment) 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) @@ -24339,9 +25815,9 @@ func (m *awsRestjson1_deserializeOpUpdateEnvironmentAction) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateEnvironmentAction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateEnvironment(response, &metadata) } - output := &UpdateEnvironmentActionOutput{} + output := &UpdateEnvironmentOutput{} out.Result = output var buff [1024]byte @@ -24362,7 +25838,7 @@ func (m *awsRestjson1_deserializeOpUpdateEnvironmentAction) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateEnvironmentActionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateEnvironmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24375,7 +25851,336 @@ func (m *awsRestjson1_deserializeOpUpdateEnvironmentAction) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateEnvironmentAction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateEnvironmentOutput(v **UpdateEnvironmentOutput, 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 *UpdateEnvironmentOutput + if *v == nil { + sv = &UpdateEnvironmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "awsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + + case "awsAccountRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsRegion to be of type string, got %T instead", value) + } + sv.AwsAccountRegion = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "createdBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "deploymentProperties": + if err := awsRestjson1_deserializeDocumentDeploymentProperties(&sv.DeploymentProperties, value); err != nil { + return err + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "domainId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainId to be of type string, got %T instead", value) + } + sv.DomainId = ptr.String(jtv) + } + + case "environmentActions": + if err := awsRestjson1_deserializeDocumentEnvironmentActionList(&sv.EnvironmentActions, value); err != nil { + return err + } + + case "environmentBlueprintId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentBlueprintId to be of type string, got %T instead", value) + } + sv.EnvironmentBlueprintId = ptr.String(jtv) + } + + case "environmentProfileId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentProfileId to be of type string, got %T instead", value) + } + sv.EnvironmentProfileId = ptr.String(jtv) + } + + case "glossaryTerms": + if err := awsRestjson1_deserializeDocumentGlossaryTerms(&sv.GlossaryTerms, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "lastDeployment": + if err := awsRestjson1_deserializeDocumentDeployment(&sv.LastDeployment, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "projectId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectId to be of type string, got %T instead", value) + } + sv.ProjectId = ptr.String(jtv) + } + + case "provider": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Provider = ptr.String(jtv) + } + + case "provisionedResources": + if err := awsRestjson1_deserializeDocumentResourceList(&sv.ProvisionedResources, value); err != nil { + return err + } + + case "provisioningProperties": + if err := awsRestjson1_deserializeDocumentProvisioningProperties(&sv.ProvisioningProperties, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentStatus to be of type string, got %T instead", value) + } + sv.Status = types.EnvironmentStatus(jtv) + } + + case "updatedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(t) + } + + case "userParameters": + if err := awsRestjson1_deserializeDocumentCustomParameterList(&sv.UserParameters, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateEnvironmentAction struct { +} + +func (*awsRestjson1_deserializeOpUpdateEnvironmentAction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateEnvironmentAction) 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_deserializeOpErrorUpdateEnvironmentAction(response, &metadata) + } + output := &UpdateEnvironmentActionOutput{} + 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_deserializeOpDocumentUpdateEnvironmentActionOutput(&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_deserializeOpErrorUpdateEnvironmentAction(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)} @@ -25632,6 +27437,15 @@ func awsRestjson1_deserializeOpDocumentUpdateProjectOutput(v **UpdateProjectOutp sv.DomainId = ptr.String(jtv) } + case "domainUnitId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.DomainUnitId = ptr.String(jtv) + } + case "failureReasons": if err := awsRestjson1_deserializeDocumentFailureReasons(&sv.FailureReasons, value); err != nil { return err @@ -27093,6 +28907,108 @@ loop: return nil } +func awsRestjson1_deserializeDocumentAddToProjectMemberPoolPolicyGrantDetail(v **types.AddToProjectMemberPoolPolicyGrantDetail, 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.AddToProjectMemberPoolPolicyGrantDetail + if *v == nil { + sv = &types.AddToProjectMemberPoolPolicyGrantDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "includeChildDomainUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildDomainUnits = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAllDomainUnitsGrantFilter(v **types.AllDomainUnitsGrantFilter, 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.AllDomainUnitsGrantFilter + if *v == nil { + sv = &types.AllDomainUnitsGrantFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAllUsersGrantFilter(v **types.AllUsersGrantFilter, 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.AllUsersGrantFilter + if *v == nil { + sv = &types.AllUsersGrantFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentApplicableAssetTypes(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -28652,6 +30568,246 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } +func awsRestjson1_deserializeDocumentCreateAssetTypePolicyGrantDetail(v **types.CreateAssetTypePolicyGrantDetail, 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.CreateAssetTypePolicyGrantDetail + if *v == nil { + sv = &types.CreateAssetTypePolicyGrantDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "includeChildDomainUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildDomainUnits = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCreateDomainUnitPolicyGrantDetail(v **types.CreateDomainUnitPolicyGrantDetail, 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.CreateDomainUnitPolicyGrantDetail + if *v == nil { + sv = &types.CreateDomainUnitPolicyGrantDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "includeChildDomainUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildDomainUnits = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCreateEnvironmentProfilePolicyGrantDetail(v **types.CreateEnvironmentProfilePolicyGrantDetail, 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.CreateEnvironmentProfilePolicyGrantDetail + if *v == nil { + sv = &types.CreateEnvironmentProfilePolicyGrantDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "domainUnitId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.DomainUnitId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCreateFormTypePolicyGrantDetail(v **types.CreateFormTypePolicyGrantDetail, 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.CreateFormTypePolicyGrantDetail + if *v == nil { + sv = &types.CreateFormTypePolicyGrantDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "includeChildDomainUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildDomainUnits = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCreateGlossaryPolicyGrantDetail(v **types.CreateGlossaryPolicyGrantDetail, 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.CreateGlossaryPolicyGrantDetail + if *v == nil { + sv = &types.CreateGlossaryPolicyGrantDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "includeChildDomainUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildDomainUnits = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCreateProjectPolicyGrantDetail(v **types.CreateProjectPolicyGrantDetail, 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.CreateProjectPolicyGrantDetail + if *v == nil { + sv = &types.CreateProjectPolicyGrantDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "includeChildDomainUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildDomainUnits = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentCustomParameter(v **types.CustomParameter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -30434,6 +32590,430 @@ func awsRestjson1_deserializeDocumentDomainSummary(v **types.DomainSummary, valu return nil } +func awsRestjson1_deserializeDocumentDomainUnitFilterForProject(v **types.DomainUnitFilterForProject, 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.DomainUnitFilterForProject + if *v == nil { + sv = &types.DomainUnitFilterForProject{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "domainUnit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.DomainUnit = ptr.String(jtv) + } + + case "includeChildDomainUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildDomainUnits = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDomainUnitGrantFilter(v *types.DomainUnitGrantFilter, 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 uv types.DomainUnitGrantFilter +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "allDomainUnitsGrantFilter": + var mv types.AllDomainUnitsGrantFilter + destAddr := &mv + if err := awsRestjson1_deserializeDocumentAllDomainUnitsGrantFilter(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.DomainUnitGrantFilterMemberAllDomainUnitsGrantFilter{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentDomainUnitGroupProperties(v **types.DomainUnitGroupProperties, 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.DomainUnitGroupProperties + if *v == nil { + sv = &types.DomainUnitGroupProperties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "groupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.GroupId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDomainUnitIds(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDomainUnitOwnerProperties(v *types.DomainUnitOwnerProperties, 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 uv types.DomainUnitOwnerProperties +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "group": + var mv types.DomainUnitGroupProperties + destAddr := &mv + if err := awsRestjson1_deserializeDocumentDomainUnitGroupProperties(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.DomainUnitOwnerPropertiesMemberGroup{Value: mv} + break loop + + case "user": + var mv types.DomainUnitUserProperties + destAddr := &mv + if err := awsRestjson1_deserializeDocumentDomainUnitUserProperties(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.DomainUnitOwnerPropertiesMemberUser{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentDomainUnitOwners(v *[]types.DomainUnitOwnerProperties, 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.DomainUnitOwnerProperties + if *v == nil { + cv = []types.DomainUnitOwnerProperties{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DomainUnitOwnerProperties + if err := awsRestjson1_deserializeDocumentDomainUnitOwnerProperties(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDomainUnitPolicyGrantPrincipal(v **types.DomainUnitPolicyGrantPrincipal, 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.DomainUnitPolicyGrantPrincipal + if *v == nil { + sv = &types.DomainUnitPolicyGrantPrincipal{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "domainUnitDesignation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitDesignation to be of type string, got %T instead", value) + } + sv.DomainUnitDesignation = types.DomainUnitDesignation(jtv) + } + + case "domainUnitGrantFilter": + if err := awsRestjson1_deserializeDocumentDomainUnitGrantFilter(&sv.DomainUnitGrantFilter, value); err != nil { + return err + } + + case "domainUnitIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.DomainUnitIdentifier = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDomainUnitSummaries(v *[]types.DomainUnitSummary, 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.DomainUnitSummary + if *v == nil { + cv = []types.DomainUnitSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DomainUnitSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentDomainUnitSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDomainUnitSummary(v **types.DomainUnitSummary, 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.DomainUnitSummary + if *v == nil { + sv = &types.DomainUnitSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDomainUnitUserProperties(v **types.DomainUnitUserProperties, 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.DomainUnitUserProperties + if *v == nil { + sv = &types.DomainUnitUserProperties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "userId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentEnabledRegionList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -30470,6 +33050,38 @@ func awsRestjson1_deserializeDocumentEnabledRegionList(v *[]string, value interf return nil } +func awsRestjson1_deserializeDocumentEntityOwners(v *[]types.OwnerPropertiesOutput, 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.OwnerPropertiesOutput + if *v == nil { + cv = []types.OwnerPropertiesOutput{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OwnerPropertiesOutput + if err := awsRestjson1_deserializeDocumentOwnerPropertiesOutput(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentEnvironmentActionList(v *[]types.ConfigurableEnvironmentAction, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -32414,6 +35026,48 @@ func awsRestjson1_deserializeDocumentGroupDetails(v **types.GroupDetails, value return nil } +func awsRestjson1_deserializeDocumentGroupPolicyGrantPrincipal(v *types.GroupPolicyGrantPrincipal, 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 uv types.GroupPolicyGrantPrincipal +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "groupIdentifier": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GroupIdentifier to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.GroupPolicyGrantPrincipalMemberGroupIdentifier{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsRestjson1_deserializeDocumentGroupProfileSummaries(v *[]types.GroupProfileSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -34443,6 +37097,522 @@ func awsRestjson1_deserializeDocumentNotLikeExpression(v **types.NotLikeExpressi return nil } +func awsRestjson1_deserializeDocumentOverrideDomainUnitOwnersPolicyGrantDetail(v **types.OverrideDomainUnitOwnersPolicyGrantDetail, 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.OverrideDomainUnitOwnersPolicyGrantDetail + if *v == nil { + sv = &types.OverrideDomainUnitOwnersPolicyGrantDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "includeChildDomainUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildDomainUnits = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOverrideProjectOwnersPolicyGrantDetail(v **types.OverrideProjectOwnersPolicyGrantDetail, 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.OverrideProjectOwnersPolicyGrantDetail + if *v == nil { + sv = &types.OverrideProjectOwnersPolicyGrantDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "includeChildDomainUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildDomainUnits = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOwnerGroupPropertiesOutput(v **types.OwnerGroupPropertiesOutput, 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.OwnerGroupPropertiesOutput + if *v == nil { + sv = &types.OwnerGroupPropertiesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "groupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.GroupId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOwnerPropertiesOutput(v *types.OwnerPropertiesOutput, 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 uv types.OwnerPropertiesOutput +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "group": + var mv types.OwnerGroupPropertiesOutput + destAddr := &mv + if err := awsRestjson1_deserializeDocumentOwnerGroupPropertiesOutput(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.OwnerPropertiesOutputMemberGroup{Value: mv} + break loop + + case "user": + var mv types.OwnerUserPropertiesOutput + destAddr := &mv + if err := awsRestjson1_deserializeDocumentOwnerUserPropertiesOutput(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.OwnerPropertiesOutputMemberUser{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentOwnerUserPropertiesOutput(v **types.OwnerUserPropertiesOutput, 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.OwnerUserPropertiesOutput + if *v == nil { + sv = &types.OwnerUserPropertiesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "userId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPolicyGrantDetail(v *types.PolicyGrantDetail, 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 uv types.PolicyGrantDetail +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "addToProjectMemberPool": + var mv types.AddToProjectMemberPoolPolicyGrantDetail + destAddr := &mv + if err := awsRestjson1_deserializeDocumentAddToProjectMemberPoolPolicyGrantDetail(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PolicyGrantDetailMemberAddToProjectMemberPool{Value: mv} + break loop + + case "createAssetType": + var mv types.CreateAssetTypePolicyGrantDetail + destAddr := &mv + if err := awsRestjson1_deserializeDocumentCreateAssetTypePolicyGrantDetail(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PolicyGrantDetailMemberCreateAssetType{Value: mv} + break loop + + case "createDomainUnit": + var mv types.CreateDomainUnitPolicyGrantDetail + destAddr := &mv + if err := awsRestjson1_deserializeDocumentCreateDomainUnitPolicyGrantDetail(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PolicyGrantDetailMemberCreateDomainUnit{Value: mv} + break loop + + case "createEnvironment": + var mv types.Unit + destAddr := &mv + if err := awsRestjson1_deserializeDocumentUnit(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PolicyGrantDetailMemberCreateEnvironment{Value: mv} + break loop + + case "createEnvironmentProfile": + var mv types.CreateEnvironmentProfilePolicyGrantDetail + destAddr := &mv + if err := awsRestjson1_deserializeDocumentCreateEnvironmentProfilePolicyGrantDetail(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PolicyGrantDetailMemberCreateEnvironmentProfile{Value: mv} + break loop + + case "createFormType": + var mv types.CreateFormTypePolicyGrantDetail + destAddr := &mv + if err := awsRestjson1_deserializeDocumentCreateFormTypePolicyGrantDetail(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PolicyGrantDetailMemberCreateFormType{Value: mv} + break loop + + case "createGlossary": + var mv types.CreateGlossaryPolicyGrantDetail + destAddr := &mv + if err := awsRestjson1_deserializeDocumentCreateGlossaryPolicyGrantDetail(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PolicyGrantDetailMemberCreateGlossary{Value: mv} + break loop + + case "createProject": + var mv types.CreateProjectPolicyGrantDetail + destAddr := &mv + if err := awsRestjson1_deserializeDocumentCreateProjectPolicyGrantDetail(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PolicyGrantDetailMemberCreateProject{Value: mv} + break loop + + case "delegateCreateEnvironmentProfile": + var mv types.Unit + destAddr := &mv + if err := awsRestjson1_deserializeDocumentUnit(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PolicyGrantDetailMemberDelegateCreateEnvironmentProfile{Value: mv} + break loop + + case "overrideDomainUnitOwners": + var mv types.OverrideDomainUnitOwnersPolicyGrantDetail + destAddr := &mv + if err := awsRestjson1_deserializeDocumentOverrideDomainUnitOwnersPolicyGrantDetail(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PolicyGrantDetailMemberOverrideDomainUnitOwners{Value: mv} + break loop + + case "overrideProjectOwners": + var mv types.OverrideProjectOwnersPolicyGrantDetail + destAddr := &mv + if err := awsRestjson1_deserializeDocumentOverrideProjectOwnersPolicyGrantDetail(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PolicyGrantDetailMemberOverrideProjectOwners{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentPolicyGrantList(v *[]types.PolicyGrantMember, 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.PolicyGrantMember + if *v == nil { + cv = []types.PolicyGrantMember{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PolicyGrantMember + destAddr := &col + if err := awsRestjson1_deserializeDocumentPolicyGrantMember(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPolicyGrantMember(v **types.PolicyGrantMember, 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.PolicyGrantMember + if *v == nil { + sv = &types.PolicyGrantMember{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreatedAt to be a JSON Number, got %T instead", value) + + } + } + + case "createdBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreatedBy to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "detail": + if err := awsRestjson1_deserializeDocumentPolicyGrantDetail(&sv.Detail, value); err != nil { + return err + } + + case "principal": + if err := awsRestjson1_deserializeDocumentPolicyGrantPrincipal(&sv.Principal, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPolicyGrantPrincipal(v *types.PolicyGrantPrincipal, 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 uv types.PolicyGrantPrincipal +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "domainUnit": + var mv types.DomainUnitPolicyGrantPrincipal + destAddr := &mv + if err := awsRestjson1_deserializeDocumentDomainUnitPolicyGrantPrincipal(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PolicyGrantPrincipalMemberDomainUnit{Value: mv} + break loop + + case "group": + var mv types.GroupPolicyGrantPrincipal + if err := awsRestjson1_deserializeDocumentGroupPolicyGrantPrincipal(&mv, value); err != nil { + return err + } + uv = &types.PolicyGrantPrincipalMemberGroup{Value: mv} + break loop + + case "project": + var mv types.ProjectPolicyGrantPrincipal + destAddr := &mv + if err := awsRestjson1_deserializeDocumentProjectPolicyGrantPrincipal(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PolicyGrantPrincipalMemberProject{Value: mv} + break loop + + case "user": + var mv types.UserPolicyGrantPrincipal + if err := awsRestjson1_deserializeDocumentUserPolicyGrantPrincipal(&mv, value); err != nil { + return err + } + uv = &types.PolicyGrantPrincipalMemberUser{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsRestjson1_deserializeDocumentPredictionConfiguration(v **types.PredictionConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -34528,6 +37698,46 @@ func awsRestjson1_deserializeDocumentProjectDeletionError(v **types.ProjectDelet return nil } +func awsRestjson1_deserializeDocumentProjectGrantFilter(v *types.ProjectGrantFilter, 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 uv types.ProjectGrantFilter +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "domainUnitFilter": + var mv types.DomainUnitFilterForProject + destAddr := &mv + if err := awsRestjson1_deserializeDocumentDomainUnitFilterForProject(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ProjectGrantFilterMemberDomainUnitFilter{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsRestjson1_deserializeDocumentProjectMember(v **types.ProjectMember, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -34607,6 +37817,60 @@ func awsRestjson1_deserializeDocumentProjectMembers(v *[]types.ProjectMember, va return nil } +func awsRestjson1_deserializeDocumentProjectPolicyGrantPrincipal(v **types.ProjectPolicyGrantPrincipal, 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.ProjectPolicyGrantPrincipal + if *v == nil { + sv = &types.ProjectPolicyGrantPrincipal{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "projectDesignation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectDesignation to be of type string, got %T instead", value) + } + sv.ProjectDesignation = types.ProjectDesignation(jtv) + } + + case "projectGrantFilter": + if err := awsRestjson1_deserializeDocumentProjectGrantFilter(&sv.ProjectGrantFilter, value); err != nil { + return err + } + + case "projectIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectId to be of type string, got %T instead", value) + } + sv.ProjectIdentifier = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentProjectSummaries(v *[]types.ProjectSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -34703,6 +37967,15 @@ func awsRestjson1_deserializeDocumentProjectSummary(v **types.ProjectSummary, va sv.DomainId = ptr.String(jtv) } + case "domainUnitId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.DomainUnitId = ptr.String(jtv) + } + case "failureReasons": if err := awsRestjson1_deserializeDocumentFailureReasons(&sv.FailureReasons, value); err != nil { return err @@ -38408,6 +41681,37 @@ func awsRestjson1_deserializeDocumentUnauthorizedException(v **types.Unauthorize return nil } +func awsRestjson1_deserializeDocumentUnit(v **types.Unit, 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.Unit + if *v == nil { + sv = &types.Unit{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentUserDetails(v **types.UserDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -38448,6 +41752,58 @@ func awsRestjson1_deserializeDocumentUserDetails(v **types.UserDetails, value in return nil } +func awsRestjson1_deserializeDocumentUserPolicyGrantPrincipal(v *types.UserPolicyGrantPrincipal, 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 uv types.UserPolicyGrantPrincipal +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "allUsersGrantFilter": + var mv types.AllUsersGrantFilter + destAddr := &mv + if err := awsRestjson1_deserializeDocumentAllUsersGrantFilter(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.UserPolicyGrantPrincipalMemberAllUsersGrantFilter{Value: mv} + break loop + + case "userIdentifier": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserIdentifier to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.UserPolicyGrantPrincipalMemberUserIdentifier{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsRestjson1_deserializeDocumentUserProfileDetails(v *types.UserProfileDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/datazone/generated.json b/service/datazone/generated.json index c7b1d65ac21..5cf281680f7 100644 --- a/service/datazone/generated.json +++ b/service/datazone/generated.json @@ -10,6 +10,8 @@ "api_client_test.go", "api_op_AcceptPredictions.go", "api_op_AcceptSubscriptionRequest.go", + "api_op_AddEntityOwner.go", + "api_op_AddPolicyGrant.go", "api_op_AssociateEnvironmentRole.go", "api_op_CancelMetadataGenerationRun.go", "api_op_CancelSubscription.go", @@ -21,6 +23,7 @@ "api_op_CreateDataProductRevision.go", "api_op_CreateDataSource.go", "api_op_CreateDomain.go", + "api_op_CreateDomainUnit.go", "api_op_CreateEnvironment.go", "api_op_CreateEnvironmentAction.go", "api_op_CreateEnvironmentProfile.go", @@ -41,6 +44,7 @@ "api_op_DeleteDataProduct.go", "api_op_DeleteDataSource.go", "api_op_DeleteDomain.go", + "api_op_DeleteDomainUnit.go", "api_op_DeleteEnvironment.go", "api_op_DeleteEnvironmentAction.go", "api_op_DeleteEnvironmentBlueprintConfiguration.go", @@ -63,6 +67,7 @@ "api_op_GetDataSource.go", "api_op_GetDataSourceRun.go", "api_op_GetDomain.go", + "api_op_GetDomainUnit.go", "api_op_GetEnvironment.go", "api_op_GetEnvironmentAction.go", "api_op_GetEnvironmentBlueprint.go", @@ -90,7 +95,9 @@ "api_op_ListDataSourceRunActivities.go", "api_op_ListDataSourceRuns.go", "api_op_ListDataSources.go", + "api_op_ListDomainUnitsForParent.go", "api_op_ListDomains.go", + "api_op_ListEntityOwners.go", "api_op_ListEnvironmentActions.go", "api_op_ListEnvironmentBlueprintConfigurations.go", "api_op_ListEnvironmentBlueprints.go", @@ -99,6 +106,7 @@ "api_op_ListLineageNodeHistory.go", "api_op_ListMetadataGenerationRuns.go", "api_op_ListNotifications.go", + "api_op_ListPolicyGrants.go", "api_op_ListProjectMemberships.go", "api_op_ListProjects.go", "api_op_ListSubscriptionGrants.go", @@ -112,6 +120,8 @@ "api_op_PutEnvironmentBlueprintConfiguration.go", "api_op_RejectPredictions.go", "api_op_RejectSubscriptionRequest.go", + "api_op_RemoveEntityOwner.go", + "api_op_RemovePolicyGrant.go", "api_op_RevokeSubscription.go", "api_op_Search.go", "api_op_SearchGroupProfiles.go", @@ -125,6 +135,7 @@ "api_op_UpdateAssetFilter.go", "api_op_UpdateDataSource.go", "api_op_UpdateDomain.go", + "api_op_UpdateDomainUnit.go", "api_op_UpdateEnvironment.go", "api_op_UpdateEnvironmentAction.go", "api_op_UpdateEnvironmentProfile.go", diff --git a/service/datazone/serializers.go b/service/datazone/serializers.go index af8fa85763c..ec2c3b54d96 100644 --- a/service/datazone/serializers.go +++ b/service/datazone/serializers.go @@ -228,6 +228,244 @@ func awsRestjson1_serializeOpDocumentAcceptSubscriptionRequestInput(v *AcceptSub return nil } +type awsRestjson1_serializeOpAddEntityOwner struct { +} + +func (*awsRestjson1_serializeOpAddEntityOwner) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAddEntityOwner) 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.(*AddEntityOwnerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/entities/{entityType}/{entityIdentifier}/addOwner") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsAddEntityOwnerInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAddEntityOwnerInput(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_serializeOpHttpBindingsAddEntityOwnerInput(v *AddEntityOwnerInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.EntityIdentifier == nil || len(*v.EntityIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member entityIdentifier must not be empty")} + } + if v.EntityIdentifier != nil { + if err := encoder.SetURI("entityIdentifier").String(*v.EntityIdentifier); err != nil { + return err + } + } + + if len(v.EntityType) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member entityType must not be empty")} + } + if len(v.EntityType) > 0 { + if err := encoder.SetURI("entityType").String(string(v.EntityType)); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAddEntityOwnerInput(v *AddEntityOwnerInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Owner != nil { + ok := object.Key("owner") + if err := awsRestjson1_serializeDocumentOwnerProperties(v.Owner, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpAddPolicyGrant struct { +} + +func (*awsRestjson1_serializeOpAddPolicyGrant) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAddPolicyGrant) 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.(*AddPolicyGrantInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/policies/managed/{entityType}/{entityIdentifier}/addGrant") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsAddPolicyGrantInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAddPolicyGrantInput(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_serializeOpHttpBindingsAddPolicyGrantInput(v *AddPolicyGrantInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.EntityIdentifier == nil || len(*v.EntityIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member entityIdentifier must not be empty")} + } + if v.EntityIdentifier != nil { + if err := encoder.SetURI("entityIdentifier").String(*v.EntityIdentifier); err != nil { + return err + } + } + + if len(v.EntityType) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member entityType must not be empty")} + } + if len(v.EntityType) > 0 { + if err := encoder.SetURI("entityType").String(string(v.EntityType)); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAddPolicyGrantInput(v *AddPolicyGrantInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Detail != nil { + ok := object.Key("detail") + if err := awsRestjson1_serializeDocumentPolicyGrantDetail(v.Detail, ok); err != nil { + return err + } + } + + if len(v.PolicyType) > 0 { + ok := object.Key("policyType") + ok.String(string(v.PolicyType)) + } + + if v.Principal != nil { + ok := object.Key("principal") + if err := awsRestjson1_serializeDocumentPolicyGrantPrincipal(v.Principal, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpAssociateEnvironmentRole struct { } @@ -1462,14 +1700,14 @@ func awsRestjson1_serializeOpDocumentCreateDomainInput(v *CreateDomainInput, val return nil } -type awsRestjson1_serializeOpCreateEnvironment struct { +type awsRestjson1_serializeOpCreateDomainUnit struct { } -func (*awsRestjson1_serializeOpCreateEnvironment) ID() string { +func (*awsRestjson1_serializeOpCreateDomainUnit) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateDomainUnit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1477,13 +1715,13 @@ func (m *awsRestjson1_serializeOpCreateEnvironment) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateEnvironmentInput) + input, ok := in.Parameters.(*CreateDomainUnitInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/environments") + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/domain-units") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1499,14 +1737,14 @@ func (m *awsRestjson1_serializeOpCreateEnvironment) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateEnvironmentInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsCreateDomainUnitInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateEnvironmentInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateDomainUnitInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1521,7 +1759,7 @@ func (m *awsRestjson1_serializeOpCreateEnvironment) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateEnvironmentInput(v *CreateEnvironmentInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateDomainUnitInput(v *CreateDomainUnitInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1538,56 +1776,159 @@ func awsRestjson1_serializeOpHttpBindingsCreateEnvironmentInput(v *CreateEnviron return nil } -func awsRestjson1_serializeOpDocumentCreateEnvironmentInput(v *CreateEnvironmentInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateDomainUnitInput(v *CreateDomainUnitInput, value smithyjson.Value) error { object := value.Object() defer object.Close() + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } - if v.EnvironmentAccountIdentifier != nil { - ok := object.Key("environmentAccountIdentifier") - ok.String(*v.EnvironmentAccountIdentifier) - } - - if v.EnvironmentAccountRegion != nil { - ok := object.Key("environmentAccountRegion") - ok.String(*v.EnvironmentAccountRegion) - } - - if v.EnvironmentBlueprintIdentifier != nil { - ok := object.Key("environmentBlueprintIdentifier") - ok.String(*v.EnvironmentBlueprintIdentifier) - } - - if v.EnvironmentProfileIdentifier != nil { - ok := object.Key("environmentProfileIdentifier") - ok.String(*v.EnvironmentProfileIdentifier) - } - - if v.GlossaryTerms != nil { - ok := object.Key("glossaryTerms") - if err := awsRestjson1_serializeDocumentGlossaryTerms(v.GlossaryTerms, ok); err != nil { - return err - } - } - if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } - if v.ProjectIdentifier != nil { - ok := object.Key("projectIdentifier") - ok.String(*v.ProjectIdentifier) + if v.ParentDomainUnitIdentifier != nil { + ok := object.Key("parentDomainUnitIdentifier") + ok.String(*v.ParentDomainUnitIdentifier) } - if v.UserParameters != nil { - ok := object.Key("userParameters") - if err := awsRestjson1_serializeDocumentEnvironmentParametersList(v.UserParameters, ok); err != nil { - return err + return nil +} + +type awsRestjson1_serializeOpCreateEnvironment struct { +} + +func (*awsRestjson1_serializeOpCreateEnvironment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateEnvironment) 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.(*CreateEnvironmentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/environments") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateEnvironmentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateEnvironmentInput(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_serializeOpHttpBindingsCreateEnvironmentInput(v *CreateEnvironmentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateEnvironmentInput(v *CreateEnvironmentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.EnvironmentAccountIdentifier != nil { + ok := object.Key("environmentAccountIdentifier") + ok.String(*v.EnvironmentAccountIdentifier) + } + + if v.EnvironmentAccountRegion != nil { + ok := object.Key("environmentAccountRegion") + ok.String(*v.EnvironmentAccountRegion) + } + + if v.EnvironmentBlueprintIdentifier != nil { + ok := object.Key("environmentBlueprintIdentifier") + ok.String(*v.EnvironmentBlueprintIdentifier) + } + + if v.EnvironmentProfileIdentifier != nil { + ok := object.Key("environmentProfileIdentifier") + ok.String(*v.EnvironmentProfileIdentifier) + } + + if v.GlossaryTerms != nil { + ok := object.Key("glossaryTerms") + if err := awsRestjson1_serializeDocumentGlossaryTerms(v.GlossaryTerms, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.ProjectIdentifier != nil { + ok := object.Key("projectIdentifier") + ok.String(*v.ProjectIdentifier) + } + + if v.UserParameters != nil { + ok := object.Key("userParameters") + if err := awsRestjson1_serializeDocumentEnvironmentParametersList(v.UserParameters, ok); err != nil { + return err } } @@ -2447,6 +2788,11 @@ func awsRestjson1_serializeOpDocumentCreateProjectInput(v *CreateProjectInput, v ok.String(*v.Description) } + if v.DomainUnitId != nil { + ok := object.Key("domainUnitId") + ok.String(*v.DomainUnitId) + } + if v.GlossaryTerms != nil { ok := object.Key("glossaryTerms") if err := awsRestjson1_serializeDocumentGlossaryTerms(v.GlossaryTerms, ok); err != nil { @@ -3481,6 +3827,80 @@ func awsRestjson1_serializeOpHttpBindingsDeleteDomainInput(v *DeleteDomainInput, return nil } +type awsRestjson1_serializeOpDeleteDomainUnit struct { +} + +func (*awsRestjson1_serializeOpDeleteDomainUnit) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteDomainUnit) 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.(*DeleteDomainUnitInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/domain-units/{identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteDomainUnitInput(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_serializeOpHttpBindingsDeleteDomainUnitInput(v *DeleteDomainUnitInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteEnvironment struct { } @@ -5194,14 +5614,14 @@ func awsRestjson1_serializeOpHttpBindingsGetDomainInput(v *GetDomainInput, encod return nil } -type awsRestjson1_serializeOpGetEnvironment struct { +type awsRestjson1_serializeOpGetDomainUnit struct { } -func (*awsRestjson1_serializeOpGetEnvironment) ID() string { +func (*awsRestjson1_serializeOpGetDomainUnit) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetDomainUnit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -5209,13 +5629,13 @@ func (m *awsRestjson1_serializeOpGetEnvironment) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetEnvironmentInput) + input, ok := in.Parameters.(*GetDomainUnitInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/environments/{identifier}") + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/domain-units/{identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -5231,7 +5651,7 @@ func (m *awsRestjson1_serializeOpGetEnvironment) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetEnvironmentInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetDomainUnitInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5242,7 +5662,7 @@ func (m *awsRestjson1_serializeOpGetEnvironment) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetEnvironmentInput(v *GetEnvironmentInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetDomainUnitInput(v *GetDomainUnitInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -5268,14 +5688,14 @@ func awsRestjson1_serializeOpHttpBindingsGetEnvironmentInput(v *GetEnvironmentIn return nil } -type awsRestjson1_serializeOpGetEnvironmentAction struct { +type awsRestjson1_serializeOpGetEnvironment struct { } -func (*awsRestjson1_serializeOpGetEnvironmentAction) ID() string { +func (*awsRestjson1_serializeOpGetEnvironment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetEnvironmentAction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -5283,13 +5703,13 @@ func (m *awsRestjson1_serializeOpGetEnvironmentAction) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetEnvironmentActionInput) + input, ok := in.Parameters.(*GetEnvironmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/environments/{environmentIdentifier}/actions/{identifier}") + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/environments/{identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -5305,7 +5725,7 @@ func (m *awsRestjson1_serializeOpGetEnvironmentAction) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetEnvironmentActionInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetEnvironmentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5316,7 +5736,7 @@ func (m *awsRestjson1_serializeOpGetEnvironmentAction) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetEnvironmentActionInput(v *GetEnvironmentActionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetEnvironmentInput(v *GetEnvironmentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -5330,15 +5750,6 @@ func awsRestjson1_serializeOpHttpBindingsGetEnvironmentActionInput(v *GetEnviron } } - if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member environmentIdentifier must not be empty")} - } - if v.EnvironmentIdentifier != nil { - if err := encoder.SetURI("environmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { - return err - } - } - if v.Identifier == nil || len(*v.Identifier) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member identifier must not be empty")} } @@ -5351,14 +5762,14 @@ func awsRestjson1_serializeOpHttpBindingsGetEnvironmentActionInput(v *GetEnviron return nil } -type awsRestjson1_serializeOpGetEnvironmentBlueprint struct { +type awsRestjson1_serializeOpGetEnvironmentAction struct { } -func (*awsRestjson1_serializeOpGetEnvironmentBlueprint) ID() string { +func (*awsRestjson1_serializeOpGetEnvironmentAction) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetEnvironmentBlueprint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetEnvironmentAction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -5366,13 +5777,13 @@ func (m *awsRestjson1_serializeOpGetEnvironmentBlueprint) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetEnvironmentBlueprintInput) + input, ok := in.Parameters.(*GetEnvironmentActionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/environment-blueprints/{identifier}") + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/environments/{environmentIdentifier}/actions/{identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -5388,7 +5799,7 @@ func (m *awsRestjson1_serializeOpGetEnvironmentBlueprint) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetEnvironmentBlueprintInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetEnvironmentActionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5399,7 +5810,7 @@ func (m *awsRestjson1_serializeOpGetEnvironmentBlueprint) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetEnvironmentBlueprintInput(v *GetEnvironmentBlueprintInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetEnvironmentActionInput(v *GetEnvironmentActionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -5413,6 +5824,15 @@ func awsRestjson1_serializeOpHttpBindingsGetEnvironmentBlueprintInput(v *GetEnvi } } + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("environmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + if v.Identifier == nil || len(*v.Identifier) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member identifier must not be empty")} } @@ -5425,14 +5845,88 @@ func awsRestjson1_serializeOpHttpBindingsGetEnvironmentBlueprintInput(v *GetEnvi return nil } -type awsRestjson1_serializeOpGetEnvironmentBlueprintConfiguration struct { +type awsRestjson1_serializeOpGetEnvironmentBlueprint struct { } -func (*awsRestjson1_serializeOpGetEnvironmentBlueprintConfiguration) ID() string { +func (*awsRestjson1_serializeOpGetEnvironmentBlueprint) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetEnvironmentBlueprintConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetEnvironmentBlueprint) 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.(*GetEnvironmentBlueprintInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/environment-blueprints/{identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetEnvironmentBlueprintInput(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_serializeOpHttpBindingsGetEnvironmentBlueprintInput(v *GetEnvironmentBlueprintInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetEnvironmentBlueprintConfiguration struct { +} + +func (*awsRestjson1_serializeOpGetEnvironmentBlueprintConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetEnvironmentBlueprintConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -7378,6 +7872,174 @@ func awsRestjson1_serializeOpHttpBindingsListDomainsInput(v *ListDomainsInput, e return nil } +type awsRestjson1_serializeOpListDomainUnitsForParent struct { +} + +func (*awsRestjson1_serializeOpListDomainUnitsForParent) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListDomainUnitsForParent) 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.(*ListDomainUnitsForParentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/domain-units") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListDomainUnitsForParentInput(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_serializeOpHttpBindingsListDomainUnitsForParentInput(v *ListDomainUnitsForParentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.ParentDomainUnitIdentifier != nil { + encoder.SetQuery("parentDomainUnitIdentifier").String(*v.ParentDomainUnitIdentifier) + } + + return nil +} + +type awsRestjson1_serializeOpListEntityOwners struct { +} + +func (*awsRestjson1_serializeOpListEntityOwners) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListEntityOwners) 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.(*ListEntityOwnersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/entities/{entityType}/{entityIdentifier}/owners") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListEntityOwnersInput(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_serializeOpHttpBindingsListEntityOwnersInput(v *ListEntityOwnersInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.EntityIdentifier == nil || len(*v.EntityIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member entityIdentifier must not be empty")} + } + if v.EntityIdentifier != nil { + if err := encoder.SetURI("entityIdentifier").String(*v.EntityIdentifier); err != nil { + return err + } + } + + if len(v.EntityType) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member entityType must not be empty")} + } + if len(v.EntityType) > 0 { + if err := encoder.SetURI("entityType").String(string(v.EntityType)); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListEnvironmentActions struct { } @@ -8086,14 +8748,14 @@ func awsRestjson1_serializeOpHttpBindingsListNotificationsInput(v *ListNotificat return nil } -type awsRestjson1_serializeOpListProjectMemberships struct { +type awsRestjson1_serializeOpListPolicyGrants struct { } -func (*awsRestjson1_serializeOpListProjectMemberships) ID() string { +func (*awsRestjson1_serializeOpListPolicyGrants) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListProjectMemberships) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListPolicyGrants) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -8101,13 +8763,13 @@ func (m *awsRestjson1_serializeOpListProjectMemberships) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListProjectMembershipsInput) + input, ok := in.Parameters.(*ListPolicyGrantsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/projects/{projectIdentifier}/memberships") + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/policies/managed/{entityType}/{entityIdentifier}/grants") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -8123,7 +8785,7 @@ func (m *awsRestjson1_serializeOpListProjectMemberships) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListProjectMembershipsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListPolicyGrantsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -8134,7 +8796,7 @@ func (m *awsRestjson1_serializeOpListProjectMemberships) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListProjectMembershipsInput(v *ListProjectMembershipsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListPolicyGrantsInput(v *ListPolicyGrantsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -8148,6 +8810,24 @@ func awsRestjson1_serializeOpHttpBindingsListProjectMembershipsInput(v *ListProj } } + if v.EntityIdentifier == nil || len(*v.EntityIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member entityIdentifier must not be empty")} + } + if v.EntityIdentifier != nil { + if err := encoder.SetURI("entityIdentifier").String(*v.EntityIdentifier); err != nil { + return err + } + } + + if len(v.EntityType) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member entityType must not be empty")} + } + if len(v.EntityType) > 0 { + if err := encoder.SetURI("entityType").String(string(v.EntityType)); err != nil { + return err + } + } + if v.MaxResults != nil { encoder.SetQuery("maxResults").Integer(*v.MaxResults) } @@ -8156,11 +8836,88 @@ func awsRestjson1_serializeOpHttpBindingsListProjectMembershipsInput(v *ListProj encoder.SetQuery("nextToken").String(*v.NextToken) } - if v.ProjectIdentifier == nil || len(*v.ProjectIdentifier) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member projectIdentifier must not be empty")} + if len(v.PolicyType) > 0 { + encoder.SetQuery("policyType").String(string(v.PolicyType)) } - if v.ProjectIdentifier != nil { - if err := encoder.SetURI("projectIdentifier").String(*v.ProjectIdentifier); err != nil { + + return nil +} + +type awsRestjson1_serializeOpListProjectMemberships struct { +} + +func (*awsRestjson1_serializeOpListProjectMemberships) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListProjectMemberships) 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.(*ListProjectMembershipsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/projects/{projectIdentifier}/memberships") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListProjectMembershipsInput(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_serializeOpHttpBindingsListProjectMembershipsInput(v *ListProjectMembershipsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.ProjectIdentifier == nil || len(*v.ProjectIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member projectIdentifier must not be empty")} + } + if v.ProjectIdentifier != nil { + if err := encoder.SetURI("projectIdentifier").String(*v.ProjectIdentifier); err != nil { return err } } @@ -9142,7 +9899,219 @@ func (*awsRestjson1_serializeOpRejectPredictions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRejectPredictions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRejectPredictions) 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.(*RejectPredictionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/assets/{identifier}/reject-predictions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsRejectPredictionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentRejectPredictionsInput(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_serializeOpHttpBindingsRejectPredictionsInput(v *RejectPredictionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("identifier").String(*v.Identifier); err != nil { + return err + } + } + + if v.Revision != nil { + encoder.SetQuery("revision").String(*v.Revision) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentRejectPredictionsInput(v *RejectPredictionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.RejectChoices != nil { + ok := object.Key("rejectChoices") + if err := awsRestjson1_serializeDocumentRejectChoices(v.RejectChoices, ok); err != nil { + return err + } + } + + if v.RejectRule != nil { + ok := object.Key("rejectRule") + if err := awsRestjson1_serializeDocumentRejectRule(v.RejectRule, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpRejectSubscriptionRequest struct { +} + +func (*awsRestjson1_serializeOpRejectSubscriptionRequest) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRejectSubscriptionRequest) 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.(*RejectSubscriptionRequestInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/subscription-requests/{identifier}/reject") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsRejectSubscriptionRequestInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentRejectSubscriptionRequestInput(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_serializeOpHttpBindingsRejectSubscriptionRequestInput(v *RejectSubscriptionRequestInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentRejectSubscriptionRequestInput(v *RejectSubscriptionRequestInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DecisionComment != nil { + ok := object.Key("decisionComment") + ok.String(*v.DecisionComment) + } + + return nil +} + +type awsRestjson1_serializeOpRemoveEntityOwner struct { +} + +func (*awsRestjson1_serializeOpRemoveEntityOwner) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRemoveEntityOwner) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -9150,16 +10119,16 @@ func (m *awsRestjson1_serializeOpRejectPredictions) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RejectPredictionsInput) + input, ok := in.Parameters.(*RemoveEntityOwnerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/assets/{identifier}/reject-predictions") + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/entities/{entityType}/{entityIdentifier}/removeOwner") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -9172,14 +10141,14 @@ func (m *awsRestjson1_serializeOpRejectPredictions) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsRejectPredictionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRemoveEntityOwnerInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentRejectPredictionsInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentRemoveEntityOwnerInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -9194,7 +10163,7 @@ func (m *awsRestjson1_serializeOpRejectPredictions) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRejectPredictionsInput(v *RejectPredictionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRemoveEntityOwnerInput(v *RemoveEntityOwnerInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -9208,23 +10177,28 @@ func awsRestjson1_serializeOpHttpBindingsRejectPredictionsInput(v *RejectPredict } } - if v.Identifier == nil || len(*v.Identifier) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member identifier must not be empty")} + if v.EntityIdentifier == nil || len(*v.EntityIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member entityIdentifier must not be empty")} } - if v.Identifier != nil { - if err := encoder.SetURI("identifier").String(*v.Identifier); err != nil { + if v.EntityIdentifier != nil { + if err := encoder.SetURI("entityIdentifier").String(*v.EntityIdentifier); err != nil { return err } } - if v.Revision != nil { - encoder.SetQuery("revision").String(*v.Revision) + if len(v.EntityType) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member entityType must not be empty")} + } + if len(v.EntityType) > 0 { + if err := encoder.SetURI("entityType").String(string(v.EntityType)); err != nil { + return err + } } return nil } -func awsRestjson1_serializeOpDocumentRejectPredictionsInput(v *RejectPredictionsInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentRemoveEntityOwnerInput(v *RemoveEntityOwnerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -9233,16 +10207,9 @@ func awsRestjson1_serializeOpDocumentRejectPredictionsInput(v *RejectPredictions ok.String(*v.ClientToken) } - if v.RejectChoices != nil { - ok := object.Key("rejectChoices") - if err := awsRestjson1_serializeDocumentRejectChoices(v.RejectChoices, ok); err != nil { - return err - } - } - - if v.RejectRule != nil { - ok := object.Key("rejectRule") - if err := awsRestjson1_serializeDocumentRejectRule(v.RejectRule, ok); err != nil { + if v.Owner != nil { + ok := object.Key("owner") + if err := awsRestjson1_serializeDocumentOwnerProperties(v.Owner, ok); err != nil { return err } } @@ -9250,14 +10217,14 @@ func awsRestjson1_serializeOpDocumentRejectPredictionsInput(v *RejectPredictions return nil } -type awsRestjson1_serializeOpRejectSubscriptionRequest struct { +type awsRestjson1_serializeOpRemovePolicyGrant struct { } -func (*awsRestjson1_serializeOpRejectSubscriptionRequest) ID() string { +func (*awsRestjson1_serializeOpRemovePolicyGrant) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRejectSubscriptionRequest) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRemovePolicyGrant) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -9265,16 +10232,16 @@ func (m *awsRestjson1_serializeOpRejectSubscriptionRequest) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RejectSubscriptionRequestInput) + input, ok := in.Parameters.(*RemovePolicyGrantInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/subscription-requests/{identifier}/reject") + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/policies/managed/{entityType}/{entityIdentifier}/removeGrant") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -9287,14 +10254,14 @@ func (m *awsRestjson1_serializeOpRejectSubscriptionRequest) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsRejectSubscriptionRequestInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRemovePolicyGrantInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentRejectSubscriptionRequestInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentRemovePolicyGrantInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -9309,7 +10276,7 @@ func (m *awsRestjson1_serializeOpRejectSubscriptionRequest) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRejectSubscriptionRequestInput(v *RejectSubscriptionRequestInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRemovePolicyGrantInput(v *RemovePolicyGrantInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -9323,11 +10290,20 @@ func awsRestjson1_serializeOpHttpBindingsRejectSubscriptionRequestInput(v *Rejec } } - if v.Identifier == nil || len(*v.Identifier) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member identifier must not be empty")} + if v.EntityIdentifier == nil || len(*v.EntityIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member entityIdentifier must not be empty")} } - if v.Identifier != nil { - if err := encoder.SetURI("identifier").String(*v.Identifier); err != nil { + if v.EntityIdentifier != nil { + if err := encoder.SetURI("entityIdentifier").String(*v.EntityIdentifier); err != nil { + return err + } + } + + if len(v.EntityType) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member entityType must not be empty")} + } + if len(v.EntityType) > 0 { + if err := encoder.SetURI("entityType").String(string(v.EntityType)); err != nil { return err } } @@ -9335,13 +10311,25 @@ func awsRestjson1_serializeOpHttpBindingsRejectSubscriptionRequestInput(v *Rejec return nil } -func awsRestjson1_serializeOpDocumentRejectSubscriptionRequestInput(v *RejectSubscriptionRequestInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentRemovePolicyGrantInput(v *RemovePolicyGrantInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.DecisionComment != nil { - ok := object.Key("decisionComment") - ok.String(*v.DecisionComment) + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if len(v.PolicyType) > 0 { + ok := object.Key("policyType") + ok.String(string(v.PolicyType)) + } + + if v.Principal != nil { + ok := object.Key("principal") + if err := awsRestjson1_serializeDocumentPolicyGrantPrincipal(v.Principal, ok); err != nil { + return err + } } return nil @@ -10776,6 +11764,108 @@ func awsRestjson1_serializeOpDocumentUpdateDomainInput(v *UpdateDomainInput, val return nil } +type awsRestjson1_serializeOpUpdateDomainUnit struct { +} + +func (*awsRestjson1_serializeOpUpdateDomainUnit) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateDomainUnit) 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.(*UpdateDomainUnitInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/domain-units/{identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateDomainUnitInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateDomainUnitInput(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_serializeOpHttpBindingsUpdateDomainUnitInput(v *UpdateDomainUnitInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateDomainUnitInput(v *UpdateDomainUnitInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + type awsRestjson1_serializeOpUpdateEnvironment struct { } @@ -12101,6 +13191,32 @@ func awsRestjson1_serializeDocumentActionParameters(v types.ActionParameters, va return nil } +func awsRestjson1_serializeDocumentAddToProjectMemberPoolPolicyGrantDetail(v *types.AddToProjectMemberPoolPolicyGrantDetail, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IncludeChildDomainUnits != nil { + ok := object.Key("includeChildDomainUnits") + ok.Boolean(*v.IncludeChildDomainUnits) + } + + return nil +} + +func awsRestjson1_serializeDocumentAllDomainUnitsGrantFilter(v *types.AllDomainUnitsGrantFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + +func awsRestjson1_serializeDocumentAllUsersGrantFilter(v *types.AllUsersGrantFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + func awsRestjson1_serializeDocumentApplicableAssetTypes(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -12170,59 +13286,131 @@ func awsRestjson1_serializeDocumentAuthorizedPrincipalIdentifiers(v []string, va array := value.Array() defer array.Close() - for i := range v { - av := array.Value() - av.String(v[i]) + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentAwsConsoleLinkParameters(v *types.AwsConsoleLinkParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Uri != nil { + ok := object.Key("uri") + ok.String(*v.Uri) + } + + return nil +} + +func awsRestjson1_serializeDocumentBusinessNameGenerationConfiguration(v *types.BusinessNameGenerationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled != nil { + ok := object.Key("enabled") + ok.Boolean(*v.Enabled) + } + + return nil +} + +func awsRestjson1_serializeDocumentColumnFilterConfiguration(v *types.ColumnFilterConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IncludedColumnNames != nil { + ok := object.Key("includedColumnNames") + if err := awsRestjson1_serializeDocumentColumnNameList(v.IncludedColumnNames, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentColumnNameList(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_serializeDocumentCreateAssetTypePolicyGrantDetail(v *types.CreateAssetTypePolicyGrantDetail, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IncludeChildDomainUnits != nil { + ok := object.Key("includeChildDomainUnits") + ok.Boolean(*v.IncludeChildDomainUnits) + } + + return nil +} + +func awsRestjson1_serializeDocumentCreateDomainUnitPolicyGrantDetail(v *types.CreateDomainUnitPolicyGrantDetail, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IncludeChildDomainUnits != nil { + ok := object.Key("includeChildDomainUnits") + ok.Boolean(*v.IncludeChildDomainUnits) } + return nil } -func awsRestjson1_serializeDocumentAwsConsoleLinkParameters(v *types.AwsConsoleLinkParameters, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentCreateEnvironmentProfilePolicyGrantDetail(v *types.CreateEnvironmentProfilePolicyGrantDetail, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Uri != nil { - ok := object.Key("uri") - ok.String(*v.Uri) + if v.DomainUnitId != nil { + ok := object.Key("domainUnitId") + ok.String(*v.DomainUnitId) } return nil } -func awsRestjson1_serializeDocumentBusinessNameGenerationConfiguration(v *types.BusinessNameGenerationConfiguration, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentCreateFormTypePolicyGrantDetail(v *types.CreateFormTypePolicyGrantDetail, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Enabled != nil { - ok := object.Key("enabled") - ok.Boolean(*v.Enabled) + if v.IncludeChildDomainUnits != nil { + ok := object.Key("includeChildDomainUnits") + ok.Boolean(*v.IncludeChildDomainUnits) } return nil } -func awsRestjson1_serializeDocumentColumnFilterConfiguration(v *types.ColumnFilterConfiguration, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentCreateGlossaryPolicyGrantDetail(v *types.CreateGlossaryPolicyGrantDetail, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.IncludedColumnNames != nil { - ok := object.Key("includedColumnNames") - if err := awsRestjson1_serializeDocumentColumnNameList(v.IncludedColumnNames, ok); err != nil { - return err - } + if v.IncludeChildDomainUnits != nil { + ok := object.Key("includeChildDomainUnits") + ok.Boolean(*v.IncludeChildDomainUnits) } return nil } -func awsRestjson1_serializeDocumentColumnNameList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() +func awsRestjson1_serializeDocumentCreateProjectPolicyGrantDetail(v *types.CreateProjectPolicyGrantDetail, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - for i := range v { - av := array.Value() - av.String(v[i]) + if v.IncludeChildDomainUnits != nil { + ok := object.Key("includeChildDomainUnits") + ok.Boolean(*v.IncludeChildDomainUnits) } + return nil } @@ -12292,6 +13480,65 @@ func awsRestjson1_serializeDocumentDataSourceConfigurationInput(v types.DataSour return nil } +func awsRestjson1_serializeDocumentDomainUnitFilterForProject(v *types.DomainUnitFilterForProject, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DomainUnit != nil { + ok := object.Key("domainUnit") + ok.String(*v.DomainUnit) + } + + if v.IncludeChildDomainUnits != nil { + ok := object.Key("includeChildDomainUnits") + ok.Boolean(*v.IncludeChildDomainUnits) + } + + return nil +} + +func awsRestjson1_serializeDocumentDomainUnitGrantFilter(v types.DomainUnitGrantFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.DomainUnitGrantFilterMemberAllDomainUnitsGrantFilter: + av := object.Key("allDomainUnitsGrantFilter") + if err := awsRestjson1_serializeDocumentAllDomainUnitsGrantFilter(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsRestjson1_serializeDocumentDomainUnitPolicyGrantPrincipal(v *types.DomainUnitPolicyGrantPrincipal, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DomainUnitDesignation) > 0 { + ok := object.Key("domainUnitDesignation") + ok.String(string(v.DomainUnitDesignation)) + } + + if v.DomainUnitGrantFilter != nil { + ok := object.Key("domainUnitGrantFilter") + if err := awsRestjson1_serializeDocumentDomainUnitGrantFilter(v.DomainUnitGrantFilter, ok); err != nil { + return err + } + } + + if v.DomainUnitIdentifier != nil { + ok := object.Key("domainUnitIdentifier") + ok.String(*v.DomainUnitIdentifier) + } + + return nil +} + func awsRestjson1_serializeDocumentEnabledRegionList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -12618,6 +13865,22 @@ func awsRestjson1_serializeDocumentGreaterThanOrEqualToExpression(v *types.Great return nil } +func awsRestjson1_serializeDocumentGroupPolicyGrantPrincipal(v types.GroupPolicyGrantPrincipal, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.GroupPolicyGrantPrincipalMemberGroupIdentifier: + av := object.Key("groupIdentifier") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsRestjson1_serializeDocumentInExpression(v *types.InExpression, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -12870,6 +14133,192 @@ func awsRestjson1_serializeDocumentNotLikeExpression(v *types.NotLikeExpression, return nil } +func awsRestjson1_serializeDocumentOverrideDomainUnitOwnersPolicyGrantDetail(v *types.OverrideDomainUnitOwnersPolicyGrantDetail, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IncludeChildDomainUnits != nil { + ok := object.Key("includeChildDomainUnits") + ok.Boolean(*v.IncludeChildDomainUnits) + } + + return nil +} + +func awsRestjson1_serializeDocumentOverrideProjectOwnersPolicyGrantDetail(v *types.OverrideProjectOwnersPolicyGrantDetail, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IncludeChildDomainUnits != nil { + ok := object.Key("includeChildDomainUnits") + ok.Boolean(*v.IncludeChildDomainUnits) + } + + return nil +} + +func awsRestjson1_serializeDocumentOwnerGroupProperties(v *types.OwnerGroupProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GroupIdentifier != nil { + ok := object.Key("groupIdentifier") + ok.String(*v.GroupIdentifier) + } + + return nil +} + +func awsRestjson1_serializeDocumentOwnerProperties(v types.OwnerProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.OwnerPropertiesMemberGroup: + av := object.Key("group") + if err := awsRestjson1_serializeDocumentOwnerGroupProperties(&uv.Value, av); err != nil { + return err + } + + case *types.OwnerPropertiesMemberUser: + av := object.Key("user") + if err := awsRestjson1_serializeDocumentOwnerUserProperties(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsRestjson1_serializeDocumentOwnerUserProperties(v *types.OwnerUserProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.UserIdentifier != nil { + ok := object.Key("userIdentifier") + ok.String(*v.UserIdentifier) + } + + return nil +} + +func awsRestjson1_serializeDocumentPolicyGrantDetail(v types.PolicyGrantDetail, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.PolicyGrantDetailMemberAddToProjectMemberPool: + av := object.Key("addToProjectMemberPool") + if err := awsRestjson1_serializeDocumentAddToProjectMemberPoolPolicyGrantDetail(&uv.Value, av); err != nil { + return err + } + + case *types.PolicyGrantDetailMemberCreateAssetType: + av := object.Key("createAssetType") + if err := awsRestjson1_serializeDocumentCreateAssetTypePolicyGrantDetail(&uv.Value, av); err != nil { + return err + } + + case *types.PolicyGrantDetailMemberCreateDomainUnit: + av := object.Key("createDomainUnit") + if err := awsRestjson1_serializeDocumentCreateDomainUnitPolicyGrantDetail(&uv.Value, av); err != nil { + return err + } + + case *types.PolicyGrantDetailMemberCreateEnvironment: + av := object.Key("createEnvironment") + if err := awsRestjson1_serializeDocumentUnit(&uv.Value, av); err != nil { + return err + } + + case *types.PolicyGrantDetailMemberCreateEnvironmentProfile: + av := object.Key("createEnvironmentProfile") + if err := awsRestjson1_serializeDocumentCreateEnvironmentProfilePolicyGrantDetail(&uv.Value, av); err != nil { + return err + } + + case *types.PolicyGrantDetailMemberCreateFormType: + av := object.Key("createFormType") + if err := awsRestjson1_serializeDocumentCreateFormTypePolicyGrantDetail(&uv.Value, av); err != nil { + return err + } + + case *types.PolicyGrantDetailMemberCreateGlossary: + av := object.Key("createGlossary") + if err := awsRestjson1_serializeDocumentCreateGlossaryPolicyGrantDetail(&uv.Value, av); err != nil { + return err + } + + case *types.PolicyGrantDetailMemberCreateProject: + av := object.Key("createProject") + if err := awsRestjson1_serializeDocumentCreateProjectPolicyGrantDetail(&uv.Value, av); err != nil { + return err + } + + case *types.PolicyGrantDetailMemberDelegateCreateEnvironmentProfile: + av := object.Key("delegateCreateEnvironmentProfile") + if err := awsRestjson1_serializeDocumentUnit(&uv.Value, av); err != nil { + return err + } + + case *types.PolicyGrantDetailMemberOverrideDomainUnitOwners: + av := object.Key("overrideDomainUnitOwners") + if err := awsRestjson1_serializeDocumentOverrideDomainUnitOwnersPolicyGrantDetail(&uv.Value, av); err != nil { + return err + } + + case *types.PolicyGrantDetailMemberOverrideProjectOwners: + av := object.Key("overrideProjectOwners") + if err := awsRestjson1_serializeDocumentOverrideProjectOwnersPolicyGrantDetail(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsRestjson1_serializeDocumentPolicyGrantPrincipal(v types.PolicyGrantPrincipal, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.PolicyGrantPrincipalMemberDomainUnit: + av := object.Key("domainUnit") + if err := awsRestjson1_serializeDocumentDomainUnitPolicyGrantPrincipal(&uv.Value, av); err != nil { + return err + } + + case *types.PolicyGrantPrincipalMemberGroup: + av := object.Key("group") + if err := awsRestjson1_serializeDocumentGroupPolicyGrantPrincipal(uv.Value, av); err != nil { + return err + } + + case *types.PolicyGrantPrincipalMemberProject: + av := object.Key("project") + if err := awsRestjson1_serializeDocumentProjectPolicyGrantPrincipal(&uv.Value, av); err != nil { + return err + } + + case *types.PolicyGrantPrincipalMemberUser: + av := object.Key("user") + if err := awsRestjson1_serializeDocumentUserPolicyGrantPrincipal(uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsRestjson1_serializeDocumentPredictionChoices(v []int32, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -12895,6 +14344,48 @@ func awsRestjson1_serializeDocumentPredictionConfiguration(v *types.PredictionCo return nil } +func awsRestjson1_serializeDocumentProjectGrantFilter(v types.ProjectGrantFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ProjectGrantFilterMemberDomainUnitFilter: + av := object.Key("domainUnitFilter") + if err := awsRestjson1_serializeDocumentDomainUnitFilterForProject(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsRestjson1_serializeDocumentProjectPolicyGrantPrincipal(v *types.ProjectPolicyGrantPrincipal, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ProjectDesignation) > 0 { + ok := object.Key("projectDesignation") + ok.String(string(v.ProjectDesignation)) + } + + if v.ProjectGrantFilter != nil { + ok := object.Key("projectGrantFilter") + if err := awsRestjson1_serializeDocumentProjectGrantFilter(v.ProjectGrantFilter, ok); err != nil { + return err + } + } + + if v.ProjectIdentifier != nil { + ok := object.Key("projectIdentifier") + ok.String(*v.ProjectIdentifier) + } + + return nil +} + func awsRestjson1_serializeDocumentProvisioningConfiguration(v types.ProvisioningConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -13595,3 +15086,32 @@ func awsRestjson1_serializeDocumentTimeSeriesDataPointFormInputList(v []types.Ti } return nil } + +func awsRestjson1_serializeDocumentUnit(v *types.Unit, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + +func awsRestjson1_serializeDocumentUserPolicyGrantPrincipal(v types.UserPolicyGrantPrincipal, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.UserPolicyGrantPrincipalMemberAllUsersGrantFilter: + av := object.Key("allUsersGrantFilter") + if err := awsRestjson1_serializeDocumentAllUsersGrantFilter(&uv.Value, av); err != nil { + return err + } + + case *types.UserPolicyGrantPrincipalMemberUserIdentifier: + av := object.Key("userIdentifier") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} diff --git a/service/datazone/snapshot/api_op_AddEntityOwner.go.snap b/service/datazone/snapshot/api_op_AddEntityOwner.go.snap new file mode 100644 index 00000000000..9ec8b4f8cd0 --- /dev/null +++ b/service/datazone/snapshot/api_op_AddEntityOwner.go.snap @@ -0,0 +1,37 @@ +AddEntityOwner + Initialize stack step + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_AddPolicyGrant.go.snap b/service/datazone/snapshot/api_op_AddPolicyGrant.go.snap new file mode 100644 index 00000000000..aa194646d3d --- /dev/null +++ b/service/datazone/snapshot/api_op_AddPolicyGrant.go.snap @@ -0,0 +1,37 @@ +AddPolicyGrant + Initialize stack step + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_CreateDomainUnit.go.snap b/service/datazone/snapshot/api_op_CreateDomainUnit.go.snap new file mode 100644 index 00000000000..3be6d9ca3bd --- /dev/null +++ b/service/datazone/snapshot/api_op_CreateDomainUnit.go.snap @@ -0,0 +1,37 @@ +CreateDomainUnit + Initialize stack step + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_DeleteDomainUnit.go.snap b/service/datazone/snapshot/api_op_DeleteDomainUnit.go.snap new file mode 100644 index 00000000000..750bfde03d9 --- /dev/null +++ b/service/datazone/snapshot/api_op_DeleteDomainUnit.go.snap @@ -0,0 +1,36 @@ +DeleteDomainUnit + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_GetDomainUnit.go.snap b/service/datazone/snapshot/api_op_GetDomainUnit.go.snap new file mode 100644 index 00000000000..a49f51b355f --- /dev/null +++ b/service/datazone/snapshot/api_op_GetDomainUnit.go.snap @@ -0,0 +1,36 @@ +GetDomainUnit + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_ListDomainUnitsForParent.go.snap b/service/datazone/snapshot/api_op_ListDomainUnitsForParent.go.snap new file mode 100644 index 00000000000..af463ca2efe --- /dev/null +++ b/service/datazone/snapshot/api_op_ListDomainUnitsForParent.go.snap @@ -0,0 +1,36 @@ +ListDomainUnitsForParent + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_ListEntityOwners.go.snap b/service/datazone/snapshot/api_op_ListEntityOwners.go.snap new file mode 100644 index 00000000000..bc98fd4e597 --- /dev/null +++ b/service/datazone/snapshot/api_op_ListEntityOwners.go.snap @@ -0,0 +1,36 @@ +ListEntityOwners + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_ListPolicyGrants.go.snap b/service/datazone/snapshot/api_op_ListPolicyGrants.go.snap new file mode 100644 index 00000000000..574f4e215bf --- /dev/null +++ b/service/datazone/snapshot/api_op_ListPolicyGrants.go.snap @@ -0,0 +1,36 @@ +ListPolicyGrants + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_RemoveEntityOwner.go.snap b/service/datazone/snapshot/api_op_RemoveEntityOwner.go.snap new file mode 100644 index 00000000000..70bfdc5bdd2 --- /dev/null +++ b/service/datazone/snapshot/api_op_RemoveEntityOwner.go.snap @@ -0,0 +1,37 @@ +RemoveEntityOwner + Initialize stack step + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_RemovePolicyGrant.go.snap b/service/datazone/snapshot/api_op_RemovePolicyGrant.go.snap new file mode 100644 index 00000000000..d7dddee63a8 --- /dev/null +++ b/service/datazone/snapshot/api_op_RemovePolicyGrant.go.snap @@ -0,0 +1,37 @@ +RemovePolicyGrant + Initialize stack step + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_UpdateDomainUnit.go.snap b/service/datazone/snapshot/api_op_UpdateDomainUnit.go.snap new file mode 100644 index 00000000000..cfe3c3d90b2 --- /dev/null +++ b/service/datazone/snapshot/api_op_UpdateDomainUnit.go.snap @@ -0,0 +1,36 @@ +UpdateDomainUnit + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot_test.go b/service/datazone/snapshot_test.go index d2cff869a66..f5ea0939139 100644 --- a/service/datazone/snapshot_test.go +++ b/service/datazone/snapshot_test.go @@ -86,6 +86,30 @@ func TestCheckSnapshot_AcceptSubscriptionRequest(t *testing.T) { } } +func TestCheckSnapshot_AddEntityOwner(t *testing.T) { + svc := New(Options{}) + _, err := svc.AddEntityOwner(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "AddEntityOwner") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_AddPolicyGrant(t *testing.T) { + svc := New(Options{}) + _, err := svc.AddPolicyGrant(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "AddPolicyGrant") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_AssociateEnvironmentRole(t *testing.T) { svc := New(Options{}) _, err := svc.AssociateEnvironmentRole(context.Background(), nil, func(o *Options) { @@ -218,6 +242,18 @@ func TestCheckSnapshot_CreateDomain(t *testing.T) { } } +func TestCheckSnapshot_CreateDomainUnit(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateDomainUnit(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateDomainUnit") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateEnvironment(t *testing.T) { svc := New(Options{}) _, err := svc.CreateEnvironment(context.Background(), nil, func(o *Options) { @@ -458,6 +494,18 @@ func TestCheckSnapshot_DeleteDomain(t *testing.T) { } } +func TestCheckSnapshot_DeleteDomainUnit(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteDomainUnit(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteDomainUnit") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteEnvironment(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteEnvironment(context.Background(), nil, func(o *Options) { @@ -722,6 +770,18 @@ func TestCheckSnapshot_GetDomain(t *testing.T) { } } +func TestCheckSnapshot_GetDomainUnit(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetDomainUnit(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetDomainUnit") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetEnvironment(t *testing.T) { svc := New(Options{}) _, err := svc.GetEnvironment(context.Background(), nil, func(o *Options) { @@ -1058,6 +1118,30 @@ func TestCheckSnapshot_ListDomains(t *testing.T) { } } +func TestCheckSnapshot_ListDomainUnitsForParent(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListDomainUnitsForParent(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListDomainUnitsForParent") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListEntityOwners(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEntityOwners(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListEntityOwners") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListEnvironmentActions(t *testing.T) { svc := New(Options{}) _, err := svc.ListEnvironmentActions(context.Background(), nil, func(o *Options) { @@ -1154,6 +1238,18 @@ func TestCheckSnapshot_ListNotifications(t *testing.T) { } } +func TestCheckSnapshot_ListPolicyGrants(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListPolicyGrants(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListPolicyGrants") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListProjectMemberships(t *testing.T) { svc := New(Options{}) _, err := svc.ListProjectMemberships(context.Background(), nil, func(o *Options) { @@ -1310,6 +1406,30 @@ func TestCheckSnapshot_RejectSubscriptionRequest(t *testing.T) { } } +func TestCheckSnapshot_RemoveEntityOwner(t *testing.T) { + svc := New(Options{}) + _, err := svc.RemoveEntityOwner(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "RemoveEntityOwner") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_RemovePolicyGrant(t *testing.T) { + svc := New(Options{}) + _, err := svc.RemovePolicyGrant(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "RemovePolicyGrant") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_RevokeSubscription(t *testing.T) { svc := New(Options{}) _, err := svc.RevokeSubscription(context.Background(), nil, func(o *Options) { @@ -1466,6 +1586,18 @@ func TestCheckSnapshot_UpdateDomain(t *testing.T) { } } +func TestCheckSnapshot_UpdateDomainUnit(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateDomainUnit(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateDomainUnit") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateEnvironment(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateEnvironment(context.Background(), nil, func(o *Options) { @@ -1621,6 +1753,30 @@ func TestUpdateSnapshot_AcceptSubscriptionRequest(t *testing.T) { } } +func TestUpdateSnapshot_AddEntityOwner(t *testing.T) { + svc := New(Options{}) + _, err := svc.AddEntityOwner(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "AddEntityOwner") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_AddPolicyGrant(t *testing.T) { + svc := New(Options{}) + _, err := svc.AddPolicyGrant(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "AddPolicyGrant") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_AssociateEnvironmentRole(t *testing.T) { svc := New(Options{}) _, err := svc.AssociateEnvironmentRole(context.Background(), nil, func(o *Options) { @@ -1753,6 +1909,18 @@ func TestUpdateSnapshot_CreateDomain(t *testing.T) { } } +func TestUpdateSnapshot_CreateDomainUnit(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateDomainUnit(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateDomainUnit") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateEnvironment(t *testing.T) { svc := New(Options{}) _, err := svc.CreateEnvironment(context.Background(), nil, func(o *Options) { @@ -1993,6 +2161,18 @@ func TestUpdateSnapshot_DeleteDomain(t *testing.T) { } } +func TestUpdateSnapshot_DeleteDomainUnit(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteDomainUnit(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteDomainUnit") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteEnvironment(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteEnvironment(context.Background(), nil, func(o *Options) { @@ -2257,6 +2437,18 @@ func TestUpdateSnapshot_GetDomain(t *testing.T) { } } +func TestUpdateSnapshot_GetDomainUnit(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetDomainUnit(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetDomainUnit") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetEnvironment(t *testing.T) { svc := New(Options{}) _, err := svc.GetEnvironment(context.Background(), nil, func(o *Options) { @@ -2593,6 +2785,30 @@ func TestUpdateSnapshot_ListDomains(t *testing.T) { } } +func TestUpdateSnapshot_ListDomainUnitsForParent(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListDomainUnitsForParent(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListDomainUnitsForParent") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListEntityOwners(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEntityOwners(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListEntityOwners") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListEnvironmentActions(t *testing.T) { svc := New(Options{}) _, err := svc.ListEnvironmentActions(context.Background(), nil, func(o *Options) { @@ -2689,6 +2905,18 @@ func TestUpdateSnapshot_ListNotifications(t *testing.T) { } } +func TestUpdateSnapshot_ListPolicyGrants(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListPolicyGrants(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListPolicyGrants") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListProjectMemberships(t *testing.T) { svc := New(Options{}) _, err := svc.ListProjectMemberships(context.Background(), nil, func(o *Options) { @@ -2845,6 +3073,30 @@ func TestUpdateSnapshot_RejectSubscriptionRequest(t *testing.T) { } } +func TestUpdateSnapshot_RemoveEntityOwner(t *testing.T) { + svc := New(Options{}) + _, err := svc.RemoveEntityOwner(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "RemoveEntityOwner") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_RemovePolicyGrant(t *testing.T) { + svc := New(Options{}) + _, err := svc.RemovePolicyGrant(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "RemovePolicyGrant") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_RevokeSubscription(t *testing.T) { svc := New(Options{}) _, err := svc.RevokeSubscription(context.Background(), nil, func(o *Options) { @@ -3001,6 +3253,18 @@ func TestUpdateSnapshot_UpdateDomain(t *testing.T) { } } +func TestUpdateSnapshot_UpdateDomainUnit(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateDomainUnit(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateDomainUnit") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateEnvironment(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateEnvironment(context.Background(), nil, func(o *Options) { diff --git a/service/datazone/types/enums.go b/service/datazone/types/enums.go index 17ac817e875..d6d75676ca6 100644 --- a/service/datazone/types/enums.go +++ b/service/datazone/types/enums.go @@ -252,6 +252,23 @@ func (DataSourceStatus) Values() []DataSourceStatus { } } +type DataZoneEntityType string + +// Enum values for DataZoneEntityType +const ( + DataZoneEntityTypeDomainUnit DataZoneEntityType = "DOMAIN_UNIT" +) + +// Values returns all known values for DataZoneEntityType. 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 (DataZoneEntityType) Values() []DataZoneEntityType { + return []DataZoneEntityType{ + "DOMAIN_UNIT", + } +} + type DeploymentStatus string // Enum values for DeploymentStatus @@ -323,6 +340,23 @@ func (DomainStatus) Values() []DomainStatus { } } +type DomainUnitDesignation string + +// Enum values for DomainUnitDesignation +const ( + DomainUnitDesignationOwner DomainUnitDesignation = "OWNER" +) + +// Values returns all known values for DomainUnitDesignation. 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 (DomainUnitDesignation) Values() []DomainUnitDesignation { + return []DomainUnitDesignation{ + "OWNER", + } +} + type EdgeDirection string // Enum values for EdgeDirection @@ -598,6 +632,43 @@ func (ListingStatus) Values() []ListingStatus { } } +type ManagedPolicyType string + +// Enum values for ManagedPolicyType +const ( + ManagedPolicyTypeCreateDomainUnit ManagedPolicyType = "CREATE_DOMAIN_UNIT" + ManagedPolicyTypeOverrideDomainUnitOwners ManagedPolicyType = "OVERRIDE_DOMAIN_UNIT_OWNERS" + ManagedPolicyTypeAddToProjectMemberPool ManagedPolicyType = "ADD_TO_PROJECT_MEMBER_POOL" + ManagedPolicyTypeOverrideProjectOwners ManagedPolicyType = "OVERRIDE_PROJECT_OWNERS" + ManagedPolicyTypeCreateGlossary ManagedPolicyType = "CREATE_GLOSSARY" + ManagedPolicyTypeCreateFormType ManagedPolicyType = "CREATE_FORM_TYPE" + ManagedPolicyTypeCreateAssetType ManagedPolicyType = "CREATE_ASSET_TYPE" + ManagedPolicyTypeCreateProject ManagedPolicyType = "CREATE_PROJECT" + ManagedPolicyTypeCreateEnvironmentProfile ManagedPolicyType = "CREATE_ENVIRONMENT_PROFILE" + ManagedPolicyTypeDelegateCreateEnvironmentProfile ManagedPolicyType = "DELEGATE_CREATE_ENVIRONMENT_PROFILE" + ManagedPolicyTypeCreateEnvironment ManagedPolicyType = "CREATE_ENVIRONMENT" +) + +// Values returns all known values for ManagedPolicyType. 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 (ManagedPolicyType) Values() []ManagedPolicyType { + return []ManagedPolicyType{ + "CREATE_DOMAIN_UNIT", + "OVERRIDE_DOMAIN_UNIT_OWNERS", + "ADD_TO_PROJECT_MEMBER_POOL", + "OVERRIDE_PROJECT_OWNERS", + "CREATE_GLOSSARY", + "CREATE_FORM_TYPE", + "CREATE_ASSET_TYPE", + "CREATE_PROJECT", + "CREATE_ENVIRONMENT_PROFILE", + "DELEGATE_CREATE_ENVIRONMENT_PROFILE", + "CREATE_ENVIRONMENT", + } +} + type MetadataGenerationRunStatus string // Enum values for MetadataGenerationRunStatus @@ -719,6 +790,25 @@ func (NotificationType) Values() []NotificationType { } } +type ProjectDesignation string + +// Enum values for ProjectDesignation +const ( + ProjectDesignationOwner ProjectDesignation = "OWNER" + ProjectDesignationContributor ProjectDesignation = "CONTRIBUTOR" +) + +// Values returns all known values for ProjectDesignation. 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 (ProjectDesignation) Values() []ProjectDesignation { + return []ProjectDesignation{ + "OWNER", + "CONTRIBUTOR", + } +} + type ProjectStatus string // Enum values for ProjectStatus @@ -966,6 +1056,27 @@ func (SubscriptionStatus) Values() []SubscriptionStatus { } } +type TargetEntityType string + +// Enum values for TargetEntityType +const ( + TargetEntityTypeDomainUnit TargetEntityType = "DOMAIN_UNIT" + TargetEntityTypeEnvironmentBlueprintConfiguration TargetEntityType = "ENVIRONMENT_BLUEPRINT_CONFIGURATION" + TargetEntityTypeEnvironmentProfile TargetEntityType = "ENVIRONMENT_PROFILE" +) + +// Values returns all known values for TargetEntityType. 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 (TargetEntityType) Values() []TargetEntityType { + return []TargetEntityType{ + "DOMAIN_UNIT", + "ENVIRONMENT_BLUEPRINT_CONFIGURATION", + "ENVIRONMENT_PROFILE", + } +} + type TaskStatus string // Enum values for TaskStatus diff --git a/service/datazone/types/types.go b/service/datazone/types/types.go index b574be45a7c..74e07490091 100644 --- a/service/datazone/types/types.go +++ b/service/datazone/types/types.go @@ -58,6 +58,25 @@ type ActionParametersMemberAwsConsoleLink struct { func (*ActionParametersMemberAwsConsoleLink) isActionParameters() {} +// The details of the policy grant. +type AddToProjectMemberPoolPolicyGrantDetail struct { + + // Specifies whether the policy grant is applied to child domain units. + IncludeChildDomainUnits *bool + + noSmithyDocumentSerde +} + +// The grant filter for all domain units. +type AllDomainUnitsGrantFilter struct { + noSmithyDocumentSerde +} + +// The all users grant filter. +type AllUsersGrantFilter struct { + noSmithyDocumentSerde +} + // The configuration details of the asset filter. // // The following types satisfy this interface: @@ -494,6 +513,60 @@ type ConfigurableEnvironmentAction struct { noSmithyDocumentSerde } +// The details of the policy grant. +type CreateAssetTypePolicyGrantDetail struct { + + // Specifies whether the policy grant is applied to child domain units. + IncludeChildDomainUnits *bool + + noSmithyDocumentSerde +} + +// The details of the policy grant. +type CreateDomainUnitPolicyGrantDetail struct { + + // Specifies whether the policy grant is applied to child domain units. + IncludeChildDomainUnits *bool + + noSmithyDocumentSerde +} + +// The details of the policy grant. +type CreateEnvironmentProfilePolicyGrantDetail struct { + + // The ID of the domain unit. + DomainUnitId *string + + noSmithyDocumentSerde +} + +// The details of the policy grant. +type CreateFormTypePolicyGrantDetail struct { + + // Specifies whether the policy grant is applied to child domain units. + IncludeChildDomainUnits *bool + + noSmithyDocumentSerde +} + +// The details of the policy grant. +type CreateGlossaryPolicyGrantDetail struct { + + // Specifies whether the policy grant is applied to child domain units. + IncludeChildDomainUnits *bool + + noSmithyDocumentSerde +} + +// The details of the policy grant. +type CreateProjectPolicyGrantDetail struct { + + // Specifies whether the policy grant is applied to child domain units. + IncludeChildDomainUnits *bool + + noSmithyDocumentSerde +} + // The details of user parameters of an environment blueprint. type CustomParameter struct { @@ -1023,6 +1096,118 @@ type DomainSummary struct { noSmithyDocumentSerde } +// The domain unit filter of the project grant filter. +type DomainUnitFilterForProject struct { + + // The domain unit ID to use in the filter. + // + // This member is required. + DomainUnit *string + + // Specifies whether to include child domain units. + IncludeChildDomainUnits *bool + + noSmithyDocumentSerde +} + +// The grant filter for the domain unit. In the current release of Amazon +// DataZone, the only supported filter is the allDomainUnitsGrantFilter . +// +// The following types satisfy this interface: +// +// DomainUnitGrantFilterMemberAllDomainUnitsGrantFilter +type DomainUnitGrantFilter interface { + isDomainUnitGrantFilter() +} + +// Specifies a grant filter containing all domain units. +type DomainUnitGrantFilterMemberAllDomainUnitsGrantFilter struct { + Value AllDomainUnitsGrantFilter + + noSmithyDocumentSerde +} + +func (*DomainUnitGrantFilterMemberAllDomainUnitsGrantFilter) isDomainUnitGrantFilter() {} + +// The properties of a domain unit group. +type DomainUnitGroupProperties struct { + + // The ID of the domain unit group. + GroupId *string + + noSmithyDocumentSerde +} + +// The properties of the domain unit owner. +// +// The following types satisfy this interface: +// +// DomainUnitOwnerPropertiesMemberGroup +// DomainUnitOwnerPropertiesMemberUser +type DomainUnitOwnerProperties interface { + isDomainUnitOwnerProperties() +} + +// Indicates that the domain unit owner is a group. +type DomainUnitOwnerPropertiesMemberGroup struct { + Value DomainUnitGroupProperties + + noSmithyDocumentSerde +} + +func (*DomainUnitOwnerPropertiesMemberGroup) isDomainUnitOwnerProperties() {} + +// Indicates that the domain unit owner is a user. +type DomainUnitOwnerPropertiesMemberUser struct { + Value DomainUnitUserProperties + + noSmithyDocumentSerde +} + +func (*DomainUnitOwnerPropertiesMemberUser) isDomainUnitOwnerProperties() {} + +// The domain unit principal to whom the policy is granted. +type DomainUnitPolicyGrantPrincipal struct { + + // Specifes the designation of the domain unit users. + // + // This member is required. + DomainUnitDesignation DomainUnitDesignation + + // The grant filter for the domain unit. + DomainUnitGrantFilter DomainUnitGrantFilter + + // The ID of the domain unit. + DomainUnitIdentifier *string + + noSmithyDocumentSerde +} + +// The summary of the domain unit. +type DomainUnitSummary struct { + + // The ID of the domain unit summary. + // + // This member is required. + Id *string + + // The name of the domain unit summary. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// The properties of the domain unit user. +type DomainUnitUserProperties struct { + + // The ID of teh domain unit user. + UserId *string + + noSmithyDocumentSerde +} + // The details about the specified action configured for an environment. For // example, the details of the specified console links for an analytics tool that // is available in this environment. @@ -1729,6 +1914,24 @@ type GroupDetails struct { noSmithyDocumentSerde } +// The group principal to whom the policy is granted. +// +// The following types satisfy this interface: +// +// GroupPolicyGrantPrincipalMemberGroupIdentifier +type GroupPolicyGrantPrincipal interface { + isGroupPolicyGrantPrincipal() +} + +// The ID Of the group of the group principal. +type GroupPolicyGrantPrincipalMemberGroupIdentifier struct { + Value string + + noSmithyDocumentSerde +} + +func (*GroupPolicyGrantPrincipalMemberGroupIdentifier) isGroupPolicyGrantPrincipal() {} + // The details of a group profile. type GroupProfileSummary struct { @@ -2318,6 +2521,304 @@ type NotLikeExpression struct { noSmithyDocumentSerde } +// The grant details of the override domain unit owners policy. +type OverrideDomainUnitOwnersPolicyGrantDetail struct { + + // Specifies whether the policy is inherited by child domain units. + IncludeChildDomainUnits *bool + + noSmithyDocumentSerde +} + +// The details of the override project owners policy grant. +type OverrideProjectOwnersPolicyGrantDetail struct { + + // Specifies whether the policy is inherited by child domain units. + IncludeChildDomainUnits *bool + + noSmithyDocumentSerde +} + +// The properties of the domain unit owners group. +type OwnerGroupProperties struct { + + // The ID of the domain unit owners group. + // + // This member is required. + GroupIdentifier *string + + noSmithyDocumentSerde +} + +// The properties of the domain unit owners group. +type OwnerGroupPropertiesOutput struct { + + // The ID of the domain unit owners group. + GroupId *string + + noSmithyDocumentSerde +} + +// The properties of a domain unit's owner. +// +// The following types satisfy this interface: +// +// OwnerPropertiesMemberGroup +// OwnerPropertiesMemberUser +type OwnerProperties interface { + isOwnerProperties() +} + +// Specifies that the domain unit owner is a group. +type OwnerPropertiesMemberGroup struct { + Value OwnerGroupProperties + + noSmithyDocumentSerde +} + +func (*OwnerPropertiesMemberGroup) isOwnerProperties() {} + +// Specifies that the domain unit owner is a user. +type OwnerPropertiesMemberUser struct { + Value OwnerUserProperties + + noSmithyDocumentSerde +} + +func (*OwnerPropertiesMemberUser) isOwnerProperties() {} + +// The ID of the domain unit owners group. +// +// The following types satisfy this interface: +// +// OwnerPropertiesOutputMemberGroup +// OwnerPropertiesOutputMemberUser +type OwnerPropertiesOutput interface { + isOwnerPropertiesOutput() +} + +// Specifies that the domain unit owner is a group. +type OwnerPropertiesOutputMemberGroup struct { + Value OwnerGroupPropertiesOutput + + noSmithyDocumentSerde +} + +func (*OwnerPropertiesOutputMemberGroup) isOwnerPropertiesOutput() {} + +// Specifies that the domain unit owner is a user. +type OwnerPropertiesOutputMemberUser struct { + Value OwnerUserPropertiesOutput + + noSmithyDocumentSerde +} + +func (*OwnerPropertiesOutputMemberUser) isOwnerPropertiesOutput() {} + +// The properties of the owner user. +type OwnerUserProperties struct { + + // The ID of the owner user. + // + // This member is required. + UserIdentifier *string + + noSmithyDocumentSerde +} + +// The properties of the owner user. +type OwnerUserPropertiesOutput struct { + + // The ID of the owner user. + UserId *string + + noSmithyDocumentSerde +} + +// The details of the policy grant. +// +// The following types satisfy this interface: +// +// PolicyGrantDetailMemberAddToProjectMemberPool +// PolicyGrantDetailMemberCreateAssetType +// PolicyGrantDetailMemberCreateDomainUnit +// PolicyGrantDetailMemberCreateEnvironment +// PolicyGrantDetailMemberCreateEnvironmentProfile +// PolicyGrantDetailMemberCreateFormType +// PolicyGrantDetailMemberCreateGlossary +// PolicyGrantDetailMemberCreateProject +// PolicyGrantDetailMemberDelegateCreateEnvironmentProfile +// PolicyGrantDetailMemberOverrideDomainUnitOwners +// PolicyGrantDetailMemberOverrideProjectOwners +type PolicyGrantDetail interface { + isPolicyGrantDetail() +} + +// Specifies that the policy grant is to be added to the members of the project. +type PolicyGrantDetailMemberAddToProjectMemberPool struct { + Value AddToProjectMemberPoolPolicyGrantDetail + + noSmithyDocumentSerde +} + +func (*PolicyGrantDetailMemberAddToProjectMemberPool) isPolicyGrantDetail() {} + +// Specifies that this is a create asset type policy. +type PolicyGrantDetailMemberCreateAssetType struct { + Value CreateAssetTypePolicyGrantDetail + + noSmithyDocumentSerde +} + +func (*PolicyGrantDetailMemberCreateAssetType) isPolicyGrantDetail() {} + +// Specifies that this is a create domain unit policy. +type PolicyGrantDetailMemberCreateDomainUnit struct { + Value CreateDomainUnitPolicyGrantDetail + + noSmithyDocumentSerde +} + +func (*PolicyGrantDetailMemberCreateDomainUnit) isPolicyGrantDetail() {} + +// Specifies that this is a create environment policy. +type PolicyGrantDetailMemberCreateEnvironment struct { + Value Unit + + noSmithyDocumentSerde +} + +func (*PolicyGrantDetailMemberCreateEnvironment) isPolicyGrantDetail() {} + +// Specifies that this is a create environment profile policy. +type PolicyGrantDetailMemberCreateEnvironmentProfile struct { + Value CreateEnvironmentProfilePolicyGrantDetail + + noSmithyDocumentSerde +} + +func (*PolicyGrantDetailMemberCreateEnvironmentProfile) isPolicyGrantDetail() {} + +// Specifies that this is a create form type policy. +type PolicyGrantDetailMemberCreateFormType struct { + Value CreateFormTypePolicyGrantDetail + + noSmithyDocumentSerde +} + +func (*PolicyGrantDetailMemberCreateFormType) isPolicyGrantDetail() {} + +// Specifies that this is a create glossary policy. +type PolicyGrantDetailMemberCreateGlossary struct { + Value CreateGlossaryPolicyGrantDetail + + noSmithyDocumentSerde +} + +func (*PolicyGrantDetailMemberCreateGlossary) isPolicyGrantDetail() {} + +// Specifies that this is a create project policy. +type PolicyGrantDetailMemberCreateProject struct { + Value CreateProjectPolicyGrantDetail + + noSmithyDocumentSerde +} + +func (*PolicyGrantDetailMemberCreateProject) isPolicyGrantDetail() {} + +// Specifies that this is the delegation of the create environment profile policy. +type PolicyGrantDetailMemberDelegateCreateEnvironmentProfile struct { + Value Unit + + noSmithyDocumentSerde +} + +func (*PolicyGrantDetailMemberDelegateCreateEnvironmentProfile) isPolicyGrantDetail() {} + +// Specifies whether to override domain unit owners. +type PolicyGrantDetailMemberOverrideDomainUnitOwners struct { + Value OverrideDomainUnitOwnersPolicyGrantDetail + + noSmithyDocumentSerde +} + +func (*PolicyGrantDetailMemberOverrideDomainUnitOwners) isPolicyGrantDetail() {} + +// Specifies whether to override project owners. +type PolicyGrantDetailMemberOverrideProjectOwners struct { + Value OverrideProjectOwnersPolicyGrantDetail + + noSmithyDocumentSerde +} + +func (*PolicyGrantDetailMemberOverrideProjectOwners) isPolicyGrantDetail() {} + +// A member of the policy grant list. +type PolicyGrantMember struct { + + // Specifies the timestamp at which policy grant member was created. + CreatedAt *time.Time + + // Specifies the user who created the policy grant member. + CreatedBy *string + + // The details of the policy grant member. + Detail PolicyGrantDetail + + // The principal of the policy grant member. + Principal PolicyGrantPrincipal + + noSmithyDocumentSerde +} + +// The policy grant principal. +// +// The following types satisfy this interface: +// +// PolicyGrantPrincipalMemberDomainUnit +// PolicyGrantPrincipalMemberGroup +// PolicyGrantPrincipalMemberProject +// PolicyGrantPrincipalMemberUser +type PolicyGrantPrincipal interface { + isPolicyGrantPrincipal() +} + +// The domain unit of the policy grant principal. +type PolicyGrantPrincipalMemberDomainUnit struct { + Value DomainUnitPolicyGrantPrincipal + + noSmithyDocumentSerde +} + +func (*PolicyGrantPrincipalMemberDomainUnit) isPolicyGrantPrincipal() {} + +// The group of the policy grant principal. +type PolicyGrantPrincipalMemberGroup struct { + Value GroupPolicyGrantPrincipal + + noSmithyDocumentSerde +} + +func (*PolicyGrantPrincipalMemberGroup) isPolicyGrantPrincipal() {} + +// The project of the policy grant principal. +type PolicyGrantPrincipalMemberProject struct { + Value ProjectPolicyGrantPrincipal + + noSmithyDocumentSerde +} + +func (*PolicyGrantPrincipalMemberProject) isPolicyGrantPrincipal() {} + +// The user of the policy grant principal. +type PolicyGrantPrincipalMemberUser struct { + Value UserPolicyGrantPrincipal + + noSmithyDocumentSerde +} + +func (*PolicyGrantPrincipalMemberUser) isPolicyGrantPrincipal() {} + // The configuration of the prediction. type PredictionConfiguration struct { @@ -2340,6 +2841,24 @@ type ProjectDeletionError struct { noSmithyDocumentSerde } +// The project grant filter. +// +// The following types satisfy this interface: +// +// ProjectGrantFilterMemberDomainUnitFilter +type ProjectGrantFilter interface { + isProjectGrantFilter() +} + +// The domain unit filter of the project grant filter. +type ProjectGrantFilterMemberDomainUnitFilter struct { + Value DomainUnitFilterForProject + + noSmithyDocumentSerde +} + +func (*ProjectGrantFilterMemberDomainUnitFilter) isProjectGrantFilter() {} + // The details of a project member. type ProjectMember struct { @@ -2356,6 +2875,23 @@ type ProjectMember struct { noSmithyDocumentSerde } +// The project policy grant principal. +type ProjectPolicyGrantPrincipal struct { + + // The project designation of the project policy grant principal. + // + // This member is required. + ProjectDesignation ProjectDesignation + + // The project grant filter of the project policy grant principal. + ProjectGrantFilter ProjectGrantFilter + + // The project ID of the project policy grant principal. + ProjectIdentifier *string + + noSmithyDocumentSerde +} + // The details of a Amazon DataZone project. type ProjectSummary struct { @@ -2385,6 +2921,9 @@ type ProjectSummary struct { // The description of a project. Description *string + // The ID of the domain unit. + DomainUnitId *string + // Specifies the error message that is returned if the operation cannot be // successfully completed. FailureReasons []ProjectDeletionError @@ -3689,6 +4228,11 @@ type Topic struct { noSmithyDocumentSerde } +// The details of the policy of creating an environment. +type Unit struct { + noSmithyDocumentSerde +} + // The user details of a project member. type UserDetails struct { @@ -3700,6 +4244,34 @@ type UserDetails struct { noSmithyDocumentSerde } +// The user policy grant principal. +// +// The following types satisfy this interface: +// +// UserPolicyGrantPrincipalMemberAllUsersGrantFilter +// UserPolicyGrantPrincipalMemberUserIdentifier +type UserPolicyGrantPrincipal interface { + isUserPolicyGrantPrincipal() +} + +// The all users grant filter of the user policy grant principal. +type UserPolicyGrantPrincipalMemberAllUsersGrantFilter struct { + Value AllUsersGrantFilter + + noSmithyDocumentSerde +} + +func (*UserPolicyGrantPrincipalMemberAllUsersGrantFilter) isUserPolicyGrantPrincipal() {} + +// The user ID of the user policy grant principal. +type UserPolicyGrantPrincipalMemberUserIdentifier struct { + Value string + + noSmithyDocumentSerde +} + +func (*UserPolicyGrantPrincipalMemberUserIdentifier) isUserPolicyGrantPrincipal() {} + // The details of the user profile in Amazon DataZone. // // The following types satisfy this interface: @@ -3764,13 +4336,21 @@ func (*UnknownUnionMember) isActionParameters() {} func (*UnknownUnionMember) isAssetFilterConfiguration() {} func (*UnknownUnionMember) isDataSourceConfigurationInput() {} func (*UnknownUnionMember) isDataSourceConfigurationOutput() {} +func (*UnknownUnionMember) isDomainUnitGrantFilter() {} +func (*UnknownUnionMember) isDomainUnitOwnerProperties() {} func (*UnknownUnionMember) isFilterClause() {} func (*UnknownUnionMember) isGrantedEntity() {} func (*UnknownUnionMember) isGrantedEntityInput() {} +func (*UnknownUnionMember) isGroupPolicyGrantPrincipal() {} func (*UnknownUnionMember) isListingItem() {} func (*UnknownUnionMember) isMember() {} func (*UnknownUnionMember) isMemberDetails() {} func (*UnknownUnionMember) isModel() {} +func (*UnknownUnionMember) isOwnerProperties() {} +func (*UnknownUnionMember) isOwnerPropertiesOutput() {} +func (*UnknownUnionMember) isPolicyGrantDetail() {} +func (*UnknownUnionMember) isPolicyGrantPrincipal() {} +func (*UnknownUnionMember) isProjectGrantFilter() {} func (*UnknownUnionMember) isProvisioningConfiguration() {} func (*UnknownUnionMember) isProvisioningProperties() {} func (*UnknownUnionMember) isRedshiftStorage() {} @@ -3783,4 +4363,5 @@ func (*UnknownUnionMember) isSelfGrantStatusOutput() {} func (*UnknownUnionMember) isSubscribedListingItem() {} func (*UnknownUnionMember) isSubscribedPrincipal() {} func (*UnknownUnionMember) isSubscribedPrincipalInput() {} +func (*UnknownUnionMember) isUserPolicyGrantPrincipal() {} func (*UnknownUnionMember) isUserProfileDetails() {} diff --git a/service/datazone/types/types_exported_test.go b/service/datazone/types/types_exported_test.go index 87612a09042..d14ce15180c 100644 --- a/service/datazone/types/types_exported_test.go +++ b/service/datazone/types/types_exported_test.go @@ -91,6 +91,46 @@ func ExampleDataSourceConfigurationOutput_outputUsage() { var _ *types.GlueRunConfigurationOutput var _ *types.RedshiftRunConfigurationOutput +func ExampleDomainUnitGrantFilter_outputUsage() { + var union types.DomainUnitGrantFilter + // type switches can be used to check the union value + switch v := union.(type) { + case *types.DomainUnitGrantFilterMemberAllDomainUnitsGrantFilter: + _ = v.Value // Value is types.AllDomainUnitsGrantFilter + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.AllDomainUnitsGrantFilter + +func ExampleDomainUnitOwnerProperties_outputUsage() { + var union types.DomainUnitOwnerProperties + // type switches can be used to check the union value + switch v := union.(type) { + case *types.DomainUnitOwnerPropertiesMemberGroup: + _ = v.Value // Value is types.DomainUnitGroupProperties + + case *types.DomainUnitOwnerPropertiesMemberUser: + _ = v.Value // Value is types.DomainUnitUserProperties + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.DomainUnitGroupProperties +var _ *types.DomainUnitUserProperties + func ExampleFilterClause_outputUsage() { var union types.FilterClause // type switches can be used to check the union value @@ -152,6 +192,24 @@ func ExampleGrantedEntityInput_outputUsage() { var _ *types.ListingRevisionInput +func ExampleGroupPolicyGrantPrincipal_outputUsage() { + var union types.GroupPolicyGrantPrincipal + // type switches can be used to check the union value + switch v := union.(type) { + case *types.GroupPolicyGrantPrincipalMemberGroupIdentifier: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *string + func ExampleListingItem_outputUsage() { var union types.ListingItem // type switches can be used to check the union value @@ -235,6 +293,155 @@ func ExampleModel_outputUsage() { var _ *string +func ExampleOwnerProperties_outputUsage() { + var union types.OwnerProperties + // type switches can be used to check the union value + switch v := union.(type) { + case *types.OwnerPropertiesMemberGroup: + _ = v.Value // Value is types.OwnerGroupProperties + + case *types.OwnerPropertiesMemberUser: + _ = v.Value // Value is types.OwnerUserProperties + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.OwnerGroupProperties +var _ *types.OwnerUserProperties + +func ExampleOwnerPropertiesOutput_outputUsage() { + var union types.OwnerPropertiesOutput + // type switches can be used to check the union value + switch v := union.(type) { + case *types.OwnerPropertiesOutputMemberGroup: + _ = v.Value // Value is types.OwnerGroupPropertiesOutput + + case *types.OwnerPropertiesOutputMemberUser: + _ = v.Value // Value is types.OwnerUserPropertiesOutput + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.OwnerGroupPropertiesOutput +var _ *types.OwnerUserPropertiesOutput + +func ExamplePolicyGrantDetail_outputUsage() { + var union types.PolicyGrantDetail + // type switches can be used to check the union value + switch v := union.(type) { + case *types.PolicyGrantDetailMemberAddToProjectMemberPool: + _ = v.Value // Value is types.AddToProjectMemberPoolPolicyGrantDetail + + case *types.PolicyGrantDetailMemberCreateAssetType: + _ = v.Value // Value is types.CreateAssetTypePolicyGrantDetail + + case *types.PolicyGrantDetailMemberCreateDomainUnit: + _ = v.Value // Value is types.CreateDomainUnitPolicyGrantDetail + + case *types.PolicyGrantDetailMemberCreateEnvironment: + _ = v.Value // Value is types.Unit + + case *types.PolicyGrantDetailMemberCreateEnvironmentProfile: + _ = v.Value // Value is types.CreateEnvironmentProfilePolicyGrantDetail + + case *types.PolicyGrantDetailMemberCreateFormType: + _ = v.Value // Value is types.CreateFormTypePolicyGrantDetail + + case *types.PolicyGrantDetailMemberCreateGlossary: + _ = v.Value // Value is types.CreateGlossaryPolicyGrantDetail + + case *types.PolicyGrantDetailMemberCreateProject: + _ = v.Value // Value is types.CreateProjectPolicyGrantDetail + + case *types.PolicyGrantDetailMemberDelegateCreateEnvironmentProfile: + _ = v.Value // Value is types.Unit + + case *types.PolicyGrantDetailMemberOverrideDomainUnitOwners: + _ = v.Value // Value is types.OverrideDomainUnitOwnersPolicyGrantDetail + + case *types.PolicyGrantDetailMemberOverrideProjectOwners: + _ = v.Value // Value is types.OverrideProjectOwnersPolicyGrantDetail + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.CreateDomainUnitPolicyGrantDetail +var _ *types.OverrideProjectOwnersPolicyGrantDetail +var _ *types.CreateEnvironmentProfilePolicyGrantDetail +var _ *types.CreateGlossaryPolicyGrantDetail +var _ *types.AddToProjectMemberPoolPolicyGrantDetail +var _ *types.CreateProjectPolicyGrantDetail +var _ *types.OverrideDomainUnitOwnersPolicyGrantDetail +var _ *types.CreateAssetTypePolicyGrantDetail +var _ *types.Unit +var _ *types.CreateFormTypePolicyGrantDetail + +func ExamplePolicyGrantPrincipal_outputUsage() { + var union types.PolicyGrantPrincipal + // type switches can be used to check the union value + switch v := union.(type) { + case *types.PolicyGrantPrincipalMemberDomainUnit: + _ = v.Value // Value is types.DomainUnitPolicyGrantPrincipal + + case *types.PolicyGrantPrincipalMemberGroup: + _ = v.Value // Value is types.GroupPolicyGrantPrincipal + + case *types.PolicyGrantPrincipalMemberProject: + _ = v.Value // Value is types.ProjectPolicyGrantPrincipal + + case *types.PolicyGrantPrincipalMemberUser: + _ = v.Value // Value is types.UserPolicyGrantPrincipal + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.DomainUnitPolicyGrantPrincipal +var _ types.GroupPolicyGrantPrincipal +var _ types.UserPolicyGrantPrincipal +var _ *types.ProjectPolicyGrantPrincipal + +func ExampleProjectGrantFilter_outputUsage() { + var union types.ProjectGrantFilter + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ProjectGrantFilterMemberDomainUnitFilter: + _ = v.Value // Value is types.DomainUnitFilterForProject + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.DomainUnitFilterForProject + func ExampleProvisioningConfiguration_outputUsage() { var union types.ProvisioningConfiguration // type switches can be used to check the union value @@ -538,6 +745,28 @@ func ExampleSubscribedPrincipalInput_outputUsage() { var _ *types.SubscribedProjectInput +func ExampleUserPolicyGrantPrincipal_outputUsage() { + var union types.UserPolicyGrantPrincipal + // type switches can be used to check the union value + switch v := union.(type) { + case *types.UserPolicyGrantPrincipalMemberAllUsersGrantFilter: + _ = v.Value // Value is types.AllUsersGrantFilter + + case *types.UserPolicyGrantPrincipalMemberUserIdentifier: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *string +var _ *types.AllUsersGrantFilter + func ExampleUserProfileDetails_outputUsage() { var union types.UserProfileDetails // type switches can be used to check the union value diff --git a/service/datazone/validators.go b/service/datazone/validators.go index 5c2abd6e592..8df62cb47f6 100644 --- a/service/datazone/validators.go +++ b/service/datazone/validators.go @@ -50,6 +50,46 @@ func (m *validateOpAcceptSubscriptionRequest) HandleInitialize(ctx context.Conte return next.HandleInitialize(ctx, in) } +type validateOpAddEntityOwner struct { +} + +func (*validateOpAddEntityOwner) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddEntityOwner) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddEntityOwnerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddEntityOwnerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAddPolicyGrant struct { +} + +func (*validateOpAddPolicyGrant) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddPolicyGrant) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddPolicyGrantInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddPolicyGrantInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpAssociateEnvironmentRole struct { } @@ -270,6 +310,26 @@ func (m *validateOpCreateDomain) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpCreateDomainUnit struct { +} + +func (*validateOpCreateDomainUnit) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateDomainUnit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateDomainUnitInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateDomainUnitInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateEnvironmentAction struct { } @@ -670,6 +730,26 @@ func (m *validateOpDeleteDomain) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpDeleteDomainUnit struct { +} + +func (*validateOpDeleteDomainUnit) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteDomainUnit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteDomainUnitInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteDomainUnitInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteEnvironmentAction struct { } @@ -1110,6 +1190,26 @@ func (m *validateOpGetDomain) HandleInitialize(ctx context.Context, in middlewar return next.HandleInitialize(ctx, in) } +type validateOpGetDomainUnit struct { +} + +func (*validateOpGetDomainUnit) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDomainUnit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDomainUnitInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDomainUnitInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetEnvironmentAction struct { } @@ -1650,6 +1750,46 @@ func (m *validateOpListDataSources) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpListDomainUnitsForParent struct { +} + +func (*validateOpListDomainUnitsForParent) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDomainUnitsForParent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDomainUnitsForParentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDomainUnitsForParentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListEntityOwners struct { +} + +func (*validateOpListEntityOwners) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListEntityOwners) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListEntityOwnersInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListEntityOwnersInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListEnvironmentActions struct { } @@ -1810,6 +1950,26 @@ func (m *validateOpListNotifications) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpListPolicyGrants struct { +} + +func (*validateOpListPolicyGrants) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListPolicyGrants) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListPolicyGrantsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListPolicyGrantsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListProjectMemberships struct { } @@ -2070,6 +2230,46 @@ func (m *validateOpRejectSubscriptionRequest) HandleInitialize(ctx context.Conte return next.HandleInitialize(ctx, in) } +type validateOpRemoveEntityOwner struct { +} + +func (*validateOpRemoveEntityOwner) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRemoveEntityOwner) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RemoveEntityOwnerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRemoveEntityOwnerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRemovePolicyGrant struct { +} + +func (*validateOpRemovePolicyGrant) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRemovePolicyGrant) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RemovePolicyGrantInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRemovePolicyGrantInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRevokeSubscription struct { } @@ -2330,6 +2530,26 @@ func (m *validateOpUpdateDomain) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpUpdateDomainUnit struct { +} + +func (*validateOpUpdateDomainUnit) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDomainUnit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDomainUnitInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDomainUnitInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateEnvironmentAction struct { } @@ -2558,6 +2778,14 @@ func addOpAcceptSubscriptionRequestValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpAcceptSubscriptionRequest{}, middleware.After) } +func addOpAddEntityOwnerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddEntityOwner{}, middleware.After) +} + +func addOpAddPolicyGrantValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddPolicyGrant{}, middleware.After) +} + func addOpAssociateEnvironmentRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateEnvironmentRole{}, middleware.After) } @@ -2602,6 +2830,10 @@ func addOpCreateDomainValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateDomain{}, middleware.After) } +func addOpCreateDomainUnitValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateDomainUnit{}, middleware.After) +} + func addOpCreateEnvironmentActionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateEnvironmentAction{}, middleware.After) } @@ -2682,6 +2914,10 @@ func addOpDeleteDomainValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDomain{}, middleware.After) } +func addOpDeleteDomainUnitValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDomainUnit{}, middleware.After) +} + func addOpDeleteEnvironmentActionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteEnvironmentAction{}, middleware.After) } @@ -2770,6 +3006,10 @@ func addOpGetDomainValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetDomain{}, middleware.After) } +func addOpGetDomainUnitValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDomainUnit{}, middleware.After) +} + func addOpGetEnvironmentActionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetEnvironmentAction{}, middleware.After) } @@ -2878,6 +3118,14 @@ func addOpListDataSourcesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListDataSources{}, middleware.After) } +func addOpListDomainUnitsForParentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDomainUnitsForParent{}, middleware.After) +} + +func addOpListEntityOwnersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListEntityOwners{}, middleware.After) +} + func addOpListEnvironmentActionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListEnvironmentActions{}, middleware.After) } @@ -2910,6 +3158,10 @@ func addOpListNotificationsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListNotifications{}, middleware.After) } +func addOpListPolicyGrantsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListPolicyGrants{}, middleware.After) +} + func addOpListProjectMembershipsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListProjectMemberships{}, middleware.After) } @@ -2962,6 +3214,14 @@ func addOpRejectSubscriptionRequestValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpRejectSubscriptionRequest{}, middleware.After) } +func addOpRemoveEntityOwnerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRemoveEntityOwner{}, middleware.After) +} + +func addOpRemovePolicyGrantValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRemovePolicyGrant{}, middleware.After) +} + func addOpRevokeSubscriptionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRevokeSubscription{}, middleware.After) } @@ -3014,6 +3274,10 @@ func addOpUpdateDomainValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateDomain{}, middleware.After) } +func addOpUpdateDomainUnitValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDomainUnit{}, middleware.After) +} + func addOpUpdateEnvironmentActionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateEnvironmentAction{}, middleware.After) } @@ -3203,6 +3467,36 @@ func validateDataSourceConfigurationInput(v types.DataSourceConfigurationInput) } } +func validateDomainUnitFilterForProject(v *types.DomainUnitFilterForProject) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DomainUnitFilterForProject"} + if v.DomainUnit == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainUnit")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDomainUnitPolicyGrantPrincipal(v *types.DomainUnitPolicyGrantPrincipal) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DomainUnitPolicyGrantPrincipal"} + if len(v.DomainUnitDesignation) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("DomainUnitDesignation")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateEqualToExpression(v *types.EqualToExpression) error { if v == nil { return nil @@ -3654,6 +3948,123 @@ func validateNotLikeExpression(v *types.NotLikeExpression) error { } } +func validateOwnerGroupProperties(v *types.OwnerGroupProperties) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OwnerGroupProperties"} + if v.GroupIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOwnerProperties(v types.OwnerProperties) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OwnerProperties"} + switch uv := v.(type) { + case *types.OwnerPropertiesMemberGroup: + if err := validateOwnerGroupProperties(&uv.Value); err != nil { + invalidParams.AddNested("[group]", err.(smithy.InvalidParamsError)) + } + + case *types.OwnerPropertiesMemberUser: + if err := validateOwnerUserProperties(&uv.Value); err != nil { + invalidParams.AddNested("[user]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOwnerUserProperties(v *types.OwnerUserProperties) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OwnerUserProperties"} + if v.UserIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePolicyGrantPrincipal(v types.PolicyGrantPrincipal) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PolicyGrantPrincipal"} + switch uv := v.(type) { + case *types.PolicyGrantPrincipalMemberDomainUnit: + if err := validateDomainUnitPolicyGrantPrincipal(&uv.Value); err != nil { + invalidParams.AddNested("[domainUnit]", err.(smithy.InvalidParamsError)) + } + + case *types.PolicyGrantPrincipalMemberProject: + if err := validateProjectPolicyGrantPrincipal(&uv.Value); err != nil { + invalidParams.AddNested("[project]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProjectGrantFilter(v types.ProjectGrantFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProjectGrantFilter"} + switch uv := v.(type) { + case *types.ProjectGrantFilterMemberDomainUnitFilter: + if err := validateDomainUnitFilterForProject(&uv.Value); err != nil { + invalidParams.AddNested("[domainUnitFilter]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProjectPolicyGrantPrincipal(v *types.ProjectPolicyGrantPrincipal) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProjectPolicyGrantPrincipal"} + if len(v.ProjectDesignation) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ProjectDesignation")) + } + if v.ProjectGrantFilter != nil { + if err := validateProjectGrantFilter(v.ProjectGrantFilter); err != nil { + invalidParams.AddNested("ProjectGrantFilter", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRedshiftClusterStorage(v *types.RedshiftClusterStorage) error { if v == nil { return nil @@ -4157,6 +4568,68 @@ func validateOpAcceptSubscriptionRequestInput(v *AcceptSubscriptionRequestInput) } } +func validateOpAddEntityOwnerInput(v *AddEntityOwnerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddEntityOwnerInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if len(v.EntityType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("EntityType")) + } + if v.EntityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EntityIdentifier")) + } + if v.Owner == nil { + invalidParams.Add(smithy.NewErrParamRequired("Owner")) + } else if v.Owner != nil { + if err := validateOwnerProperties(v.Owner); err != nil { + invalidParams.AddNested("Owner", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAddPolicyGrantInput(v *AddPolicyGrantInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddPolicyGrantInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if len(v.EntityType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("EntityType")) + } + if v.EntityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EntityIdentifier")) + } + if len(v.PolicyType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PolicyType")) + } + if v.Principal == nil { + invalidParams.Add(smithy.NewErrParamRequired("Principal")) + } else if v.Principal != nil { + if err := validatePolicyGrantPrincipal(v.Principal); err != nil { + invalidParams.AddNested("Principal", err.(smithy.InvalidParamsError)) + } + } + if v.Detail == nil { + invalidParams.Add(smithy.NewErrParamRequired("Detail")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpAssociateEnvironmentRoleInput(v *AssociateEnvironmentRoleInput) error { if v == nil { return nil @@ -4442,6 +4915,27 @@ func validateOpCreateDomainInput(v *CreateDomainInput) error { } } +func validateOpCreateDomainUnitInput(v *CreateDomainUnitInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateDomainUnitInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.ParentDomainUnitIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ParentDomainUnitIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateEnvironmentActionInput(v *CreateEnvironmentActionInput) error { if v == nil { return nil @@ -4891,6 +5385,24 @@ func validateOpDeleteDomainInput(v *DeleteDomainInput) error { } } +func validateOpDeleteDomainUnitInput(v *DeleteDomainUnitInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDomainUnitInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteEnvironmentActionInput(v *DeleteEnvironmentActionInput) error { if v == nil { return nil @@ -5305,6 +5817,24 @@ func validateOpGetDomainInput(v *GetDomainInput) error { } } +func validateOpGetDomainUnitInput(v *GetDomainUnitInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDomainUnitInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetEnvironmentActionInput(v *GetEnvironmentActionInput) error { if v == nil { return nil @@ -5803,6 +6333,45 @@ func validateOpListDataSourcesInput(v *ListDataSourcesInput) error { } } +func validateOpListDomainUnitsForParentInput(v *ListDomainUnitsForParentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDomainUnitsForParentInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if v.ParentDomainUnitIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ParentDomainUnitIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListEntityOwnersInput(v *ListEntityOwnersInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListEntityOwnersInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if len(v.EntityType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("EntityType")) + } + if v.EntityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EntityIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListEnvironmentActionsInput(v *ListEnvironmentActionsInput) error { if v == nil { return nil @@ -5935,6 +6504,30 @@ func validateOpListNotificationsInput(v *ListNotificationsInput) error { } } +func validateOpListPolicyGrantsInput(v *ListPolicyGrantsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListPolicyGrantsInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if len(v.EntityType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("EntityType")) + } + if v.EntityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EntityIdentifier")) + } + if len(v.PolicyType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PolicyType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListProjectMembershipsInput(v *ListProjectMembershipsInput) error { if v == nil { return nil @@ -6178,6 +6771,65 @@ func validateOpRejectSubscriptionRequestInput(v *RejectSubscriptionRequestInput) } } +func validateOpRemoveEntityOwnerInput(v *RemoveEntityOwnerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RemoveEntityOwnerInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if len(v.EntityType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("EntityType")) + } + if v.EntityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EntityIdentifier")) + } + if v.Owner == nil { + invalidParams.Add(smithy.NewErrParamRequired("Owner")) + } else if v.Owner != nil { + if err := validateOwnerProperties(v.Owner); err != nil { + invalidParams.AddNested("Owner", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRemovePolicyGrantInput(v *RemovePolicyGrantInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RemovePolicyGrantInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if len(v.EntityType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("EntityType")) + } + if v.EntityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EntityIdentifier")) + } + if len(v.PolicyType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PolicyType")) + } + if v.Principal == nil { + invalidParams.Add(smithy.NewErrParamRequired("Principal")) + } else if v.Principal != nil { + if err := validatePolicyGrantPrincipal(v.Principal); err != nil { + invalidParams.AddNested("Principal", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRevokeSubscriptionInput(v *RevokeSubscriptionInput) error { if v == nil { return nil @@ -6482,6 +7134,24 @@ func validateOpUpdateDomainInput(v *UpdateDomainInput) error { } } +func validateOpUpdateDomainUnitInput(v *UpdateDomainUnitInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateDomainUnitInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateEnvironmentActionInput(v *UpdateEnvironmentActionInput) error { if v == nil { return nil diff --git a/service/redshiftdata/api_op_BatchExecuteStatement.go b/service/redshiftdata/api_op_BatchExecuteStatement.go index 93f74420822..c2f302e5d28 100644 --- a/service/redshiftdata/api_op_BatchExecuteStatement.go +++ b/service/redshiftdata/api_op_BatchExecuteStatement.go @@ -63,12 +63,6 @@ func (c *Client) BatchExecuteStatement(ctx context.Context, params *BatchExecute type BatchExecuteStatementInput struct { - // The name of the database. This parameter is required when authenticating using - // either Secrets Manager or temporary credentials. - // - // This member is required. - Database *string - // One or more SQL statements to run. // // The SQL statements are run as a single transaction. They run serially in the @@ -87,6 +81,10 @@ type BatchExecuteStatementInput struct { // and authenticating using either Secrets Manager or temporary credentials. ClusterIdentifier *string + // The name of the database. This parameter is required when authenticating using + // either Secrets Manager or temporary credentials. + Database *string + // The database user name. This parameter is required when connecting to a cluster // as a database user and authenticating using temporary credentials. DbUser *string @@ -95,6 +93,14 @@ type BatchExecuteStatementInput struct { // parameter is required when authenticating using Secrets Manager. SecretArn *string + // The session identifier of the query. + SessionId *string + + // The number of seconds to keep the session alive after the query finishes. The + // maximum time a session can keep alive is 24 hours. After 24 hours, the session + // is forced closed and the query is terminated. + SessionKeepAliveSeconds *int32 + // The name of the SQL statements. You can name the SQL statements when you create // them to identify the query. StatementName *string @@ -123,6 +129,9 @@ type BatchExecuteStatementOutput struct { // The name of the database. Database *string + // A list of colon (:) separated names of database groups. + DbGroups []string + // The database user name. DbUser *string @@ -134,6 +143,9 @@ type BatchExecuteStatementOutput struct { // The name or ARN of the secret that enables access to the database. SecretArn *string + // The session identifier of the query. + SessionId *string + // The serverless workgroup name or Amazon Resource Name (ARN). This element is // not returned when connecting to a provisioned cluster. WorkgroupName *string diff --git a/service/redshiftdata/api_op_DescribeStatement.go b/service/redshiftdata/api_op_DescribeStatement.go index 3e574dea3e9..5194ed27bbe 100644 --- a/service/redshiftdata/api_op_DescribeStatement.go +++ b/service/redshiftdata/api_op_DescribeStatement.go @@ -109,6 +109,9 @@ type DescribeStatementOutput struct { // database. SecretArn *string + // The session identifier of the query. + SessionId *string + // The status of the SQL statement being described. Status values are defined as // follows: // diff --git a/service/redshiftdata/api_op_ExecuteStatement.go b/service/redshiftdata/api_op_ExecuteStatement.go index 2191c3fb0ed..b01bbd2c373 100644 --- a/service/redshiftdata/api_op_ExecuteStatement.go +++ b/service/redshiftdata/api_op_ExecuteStatement.go @@ -65,12 +65,6 @@ func (c *Client) ExecuteStatement(ctx context.Context, params *ExecuteStatementI type ExecuteStatementInput struct { - // The name of the database. This parameter is required when authenticating using - // either Secrets Manager or temporary credentials. - // - // This member is required. - Database *string - // The SQL statement text to run. // // This member is required. @@ -84,6 +78,10 @@ type ExecuteStatementInput struct { // and authenticating using either Secrets Manager or temporary credentials. ClusterIdentifier *string + // The name of the database. This parameter is required when authenticating using + // either Secrets Manager or temporary credentials. + Database *string + // The database user name. This parameter is required when connecting to a cluster // as a database user and authenticating using temporary credentials. DbUser *string @@ -95,6 +93,14 @@ type ExecuteStatementInput struct { // parameter is required when authenticating using Secrets Manager. SecretArn *string + // The session identifier of the query. + SessionId *string + + // The number of seconds to keep the session alive after the query finishes. The + // maximum time a session can keep alive is 24 hours. After 24 hours, the session + // is forced closed and the query is terminated. + SessionKeepAliveSeconds *int32 + // The name of the SQL statement. You can name the SQL statement when you create // it to identify the query. StatementName *string @@ -123,6 +129,9 @@ type ExecuteStatementOutput struct { // The name of the database. Database *string + // A list of colon (:) separated names of database groups. + DbGroups []string + // The database user name. DbUser *string @@ -133,6 +142,9 @@ type ExecuteStatementOutput struct { // The name or ARN of the secret that enables access to the database. SecretArn *string + // The session identifier of the query. + SessionId *string + // The serverless workgroup name or Amazon Resource Name (ARN). This element is // not returned when connecting to a provisioned cluster. WorkgroupName *string diff --git a/service/redshiftdata/deserializers.go b/service/redshiftdata/deserializers.go index 578b031ae5c..f3fea2c052c 100644 --- a/service/redshiftdata/deserializers.go +++ b/service/redshiftdata/deserializers.go @@ -124,12 +124,18 @@ func awsAwsjson11_deserializeOpErrorBatchExecuteStatement(response *smithyhttp.R errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ActiveSessionsExceededException", errorCode): + return awsAwsjson11_deserializeErrorActiveSessionsExceededException(response, errorBody) + case strings.EqualFold("ActiveStatementsExceededException", errorCode): return awsAwsjson11_deserializeErrorActiveStatementsExceededException(response, errorBody) case strings.EqualFold("BatchExecuteStatementException", errorCode): return awsAwsjson11_deserializeErrorBatchExecuteStatementException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -472,6 +478,9 @@ func awsAwsjson11_deserializeOpErrorDescribeTable(response *smithyhttp.Response, case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("QueryTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorQueryTimeoutException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -579,12 +588,18 @@ func awsAwsjson11_deserializeOpErrorExecuteStatement(response *smithyhttp.Respon errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ActiveSessionsExceededException", errorCode): + return awsAwsjson11_deserializeErrorActiveSessionsExceededException(response, errorBody) + case strings.EqualFold("ActiveStatementsExceededException", errorCode): return awsAwsjson11_deserializeErrorActiveStatementsExceededException(response, errorBody) case strings.EqualFold("ExecuteStatementException", errorCode): return awsAwsjson11_deserializeErrorExecuteStatementException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -811,6 +826,9 @@ func awsAwsjson11_deserializeOpErrorListDatabases(response *smithyhttp.Response, case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("QueryTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorQueryTimeoutException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -924,6 +942,9 @@ func awsAwsjson11_deserializeOpErrorListSchemas(response *smithyhttp.Response, m case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("QueryTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorQueryTimeoutException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -1147,6 +1168,9 @@ func awsAwsjson11_deserializeOpErrorListTables(response *smithyhttp.Response, me case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("QueryTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorQueryTimeoutException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -1160,6 +1184,41 @@ func awsAwsjson11_deserializeOpErrorListTables(response *smithyhttp.Response, me } } +func awsAwsjson11_deserializeErrorActiveSessionsExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.ActiveSessionsExceededException{} + err := awsAwsjson11_deserializeDocumentActiveSessionsExceededException(&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 awsAwsjson11_deserializeErrorActiveStatementsExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1335,6 +1394,41 @@ func awsAwsjson11_deserializeErrorInternalServerException(response *smithyhttp.R return output } +func awsAwsjson11_deserializeErrorQueryTimeoutException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.QueryTimeoutException{} + err := awsAwsjson11_deserializeDocumentQueryTimeoutException(&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 awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1405,6 +1499,46 @@ func awsAwsjson11_deserializeErrorValidationException(response *smithyhttp.Respo return output } +func awsAwsjson11_deserializeDocumentActiveSessionsExceededException(v **types.ActiveSessionsExceededException, 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.ActiveSessionsExceededException + if *v == nil { + sv = &types.ActiveSessionsExceededException{} + } 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 +} + func awsAwsjson11_deserializeDocumentActiveStatementsExceededException(v **types.ActiveStatementsExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -1802,6 +1936,42 @@ func awsAwsjson11_deserializeDocumentDatabaseList(v *[]string, value interface{} return nil } +func awsAwsjson11_deserializeDocumentDbGroupList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentExecuteStatementException(v **types.ExecuteStatementException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2058,6 +2228,46 @@ func awsAwsjson11_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsAwsjson11_deserializeDocumentQueryTimeoutException(v **types.QueryTimeoutException, 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.QueryTimeoutException + if *v == nil { + sv = &types.QueryTimeoutException{} + } 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 +} + func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2300,7 +2510,7 @@ func awsAwsjson11_deserializeDocumentStatementData(v **types.StatementData, valu if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatementId to be of type string, got %T instead", value) + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } @@ -2342,6 +2552,15 @@ func awsAwsjson11_deserializeDocumentStatementData(v **types.StatementData, valu sv.SecretArn = ptr.String(jtv) } + case "SessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(jtv) + } + case "StatementName": if value != nil { jtv, ok := value.(string) @@ -2528,7 +2747,7 @@ func awsAwsjson11_deserializeDocumentSubStatementData(v **types.SubStatementData if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatementId to be of type string, got %T instead", value) + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } @@ -2807,7 +3026,7 @@ func awsAwsjson11_deserializeOpDocumentBatchExecuteStatementOutput(v **BatchExec if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Location to be of type string, got %T instead", value) + return fmt.Errorf("expected ClusterIdentifierString to be of type string, got %T instead", value) } sv.ClusterIdentifier = ptr.String(jtv) } @@ -2837,6 +3056,11 @@ func awsAwsjson11_deserializeOpDocumentBatchExecuteStatementOutput(v **BatchExec sv.Database = ptr.String(jtv) } + case "DbGroups": + if err := awsAwsjson11_deserializeDocumentDbGroupList(&sv.DbGroups, value); err != nil { + return err + } + case "DbUser": if value != nil { jtv, ok := value.(string) @@ -2850,7 +3074,7 @@ func awsAwsjson11_deserializeOpDocumentBatchExecuteStatementOutput(v **BatchExec if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatementId to be of type string, got %T instead", value) + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } @@ -2864,6 +3088,15 @@ func awsAwsjson11_deserializeOpDocumentBatchExecuteStatementOutput(v **BatchExec sv.SecretArn = ptr.String(jtv) } + case "SessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(jtv) + } + case "WorkgroupName": if value != nil { jtv, ok := value.(string) @@ -3022,7 +3255,7 @@ func awsAwsjson11_deserializeOpDocumentDescribeStatementOutput(v **DescribeState if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatementId to be of type string, got %T instead", value) + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } @@ -3102,6 +3335,15 @@ func awsAwsjson11_deserializeOpDocumentDescribeStatementOutput(v **DescribeState sv.SecretArn = ptr.String(jtv) } + case "SessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(jtv) + } + case "Status": if value != nil { jtv, ok := value.(string) @@ -3230,7 +3472,7 @@ func awsAwsjson11_deserializeOpDocumentExecuteStatementOutput(v **ExecuteStateme if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Location to be of type string, got %T instead", value) + return fmt.Errorf("expected ClusterIdentifierString to be of type string, got %T instead", value) } sv.ClusterIdentifier = ptr.String(jtv) } @@ -3260,6 +3502,11 @@ func awsAwsjson11_deserializeOpDocumentExecuteStatementOutput(v **ExecuteStateme sv.Database = ptr.String(jtv) } + case "DbGroups": + if err := awsAwsjson11_deserializeDocumentDbGroupList(&sv.DbGroups, value); err != nil { + return err + } + case "DbUser": if value != nil { jtv, ok := value.(string) @@ -3273,7 +3520,7 @@ func awsAwsjson11_deserializeOpDocumentExecuteStatementOutput(v **ExecuteStateme if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatementId to be of type string, got %T instead", value) + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } @@ -3287,6 +3534,15 @@ func awsAwsjson11_deserializeOpDocumentExecuteStatementOutput(v **ExecuteStateme sv.SecretArn = ptr.String(jtv) } + case "SessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(jtv) + } + case "WorkgroupName": if value != nil { jtv, ok := value.(string) diff --git a/service/redshiftdata/endpoints.go b/service/redshiftdata/endpoints.go index 40f42904581..34e1d64f430 100644 --- a/service/redshiftdata/endpoints.go +++ b/service/redshiftdata/endpoints.go @@ -384,7 +384,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://redshift-data-fips.") diff --git a/service/redshiftdata/serializers.go b/service/redshiftdata/serializers.go index 1853f204cdb..fa1c3381a09 100644 --- a/service/redshiftdata/serializers.go +++ b/service/redshiftdata/serializers.go @@ -634,6 +634,16 @@ func awsAwsjson11_serializeOpDocumentBatchExecuteStatementInput(v *BatchExecuteS ok.String(*v.SecretArn) } + if v.SessionId != nil { + ok := object.Key("SessionId") + ok.String(*v.SessionId) + } + + if v.SessionKeepAliveSeconds != nil { + ok := object.Key("SessionKeepAliveSeconds") + ok.Integer(*v.SessionKeepAliveSeconds) + } + if v.Sqls != nil { ok := object.Key("Sqls") if err := awsAwsjson11_serializeDocumentSqlList(v.Sqls, ok); err != nil { @@ -776,6 +786,16 @@ func awsAwsjson11_serializeOpDocumentExecuteStatementInput(v *ExecuteStatementIn ok.String(*v.SecretArn) } + if v.SessionId != nil { + ok := object.Key("SessionId") + ok.String(*v.SessionId) + } + + if v.SessionKeepAliveSeconds != nil { + ok := object.Key("SessionKeepAliveSeconds") + ok.Integer(*v.SessionKeepAliveSeconds) + } + if v.Sql != nil { ok := object.Key("Sql") ok.String(*v.Sql) diff --git a/service/redshiftdata/types/errors.go b/service/redshiftdata/types/errors.go index ade6881d182..cc057926141 100644 --- a/service/redshiftdata/types/errors.go +++ b/service/redshiftdata/types/errors.go @@ -7,6 +7,33 @@ import ( smithy "github.com/aws/smithy-go" ) +// The Amazon Redshift Data API operation failed because the maximum number of +// active sessions exceeded. +type ActiveSessionsExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ActiveSessionsExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ActiveSessionsExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ActiveSessionsExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ActiveSessionsExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ActiveSessionsExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The number of active statements exceeds the limit. type ActiveStatementsExceededException struct { Message *string @@ -141,6 +168,32 @@ func (e *InternalServerException) ErrorCode() string { } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } +// The Amazon Redshift Data API operation failed due to timeout. +type QueryTimeoutException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *QueryTimeoutException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *QueryTimeoutException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *QueryTimeoutException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "QueryTimeoutException" + } + return *e.ErrorCodeOverride +} +func (e *QueryTimeoutException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The Amazon Redshift Data API operation failed due to a missing resource. type ResourceNotFoundException struct { Message *string diff --git a/service/redshiftdata/types/types.go b/service/redshiftdata/types/types.go index 9ffce80cf60..dc2c977ab9f 100644 --- a/service/redshiftdata/types/types.go +++ b/service/redshiftdata/types/types.go @@ -169,6 +169,9 @@ type StatementData struct { // database. SecretArn *string + // The session identifier of the query. + SessionId *string + // The name of the SQL statement. StatementName *string diff --git a/service/redshiftdata/validators.go b/service/redshiftdata/validators.go index bd99d744b85..ead72ce8591 100644 --- a/service/redshiftdata/validators.go +++ b/service/redshiftdata/validators.go @@ -269,9 +269,6 @@ func validateOpBatchExecuteStatementInput(v *BatchExecuteStatementInput) error { if v.Sqls == nil { invalidParams.Add(smithy.NewErrParamRequired("Sqls")) } - if v.Database == nil { - invalidParams.Add(smithy.NewErrParamRequired("Database")) - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -332,9 +329,6 @@ func validateOpExecuteStatementInput(v *ExecuteStatementInput) error { if v.Sql == nil { invalidParams.Add(smithy.NewErrParamRequired("Sql")) } - if v.Database == nil { - invalidParams.Add(smithy.NewErrParamRequired("Database")) - } if v.Parameters != nil { if err := validateSqlParametersList(v.Parameters); err != nil { invalidParams.AddNested("Parameters", err.(smithy.InvalidParamsError)) diff --git a/service/serverlessapplicationrepository/internal/endpoints/endpoints.go b/service/serverlessapplicationrepository/internal/endpoints/endpoints.go index 832e7e4ef5a..b169389bca2 100644 --- a/service/serverlessapplicationrepository/internal/endpoints/endpoints.go +++ b/service/serverlessapplicationrepository/internal/endpoints/endpoints.go @@ -174,6 +174,22 @@ var defaultPartitions = endpoints.Partitions{ }: endpoints.Endpoint{ Protocols: []string{"https"}, }, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "serverlessrepo-fips.ca-central-1.amazonaws.com", + Protocols: []string{"https"}, + }, + endpoints.EndpointKey{ + Region: "ca-central-1-fips", + }: endpoints.Endpoint{ + Hostname: "serverlessrepo-fips.ca-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-central-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{