diff --git a/.changelog/043abd102b7c42b8a7b48e4f4db2c8cc.json b/.changelog/043abd102b7c42b8a7b48e4f4db2c8cc.json new file mode 100644 index 00000000000..9d39ce1af47 --- /dev/null +++ b/.changelog/043abd102b7c42b8a7b48e4f4db2c8cc.json @@ -0,0 +1,8 @@ +{ + "id": "043abd10-2b7c-42b8-a7b4-8e4f4db2c8cc", + "type": "feature", + "description": "This release adds a new MonitorContact API for initiating monitoring of ongoing Voice and Chat contacts.", + "modules": [ + "service/connect" + ] +} \ No newline at end of file diff --git a/.changelog/1b25d83863c14e8da362dcac933a0449.json b/.changelog/1b25d83863c14e8da362dcac933a0449.json new file mode 100644 index 00000000000..bac565434a2 --- /dev/null +++ b/.changelog/1b25d83863c14e8da362dcac933a0449.json @@ -0,0 +1,8 @@ +{ + "id": "1b25d838-63c1-4e8d-a362-dcac933a0449", + "type": "feature", + "description": "This release supports new set of entities and traits. It also adds new category (BEHAVIORAL_ENVIRONMENTAL_SOCIAL).", + "modules": [ + "service/comprehendmedical" + ] +} \ No newline at end of file diff --git a/.changelog/1c67b90ca7904785a2e198bdda2d946a.json b/.changelog/1c67b90ca7904785a2e198bdda2d946a.json new file mode 100644 index 00000000000..1e87f3b4657 --- /dev/null +++ b/.changelog/1c67b90ca7904785a2e198bdda2d946a.json @@ -0,0 +1,8 @@ +{ + "id": "1c67b90c-a790-4785-a2e1-98bdda2d946a", + "type": "feature", + "description": "This release provides support for creation and use of metric attributions in AWS Personalize", + "modules": [ + "service/personalizeevents" + ] +} \ No newline at end of file diff --git a/.changelog/323a272acb8149cea084475fdf1a58da.json b/.changelog/323a272acb8149cea084475fdf1a58da.json new file mode 100644 index 00000000000..8a03dcf016a --- /dev/null +++ b/.changelog/323a272acb8149cea084475fdf1a58da.json @@ -0,0 +1,8 @@ +{ + "id": "323a272a-cb81-49ce-a084-475fdf1a58da", + "type": "feature", + "description": "Added UnsupportedTarget HandlerErrorCode for use with CFN Resource Hooks", + "modules": [ + "service/cloudformation" + ] +} \ No newline at end of file diff --git a/.changelog/4211cfe704c44707a5a0b02523d6d0ba.json b/.changelog/4211cfe704c44707a5a0b02523d6d0ba.json new file mode 100644 index 00000000000..2b7f481219d --- /dev/null +++ b/.changelog/4211cfe704c44707a5a0b02523d6d0ba.json @@ -0,0 +1,8 @@ +{ + "id": "4211cfe7-04c4-4707-a5a0-b02523d6d0ba", + "type": "documentation", + "description": "Documentation updates related to Batch on EKS", + "modules": [ + "service/batch" + ] +} \ No newline at end of file diff --git a/.changelog/42c6c114277e42038fb00de38f6acf0c.json b/.changelog/42c6c114277e42038fb00de38f6acf0c.json new file mode 100644 index 00000000000..e055b334d2f --- /dev/null +++ b/.changelog/42c6c114277e42038fb00de38f6acf0c.json @@ -0,0 +1,8 @@ +{ + "id": "42c6c114-277e-4203-8fb0-0de38f6acf0c", + "type": "feature", + "description": "This release adds the following: 1) ExecuteQuery API allows users to query their AWS IoT TwinMaker Knowledge Graph 2) Pricing plan APIs allow users to configure and manage their pricing mode 3) Support for property groups and tabular property values in existing AWS IoT TwinMaker APIs.", + "modules": [ + "service/iottwinmaker" + ] +} \ No newline at end of file diff --git a/.changelog/4ea4f8f435c74dcf93d3aacb9b1e6104.json b/.changelog/4ea4f8f435c74dcf93d3aacb9b1e6104.json new file mode 100644 index 00000000000..2289ded986a --- /dev/null +++ b/.changelog/4ea4f8f435c74dcf93d3aacb9b1e6104.json @@ -0,0 +1,8 @@ +{ + "id": "4ea4f8f4-35c7-4dcf-93d3-aacb9b1e6104", + "type": "feature", + "description": "This release adds new APIs - PutResourcePolicy, DeleteResourcePolicy, ListResourcePolicies for supporting resource based policies for AWS X-Ray.", + "modules": [ + "service/xray" + ] +} \ No newline at end of file diff --git a/.changelog/5100ad00ff1f4d81ba457d22df988f80.json b/.changelog/5100ad00ff1f4d81ba457d22df988f80.json new file mode 100644 index 00000000000..3b6e81c734a --- /dev/null +++ b/.changelog/5100ad00ff1f4d81ba457d22df988f80.json @@ -0,0 +1,8 @@ +{ + "id": "5100ad00-ff1f-4d81-ba45-7d22df988f80", + "type": "feature", + "description": "This release adds a new feature BillingEntity pricing rule.", + "modules": [ + "service/billingconductor" + ] +} \ No newline at end of file diff --git a/.changelog/5bb0c2e40fe74942aeeadd34f9d06bb9.json b/.changelog/5bb0c2e40fe74942aeeadd34f9d06bb9.json new file mode 100644 index 00000000000..f2a93ec1d5d --- /dev/null +++ b/.changelog/5bb0c2e40fe74942aeeadd34f9d06bb9.json @@ -0,0 +1,8 @@ +{ + "id": "5bb0c2e4-0fe7-4942-aeea-dd34f9d06bb9", + "type": "feature", + "description": "for Redis now supports AWS Identity and Access Management authentication access to Redis clusters starting with redis-engine version 7.0", + "modules": [ + "service/elasticache" + ] +} \ No newline at end of file diff --git a/.changelog/63338df3afe048f7acc7fe4891fd79e2.json b/.changelog/63338df3afe048f7acc7fe4891fd79e2.json new file mode 100644 index 00000000000..568d6beb4a7 --- /dev/null +++ b/.changelog/63338df3afe048f7acc7fe4891fd79e2.json @@ -0,0 +1,8 @@ +{ + "id": "63338df3-afe0-48f7-acc7-fe4891fd79e2", + "type": "feature", + "description": "This release adds support for container databases (CDBs) to Amazon RDS Custom for Oracle. A CDB contains one PDB at creation. You can add more PDBs using Oracle SQL. You can also customize your database installation by setting the Oracle base, Oracle home, and the OS user name and group.", + "modules": [ + "service/rds" + ] +} \ No newline at end of file diff --git a/.changelog/845c19b30a0647b494456ec262e4c4af.json b/.changelog/845c19b30a0647b494456ec262e4c4af.json new file mode 100644 index 00000000000..2c477876ee8 --- /dev/null +++ b/.changelog/845c19b30a0647b494456ec262e4c4af.json @@ -0,0 +1,8 @@ +{ + "id": "845c19b3-0a06-47b4-9445-6ec262e4c4af", + "type": "feature", + "description": "Add support for sorting and filtering in ListServiceInstances", + "modules": [ + "service/proton" + ] +} \ No newline at end of file diff --git a/.changelog/d892bf7373784cad9e6635d59c911db2.json b/.changelog/d892bf7373784cad9e6635d59c911db2.json new file mode 100644 index 00000000000..da9b3d63655 --- /dev/null +++ b/.changelog/d892bf7373784cad9e6635d59c911db2.json @@ -0,0 +1,8 @@ +{ + "id": "d892bf73-7378-4cad-9e66-35d59c911db2", + "type": "feature", + "description": "This release adds support for cross account access in CreateOpsItem, UpdateOpsItem and GetOpsItem. It introduces new APIs to setup resource policies for SSM resources: PutResourcePolicy, GetResourcePolicies and DeleteResourcePolicy.", + "modules": [ + "service/ssm" + ] +} \ No newline at end of file diff --git a/.changelog/d9cda1ab24fd454dabd751f012e83c17.json b/.changelog/d9cda1ab24fd454dabd751f012e83c17.json new file mode 100644 index 00000000000..543240527f5 --- /dev/null +++ b/.changelog/d9cda1ab24fd454dabd751f012e83c17.json @@ -0,0 +1,8 @@ +{ + "id": "d9cda1ab-24fd-454d-abd7-51f012e83c17", + "type": "feature", + "description": "Adds support for customer-provided placement groups for Kubernetes control plane instances when creating local EKS clusters on Outposts", + "modules": [ + "service/eks" + ] +} \ No newline at end of file diff --git a/.changelog/e4d860476a2e4e0792a3af4aafeb85d8.json b/.changelog/e4d860476a2e4e0792a3af4aafeb85d8.json new file mode 100644 index 00000000000..8b8a595e4b4 --- /dev/null +++ b/.changelog/e4d860476a2e4e0792a3af4aafeb85d8.json @@ -0,0 +1,8 @@ +{ + "id": "e4d86047-6a2e-4e07-92a3-af4aafeb85d8", + "type": "feature", + "description": "Allow additional operations to throw ThrottlingException", + "modules": [ + "service/transfer" + ] +} \ No newline at end of file diff --git a/.changelog/ea793e1513174a7294244873aad1de8f.json b/.changelog/ea793e1513174a7294244873aad1de8f.json new file mode 100644 index 00000000000..280edf59f80 --- /dev/null +++ b/.changelog/ea793e1513174a7294244873aad1de8f.json @@ -0,0 +1,8 @@ +{ + "id": "ea793e15-1317-4a72-9424-4873aad1de8f", + "type": "feature", + "description": "Add support for PagerDuty integrations on ResponsePlan, IncidentRecord, and RelatedItem APIs", + "modules": [ + "service/ssmincidents" + ] +} \ No newline at end of file diff --git a/service/accessanalyzer/internal/endpoints/endpoints.go b/service/accessanalyzer/internal/endpoints/endpoints.go index 3627a647a19..188e1568c88 100644 --- a/service/accessanalyzer/internal/endpoints/endpoints.go +++ b/service/accessanalyzer/internal/endpoints/endpoints.go @@ -183,6 +183,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/acm/internal/endpoints/endpoints.go b/service/acm/internal/endpoints/endpoints.go index f937887fc9a..4c4cb557fe2 100644 --- a/service/acm/internal/endpoints/endpoints.go +++ b/service/acm/internal/endpoints/endpoints.go @@ -192,6 +192,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/apigateway/internal/endpoints/endpoints.go b/service/apigateway/internal/endpoints/endpoints.go index d17c9df6adc..e3e9b729c82 100644 --- a/service/apigateway/internal/endpoints/endpoints.go +++ b/service/apigateway/internal/endpoints/endpoints.go @@ -183,6 +183,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/apigatewayv2/internal/endpoints/endpoints.go b/service/apigatewayv2/internal/endpoints/endpoints.go index fde1bb15b01..346fd9fc5de 100644 --- a/service/apigatewayv2/internal/endpoints/endpoints.go +++ b/service/apigatewayv2/internal/endpoints/endpoints.go @@ -183,6 +183,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/appconfig/internal/endpoints/endpoints.go b/service/appconfig/internal/endpoints/endpoints.go index 502eb268169..a0afe536b87 100644 --- a/service/appconfig/internal/endpoints/endpoints.go +++ b/service/appconfig/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/applicationautoscaling/internal/endpoints/endpoints.go b/service/applicationautoscaling/internal/endpoints/endpoints.go index 6545c0e444f..c67f9ede5ca 100644 --- a/service/applicationautoscaling/internal/endpoints/endpoints.go +++ b/service/applicationautoscaling/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/autoscaling/internal/endpoints/endpoints.go b/service/autoscaling/internal/endpoints/endpoints.go index aa36464f0e5..90ada052cdc 100644 --- a/service/autoscaling/internal/endpoints/endpoints.go +++ b/service/autoscaling/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/batch/api_op_CreateComputeEnvironment.go b/service/batch/api_op_CreateComputeEnvironment.go index 0301eab43ff..3b111580cba 100644 --- a/service/batch/api_op_CreateComputeEnvironment.go +++ b/service/batch/api_op_CreateComputeEnvironment.go @@ -36,29 +36,30 @@ import ( // your container instances into that Amazon ECS cluster. For more information, see // Launching an Amazon ECS container instance // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html) -// in the Amazon Elastic Container Service Developer Guide. Batch doesn't -// automatically upgrade the AMIs in a compute environment after it's created. For -// example, it also doesn't update the AMIs in your compute environment when a -// newer version of the Amazon ECS optimized AMI is available. You're responsible -// for the management of the guest operating system. This includes any updates and -// security patches. You're also responsible for any additional application -// software or utilities that you install on the compute resources. There are two -// ways to use a new AMI for your Batch jobs. The original method is to complete -// these steps: +// in the Amazon Elastic Container Service Developer Guide. To create a compute +// environment that uses EKS resources, the caller must have permissions to call +// eks:DescribeCluster. Batch doesn't automatically upgrade the AMIs in a compute +// environment after it's created. For example, it also doesn't update the AMIs in +// your compute environment when a newer version of the Amazon ECS optimized AMI is +// available. You're responsible for the management of the guest operating system. +// This includes any updates and security patches. You're also responsible for any +// additional application software or utilities that you install on the compute +// resources. There are two ways to use a new AMI for your Batch jobs. The original +// method is to complete these steps: // -// * Create a new compute environment with the new AMI. +// * Create a new compute environment with the +// new AMI. // -// * Add the -// compute environment to an existing job queue. +// * Add the compute environment to an existing job queue. // -// * Remove the earlier compute -// environment from your job queue. +// * Remove the +// earlier compute environment from your job queue. // -// * Delete the earlier compute environment. +// * Delete the earlier compute +// environment. // -// In -// April 2022, Batch added enhanced support for updating compute environments. For -// more information, see Updating compute environments +// In April 2022, Batch added enhanced support for updating compute +// environments. For more information, see Updating compute environments // (https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html). // To use the enhanced updating of compute environments to update AMIs, follow // these rules: diff --git a/service/batch/types/types.go b/service/batch/types/types.go index ad12fd2f615..4585257c11f 100644 --- a/service/batch/types/types.go +++ b/service/batch/types/types.go @@ -470,7 +470,9 @@ type ComputeResourceUpdate struct { // The desired number of Amazon EC2 vCPUS in the compute environment. Batch // modifies this value between the minimum and maximum values based on job queue // demand. This parameter isn't applicable to jobs that are running on Fargate - // resources. Don't specify it. + // resources. Don't specify it. Batch doesn't support changing the desired number + // of vCPUs of an existing compute environment. Don't specify this parameter for + // compute environments using Amazon EKS clusters. DesiredvCpus *int32 // Provides information used to select Amazon Machine Images (AMIs) for EC2 @@ -1698,7 +1700,7 @@ type EksPodProperties struct { // node. For more information, see Pod's DNS policy // (https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy) // in the Kubernetes documentation. Valid values: Default | ClusterFirst | - // ClusterFirstWithHostNet | None + // ClusterFirstWithHostNet DnsPolicy *string // Indicates if the pod uses the hosts' network IP address. The default value is @@ -1737,10 +1739,19 @@ type EksPodPropertiesDetail struct { // hostNetwork parameter is not specified, the default is ClusterFirstWithHostNet. // ClusterFirst indicates that any DNS query that does not match the configured // cluster domain suffix is forwarded to the upstream nameserver inherited from the - // node. For more information, see Pod's DNS policy + // node. If no value was specified for dnsPolicy in the RegisterJobDefinition + // (https://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html) + // API operation, then no value will be returned for dnsPolicy by either of + // DescribeJobDefinitions + // (https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeJobDefinitions.html) + // or DescribeJobs + // (https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeJobs.html) + // API operations. The pod spec setting will contain either ClusterFirst or + // ClusterFirstWithHostNet, depending on the value of the hostNetwork parameter. + // For more information, see Pod's DNS policy // (https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy) // in the Kubernetes documentation. Valid values: Default | ClusterFirst | - // ClusterFirstWithHostNet | None + // ClusterFirstWithHostNet DnsPolicy *string // Indicates if the pod uses the hosts' network IP address. The default value is @@ -2736,10 +2747,13 @@ type ResourceRequirement struct { // VCPU values must be one of the values supported for that memory value. value = // 512 VCPU = 0.25 value = 1024 VCPU = 0.25 or 0.5 value = 2048 VCPU = 0.25, 0.5, // or 1 value = 3072 VCPU = 0.5, or 1 value = 4096 VCPU = 0.5, 1, or 2 value = - // 5120, 6144, or 7168 VCPU = 1 or 2 value = 8192 VCPU = 1, 2, or 4 value = 9216, - // 10240, 11264, 12288, 13312, 14336, 15360, or 16384 VCPU = 2 or 4 value = 17408, - // 18432, 19456, 20480, 21504, 22528, 23552, 24576, 25600, 26624, 27648, 28672, - // 29696, or 30720 VCPU = 4 type="VCPU" The number of vCPUs reserved for the + // 5120, 6144, or 7168 VCPU = 1 or 2 value = 8192 VCPU = 1, 2, 4, or 8 value = + // 9216, 10240, 11264, 12288, 13312, 14336, or 15360 VCPU = 2 or 4 value = 16384 + // VCPU = 2, 4, or 8 value = 17408, 18432, 19456, 21504, 22528, 23552, 25600, + // 26624, 27648, 29696, or 30720 VCPU = 4 value = 20480, 24576, or 28672 VCPU = 4 + // or 8 value = 36864, 45056, 53248, or 61440 VCPU = 8 value = 32768, 40960, 49152, + // or 57344 VCPU = 8 or 16 value = 65536, 73728, 81920, 90112, 98304, 106496, + // 114688, or 122880 VCPU = 16 type="VCPU" The number of vCPUs reserved for the // container. This parameter maps to CpuShares in the Create a container // (https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the // Docker Remote API (https://docs.docker.com/engine/api/v1.23/) and the @@ -2747,15 +2761,21 @@ type ResourceRequirement struct { // (https://docs.docker.com/engine/reference/run/). Each vCPU is equivalent to // 1,024 CPU shares. For EC2 resources, you must specify at least one vCPU. This is // required but can be specified in several places; it must be specified for each - // node at least once. For jobs that are running on Fargate resources, then value - // must match one of the supported values and the MEMORY values must be one of the - // values supported for that VCPU value. The supported values are 0.25, 0.5, 1, 2, - // and 4 value = 0.25 MEMORY = 512, 1024, or 2048 value = 0.5 MEMORY = 1024, 2048, - // 3072, or 4096 value = 1 MEMORY = 2048, 3072, 4096, 5120, 6144, 7168, or 8192 - // value = 2 MEMORY = 4096, 5120, 6144, 7168, 8192, 9216, 10240, 11264, 12288, - // 13312, 14336, 15360, or 16384 value = 4 MEMORY = 8192, 9216, 10240, 11264, - // 12288, 13312, 14336, 15360, 16384, 17408, 18432, 19456, 20480, 21504, 22528, - // 23552, 24576, 25600, 26624, 27648, 28672, 29696, or 30720 + // node at least once. The default for the Fargate On-Demand vCPU resource count + // quota is 6 vCPUs. For more information about Fargate quotas, see Fargate quotas + // (https://docs.aws.amazon.com/general/latest/gr/ecs-service.html#service-quotas-fargate) + // in the Amazon Web Services General Reference. For jobs that are running on + // Fargate resources, then value must match one of the supported values and the + // MEMORY values must be one of the values supported for that VCPU value. The + // supported values are 0.25, 0.5, 1, 2, 4, 8, and 16 value = 0.25 MEMORY = 512, + // 1024, or 2048 value = 0.5 MEMORY = 1024, 2048, 3072, or 4096 value = 1 MEMORY = + // 2048, 3072, 4096, 5120, 6144, 7168, or 8192 value = 2 MEMORY = 4096, 5120, 6144, + // 7168, 8192, 9216, 10240, 11264, 12288, 13312, 14336, 15360, or 16384 value = 4 + // MEMORY = 8192, 9216, 10240, 11264, 12288, 13312, 14336, 15360, 16384, 17408, + // 18432, 19456, 20480, 21504, 22528, 23552, 24576, 25600, 26624, 27648, 28672, + // 29696, or 30720 value = 8 MEMORY = 16384, 20480, 24576, 28672, 32768, 36864, + // 40960, 45056, 49152, 53248, 57344, or 61440 value = 16 MEMORY = 32768, 40960, + // 49152, 57344, 65536, 73728, 81920, 90112, 98304, 106496, 114688, or 122880 // // This member is required. Value *string @@ -2932,8 +2952,8 @@ type Ulimit struct { } // Specifies the infrastructure update policy for the compute environment. For more -// information about infrastructure updates, see Infrastructure updates -// (https://docs.aws.amazon.com/batch/latest/userguide/infrastructure-updates.html) +// information about infrastructure updates, see Updating compute environments +// (https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) // in the Batch User Guide. type UpdatePolicy struct { diff --git a/service/billingconductor/api_op_CreatePricingRule.go b/service/billingconductor/api_op_CreatePricingRule.go index 96e15d4d4e8..e574e943abd 100644 --- a/service/billingconductor/api_op_CreatePricingRule.go +++ b/service/billingconductor/api_op_CreatePricingRule.go @@ -52,6 +52,10 @@ type CreatePricingRuleInput struct { // This member is required. Type types.PricingRuleType + // The seller of services provided by Amazon Web Services, their affiliates, or + // third-party providers selling services via Amazon Web Services Marketplace. + BillingEntity *string + // The token that's needed to support idempotency. Idempotency isn't currently // supported, but will be implemented in a future update. ClientToken *string diff --git a/service/billingconductor/api_op_UpdatePricingRule.go b/service/billingconductor/api_op_UpdatePricingRule.go index c2389c34654..416bf0c3ce9 100644 --- a/service/billingconductor/api_op_UpdatePricingRule.go +++ b/service/billingconductor/api_op_UpdatePricingRule.go @@ -57,6 +57,10 @@ type UpdatePricingRuleOutput struct { // The pricing plans count that this pricing rule is associated with. AssociatedPricingPlanCount int64 + // The seller of services provided by Amazon Web Services, their affiliates, or + // third-party providers selling services via Amazon Web Services Marketplace. + BillingEntity *string + // The new description for the pricing rule. Description *string diff --git a/service/billingconductor/deserializers.go b/service/billingconductor/deserializers.go index 03bd615901d..f56232608bc 100644 --- a/service/billingconductor/deserializers.go +++ b/service/billingconductor/deserializers.go @@ -5273,6 +5273,15 @@ func awsRestjson1_deserializeOpDocumentUpdatePricingRuleOutput(v **UpdatePricing sv.AssociatedPricingPlanCount = i64 } + case "BillingEntity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BillingEntity to be of type string, got %T instead", value) + } + sv.BillingEntity = ptr.String(jtv) + } + case "Description": if value != nil { jtv, ok := value.(string) @@ -7344,6 +7353,15 @@ func awsRestjson1_deserializeDocumentPricingRuleListElement(v **types.PricingRul sv.AssociatedPricingPlanCount = i64 } + case "BillingEntity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BillingEntity to be of type string, got %T instead", value) + } + sv.BillingEntity = ptr.String(jtv) + } + case "CreationTime": if value != nil { jtv, ok := value.(json.Number) diff --git a/service/billingconductor/serializers.go b/service/billingconductor/serializers.go index 302f8b66994..3c14bf5541e 100644 --- a/service/billingconductor/serializers.go +++ b/service/billingconductor/serializers.go @@ -710,6 +710,11 @@ func awsRestjson1_serializeOpDocumentCreatePricingRuleInput(v *CreatePricingRule object := value.Object() defer object.Close() + if v.BillingEntity != nil { + ok := object.Key("BillingEntity") + ok.String(*v.BillingEntity) + } + if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) diff --git a/service/billingconductor/types/enums.go b/service/billingconductor/types/enums.go index f6a92630429..3d6e6399152 100644 --- a/service/billingconductor/types/enums.go +++ b/service/billingconductor/types/enums.go @@ -126,8 +126,9 @@ type PricingRuleScope string // Enum values for PricingRuleScope const ( - PricingRuleScopeGlobal PricingRuleScope = "GLOBAL" - PricingRuleScopeService PricingRuleScope = "SERVICE" + PricingRuleScopeGlobal PricingRuleScope = "GLOBAL" + PricingRuleScopeService PricingRuleScope = "SERVICE" + PricingRuleScopeBillingEntity PricingRuleScope = "BILLING_ENTITY" ) // Values returns all known values for PricingRuleScope. Note that this can be @@ -137,6 +138,7 @@ func (PricingRuleScope) Values() []PricingRuleScope { return []PricingRuleScope{ "GLOBAL", "SERVICE", + "BILLING_ENTITY", } } @@ -208,8 +210,10 @@ const ( ValidationExceptionReasonMultiplePricingPlanArn ValidationExceptionReason = "MULTIPLE_PRICING_PLAN_ARN" ValidationExceptionReasonIllegalChildAssociateResource ValidationExceptionReason = "ILLEGAL_CHILD_ASSOCIATE_RESOURCE" ValidationExceptionReasonCustomLineItemAssociationExists ValidationExceptionReason = "CUSTOM_LINE_ITEM_ASSOCIATION_EXISTS" - ValidationExceptionReasonInvalidBillingPeriodForOperation ValidationExceptionReason = "INVALID_BILLING_PERIOD_FOR_OPERATION" ValidationExceptionReasonInvalidBillingGroup ValidationExceptionReason = "INVALID_BILLING_GROUP" + ValidationExceptionReasonInvalidBillingPeriodForOperation ValidationExceptionReason = "INVALID_BILLING_PERIOD_FOR_OPERATION" + ValidationExceptionReasonIllegalBillingEntity ValidationExceptionReason = "ILLEGAL_BILLING_ENTITY" + ValidationExceptionReasonIllegalModifierPercentage ValidationExceptionReason = "ILLEGAL_MODIFIER_PERCENTAGE" ) // Values returns all known values for ValidationExceptionReason. Note that this @@ -263,7 +267,9 @@ func (ValidationExceptionReason) Values() []ValidationExceptionReason { "MULTIPLE_PRICING_PLAN_ARN", "ILLEGAL_CHILD_ASSOCIATE_RESOURCE", "CUSTOM_LINE_ITEM_ASSOCIATION_EXISTS", - "INVALID_BILLING_PERIOD_FOR_OPERATION", "INVALID_BILLING_GROUP", + "INVALID_BILLING_PERIOD_FOR_OPERATION", + "ILLEGAL_BILLING_ENTITY", + "ILLEGAL_MODIFIER_PERCENTAGE", } } diff --git a/service/billingconductor/types/types.go b/service/billingconductor/types/types.go index 2d5b54374d8..734783474c4 100644 --- a/service/billingconductor/types/types.go +++ b/service/billingconductor/types/types.go @@ -504,6 +504,10 @@ type PricingRuleListElement struct { // The pricing plans count that this pricing rule is associated with. AssociatedPricingPlanCount int64 + // The seller of services provided by Amazon Web Services, their affiliates, or + // third-party providers selling services via Amazon Web Services Marketplace. + BillingEntity *string + // The time when the pricing rule was created. CreationTime int64 diff --git a/service/cloudcontrol/internal/endpoints/endpoints.go b/service/cloudcontrol/internal/endpoints/endpoints.go index 115ceeeae2a..2532ecf5fff 100644 --- a/service/cloudcontrol/internal/endpoints/endpoints.go +++ b/service/cloudcontrol/internal/endpoints/endpoints.go @@ -183,6 +183,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/cloudformation/internal/endpoints/endpoints.go b/service/cloudformation/internal/endpoints/endpoints.go index bddbaad1a0c..b3ae816d19b 100644 --- a/service/cloudformation/internal/endpoints/endpoints.go +++ b/service/cloudformation/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/cloudformation/types/enums.go b/service/cloudformation/types/enums.go index 2e0576434eb..ad8c39b363d 100644 --- a/service/cloudformation/types/enums.go +++ b/service/cloudformation/types/enums.go @@ -342,6 +342,7 @@ const ( HandlerErrorCodeHandlerInternalFailure HandlerErrorCode = "HandlerInternalFailure" HandlerErrorCodeNonCompliant HandlerErrorCode = "NonCompliant" HandlerErrorCodeUnknown HandlerErrorCode = "Unknown" + HandlerErrorCodeUnsupportedTarget HandlerErrorCode = "UnsupportedTarget" ) // Values returns all known values for HandlerErrorCode. Note that this can be @@ -367,6 +368,7 @@ func (HandlerErrorCode) Values() []HandlerErrorCode { "HandlerInternalFailure", "NonCompliant", "Unknown", + "UnsupportedTarget", } } diff --git a/service/cloudtrail/internal/endpoints/endpoints.go b/service/cloudtrail/internal/endpoints/endpoints.go index 21ac14abb44..f5db5737ba2 100644 --- a/service/cloudtrail/internal/endpoints/endpoints.go +++ b/service/cloudtrail/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/cloudwatch/internal/endpoints/endpoints.go b/service/cloudwatch/internal/endpoints/endpoints.go index 185f46b857d..a0116ed8553 100644 --- a/service/cloudwatch/internal/endpoints/endpoints.go +++ b/service/cloudwatch/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/cloudwatchevents/internal/endpoints/endpoints.go b/service/cloudwatchevents/internal/endpoints/endpoints.go index f1160bd2a88..0b6ca3bd0d5 100644 --- a/service/cloudwatchevents/internal/endpoints/endpoints.go +++ b/service/cloudwatchevents/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/cloudwatchlogs/internal/endpoints/endpoints.go b/service/cloudwatchlogs/internal/endpoints/endpoints.go index 85cad547f92..3e6775bfad5 100644 --- a/service/cloudwatchlogs/internal/endpoints/endpoints.go +++ b/service/cloudwatchlogs/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/codedeploy/internal/endpoints/endpoints.go b/service/codedeploy/internal/endpoints/endpoints.go index 6e6052d121f..966839aa070 100644 --- a/service/codedeploy/internal/endpoints/endpoints.go +++ b/service/codedeploy/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/comprehendmedical/types/enums.go b/service/comprehendmedical/types/enums.go index 1aa773949bb..615f200de0c 100644 --- a/service/comprehendmedical/types/enums.go +++ b/service/comprehendmedical/types/enums.go @@ -6,10 +6,15 @@ type AttributeName string // Enum values for AttributeName const ( - AttributeNameSign AttributeName = "SIGN" - AttributeNameSymptom AttributeName = "SYMPTOM" - AttributeNameDiagnosis AttributeName = "DIAGNOSIS" - AttributeNameNegation AttributeName = "NEGATION" + AttributeNameSign AttributeName = "SIGN" + AttributeNameSymptom AttributeName = "SYMPTOM" + AttributeNameDiagnosis AttributeName = "DIAGNOSIS" + AttributeNameNegation AttributeName = "NEGATION" + AttributeNamePertainsToFamily AttributeName = "PERTAINS_TO_FAMILY" + AttributeNameHypothetical AttributeName = "HYPOTHETICAL" + AttributeNameLowConfidence AttributeName = "LOW_CONFIDENCE" + AttributeNamePastHistory AttributeName = "PAST_HISTORY" + AttributeNameFuture AttributeName = "FUTURE" ) // Values returns all known values for AttributeName. Note that this can be @@ -21,6 +26,11 @@ func (AttributeName) Values() []AttributeName { "SYMPTOM", "DIAGNOSIS", "NEGATION", + "PERTAINS_TO_FAMILY", + "HYPOTHETICAL", + "LOW_CONFIDENCE", + "PAST_HISTORY", + "FUTURE", } } @@ -66,6 +76,13 @@ const ( EntitySubTypeTimeToTestName EntitySubType = "TIME_TO_TEST_NAME" EntitySubTypeTimeToProcedureName EntitySubType = "TIME_TO_PROCEDURE_NAME" EntitySubTypeTimeToTreatmentName EntitySubType = "TIME_TO_TREATMENT_NAME" + EntitySubTypeAmount EntitySubType = "AMOUNT" + EntitySubTypeGender EntitySubType = "GENDER" + EntitySubTypeRaceEthnicity EntitySubType = "RACE_ETHNICITY" + EntitySubTypeAllergies EntitySubType = "ALLERGIES" + EntitySubTypeTobaccoUse EntitySubType = "TOBACCO_USE" + EntitySubTypeAlcoholConsumption EntitySubType = "ALCOHOL_CONSUMPTION" + EntitySubTypeRecDrugUse EntitySubType = "REC_DRUG_USE" ) // Values returns all known values for EntitySubType. Note that this can be @@ -111,6 +128,13 @@ func (EntitySubType) Values() []EntitySubType { "TIME_TO_TEST_NAME", "TIME_TO_PROCEDURE_NAME", "TIME_TO_TREATMENT_NAME", + "AMOUNT", + "GENDER", + "RACE_ETHNICITY", + "ALLERGIES", + "TOBACCO_USE", + "ALCOHOL_CONSUMPTION", + "REC_DRUG_USE", } } @@ -118,12 +142,13 @@ type EntityType string // Enum values for EntityType const ( - EntityTypeMedication EntityType = "MEDICATION" - EntityTypeMedicalCondition EntityType = "MEDICAL_CONDITION" - EntityTypeProtectedHealthInformation EntityType = "PROTECTED_HEALTH_INFORMATION" - EntityTypeTestTreatmentProcedure EntityType = "TEST_TREATMENT_PROCEDURE" - EntityTypeAnatomy EntityType = "ANATOMY" - EntityTypeTimeExpression EntityType = "TIME_EXPRESSION" + EntityTypeMedication EntityType = "MEDICATION" + EntityTypeMedicalCondition EntityType = "MEDICAL_CONDITION" + EntityTypeProtectedHealthInformation EntityType = "PROTECTED_HEALTH_INFORMATION" + EntityTypeTestTreatmentProcedure EntityType = "TEST_TREATMENT_PROCEDURE" + EntityTypeAnatomy EntityType = "ANATOMY" + EntityTypeTimeExpression EntityType = "TIME_EXPRESSION" + EntityTypeBehavioralEnvironmentalSocial EntityType = "BEHAVIORAL_ENVIRONMENTAL_SOCIAL" ) // Values returns all known values for EntityType. Note that this can be expanded @@ -137,6 +162,7 @@ func (EntityType) Values() []EntityType { "TEST_TREATMENT_PROCEDURE", "ANATOMY", "TIME_EXPRESSION", + "BEHAVIORAL_ENVIRONMENTAL_SOCIAL", } } @@ -224,10 +250,13 @@ type ICD10CMTraitName string // Enum values for ICD10CMTraitName const ( - ICD10CMTraitNameNegation ICD10CMTraitName = "NEGATION" - ICD10CMTraitNameDiagnosis ICD10CMTraitName = "DIAGNOSIS" - ICD10CMTraitNameSign ICD10CMTraitName = "SIGN" - ICD10CMTraitNameSymptom ICD10CMTraitName = "SYMPTOM" + ICD10CMTraitNameNegation ICD10CMTraitName = "NEGATION" + ICD10CMTraitNameDiagnosis ICD10CMTraitName = "DIAGNOSIS" + ICD10CMTraitNameSign ICD10CMTraitName = "SIGN" + ICD10CMTraitNameSymptom ICD10CMTraitName = "SYMPTOM" + ICD10CMTraitNamePertainsToFamily ICD10CMTraitName = "PERTAINS_TO_FAMILY" + ICD10CMTraitNameHypothetical ICD10CMTraitName = "HYPOTHETICAL" + ICD10CMTraitNameLowConfidence ICD10CMTraitName = "LOW_CONFIDENCE" ) // Values returns all known values for ICD10CMTraitName. Note that this can be @@ -239,6 +268,9 @@ func (ICD10CMTraitName) Values() []ICD10CMTraitName { "DIAGNOSIS", "SIGN", "SYMPTOM", + "PERTAINS_TO_FAMILY", + "HYPOTHETICAL", + "LOW_CONFIDENCE", } } @@ -309,6 +341,7 @@ const ( RelationshipTypeTestUnit RelationshipType = "TEST_UNIT" RelationshipTypeDirection RelationshipType = "DIRECTION" RelationshipTypeSystemOrganSite RelationshipType = "SYSTEM_ORGAN_SITE" + RelationshipTypeAmount RelationshipType = "AMOUNT" ) // Values returns all known values for RelationshipType. Note that this can be @@ -335,6 +368,7 @@ func (RelationshipType) Values() []RelationshipType { "TEST_UNIT", "DIRECTION", "SYSTEM_ORGAN_SITE", + "AMOUNT", } } @@ -514,10 +548,15 @@ type SNOMEDCTTraitName string // Enum values for SNOMEDCTTraitName const ( - SNOMEDCTTraitNameNegation SNOMEDCTTraitName = "NEGATION" - SNOMEDCTTraitNameDiagnosis SNOMEDCTTraitName = "DIAGNOSIS" - SNOMEDCTTraitNameSign SNOMEDCTTraitName = "SIGN" - SNOMEDCTTraitNameSymptom SNOMEDCTTraitName = "SYMPTOM" + SNOMEDCTTraitNameNegation SNOMEDCTTraitName = "NEGATION" + SNOMEDCTTraitNameDiagnosis SNOMEDCTTraitName = "DIAGNOSIS" + SNOMEDCTTraitNameSign SNOMEDCTTraitName = "SIGN" + SNOMEDCTTraitNameSymptom SNOMEDCTTraitName = "SYMPTOM" + SNOMEDCTTraitNamePertainsToFamily SNOMEDCTTraitName = "PERTAINS_TO_FAMILY" + SNOMEDCTTraitNameHypothetical SNOMEDCTTraitName = "HYPOTHETICAL" + SNOMEDCTTraitNameLowConfidence SNOMEDCTTraitName = "LOW_CONFIDENCE" + SNOMEDCTTraitNamePastHistory SNOMEDCTTraitName = "PAST_HISTORY" + SNOMEDCTTraitNameFuture SNOMEDCTTraitName = "FUTURE" ) // Values returns all known values for SNOMEDCTTraitName. Note that this can be @@ -529,5 +568,10 @@ func (SNOMEDCTTraitName) Values() []SNOMEDCTTraitName { "DIAGNOSIS", "SIGN", "SYMPTOM", + "PERTAINS_TO_FAMILY", + "HYPOTHETICAL", + "LOW_CONFIDENCE", + "PAST_HISTORY", + "FUTURE", } } diff --git a/service/configservice/internal/endpoints/endpoints.go b/service/configservice/internal/endpoints/endpoints.go index 37db3c96eb4..0f84cb51663 100644 --- a/service/configservice/internal/endpoints/endpoints.go +++ b/service/configservice/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/connect/api_op_GetCurrentMetricData.go b/service/connect/api_op_GetCurrentMetricData.go index f06358ffec9..10ce97470a2 100644 --- a/service/connect/api_op_GetCurrentMetricData.go +++ b/service/connect/api_op_GetCurrentMetricData.go @@ -91,9 +91,16 @@ type GetCurrentMetricDataInput struct { // The grouping applied to the metrics returned. For example, when grouped by // QUEUE, the metrics returned apply to each queue rather than aggregated for all - // queues. If you group by CHANNEL, you should include a Channels filter. VOICE, - // CHAT, and TASK channels are supported. If no Grouping is included in the - // request, a summary of metrics is returned. + // queues. + // + // * If you group by CHANNEL, you should include a Channels filter. VOICE, + // CHAT, and TASK channels are supported. + // + // * If you group by ROUTING_PROFILE, you + // must include either a queue or routing profile filter. + // + // * If no Grouping is + // included in the request, a summary of metrics is returned. Groupings []types.Grouping // The maximum number of results to return per page. diff --git a/service/connect/api_op_MonitorContact.go b/service/connect/api_op_MonitorContact.go new file mode 100644 index 00000000000..ece0bda3ca4 --- /dev/null +++ b/service/connect/api_op_MonitorContact.go @@ -0,0 +1,184 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Initiates silent monitoring of a contact. The Contact Control Panel (CCP) of the +// user specified by userId will be set to silent monitoring mode on the contact. +func (c *Client) MonitorContact(ctx context.Context, params *MonitorContactInput, optFns ...func(*Options)) (*MonitorContactOutput, error) { + if params == nil { + params = &MonitorContactInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MonitorContact", params, optFns, c.addOperationMonitorContactMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MonitorContactOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MonitorContactInput struct { + + // The identifier of the contact. + // + // This member is required. + ContactId *string + + // The identifier of the Amazon Connect instance. You can find the instanceId in + // the ARN of the instance. + // + // This member is required. + InstanceId *string + + // The identifier of the user account. + // + // This member is required. + UserId *string + + // Specify which monitoring actions the user is allowed to take. For example, + // whether the user is allowed to escalate from silent monitoring to barge. + AllowedMonitorCapabilities []types.MonitorCapability + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. If not provided, the Amazon Web Services SDK populates this + // field. For more information about idempotency, see Making retries safe with + // idempotent APIs + // (https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/). + ClientToken *string + + noSmithyDocumentSerde +} + +type MonitorContactOutput struct { + + // The ARN of the contact. + ContactArn *string + + // The identifier of the contact. + ContactId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMonitorContactMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMonitorContact{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMonitorContact{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opMonitorContactMiddleware(stack, options); err != nil { + return err + } + if err = addOpMonitorContactValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMonitorContact(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpMonitorContact struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpMonitorContact) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpMonitorContact) 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.(*MonitorContactInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *MonitorContactInput ") + } + + 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_opMonitorContactMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpMonitorContact{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opMonitorContact(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "MonitorContact", + } +} diff --git a/service/connect/api_op_SearchQueues.go b/service/connect/api_op_SearchQueues.go index 6fc6ec5cfbb..a6ae955ff9e 100644 --- a/service/connect/api_op_SearchQueues.go +++ b/service/connect/api_op_SearchQueues.go @@ -44,7 +44,10 @@ type SearchQueuesInput struct { // response in the next request to retrieve the next set of results. NextToken *string - // The search criteria to be used to return queues. + // The search criteria to be used to return queues. The name and description fields + // support "contains" queries with a minimum of 2 characters and a maximum of 25 + // characters. Any queries with character lengths outside of this range will throw + // invalid results. SearchCriteria *types.QueueSearchCriteria // Filters to be applied to search results. diff --git a/service/connect/api_op_SearchRoutingProfiles.go b/service/connect/api_op_SearchRoutingProfiles.go index 1c67930394d..9e6ed177864 100644 --- a/service/connect/api_op_SearchRoutingProfiles.go +++ b/service/connect/api_op_SearchRoutingProfiles.go @@ -45,7 +45,10 @@ type SearchRoutingProfilesInput struct { // response in the next request to retrieve the next set of results. NextToken *string - // The search criteria to be used to return routing profiles. + // The search criteria to be used to return routing profiles. The name and + // description fields support "contains" queries with a minimum of 2 characters and + // a maximum of 25 characters. Any queries with character lengths outside of this + // range will throw invalid results. SearchCriteria *types.RoutingProfileSearchCriteria // Filters to be applied to search results. diff --git a/service/connect/api_op_SearchSecurityProfiles.go b/service/connect/api_op_SearchSecurityProfiles.go index 0d35b70bc2d..ba1b1870972 100644 --- a/service/connect/api_op_SearchSecurityProfiles.go +++ b/service/connect/api_op_SearchSecurityProfiles.go @@ -45,8 +45,10 @@ type SearchSecurityProfilesInput struct { // response in the next request to retrieve the next set of results. NextToken *string - // The search criteria to be used to return security profiles. The currently - // supported value for FieldName: name + // The search criteria to be used to return security profiles. The name field + // support "contains" queries with a minimum of 2 characters and maximum of 25 + // characters. Any queries with character lengths outside of this range will throw + // invalid results. The currently supported value for FieldName: name SearchCriteria *types.SecurityProfileSearchCriteria // Filters to be applied to search results. diff --git a/service/connect/api_op_SearchUsers.go b/service/connect/api_op_SearchUsers.go index ba8b662d9b3..1b82b72f9c6 100644 --- a/service/connect/api_op_SearchUsers.go +++ b/service/connect/api_op_SearchUsers.go @@ -42,10 +42,10 @@ type SearchUsersInput struct { // response in the next request to retrieve the next set of results. NextToken *string - // The search criteria to be used to return users. The Username, Firstname, and - // Lastname fields support "contains" queries with a minimum of 2 characters and a - // maximum of 25 characters. Any queries with character lengths outside of this - // range result in empty results. + // The search criteria to be used to return users. The name and description fields + // support "contains" queries with a minimum of 2 characters and a maximum of 25 + // characters. Any queries with character lengths outside of this range will throw + // invalid results. SearchCriteria *types.UserSearchCriteria // Filters to be applied to search results. diff --git a/service/connect/deserializers.go b/service/connect/deserializers.go index aa1bb31d1a6..2cf1ee11c89 100644 --- a/service/connect/deserializers.go +++ b/service/connect/deserializers.go @@ -15944,6 +15944,184 @@ func awsRestjson1_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, valu return nil } +type awsRestjson1_deserializeOpMonitorContact struct { +} + +func (*awsRestjson1_deserializeOpMonitorContact) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMonitorContact) 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_deserializeOpErrorMonitorContact(response, &metadata) + } + output := &MonitorContactOutput{} + 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_deserializeOpDocumentMonitorContactOutput(&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_deserializeOpErrorMonitorContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("IdempotencyException", errorCode): + return awsRestjson1_deserializeErrorIdempotencyException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentMonitorContactOutput(v **MonitorContactOutput, 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 *MonitorContactOutput + if *v == nil { + sv = &MonitorContactOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } + + case "ContactId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + } + sv.ContactId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpPutUserStatus struct { } diff --git a/service/connect/generated.json b/service/connect/generated.json index 68d3f747acb..bf77a97dc7f 100644 --- a/service/connect/generated.json +++ b/service/connect/generated.json @@ -114,6 +114,7 @@ "api_op_ListUseCases.go", "api_op_ListUserHierarchyGroups.go", "api_op_ListUsers.go", + "api_op_MonitorContact.go", "api_op_PutUserStatus.go", "api_op_ReleasePhoneNumber.go", "api_op_ReplicateInstance.go", diff --git a/service/connect/serializers.go b/service/connect/serializers.go index b4dee614973..1c828dd567c 100644 --- a/service/connect/serializers.go +++ b/service/connect/serializers.go @@ -8196,6 +8196,96 @@ func awsRestjson1_serializeOpHttpBindingsListUsersInput(v *ListUsersInput, encod return nil } +type awsRestjson1_serializeOpMonitorContact struct { +} + +func (*awsRestjson1_serializeOpMonitorContact) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMonitorContact) 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.(*MonitorContactInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact/monitor") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMonitorContactInput(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_serializeOpHttpBindingsMonitorContactInput(v *MonitorContactInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMonitorContactInput(v *MonitorContactInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AllowedMonitorCapabilities != nil { + ok := object.Key("AllowedMonitorCapabilities") + if err := awsRestjson1_serializeDocumentAllowedMonitorCapabilities(v.AllowedMonitorCapabilities, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.ContactId != nil { + ok := object.Key("ContactId") + ok.String(*v.ContactId) + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.UserId != nil { + ok := object.Key("UserId") + ok.String(*v.UserId) + } + + return nil +} + type awsRestjson1_serializeOpPutUserStatus struct { } @@ -13318,6 +13408,17 @@ func awsRestjson1_serializeOpDocumentUpdateUserSecurityProfilesInput(v *UpdateUs return nil } +func awsRestjson1_serializeDocumentAllowedMonitorCapabilities(v []types.MonitorCapability, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsRestjson1_serializeDocumentAnswerMachineDetectionConfig(v *types.AnswerMachineDetectionConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/connect/types/enums.go b/service/connect/types/enums.go index d8770805750..9e8e2fe0255 100644 --- a/service/connect/types/enums.go +++ b/service/connect/types/enums.go @@ -550,6 +550,24 @@ func (LexVersion) Values() []LexVersion { } } +type MonitorCapability string + +// Enum values for MonitorCapability +const ( + MonitorCapabilitySilentMonitor MonitorCapability = "SILENT_MONITOR" + MonitorCapabilityBarge MonitorCapability = "BARGE" +) + +// Values returns all known values for MonitorCapability. 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 (MonitorCapability) Values() []MonitorCapability { + return []MonitorCapability{ + "SILENT_MONITOR", + "BARGE", + } +} + type PhoneNumberCountryCode string // Enum values for PhoneNumberCountryCode diff --git a/service/connect/types/errors.go b/service/connect/types/errors.go index 6186225c9e8..e90b835d860 100644 --- a/service/connect/types/errors.go +++ b/service/connect/types/errors.go @@ -47,7 +47,8 @@ func (e *ContactFlowNotPublishedException) ErrorCode() string { } func (e *ContactFlowNotPublishedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The contact with the specified ID is not active or does not exist. +// The contact with the specified ID is not active or does not exist. Applies to +// Voice calls only, not to Chat, Task, or Voice Callback. type ContactNotFoundException struct { Message *string diff --git a/service/connect/types/types.go b/service/connect/types/types.go index cd998d848c9..af77b4616c7 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -1428,7 +1428,10 @@ type QueueReference struct { noSmithyDocumentSerde } -// The search criteria to be used to return queues. +// The search criteria to be used to return queues. The name and description fields +// support "contains" queries with a minimum of 2 characters and a maximum of 25 +// characters. Any queries with character lengths outside of this range will throw +// invalid results. type QueueSearchCriteria struct { // A list of conditions which would be applied together with an AND condition. @@ -1792,7 +1795,10 @@ type RoutingProfileReference struct { noSmithyDocumentSerde } -// The search criteria to be used to return routing profiles. +// The search criteria to be used to return routing profiles. The name and +// description fields support "contains" queries with a minimum of 2 characters and +// a maximum of 25 characters. Any queries with character lengths outside of this +// range will throw invalid results. type RoutingProfileSearchCriteria struct { // A list of conditions which would be applied together with an AND condition. @@ -1899,7 +1905,10 @@ type SecurityProfile struct { noSmithyDocumentSerde } -// The search criteria to be used to return security profiles. +// The search criteria to be used to return security profiles. The name field +// support "contains" queries with a minimum of 2 characters and maximum of 25 +// characters. Any queries with character lengths outside of this range will throw +// invalid results. type SecurityProfileSearchCriteria struct { // A list of conditions which would be applied together with an AND condition. @@ -2446,10 +2455,10 @@ type UserReference struct { noSmithyDocumentSerde } -// The search criteria to be used to return users. The Username, Firstname, and -// Lastname fields support "contains" queries with a minimum of 2 characters and a -// maximum of 25 characters. Any queries with character lengths outside of this -// range result in empty results. +// The search criteria to be used to return users. The name and description fields +// support "contains" queries with a minimum of 2 characters and a maximum of 25 +// characters. Any queries with character lengths outside of this range will throw +// invalid results. type UserSearchCriteria struct { // A list of conditions which would be applied together with an AND condition. diff --git a/service/connect/validators.go b/service/connect/validators.go index f5cf3f72e21..16b6956a343 100644 --- a/service/connect/validators.go +++ b/service/connect/validators.go @@ -2070,6 +2070,26 @@ func (m *validateOpListUsers) HandleInitialize(ctx context.Context, in middlewar return next.HandleInitialize(ctx, in) } +type validateOpMonitorContact struct { +} + +func (*validateOpMonitorContact) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMonitorContact) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MonitorContactInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMonitorContactInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpPutUserStatus struct { } @@ -3582,6 +3602,10 @@ func addOpListUsersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListUsers{}, middleware.After) } +func addOpMonitorContactValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMonitorContact{}, middleware.After) +} + func addOpPutUserStatusValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutUserStatus{}, middleware.After) } @@ -6324,6 +6348,27 @@ func validateOpListUsersInput(v *ListUsersInput) error { } } +func validateOpMonitorContactInput(v *MonitorContactInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MonitorContactInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.ContactId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactId")) + } + if v.UserId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpPutUserStatusInput(v *PutUserStatusInput) error { if v == nil { return nil diff --git a/service/databasemigrationservice/internal/endpoints/endpoints.go b/service/databasemigrationservice/internal/endpoints/endpoints.go index ec1436863b0..12074b5381e 100644 --- a/service/databasemigrationservice/internal/endpoints/endpoints.go +++ b/service/databasemigrationservice/internal/endpoints/endpoints.go @@ -204,6 +204,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/datasync/internal/endpoints/endpoints.go b/service/datasync/internal/endpoints/endpoints.go index fb3ec32935e..e7bcab2cf3f 100644 --- a/service/datasync/internal/endpoints/endpoints.go +++ b/service/datasync/internal/endpoints/endpoints.go @@ -234,6 +234,9 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/service/directconnect/internal/endpoints/endpoints.go b/service/directconnect/internal/endpoints/endpoints.go index 992507ae0d2..be6e26e5b3c 100644 --- a/service/directconnect/internal/endpoints/endpoints.go +++ b/service/directconnect/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/docdb/internal/endpoints/endpoints.go b/service/docdb/internal/endpoints/endpoints.go index 7226750fe37..0168a7725d3 100644 --- a/service/docdb/internal/endpoints/endpoints.go +++ b/service/docdb/internal/endpoints/endpoints.go @@ -192,6 +192,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/dynamodb/internal/endpoints/endpoints.go b/service/dynamodb/internal/endpoints/endpoints.go index 88c467c7353..e80d0aa914d 100644 --- a/service/dynamodb/internal/endpoints/endpoints.go +++ b/service/dynamodb/internal/endpoints/endpoints.go @@ -192,6 +192,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/dynamodbstreams/internal/endpoints/endpoints.go b/service/dynamodbstreams/internal/endpoints/endpoints.go index 87fcdc24033..5646f26e07d 100644 --- a/service/dynamodbstreams/internal/endpoints/endpoints.go +++ b/service/dynamodbstreams/internal/endpoints/endpoints.go @@ -189,6 +189,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/ebs/internal/endpoints/endpoints.go b/service/ebs/internal/endpoints/endpoints.go index eb258b0ed3d..9ded3a6986e 100644 --- a/service/ebs/internal/endpoints/endpoints.go +++ b/service/ebs/internal/endpoints/endpoints.go @@ -234,6 +234,9 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/service/ec2/internal/endpoints/endpoints.go b/service/ec2/internal/endpoints/endpoints.go index 3847bbcc845..000b750d00b 100644 --- a/service/ec2/internal/endpoints/endpoints.go +++ b/service/ec2/internal/endpoints/endpoints.go @@ -189,6 +189,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/ecr/internal/endpoints/endpoints.go b/service/ecr/internal/endpoints/endpoints.go index d14592bb8dc..09aab981e96 100644 --- a/service/ecr/internal/endpoints/endpoints.go +++ b/service/ecr/internal/endpoints/endpoints.go @@ -319,6 +319,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "eu-south-1", }, }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{ + Hostname: "api.ecr.eu-south-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-south-2", + }, + }, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{ diff --git a/service/ecs/internal/endpoints/endpoints.go b/service/ecs/internal/endpoints/endpoints.go index 0612af225e0..27308bb092a 100644 --- a/service/ecs/internal/endpoints/endpoints.go +++ b/service/ecs/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/eks/api_op_CreateAddon.go b/service/eks/api_op_CreateAddon.go index d8a68cb6f00..c9e97a8192a 100644 --- a/service/eks/api_op_CreateAddon.go +++ b/service/eks/api_op_CreateAddon.go @@ -14,10 +14,7 @@ import ( // Creates an Amazon EKS add-on. Amazon EKS add-ons help to automate the // provisioning and lifecycle management of common operational software for Amazon -// EKS clusters. Amazon EKS add-ons require clusters running version 1.18 or later -// because Amazon EKS add-ons rely on the Server-side Apply Kubernetes feature, -// which is only available in Kubernetes 1.18 and later. For more information, see -// Amazon EKS add-ons +// EKS clusters. For more information, see Amazon EKS add-ons // (https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html) in the // Amazon EKS User Guide. func (c *Client) CreateAddon(ctx context.Context, params *CreateAddonInput, optFns ...func(*Options)) (*CreateAddonOutput, error) { diff --git a/service/eks/api_op_CreateCluster.go b/service/eks/api_op_CreateCluster.go index e74dab64329..8e36d0ed2d7 100644 --- a/service/eks/api_op_CreateCluster.go +++ b/service/eks/api_op_CreateCluster.go @@ -97,8 +97,8 @@ type CreateClusterInput struct { // An object representing the configuration of your local Amazon EKS cluster on an // Amazon Web Services Outpost. Before creating a local cluster on an Outpost, - // review Creating an Amazon EKS cluster on an Amazon Web Services Outpost - // (https://docs.aws.amazon.com/eks/latest/userguide/create-cluster-outpost.html) + // review Local clusters for Amazon EKS on Amazon Web Services Outposts + // (https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-overview.html) // in the Amazon EKS User Guide. This object isn't available for creating Amazon // EKS clusters on the Amazon Web Services cloud. OutpostConfig *types.OutpostConfigRequest diff --git a/service/eks/deserializers.go b/service/eks/deserializers.go index d21cbf13c97..9aaeb2ddc0d 100644 --- a/service/eks/deserializers.go +++ b/service/eks/deserializers.go @@ -6993,6 +6993,46 @@ func awsRestjson1_deserializeDocumentConnectorConfigResponse(v **types.Connector return nil } +func awsRestjson1_deserializeDocumentControlPlanePlacementResponse(v **types.ControlPlanePlacementResponse, 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.ControlPlanePlacementResponse + if *v == nil { + sv = &types.ControlPlanePlacementResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "groupName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.GroupName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentEncryptionConfig(v **types.EncryptionConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8729,6 +8769,11 @@ func awsRestjson1_deserializeDocumentOutpostConfigResponse(v **types.OutpostConf sv.ControlPlaneInstanceType = ptr.String(jtv) } + case "controlPlanePlacement": + if err := awsRestjson1_deserializeDocumentControlPlanePlacementResponse(&sv.ControlPlanePlacement, value); err != nil { + return err + } + case "outpostArns": if err := awsRestjson1_deserializeDocumentStringList(&sv.OutpostArns, value); err != nil { return err diff --git a/service/eks/serializers.go b/service/eks/serializers.go index 8bf47e31b94..10b5462825b 100644 --- a/service/eks/serializers.go +++ b/service/eks/serializers.go @@ -2838,6 +2838,18 @@ func awsRestjson1_serializeDocumentConnectorConfigRequest(v *types.ConnectorConf return nil } +func awsRestjson1_serializeDocumentControlPlanePlacementRequest(v *types.ControlPlanePlacementRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GroupName != nil { + ok := object.Key("groupName") + ok.String(*v.GroupName) + } + + return nil +} + func awsRestjson1_serializeDocumentEncryptionConfig(v *types.EncryptionConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3147,6 +3159,13 @@ func awsRestjson1_serializeDocumentOutpostConfigRequest(v *types.OutpostConfigRe ok.String(*v.ControlPlaneInstanceType) } + if v.ControlPlanePlacement != nil { + ok := object.Key("controlPlanePlacement") + if err := awsRestjson1_serializeDocumentControlPlanePlacementRequest(v.ControlPlanePlacement, ok); err != nil { + return err + } + } + if v.OutpostArns != nil { ok := object.Key("outpostArns") if err := awsRestjson1_serializeDocumentStringList(v.OutpostArns, ok); err != nil { diff --git a/service/eks/types/types.go b/service/eks/types/types.go index 85d8206d3cb..fbb8e27c7df 100644 --- a/service/eks/types/types.go +++ b/service/eks/types/types.go @@ -295,6 +295,33 @@ type ConnectorConfigResponse struct { noSmithyDocumentSerde } +// The placement configuration for all the control plane instance of your local +// Amazon EKS cluster on an Amazon Web Services Outpost. For more information, see +// Capacity considerations +// (https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html) +// in the Amazon EKS User Guide +type ControlPlanePlacementRequest struct { + + // The name of the placement group for the Kubernetes control plane instances. This + // setting can't be changed after cluster creation. + GroupName *string + + noSmithyDocumentSerde +} + +// The placement configuration for all the control plane instance of your local +// Amazon EKS cluster on an Amazon Web Services Outpost. For more information, see +// Capacity considerations +// (https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html) +// in the Amazon EKS User Guide. +type ControlPlanePlacementResponse struct { + + // The name of the placement group for the Kubernetes control plane instances. + GroupName *string + + noSmithyDocumentSerde +} + // The encryption configuration for the cluster. type EncryptionConfig struct { @@ -617,10 +644,8 @@ type LaunchTemplateSpecification struct { // name or the launch template ID in the request, but not both. Name *string - // The launch template version number, $Latest, or $Default. If the value is - // $Latest, Amazon EKS uses the latest version of the launch template. If the value - // is $Default, Amazon EKS uses the default version of the launch template. - // Default: The default version of the launch template. + // The version number of the launch template to use. If no version is specified, + // then the template's default version is used. Version *string noSmithyDocumentSerde @@ -955,32 +980,20 @@ type OidcIdentityProviderConfigRequest struct { } // The configuration of your local Amazon EKS cluster on an Amazon Web Services -// Outpost. Before creating a cluster on an Outpost, review Creating a local Amazon -// EKS cluster on an Amazon Web Services Outpost -// (https://docs.aws.amazon.com/eks/latest/userguide/create-cluster-outpost.html) +// Outpost. Before creating a cluster on an Outpost, review Creating a local +// cluster on an Outpost +// (https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-create.html) // in the Amazon EKS User Guide. This API isn't available for Amazon EKS clusters // on the Amazon Web Services cloud. type OutpostConfigRequest struct { // The Amazon EC2 instance type that you want to use for your local Amazon EKS - // cluster on Outposts. The instance type that you specify is used for all + // cluster on Outposts. Choose an instance type based on the number of nodes that + // your cluster will have. For more information, see Capacity considerations + // (https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html) + // in the Amazon EKS User Guide. The instance type that you specify is used for all // Kubernetes control plane instances. The instance type can't be changed after - // cluster creation. Choose an instance type based on the number of nodes that your - // cluster will have. If your cluster will have: - // - // * 1–20 nodes, then we recommend - // specifying a large instance type. - // - // * 21–100 nodes, then we recommend specifying - // an xlarge instance type. - // - // * 101–250 nodes, then we recommend specifying a - // 2xlarge instance type. - // - // For a list of the available Amazon EC2 instance types, - // see Compute and storage in Outposts rack features - // (http://aws.amazon.com/outposts/rack/features/). The control plane is not - // automatically scaled by Amazon EKS. + // cluster creation. The control plane is not automatically scaled by Amazon EKS. // // This member is required. ControlPlaneInstanceType *string @@ -991,6 +1004,13 @@ type OutpostConfigRequest struct { // This member is required. OutpostArns []string + // An object representing the placement configuration for all the control plane + // instance of your local Amazon EKS cluster on an Amazon Web Services Outpost. For + // more information, see Capacity considerations + // (https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html) + // in the Amazon EKS User Guide. + ControlPlanePlacement *ControlPlanePlacementRequest + noSmithyDocumentSerde } @@ -1011,6 +1031,13 @@ type OutpostConfigResponse struct { // This member is required. OutpostArns []string + // An object representing the placement configuration for all the control plane + // instance of your local Amazon EKS cluster on an Amazon Web Services Outpost. For + // more information, see Capacity considerations + // (https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html) + // in the Amazon EKS User Guide. + ControlPlanePlacement *ControlPlanePlacementResponse + noSmithyDocumentSerde } @@ -1167,15 +1194,8 @@ type VpcConfigRequest struct { // interfaces that Amazon EKS creates to use that allow communication between your // nodes and the Kubernetes control plane. If you don't specify any security // groups, then familiarize yourself with the difference between Amazon EKS - // defaults for clusters deployed with Kubernetes: - // - // * 1.14 Amazon EKS platform - // version eks.2 and earlier - // - // * 1.14 Amazon EKS platform version eks.3 and - // later - // - // For more information, see Amazon EKS security group considerations + // defaults for clusters deployed with Kubernetes. For more information, see Amazon + // EKS security group considerations // (https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) in the // Amazon EKS User Guide . SecurityGroupIds []string diff --git a/service/elasticache/api_op_CreateUser.go b/service/elasticache/api_op_CreateUser.go index d03ec3fb911..14299be7989 100644 --- a/service/elasticache/api_op_CreateUser.go +++ b/service/elasticache/api_op_CreateUser.go @@ -51,6 +51,9 @@ type CreateUserInput struct { // This member is required. UserName *string + // Specifies how to authenticate the user. + AuthenticationMode *types.AuthenticationMode + // Indicates a password is not required for this user. NoPasswordRequired *bool diff --git a/service/elasticache/api_op_ModifyUser.go b/service/elasticache/api_op_ModifyUser.go index 8a149d1bb54..cb963730d55 100644 --- a/service/elasticache/api_op_ModifyUser.go +++ b/service/elasticache/api_op_ModifyUser.go @@ -40,6 +40,9 @@ type ModifyUserInput struct { // Adds additional user permissions to the access string. AppendAccessString *string + // Specifies how to authenticate the user. + AuthenticationMode *types.AuthenticationMode + // Indicates no password is required for the user. NoPasswordRequired *bool diff --git a/service/elasticache/internal/endpoints/endpoints.go b/service/elasticache/internal/endpoints/endpoints.go index 3f6482ef3c8..9d222455937 100644 --- a/service/elasticache/internal/endpoints/endpoints.go +++ b/service/elasticache/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/elasticache/serializers.go b/service/elasticache/serializers.go index 2354c21c97d..d6029dec854 100644 --- a/service/elasticache/serializers.go +++ b/service/elasticache/serializers.go @@ -4175,6 +4175,25 @@ func (m *awsAwsquery_serializeOpTestFailover) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +func awsAwsquery_serializeDocumentAuthenticationMode(v *types.AuthenticationMode, value query.Value) error { + object := value.Object() + _ = object + + if v.Passwords != nil { + objectKey := object.Key("Passwords") + if err := awsAwsquery_serializeDocumentPasswordListInput(v.Passwords, objectKey); err != nil { + return err + } + } + + if len(v.Type) > 0 { + objectKey := object.Key("Type") + objectKey.String(string(v.Type)) + } + + return nil +} + func awsAwsquery_serializeDocumentAvailabilityZonesList(v []string, value query.Value) error { if len(v) == 0 { return nil @@ -5593,6 +5612,13 @@ func awsAwsquery_serializeOpDocumentCreateUserInput(v *CreateUserInput, value qu objectKey.String(*v.AccessString) } + if v.AuthenticationMode != nil { + objectKey := object.Key("AuthenticationMode") + if err := awsAwsquery_serializeDocumentAuthenticationMode(v.AuthenticationMode, objectKey); err != nil { + return err + } + } + if v.Engine != nil { objectKey := object.Key("Engine") objectKey.String(*v.Engine) @@ -6956,6 +6982,13 @@ func awsAwsquery_serializeOpDocumentModifyUserInput(v *ModifyUserInput, value qu objectKey.String(*v.AppendAccessString) } + if v.AuthenticationMode != nil { + objectKey := object.Key("AuthenticationMode") + if err := awsAwsquery_serializeDocumentAuthenticationMode(v.AuthenticationMode, objectKey); err != nil { + return err + } + } + if v.NoPasswordRequired != nil { objectKey := object.Key("NoPasswordRequired") objectKey.Boolean(*v.NoPasswordRequired) diff --git a/service/elasticache/types/enums.go b/service/elasticache/types/enums.go index e5f53ba5cae..21a830190ff 100644 --- a/service/elasticache/types/enums.go +++ b/service/elasticache/types/enums.go @@ -8,6 +8,7 @@ type AuthenticationType string const ( AuthenticationTypePassword AuthenticationType = "password" AuthenticationTypeNoPassword AuthenticationType = "no-password" + AuthenticationTypeIam AuthenticationType = "iam" ) // Values returns all known values for AuthenticationType. Note that this can be @@ -17,6 +18,7 @@ func (AuthenticationType) Values() []AuthenticationType { return []AuthenticationType{ "password", "no-password", + "iam", } } @@ -152,6 +154,26 @@ func (DestinationType) Values() []DestinationType { } } +type InputAuthenticationType string + +// Enum values for InputAuthenticationType +const ( + InputAuthenticationTypePassword InputAuthenticationType = "password" + InputAuthenticationTypeNoPassword InputAuthenticationType = "no-password-required" + InputAuthenticationTypeIam InputAuthenticationType = "iam" +) + +// Values returns all known values for InputAuthenticationType. 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 (InputAuthenticationType) Values() []InputAuthenticationType { + return []InputAuthenticationType{ + "password", + "no-password-required", + "iam", + } +} + type IpDiscovery string // Enum values for IpDiscovery diff --git a/service/elasticache/types/types.go b/service/elasticache/types/types.go index 6153c2836a8..9b91b02b917 100644 --- a/service/elasticache/types/types.go +++ b/service/elasticache/types/types.go @@ -19,6 +19,19 @@ type Authentication struct { noSmithyDocumentSerde } +// Specifies the authentication mode to use. +type AuthenticationMode struct { + + // Specifies the passwords to use for authentication if Type is set to password. + Passwords []string + + // Specifies the authentication type. Possible options are IAM authentication, + // password and no password. + Type InputAuthenticationType + + noSmithyDocumentSerde +} + // Describes an Availability Zone in which the cluster is launched. type AvailabilityZone struct { diff --git a/service/elasticloadbalancing/internal/endpoints/endpoints.go b/service/elasticloadbalancing/internal/endpoints/endpoints.go index 99f39696880..d00c491e99e 100644 --- a/service/elasticloadbalancing/internal/endpoints/endpoints.go +++ b/service/elasticloadbalancing/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/elasticloadbalancingv2/internal/endpoints/endpoints.go b/service/elasticloadbalancingv2/internal/endpoints/endpoints.go index 5a12669cb41..2600657e281 100644 --- a/service/elasticloadbalancingv2/internal/endpoints/endpoints.go +++ b/service/elasticloadbalancingv2/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/elasticsearchservice/internal/endpoints/endpoints.go b/service/elasticsearchservice/internal/endpoints/endpoints.go index 9da0bfcf48a..b567b00151d 100644 --- a/service/elasticsearchservice/internal/endpoints/endpoints.go +++ b/service/elasticsearchservice/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/emr/internal/endpoints/endpoints.go b/service/emr/internal/endpoints/endpoints.go index 866e010f36f..1cd23936835 100644 --- a/service/emr/internal/endpoints/endpoints.go +++ b/service/emr/internal/endpoints/endpoints.go @@ -183,6 +183,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/eventbridge/internal/endpoints/endpoints.go b/service/eventbridge/internal/endpoints/endpoints.go index cbee3258af9..a6cac580d2d 100644 --- a/service/eventbridge/internal/endpoints/endpoints.go +++ b/service/eventbridge/internal/endpoints/endpoints.go @@ -179,6 +179,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/greengrass/internal/endpoints/endpoints.go b/service/greengrass/internal/endpoints/endpoints.go index 287613b78e1..5a272e7baa1 100644 --- a/service/greengrass/internal/endpoints/endpoints.go +++ b/service/greengrass/internal/endpoints/endpoints.go @@ -153,6 +153,22 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "dataplane-ap-south-1", + }: endpoints.Endpoint{ + Hostname: "greengrass-ats.iot.ap-south-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-south-1", + }, + }, + endpoints.EndpointKey{ + Region: "dataplane-us-east-2", + }: endpoints.Endpoint{ + Hostname: "greengrass-ats.iot.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, @@ -211,6 +227,14 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "cn-north-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "dataplane-cn-north-1", + }: endpoints.Endpoint{ + Hostname: "greengrass.ats.iot.cn-north-1.amazonaws.com.cn", + CredentialScope: endpoints.CredentialScope{ + Region: "cn-north-1", + }, + }, }, }, { diff --git a/service/greengrassv2/internal/endpoints/endpoints.go b/service/greengrassv2/internal/endpoints/endpoints.go index 8bf846e531b..046fd789939 100644 --- a/service/greengrassv2/internal/endpoints/endpoints.go +++ b/service/greengrassv2/internal/endpoints/endpoints.go @@ -153,6 +153,22 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "dataplane-ap-south-1", + }: endpoints.Endpoint{ + Hostname: "greengrass-ats.iot.ap-south-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-south-1", + }, + }, + endpoints.EndpointKey{ + Region: "dataplane-us-east-2", + }: endpoints.Endpoint{ + Hostname: "greengrass-ats.iot.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, @@ -211,6 +227,14 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "cn-north-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "dataplane-cn-north-1", + }: endpoints.Endpoint{ + Hostname: "greengrass.ats.iot.cn-north-1.amazonaws.com.cn", + CredentialScope: endpoints.CredentialScope{ + Region: "cn-north-1", + }, + }, }, }, { diff --git a/service/iottwinmaker/api_op_CreateComponentType.go b/service/iottwinmaker/api_op_CreateComponentType.go index fe4b866a28a..375ff7d86cc 100644 --- a/service/iottwinmaker/api_op_CreateComponentType.go +++ b/service/iottwinmaker/api_op_CreateComponentType.go @@ -59,6 +59,9 @@ type CreateComponentTypeInput struct { // Each string in the mapping must be unique to this object. PropertyDefinitions map[string]types.PropertyDefinitionRequest + // + PropertyGroups map[string]types.PropertyGroupRequest + // Metadata that you can use to manage the component type. Tags map[string]string diff --git a/service/iottwinmaker/api_op_ExecuteQuery.go b/service/iottwinmaker/api_op_ExecuteQuery.go new file mode 100644 index 00000000000..2750d72e780 --- /dev/null +++ b/service/iottwinmaker/api_op_ExecuteQuery.go @@ -0,0 +1,261 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iottwinmaker + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/iottwinmaker/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Run queries to access information from your knowledge graph of entities within +// individual workspaces. +func (c *Client) ExecuteQuery(ctx context.Context, params *ExecuteQueryInput, optFns ...func(*Options)) (*ExecuteQueryOutput, error) { + if params == nil { + params = &ExecuteQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ExecuteQuery", params, optFns, c.addOperationExecuteQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ExecuteQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ExecuteQueryInput struct { + + // The query statement. + // + // This member is required. + QueryStatement *string + + // The ID of the workspace. + // + // This member is required. + WorkspaceId *string + + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. + MaxResults *int32 + + // The string that specifies the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ExecuteQueryOutput struct { + + // A list of ColumnDescription objects. + ColumnDescriptions []types.ColumnDescription + + // The string that specifies the next page of results. + NextToken *string + + // Represents a single row in the query results. + Rows []types.Row + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationExecuteQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpExecuteQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpExecuteQuery{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opExecuteQueryMiddleware(stack); err != nil { + return err + } + if err = addOpExecuteQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExecuteQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opExecuteQueryMiddleware struct { +} + +func (*endpointPrefix_opExecuteQueryMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opExecuteQueryMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opExecuteQueryMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opExecuteQueryMiddleware{}, `OperationSerializer`, middleware.After) +} + +// ExecuteQueryAPIClient is a client that implements the ExecuteQuery operation. +type ExecuteQueryAPIClient interface { + ExecuteQuery(context.Context, *ExecuteQueryInput, ...func(*Options)) (*ExecuteQueryOutput, error) +} + +var _ ExecuteQueryAPIClient = (*Client)(nil) + +// ExecuteQueryPaginatorOptions is the paginator options for ExecuteQuery +type ExecuteQueryPaginatorOptions struct { + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. + 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 +} + +// ExecuteQueryPaginator is a paginator for ExecuteQuery +type ExecuteQueryPaginator struct { + options ExecuteQueryPaginatorOptions + client ExecuteQueryAPIClient + params *ExecuteQueryInput + nextToken *string + firstPage bool +} + +// NewExecuteQueryPaginator returns a new ExecuteQueryPaginator +func NewExecuteQueryPaginator(client ExecuteQueryAPIClient, params *ExecuteQueryInput, optFns ...func(*ExecuteQueryPaginatorOptions)) *ExecuteQueryPaginator { + if params == nil { + params = &ExecuteQueryInput{} + } + + options := ExecuteQueryPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ExecuteQueryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ExecuteQueryPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ExecuteQuery page. +func (p *ExecuteQueryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ExecuteQueryOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ExecuteQuery(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opExecuteQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "iottwinmaker", + OperationName: "ExecuteQuery", + } +} diff --git a/service/iottwinmaker/api_op_GetComponentType.go b/service/iottwinmaker/api_op_GetComponentType.go index 98a53980c5c..577740056a8 100644 --- a/service/iottwinmaker/api_op_GetComponentType.go +++ b/service/iottwinmaker/api_op_GetComponentType.go @@ -96,6 +96,10 @@ type GetComponentTypeOutput struct { // Each string in the mapping must be unique to this object. PropertyDefinitions map[string]types.PropertyDefinitionResponse + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. + PropertyGroups map[string]types.PropertyGroupResponse + // The current status of the component type. Status *types.Status diff --git a/service/iottwinmaker/api_op_GetPricingPlan.go b/service/iottwinmaker/api_op_GetPricingPlan.go new file mode 100644 index 00000000000..b67888366da --- /dev/null +++ b/service/iottwinmaker/api_op_GetPricingPlan.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iottwinmaker + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/iottwinmaker/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the pricing plan. +func (c *Client) GetPricingPlan(ctx context.Context, params *GetPricingPlanInput, optFns ...func(*Options)) (*GetPricingPlanOutput, error) { + if params == nil { + params = &GetPricingPlanInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPricingPlan", params, optFns, c.addOperationGetPricingPlanMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPricingPlanOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPricingPlanInput struct { + noSmithyDocumentSerde +} + +type GetPricingPlanOutput struct { + + // The chosen pricing plan for the current billing cycle. + // + // This member is required. + CurrentPricingPlan *types.PricingPlan + + // The pending pricing plan. + PendingPricingPlan *types.PricingPlan + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPricingPlanMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetPricingPlan{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetPricingPlan{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opGetPricingPlanMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPricingPlan(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opGetPricingPlanMiddleware struct { +} + +func (*endpointPrefix_opGetPricingPlanMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetPricingPlanMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opGetPricingPlanMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opGetPricingPlanMiddleware{}, `OperationSerializer`, middleware.After) +} + +func newServiceMetadataMiddleware_opGetPricingPlan(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "iottwinmaker", + OperationName: "GetPricingPlan", + } +} diff --git a/service/iottwinmaker/api_op_GetPropertyValue.go b/service/iottwinmaker/api_op_GetPropertyValue.go index a4d9fcf4fc6..e3ec717a92f 100644 --- a/service/iottwinmaker/api_op_GetPropertyValue.go +++ b/service/iottwinmaker/api_op_GetPropertyValue.go @@ -51,17 +51,34 @@ type GetPropertyValueInput struct { // The ID of the entity whose property values the operation returns. EntityId *string + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. + MaxResults *int32 + + // The string that specifies the next page of results. + NextToken *string + + // The property group name. + PropertyGroupName *string + + // The tabular conditions. + TabularConditions *types.TabularConditions + noSmithyDocumentSerde } type GetPropertyValueOutput struct { + // The string that specifies the next page of results. + NextToken *string + // An object that maps strings to the properties and latest property values in the // response. Each string in the mapping must be unique to this object. - // - // This member is required. PropertyValues map[string]types.PropertyLatestValue + // A table of property values. + TabularPropertyValues [][]map[string]types.DataValue + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -161,6 +178,97 @@ func addEndpointPrefix_opGetPropertyValueMiddleware(stack *middleware.Stack) err return stack.Serialize.Insert(&endpointPrefix_opGetPropertyValueMiddleware{}, `OperationSerializer`, middleware.After) } +// GetPropertyValueAPIClient is a client that implements the GetPropertyValue +// operation. +type GetPropertyValueAPIClient interface { + GetPropertyValue(context.Context, *GetPropertyValueInput, ...func(*Options)) (*GetPropertyValueOutput, error) +} + +var _ GetPropertyValueAPIClient = (*Client)(nil) + +// GetPropertyValuePaginatorOptions is the paginator options for GetPropertyValue +type GetPropertyValuePaginatorOptions struct { + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. + 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 +} + +// GetPropertyValuePaginator is a paginator for GetPropertyValue +type GetPropertyValuePaginator struct { + options GetPropertyValuePaginatorOptions + client GetPropertyValueAPIClient + params *GetPropertyValueInput + nextToken *string + firstPage bool +} + +// NewGetPropertyValuePaginator returns a new GetPropertyValuePaginator +func NewGetPropertyValuePaginator(client GetPropertyValueAPIClient, params *GetPropertyValueInput, optFns ...func(*GetPropertyValuePaginatorOptions)) *GetPropertyValuePaginator { + if params == nil { + params = &GetPropertyValueInput{} + } + + options := GetPropertyValuePaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetPropertyValuePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetPropertyValuePaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetPropertyValue page. +func (p *GetPropertyValuePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetPropertyValueOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.GetPropertyValue(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opGetPropertyValue(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iottwinmaker/api_op_GetPropertyValueHistory.go b/service/iottwinmaker/api_op_GetPropertyValueHistory.go index 3804053c3ab..e6ea8b741cf 100644 --- a/service/iottwinmaker/api_op_GetPropertyValueHistory.go +++ b/service/iottwinmaker/api_op_GetPropertyValueHistory.go @@ -58,7 +58,7 @@ type GetPropertyValueHistoryInput struct { // The ISO8601 DateTime of the latest property value to return. For more // information about the ISO8601 DateTime format, see the data type PropertyValue - // (https://docs.aws.amazon.com/roci/latest/roci-api/API_PropertyValue.html). + // (https://docs.aws.amazon.com/iot-twinmaker/latest/apireference/API_PropertyValue.html). EndTime *string // The ID of the entity. @@ -68,7 +68,8 @@ type GetPropertyValueHistoryInput struct { // interpolate data. Interpolation *types.InterpolationParameters - // The maximum number of results to return. + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. MaxResults *int32 // The string that specifies the next page of results. @@ -88,7 +89,7 @@ type GetPropertyValueHistoryInput struct { // The ISO8601 DateTime of the earliest property value to return. For more // information about the ISO8601 DateTime format, see the data type PropertyValue - // (https://docs.aws.amazon.com/roci/latest/roci-api/API_PropertyValue.html). + // (https://docs.aws.amazon.com/iot-twinmaker/latest/apireference/API_PropertyValue.html). StartTime *string noSmithyDocumentSerde @@ -215,7 +216,8 @@ var _ GetPropertyValueHistoryAPIClient = (*Client)(nil) // GetPropertyValueHistoryPaginatorOptions is the paginator options for // GetPropertyValueHistory type GetPropertyValueHistoryPaginatorOptions struct { - // The maximum number of results to return. + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/iottwinmaker/api_op_ListComponentTypes.go b/service/iottwinmaker/api_op_ListComponentTypes.go index 85e5c0b2e87..c8bc6c40578 100644 --- a/service/iottwinmaker/api_op_ListComponentTypes.go +++ b/service/iottwinmaker/api_op_ListComponentTypes.go @@ -38,7 +38,8 @@ type ListComponentTypesInput struct { // A list of objects that filter the request. Filters []types.ListComponentTypesFilter - // The maximum number of results to display. + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. MaxResults *int32 // The string that specifies the next page of results. @@ -175,7 +176,8 @@ var _ ListComponentTypesAPIClient = (*Client)(nil) // ListComponentTypesPaginatorOptions is the paginator options for // ListComponentTypes type ListComponentTypesPaginatorOptions struct { - // The maximum number of results to display. + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/iottwinmaker/api_op_ListEntities.go b/service/iottwinmaker/api_op_ListEntities.go index 23fe3e91ec7..2c94bbf3cfb 100644 --- a/service/iottwinmaker/api_op_ListEntities.go +++ b/service/iottwinmaker/api_op_ListEntities.go @@ -39,7 +39,8 @@ type ListEntitiesInput struct { // valid input. Filters []types.ListEntitiesFilter - // The maximum number of results to display. + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. MaxResults *int32 // The string that specifies the next page of results. @@ -164,7 +165,8 @@ var _ ListEntitiesAPIClient = (*Client)(nil) // ListEntitiesPaginatorOptions is the paginator options for ListEntities type ListEntitiesPaginatorOptions struct { - // The maximum number of results to display. + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/iottwinmaker/api_op_ListTagsForResource.go b/service/iottwinmaker/api_op_ListTagsForResource.go index 2881db71610..3d0597a0948 100644 --- a/service/iottwinmaker/api_op_ListTagsForResource.go +++ b/service/iottwinmaker/api_op_ListTagsForResource.go @@ -34,7 +34,8 @@ type ListTagsForResourceInput struct { // This member is required. ResourceARN *string - // The maximum number of results to display. + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. MaxResults *int32 // The string that specifies the next page of results. diff --git a/service/iottwinmaker/api_op_ListWorkspaces.go b/service/iottwinmaker/api_op_ListWorkspaces.go index c9cd8c684a5..4b2ebf2149b 100644 --- a/service/iottwinmaker/api_op_ListWorkspaces.go +++ b/service/iottwinmaker/api_op_ListWorkspaces.go @@ -30,7 +30,8 @@ func (c *Client) ListWorkspaces(ctx context.Context, params *ListWorkspacesInput type ListWorkspacesInput struct { - // The maximum number of results to display. + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. MaxResults *int32 // The string that specifies the next page of results. @@ -153,7 +154,8 @@ var _ ListWorkspacesAPIClient = (*Client)(nil) // ListWorkspacesPaginatorOptions is the paginator options for ListWorkspaces type ListWorkspacesPaginatorOptions struct { - // The maximum number of results to display. + // The maximum number of results to return at one time. The default is 25. Valid + // Range: Minimum value of 1. Maximum value of 250. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/iottwinmaker/api_op_UpdateComponentType.go b/service/iottwinmaker/api_op_UpdateComponentType.go index 5417d3dff3c..d8d0cb560c9 100644 --- a/service/iottwinmaker/api_op_UpdateComponentType.go +++ b/service/iottwinmaker/api_op_UpdateComponentType.go @@ -58,6 +58,9 @@ type UpdateComponentTypeInput struct { // Each string in the mapping must be unique to this object. PropertyDefinitions map[string]types.PropertyDefinitionRequest + // The property groups + PropertyGroups map[string]types.PropertyGroupRequest + noSmithyDocumentSerde } diff --git a/service/iottwinmaker/api_op_UpdatePricingPlan.go b/service/iottwinmaker/api_op_UpdatePricingPlan.go new file mode 100644 index 00000000000..6af3e9581c3 --- /dev/null +++ b/service/iottwinmaker/api_op_UpdatePricingPlan.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iottwinmaker + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/iottwinmaker/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update the pricing plan. +func (c *Client) UpdatePricingPlan(ctx context.Context, params *UpdatePricingPlanInput, optFns ...func(*Options)) (*UpdatePricingPlanOutput, error) { + if params == nil { + params = &UpdatePricingPlanInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdatePricingPlan", params, optFns, c.addOperationUpdatePricingPlanMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdatePricingPlanOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdatePricingPlanInput struct { + + // The pricing mode. + // + // This member is required. + PricingMode types.PricingMode + + // The bundle names. + BundleNames []string + + noSmithyDocumentSerde +} + +type UpdatePricingPlanOutput struct { + + // Update the current pricing plan. + // + // This member is required. + CurrentPricingPlan *types.PricingPlan + + // Update the pending pricing plan. + PendingPricingPlan *types.PricingPlan + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdatePricingPlanMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdatePricingPlan{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdatePricingPlan{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opUpdatePricingPlanMiddleware(stack); err != nil { + return err + } + if err = addOpUpdatePricingPlanValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePricingPlan(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opUpdatePricingPlanMiddleware struct { +} + +func (*endpointPrefix_opUpdatePricingPlanMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opUpdatePricingPlanMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opUpdatePricingPlanMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opUpdatePricingPlanMiddleware{}, `OperationSerializer`, middleware.After) +} + +func newServiceMetadataMiddleware_opUpdatePricingPlan(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "iottwinmaker", + OperationName: "UpdatePricingPlan", + } +} diff --git a/service/iottwinmaker/deserializers.go b/service/iottwinmaker/deserializers.go index 7a12371bcaf..3ac309a9ed5 100644 --- a/service/iottwinmaker/deserializers.go +++ b/service/iottwinmaker/deserializers.go @@ -8,6 +8,8 @@ import ( "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/iottwinmaker/document" + internaldocument "github.com/aws/aws-sdk-go-v2/service/iottwinmaker/internal/document" "github.com/aws/aws-sdk-go-v2/service/iottwinmaker/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" @@ -1447,6 +1449,182 @@ func awsRestjson1_deserializeOpErrorDeleteWorkspace(response *smithyhttp.Respons } } +type awsRestjson1_deserializeOpExecuteQuery struct { +} + +func (*awsRestjson1_deserializeOpExecuteQuery) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpExecuteQuery) 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_deserializeOpErrorExecuteQuery(response, &metadata) + } + output := &ExecuteQueryOutput{} + 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_deserializeOpDocumentExecuteQueryOutput(&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_deserializeOpErrorExecuteQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("QueryTimeoutException", errorCode): + return awsRestjson1_deserializeErrorQueryTimeoutException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentExecuteQueryOutput(v **ExecuteQueryOutput, 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 *ExecuteQueryOutput + if *v == nil { + sv = &ExecuteQueryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "columnDescriptions": + if err := awsRestjson1_deserializeDocumentColumnDescriptions(&sv.ColumnDescriptions, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "rows": + if err := awsRestjson1_deserializeDocumentRows(&sv.Rows, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetComponentType struct { } @@ -1557,6 +1735,9 @@ func awsRestjson1_deserializeOpErrorGetComponentType(response *smithyhttp.Respon case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1674,6 +1855,11 @@ func awsRestjson1_deserializeOpDocumentGetComponentTypeOutput(v **GetComponentTy return err } + case "propertyGroups": + if err := awsRestjson1_deserializeDocumentPropertyGroupsResponse(&sv.PropertyGroups, value); err != nil { + return err + } + case "status": if err := awsRestjson1_deserializeDocumentStatus(&sv.Status, value); err != nil { return err @@ -1972,14 +2158,14 @@ func awsRestjson1_deserializeOpDocumentGetEntityOutput(v **GetEntityOutput, valu return nil } -type awsRestjson1_deserializeOpGetPropertyValue struct { +type awsRestjson1_deserializeOpGetPricingPlan struct { } -func (*awsRestjson1_deserializeOpGetPropertyValue) ID() string { +func (*awsRestjson1_deserializeOpGetPricingPlan) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetPropertyValue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetPricingPlan) 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) @@ -1993,9 +2179,9 @@ func (m *awsRestjson1_deserializeOpGetPropertyValue) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetPropertyValue(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetPricingPlan(response, &metadata) } - output := &GetPropertyValueOutput{} + output := &GetPricingPlanOutput{} out.Result = output var buff [1024]byte @@ -2016,7 +2202,7 @@ func (m *awsRestjson1_deserializeOpGetPropertyValue) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetPropertyValueOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetPricingPlanOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2029,7 +2215,7 @@ func (m *awsRestjson1_deserializeOpGetPropertyValue) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetPropertyValue(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetPricingPlan(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)} @@ -2073,18 +2259,9 @@ func awsRestjson1_deserializeOpErrorGetPropertyValue(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConnectorFailureException", errorCode): - return awsRestjson1_deserializeErrorConnectorFailureException(response, errorBody) - - case strings.EqualFold("ConnectorTimeoutException", errorCode): - return awsRestjson1_deserializeErrorConnectorTimeoutException(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) @@ -2101,7 +2278,7 @@ func awsRestjson1_deserializeOpErrorGetPropertyValue(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentGetPropertyValueOutput(v **GetPropertyValueOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetPricingPlanOutput(v **GetPricingPlanOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2114,17 +2291,22 @@ func awsRestjson1_deserializeOpDocumentGetPropertyValueOutput(v **GetPropertyVal return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetPropertyValueOutput + var sv *GetPricingPlanOutput if *v == nil { - sv = &GetPropertyValueOutput{} + sv = &GetPricingPlanOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "propertyValues": - if err := awsRestjson1_deserializeDocumentPropertyLatestValueMap(&sv.PropertyValues, value); err != nil { + case "currentPricingPlan": + if err := awsRestjson1_deserializeDocumentPricingPlan(&sv.CurrentPricingPlan, value); err != nil { + return err + } + + case "pendingPricingPlan": + if err := awsRestjson1_deserializeDocumentPricingPlan(&sv.PendingPricingPlan, value); err != nil { return err } @@ -2137,14 +2319,14 @@ func awsRestjson1_deserializeOpDocumentGetPropertyValueOutput(v **GetPropertyVal return nil } -type awsRestjson1_deserializeOpGetPropertyValueHistory struct { +type awsRestjson1_deserializeOpGetPropertyValue struct { } -func (*awsRestjson1_deserializeOpGetPropertyValueHistory) ID() string { +func (*awsRestjson1_deserializeOpGetPropertyValue) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetPropertyValueHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetPropertyValue) 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) @@ -2158,9 +2340,9 @@ func (m *awsRestjson1_deserializeOpGetPropertyValueHistory) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetPropertyValueHistory(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetPropertyValue(response, &metadata) } - output := &GetPropertyValueHistoryOutput{} + output := &GetPropertyValueOutput{} out.Result = output var buff [1024]byte @@ -2181,7 +2363,7 @@ func (m *awsRestjson1_deserializeOpGetPropertyValueHistory) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetPropertyValueHistoryOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetPropertyValueOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2194,7 +2376,7 @@ func (m *awsRestjson1_deserializeOpGetPropertyValueHistory) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetPropertyValueHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetPropertyValue(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)} @@ -2266,7 +2448,7 @@ func awsRestjson1_deserializeOpErrorGetPropertyValueHistory(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentGetPropertyValueHistoryOutput(v **GetPropertyValueHistoryOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetPropertyValueOutput(v **GetPropertyValueOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2279,9 +2461,9 @@ func awsRestjson1_deserializeOpDocumentGetPropertyValueHistoryOutput(v **GetProp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetPropertyValueHistoryOutput + var sv *GetPropertyValueOutput if *v == nil { - sv = &GetPropertyValueHistoryOutput{} + sv = &GetPropertyValueOutput{} } else { sv = *v } @@ -2298,7 +2480,12 @@ func awsRestjson1_deserializeOpDocumentGetPropertyValueHistoryOutput(v **GetProp } case "propertyValues": - if err := awsRestjson1_deserializeDocumentPropertyValueList(&sv.PropertyValues, value); err != nil { + if err := awsRestjson1_deserializeDocumentPropertyLatestValueMap(&sv.PropertyValues, value); err != nil { + return err + } + + case "tabularPropertyValues": + if err := awsRestjson1_deserializeDocumentTabularPropertyValues(&sv.TabularPropertyValues, value); err != nil { return err } @@ -2311,14 +2498,14 @@ func awsRestjson1_deserializeOpDocumentGetPropertyValueHistoryOutput(v **GetProp return nil } -type awsRestjson1_deserializeOpGetScene struct { +type awsRestjson1_deserializeOpGetPropertyValueHistory struct { } -func (*awsRestjson1_deserializeOpGetScene) ID() string { +func (*awsRestjson1_deserializeOpGetPropertyValueHistory) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetScene) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetPropertyValueHistory) 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) @@ -2332,9 +2519,9 @@ func (m *awsRestjson1_deserializeOpGetScene) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetScene(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetPropertyValueHistory(response, &metadata) } - output := &GetSceneOutput{} + output := &GetPropertyValueHistoryOutput{} out.Result = output var buff [1024]byte @@ -2355,7 +2542,7 @@ func (m *awsRestjson1_deserializeOpGetScene) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSceneOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetPropertyValueHistoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2368,7 +2555,7 @@ func (m *awsRestjson1_deserializeOpGetScene) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetScene(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetPropertyValueHistory(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)} @@ -2412,6 +2599,12 @@ func awsRestjson1_deserializeOpErrorGetScene(response *smithyhttp.Response, meta case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConnectorFailureException", errorCode): + return awsRestjson1_deserializeErrorConnectorFailureException(response, errorBody) + + case strings.EqualFold("ConnectorTimeoutException", errorCode): + return awsRestjson1_deserializeErrorConnectorTimeoutException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -2434,7 +2627,7 @@ func awsRestjson1_deserializeOpErrorGetScene(response *smithyhttp.Response, meta } } -func awsRestjson1_deserializeOpDocumentGetSceneOutput(v **GetSceneOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetPropertyValueHistoryOutput(v **GetPropertyValueHistoryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2447,34 +2640,202 @@ func awsRestjson1_deserializeOpDocumentGetSceneOutput(v **GetSceneOutput, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSceneOutput + var sv *GetPropertyValueHistoryOutput if *v == nil { - sv = &GetSceneOutput{} + sv = &GetPropertyValueHistoryOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TwinMakerArn to be of type string, got %T instead", value) + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } - case "capabilities": - if err := awsRestjson1_deserializeDocumentSceneCapabilities(&sv.Capabilities, value); err != nil { + case "propertyValues": + if err := awsRestjson1_deserializeDocumentPropertyValueList(&sv.PropertyValues, value); err != nil { return err } - case "contentLocation": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected S3Url to be of type string, got %T instead", value) + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetScene struct { +} + +func (*awsRestjson1_deserializeOpGetScene) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetScene) 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_deserializeOpErrorGetScene(response, &metadata) + } + output := &GetSceneOutput{} + 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_deserializeOpDocumentGetSceneOutput(&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_deserializeOpErrorGetScene(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetSceneOutput(v **GetSceneOutput, 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 *GetSceneOutput + if *v == nil { + sv = &GetSceneOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TwinMakerArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "capabilities": + if err := awsRestjson1_deserializeDocumentSceneCapabilities(&sv.Capabilities, value); err != nil { + return err + } + + case "contentLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Url to be of type string, got %T instead", value) } sv.ContentLocation = ptr.String(jtv) } @@ -4172,14 +4533,14 @@ func awsRestjson1_deserializeOpDocumentUpdateEntityOutput(v **UpdateEntityOutput return nil } -type awsRestjson1_deserializeOpUpdateScene struct { +type awsRestjson1_deserializeOpUpdatePricingPlan struct { } -func (*awsRestjson1_deserializeOpUpdateScene) ID() string { +func (*awsRestjson1_deserializeOpUpdatePricingPlan) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateScene) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdatePricingPlan) 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) @@ -4193,9 +4554,9 @@ func (m *awsRestjson1_deserializeOpUpdateScene) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateScene(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdatePricingPlan(response, &metadata) } - output := &UpdateSceneOutput{} + output := &UpdatePricingPlanOutput{} out.Result = output var buff [1024]byte @@ -4216,7 +4577,7 @@ func (m *awsRestjson1_deserializeOpUpdateScene) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateSceneOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdatePricingPlanOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4229,7 +4590,7 @@ func (m *awsRestjson1_deserializeOpUpdateScene) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateScene(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdatePricingPlan(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)} @@ -4276,9 +4637,6 @@ func awsRestjson1_deserializeOpErrorUpdateScene(response *smithyhttp.Response, m case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -4295,7 +4653,7 @@ func awsRestjson1_deserializeOpErrorUpdateScene(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentUpdateSceneOutput(v **UpdateSceneOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdatePricingPlanOutput(v **UpdatePricingPlanOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4308,29 +4666,23 @@ func awsRestjson1_deserializeOpDocumentUpdateSceneOutput(v **UpdateSceneOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateSceneOutput + var sv *UpdatePricingPlanOutput if *v == nil { - sv = &UpdateSceneOutput{} + sv = &UpdatePricingPlanOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "updateDateTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.UpdateDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + case "currentPricingPlan": + if err := awsRestjson1_deserializeDocumentPricingPlan(&sv.CurrentPricingPlan, value); err != nil { + return err + } - } + case "pendingPricingPlan": + if err := awsRestjson1_deserializeDocumentPricingPlan(&sv.PendingPricingPlan, value); err != nil { + return err } default: @@ -4342,14 +4694,14 @@ func awsRestjson1_deserializeOpDocumentUpdateSceneOutput(v **UpdateSceneOutput, return nil } -type awsRestjson1_deserializeOpUpdateWorkspace struct { +type awsRestjson1_deserializeOpUpdateScene struct { } -func (*awsRestjson1_deserializeOpUpdateWorkspace) ID() string { +func (*awsRestjson1_deserializeOpUpdateScene) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateWorkspace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateScene) 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) @@ -4363,9 +4715,9 @@ func (m *awsRestjson1_deserializeOpUpdateWorkspace) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateWorkspace(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateScene(response, &metadata) } - output := &UpdateWorkspaceOutput{} + output := &UpdateSceneOutput{} out.Result = output var buff [1024]byte @@ -4386,7 +4738,7 @@ func (m *awsRestjson1_deserializeOpUpdateWorkspace) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateWorkspaceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateSceneOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4399,7 +4751,7 @@ func (m *awsRestjson1_deserializeOpUpdateWorkspace) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateWorkspace(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateScene(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)} @@ -4449,9 +4801,6 @@ func awsRestjson1_deserializeOpErrorUpdateWorkspace(response *smithyhttp.Respons 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) @@ -4468,7 +4817,7 @@ func awsRestjson1_deserializeOpErrorUpdateWorkspace(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentUpdateWorkspaceOutput(v **UpdateWorkspaceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateSceneOutput(v **UpdateSceneOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4481,9 +4830,9 @@ func awsRestjson1_deserializeOpDocumentUpdateWorkspaceOutput(v **UpdateWorkspace return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateWorkspaceOutput + var sv *UpdateSceneOutput if *v == nil { - sv = &UpdateWorkspaceOutput{} + sv = &UpdateSceneOutput{} } else { sv = *v } @@ -4515,12 +4864,185 @@ func awsRestjson1_deserializeOpDocumentUpdateWorkspaceOutput(v **UpdateWorkspace return nil } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} +type awsRestjson1_deserializeOpUpdateWorkspace struct { +} + +func (*awsRestjson1_deserializeOpUpdateWorkspace) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateWorkspace) 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_deserializeOpErrorUpdateWorkspace(response, &metadata) + } + output := &UpdateWorkspaceOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + 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_deserializeOpDocumentUpdateWorkspaceOutput(&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_deserializeOpErrorUpdateWorkspace(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return 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("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateWorkspaceOutput(v **UpdateWorkspaceOutput, 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 *UpdateWorkspaceOutput + if *v == nil { + sv = &UpdateWorkspaceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "updateDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdateDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4695,6 +5217,42 @@ func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.R return output } +func awsRestjson1_deserializeErrorQueryTimeoutException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.QueryTimeoutException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_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 awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ResourceNotFoundException{} var buff [1024]byte @@ -4911,11 +5469,229 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie } } - *v = sv + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBatchPutPropertyError(v **types.BatchPutPropertyError, 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.BatchPutPropertyError + if *v == nil { + sv = &types.BatchPutPropertyError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entry": + if err := awsRestjson1_deserializeDocumentPropertyValueEntry(&sv.Entry, value); err != nil { + return err + } + + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorCode = ptr.String(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBatchPutPropertyErrorEntry(v **types.BatchPutPropertyErrorEntry, 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.BatchPutPropertyErrorEntry + if *v == nil { + sv = &types.BatchPutPropertyErrorEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errors": + if err := awsRestjson1_deserializeDocumentErrors(&sv.Errors, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBundleInformation(v **types.BundleInformation, 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.BundleInformation + if *v == nil { + sv = &types.BundleInformation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bundleNames": + if err := awsRestjson1_deserializeDocumentPricingBundles(&sv.BundleNames, value); err != nil { + return err + } + + case "pricingTier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PricingTier to be of type string, got %T instead", value) + } + sv.PricingTier = types.PricingTier(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentColumnDescription(v **types.ColumnDescription, 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.ColumnDescription + if *v == nil { + sv = &types.ColumnDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ColumnName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ColumnType to be of type string, got %T instead", value) + } + sv.Type = types.ColumnType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentColumnDescriptions(v *[]types.ColumnDescription, 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.ColumnDescription + if *v == nil { + cv = []types.ColumnDescription{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ColumnDescription + destAddr := &col + if err := awsRestjson1_deserializeDocumentColumnDescription(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv return nil } -func awsRestjson1_deserializeDocumentBatchPutPropertyError(v **types.BatchPutPropertyError, value interface{}) error { +func awsRestjson1_deserializeDocumentComponentPropertyGroupResponse(v **types.ComponentPropertyGroupResponse, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4928,36 +5704,36 @@ func awsRestjson1_deserializeDocumentBatchPutPropertyError(v **types.BatchPutPro return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BatchPutPropertyError + var sv *types.ComponentPropertyGroupResponse if *v == nil { - sv = &types.BatchPutPropertyError{} + sv = &types.ComponentPropertyGroupResponse{} } else { sv = *v } for key, value := range shape { switch key { - case "entry": - if err := awsRestjson1_deserializeDocumentPropertyValueEntry(&sv.Entry, value); err != nil { - return err - } - - case "errorCode": + case "groupType": 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 GroupType to be of type string, got %T instead", value) } - sv.ErrorCode = ptr.String(jtv) + sv.GroupType = types.GroupType(jtv) } - case "errorMessage": + case "isInherited": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.ErrorMessage = ptr.String(jtv) + sv.IsInherited = ptr.Bool(jtv) + } + + case "propertyNames": + if err := awsRestjson1_deserializeDocumentPropertyNames(&sv.PropertyNames, value); err != nil { + return err } default: @@ -4969,7 +5745,7 @@ func awsRestjson1_deserializeDocumentBatchPutPropertyError(v **types.BatchPutPro return nil } -func awsRestjson1_deserializeDocumentBatchPutPropertyErrorEntry(v **types.BatchPutPropertyErrorEntry, value interface{}) error { +func awsRestjson1_deserializeDocumentComponentPropertyGroupResponses(v *map[string]types.ComponentPropertyGroupResponse, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4982,26 +5758,25 @@ func awsRestjson1_deserializeDocumentBatchPutPropertyErrorEntry(v **types.BatchP return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BatchPutPropertyErrorEntry + var mv map[string]types.ComponentPropertyGroupResponse if *v == nil { - sv = &types.BatchPutPropertyErrorEntry{} + mv = map[string]types.ComponentPropertyGroupResponse{} } else { - sv = *v + mv = *v } for key, value := range shape { - switch key { - case "errors": - if err := awsRestjson1_deserializeDocumentErrors(&sv.Errors, value); err != nil { - return err - } - - default: - _, _ = key, value - + var parsedVal types.ComponentPropertyGroupResponse + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentComponentPropertyGroupResponse(&destAddr, value); err != nil { + return err } + parsedVal = *destAddr + mv[key] = parsedVal + } - *v = sv + *v = mv return nil } @@ -5068,6 +5843,11 @@ func awsRestjson1_deserializeDocumentComponentResponse(v **types.ComponentRespon return err } + case "propertyGroups": + if err := awsRestjson1_deserializeDocumentComponentPropertyGroupResponses(&sv.PropertyGroups, value); err != nil { + return err + } + case "status": if err := awsRestjson1_deserializeDocumentStatus(&sv.Status, value); err != nil { return err @@ -6295,6 +7075,141 @@ func awsRestjson1_deserializeDocumentLambdaFunction(v **types.LambdaFunction, va return nil } +func awsRestjson1_deserializeDocumentPricingBundles(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 BundleName to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPricingPlan(v **types.PricingPlan, 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.PricingPlan + if *v == nil { + sv = &types.PricingPlan{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "billableEntityCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BillableEntityCount = ptr.Int64(i64) + } + + case "bundleInformation": + if err := awsRestjson1_deserializeDocumentBundleInformation(&sv.BundleInformation, value); err != nil { + return err + } + + case "effectiveDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EffectiveDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "pricingMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PricingMode to be of type string, got %T instead", value) + } + sv.PricingMode = types.PricingMode(jtv) + } + + case "updateDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdateDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "updateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdateReason to be of type string, got %T instead", value) + } + sv.UpdateReason = types.UpdateReason(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentPropertyDefinitionResponse(v **types.PropertyDefinitionResponse, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6419,16 +7334,105 @@ func awsRestjson1_deserializeDocumentPropertyDefinitionsResponse(v *map[string]t var mv map[string]types.PropertyDefinitionResponse if *v == nil { - mv = map[string]types.PropertyDefinitionResponse{} + mv = map[string]types.PropertyDefinitionResponse{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.PropertyDefinitionResponse + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentPropertyDefinitionResponse(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentPropertyGroupResponse(v **types.PropertyGroupResponse, 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.PropertyGroupResponse + if *v == nil { + sv = &types.PropertyGroupResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "groupType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GroupType to be of type string, got %T instead", value) + } + sv.GroupType = types.GroupType(jtv) + } + + case "isInherited": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsInherited = ptr.Bool(jtv) + } + + case "propertyNames": + if err := awsRestjson1_deserializeDocumentPropertyNames(&sv.PropertyNames, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPropertyGroupsResponse(v *map[string]types.PropertyGroupResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.PropertyGroupResponse + if *v == nil { + mv = map[string]types.PropertyGroupResponse{} } else { mv = *v } for key, value := range shape { - var parsedVal types.PropertyDefinitionResponse + var parsedVal types.PropertyGroupResponse mapVar := parsedVal destAddr := &mapVar - if err := awsRestjson1_deserializeDocumentPropertyDefinitionResponse(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentPropertyGroupResponse(&destAddr, value); err != nil { return err } parsedVal = *destAddr @@ -6515,6 +7519,42 @@ func awsRestjson1_deserializeDocumentPropertyLatestValueMap(v *map[string]types. return nil } +func awsRestjson1_deserializeDocumentPropertyNames(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 Name to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentPropertyResponse(v **types.PropertyResponse, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6591,6 +7631,41 @@ func awsRestjson1_deserializeDocumentPropertyResponses(v *map[string]types.Prope return nil } +func awsRestjson1_deserializeDocumentPropertyTableValue(v *map[string]types.DataValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.DataValue + if *v == nil { + mv = map[string]types.DataValue{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.DataValue + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentDataValue(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsRestjson1_deserializeDocumentPropertyValue(v **types.PropertyValue, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6802,6 +7877,54 @@ func awsRestjson1_deserializeDocumentPropertyValues(v *[]types.PropertyValue, va return nil } +func awsRestjson1_deserializeDocumentQueryResultValue(v *document.Interface, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + *v = internaldocument.NewDocumentUnmarshaler(value) + return nil +} + +func awsRestjson1_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 ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentRelationship(v **types.Relationship, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6976,6 +8099,108 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsRestjson1_deserializeDocumentRow(v **types.Row, 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.Row + if *v == nil { + sv = &types.Row{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "rowData": + if err := awsRestjson1_deserializeDocumentRowData(&sv.RowData, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRowData(v *[]document.Interface, 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 []document.Interface + if *v == nil { + cv = []document.Interface{} + } else { + cv = *v + } + + for _, value := range shape { + var col document.Interface + if err := awsRestjson1_deserializeDocumentQueryResultValue(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRows(v *[]types.Row, 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.Row + if *v == nil { + cv = []types.Row{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Row + destAddr := &col + if err := awsRestjson1_deserializeDocumentRow(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentSceneCapabilities(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7230,6 +8455,70 @@ func awsRestjson1_deserializeDocumentStatus(v **types.Status, value interface{}) return nil } +func awsRestjson1_deserializeDocumentTabularPropertyValue(v *[]map[string]types.DataValue, 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 []map[string]types.DataValue + if *v == nil { + cv = []map[string]types.DataValue{} + } else { + cv = *v + } + + for _, value := range shape { + var col map[string]types.DataValue + if err := awsRestjson1_deserializeDocumentPropertyTableValue(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentTabularPropertyValues(v *[][]map[string]types.DataValue, 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 [][]map[string]types.DataValue + if *v == nil { + cv = [][]map[string]types.DataValue{} + } else { + cv = *v + } + + for _, value := range shape { + var col []map[string]types.DataValue + if err := awsRestjson1_deserializeDocumentTabularPropertyValue(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/iottwinmaker/document/doc.go b/service/iottwinmaker/document/doc.go new file mode 100644 index 00000000000..2b06b14f3cd --- /dev/null +++ b/service/iottwinmaker/document/doc.go @@ -0,0 +1,66 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package document implements encoding and decoding of open-content that has a JSON-like data model. +// This data-model allows for UTF-8 strings, arbitrary precision numbers, booleans, nulls, a list of these values, and a +// map of UTF-8 strings to these values. +// +// Interface defines the semantics for how a document type is marshalled and unmarshalled for requests and responses +// for the service. To send a document as input to the service you use NewLazyDocument and pass it the Go type to be +// sent to the service. NewLazyDocument returns a document Interface type that encodes the provided Go type during +// the request serialization step after you have invoked an API client operation that uses the document type. +// +// The following examples show how you can create document types using basic Go types. +// +// NewLazyDocument(map[string]interface{}{ +// "favoriteNumber": 42, +// "fruits": []string{"apple", "orange"}, +// "capitals": map[string]interface{}{ +// "Washington": "Olympia", +// "Oregon": "Salem", +// }, +// "skyIsBlue": true, +// }) +// +// NewLazyDocument(3.14159) +// +// NewLazyDocument([]interface{"One", 2, 3, 3.5, "four"}) +// +// NewLazyDocument(true) +// +// Services can send document types as part of their API responses. To retrieve the content of a response document +// you use the UnmarshalSmithyDocument method on the response document. When calling UnmarshalSmithyDocument you pass +// a reference to the Go type that you want to unmarshal and map the response to. +// +// For example, if you expect to receive key/value map from the service response: +// +// var kv map[string]interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&kv); err != nil { +// // handle error +// } +// +// If a service can return one or more data-types in the response, you can use an empty interface and type switch to +// dynamically handle the response type. +// +// var v interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&v); err != nil { +// // handle error +// } +// +// switch vv := v.(type) { +// case map[string]interface{}: +// // handle key/value map +// case []interface{}: +// // handle array of values +// case bool: +// // handle boolean +// case document.Number: +// // handle an arbitrary precision number +// case string: +// // handle string +// default: +// // handle unknown case +// } +// +// The mapping of Go types to document types is covered in more depth in https://pkg.go.dev/github.com/aws/smithy-go/document +// including more in depth examples that cover user-defined structure types. +package document diff --git a/service/iottwinmaker/document/document.go b/service/iottwinmaker/document/document.go new file mode 100644 index 00000000000..2fe6b6821e6 --- /dev/null +++ b/service/iottwinmaker/document/document.go @@ -0,0 +1,34 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + internaldocument "github.com/aws/aws-sdk-go-v2/service/iottwinmaker/internal/document" +) + +// Interface defines a document which is a protocol-agnostic type which supports a +// JSON-like data-model. You can use this type to send UTF-8 strings, arbitrary +// precision numbers, booleans, nulls, a list of these values, and a map of UTF-8 +// strings to these values. +// +// You create a document type using the NewLazyDocument function and passing it the +// Go type to marshal. When receiving a document in an API response, you use the +// document's UnmarshalSmithyDocument function to decode the response to your +// desired Go type. Unless documented specifically generated structure types in +// client packages or client types packages are not supported at this time. Such +// types embed a noSmithyDocumentSerde and will cause an error to be returned when +// attempting to send an API request. +// +// For more information see the accompanying package documentation and linked +// references. +type Interface = internaldocument.Interface + +// You create document type using the NewLazyDocument function and passing it the +// Go type to be marshaled and sent to the service. The document marshaler supports +// semantics similar to the encoding/json Go standard library. +// +// For more information see the accompanying package documentation and linked +// references. +func NewLazyDocument(v interface{}) Interface { + return internaldocument.NewDocumentMarshaler(v) +} diff --git a/service/iottwinmaker/generated.json b/service/iottwinmaker/generated.json index bb2379b180b..ab082a05c6d 100644 --- a/service/iottwinmaker/generated.json +++ b/service/iottwinmaker/generated.json @@ -17,8 +17,10 @@ "api_op_DeleteEntity.go", "api_op_DeleteScene.go", "api_op_DeleteWorkspace.go", + "api_op_ExecuteQuery.go", "api_op_GetComponentType.go", "api_op_GetEntity.go", + "api_op_GetPricingPlan.go", "api_op_GetPropertyValue.go", "api_op_GetPropertyValueHistory.go", "api_op_GetScene.go", @@ -32,12 +34,17 @@ "api_op_UntagResource.go", "api_op_UpdateComponentType.go", "api_op_UpdateEntity.go", + "api_op_UpdatePricingPlan.go", "api_op_UpdateScene.go", "api_op_UpdateWorkspace.go", "deserializers.go", "doc.go", + "document/doc.go", + "document/document.go", "endpoints.go", "generated.json", + "internal/document/document.go", + "internal/document/document_test.go", "internal/endpoints/endpoints.go", "internal/endpoints/endpoints_test.go", "protocol_test.go", diff --git a/service/iottwinmaker/internal/document/document.go b/service/iottwinmaker/internal/document/document.go new file mode 100644 index 00000000000..4080f81b8a8 --- /dev/null +++ b/service/iottwinmaker/internal/document/document.go @@ -0,0 +1,99 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + "bytes" + "encoding/json" + smithydocument "github.com/aws/smithy-go/document" + smithydocumentjson "github.com/aws/smithy-go/document/json" +) + +// github.com/aws/aws-sdk-go-v2/service/iottwinmaker/internal/document.smithyDocument +// is an interface which is used to bind a document type to its service client. +type smithyDocument interface { + isSmithyDocument() +} + +// github.com/aws/aws-sdk-go-v2/service/iottwinmaker/internal/document.Interface is +// a JSON-like data model type that is protocol agnostic and is usedto send +// open-content to a service. +type Interface interface { + smithyDocument + smithydocument.Marshaler + smithydocument.Unmarshaler +} + +type documentMarshaler struct { + value interface{} +} + +func (m *documentMarshaler) UnmarshalSmithyDocument(v interface{}) error { + mBytes, err := m.MarshalSmithyDocument() + if err != nil { + return err + } + + jDecoder := json.NewDecoder(bytes.NewReader(mBytes)) + jDecoder.UseNumber() + + var jv interface{} + if err := jDecoder.Decode(&v); err != nil { + return err + } + + return NewDocumentUnmarshaler(v).UnmarshalSmithyDocument(&jv) +} + +func (m *documentMarshaler) MarshalSmithyDocument() ([]byte, error) { + return smithydocumentjson.NewEncoder().Encode(m.value) +} + +func (m *documentMarshaler) isSmithyDocument() {} + +var _ Interface = (*documentMarshaler)(nil) + +type documentUnmarshaler struct { + value interface{} +} + +func (m *documentUnmarshaler) UnmarshalSmithyDocument(v interface{}) error { + decoder := smithydocumentjson.NewDecoder() + return decoder.DecodeJSONInterface(m.value, v) +} + +func (m *documentUnmarshaler) MarshalSmithyDocument() ([]byte, error) { + return json.Marshal(m.value) +} + +func (m *documentUnmarshaler) isSmithyDocument() {} + +var _ Interface = (*documentUnmarshaler)(nil) + +// NewDocumentMarshaler creates a new document marshaler for the given input type +func NewDocumentMarshaler(v interface{}) Interface { + return &documentMarshaler{ + value: v, + } +} + +// NewDocumentUnmarshaler creates a new document unmarshaler for the given service +// response +func NewDocumentUnmarshaler(v interface{}) Interface { + return &documentUnmarshaler{ + value: v, + } +} + +// github.com/aws/aws-sdk-go-v2/service/iottwinmaker/internal/document.IsInterface +// returns whether the given Interface implementation is a valid client +// implementation +func IsInterface(v Interface) (ok bool) { + defer func() { + if err := recover(); err != nil { + ok = false + } + }() + v.isSmithyDocument() + return true +} diff --git a/service/iottwinmaker/internal/document/document_test.go b/service/iottwinmaker/internal/document/document_test.go new file mode 100644 index 00000000000..775645dcd6e --- /dev/null +++ b/service/iottwinmaker/internal/document/document_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + smithydocument "github.com/aws/smithy-go/document" +) + +var _ smithyDocument = (Interface)(nil) +var _ smithydocument.Marshaler = (Interface)(nil) +var _ smithydocument.Unmarshaler = (Interface)(nil) diff --git a/service/iottwinmaker/serializers.go b/service/iottwinmaker/serializers.go index 343a5042d0e..2ebfc4a56e5 100644 --- a/service/iottwinmaker/serializers.go +++ b/service/iottwinmaker/serializers.go @@ -212,6 +212,13 @@ func awsRestjson1_serializeOpDocumentCreateComponentTypeInput(v *CreateComponent } } + if v.PropertyGroups != nil { + ok := object.Key("propertyGroups") + if err := awsRestjson1_serializeDocumentPropertyGroupsRequest(v.PropertyGroups, ok); err != nil { + return err + } + } + if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { @@ -798,6 +805,89 @@ func awsRestjson1_serializeOpHttpBindingsDeleteWorkspaceInput(v *DeleteWorkspace return nil } +type awsRestjson1_serializeOpExecuteQuery struct { +} + +func (*awsRestjson1_serializeOpExecuteQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpExecuteQuery) 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.(*ExecuteQueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/queries/execution") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentExecuteQueryInput(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_serializeOpHttpBindingsExecuteQueryInput(v *ExecuteQueryInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentExecuteQueryInput(v *ExecuteQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.QueryStatement != nil { + ok := object.Key("queryStatement") + ok.String(*v.QueryStatement) + } + + if v.WorkspaceId != nil { + ok := object.Key("workspaceId") + ok.String(*v.WorkspaceId) + } + + return nil +} + type awsRestjson1_serializeOpGetComponentType struct { } @@ -932,6 +1022,51 @@ func awsRestjson1_serializeOpHttpBindingsGetEntityInput(v *GetEntityInput, encod return nil } +type awsRestjson1_serializeOpGetPricingPlan struct { +} + +func (*awsRestjson1_serializeOpGetPricingPlan) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetPricingPlan) 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.(*GetPricingPlanInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/pricingplan") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if 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_serializeOpHttpBindingsGetPricingPlanInput(v *GetPricingPlanInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + type awsRestjson1_serializeOpGetPropertyValue struct { } @@ -1020,6 +1155,21 @@ func awsRestjson1_serializeOpDocumentGetPropertyValueInput(v *GetPropertyValueIn ok.String(*v.EntityId) } + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.PropertyGroupName != nil { + ok := object.Key("propertyGroupName") + ok.String(*v.PropertyGroupName) + } + if v.SelectedProperties != nil { ok := object.Key("selectedProperties") if err := awsRestjson1_serializeDocumentSelectedPropertyList(v.SelectedProperties, ok); err != nil { @@ -1027,6 +1177,13 @@ func awsRestjson1_serializeOpDocumentGetPropertyValueInput(v *GetPropertyValueIn } } + if v.TabularConditions != nil { + ok := object.Key("tabularConditions") + if err := awsRestjson1_serializeDocumentTabularConditions(v.TabularConditions, ok); err != nil { + return err + } + } + return nil } @@ -1972,6 +2129,13 @@ func awsRestjson1_serializeOpDocumentUpdateComponentTypeInput(v *UpdateComponent } } + if v.PropertyGroups != nil { + ok := object.Key("propertyGroups") + if err := awsRestjson1_serializeDocumentPropertyGroupsRequest(v.PropertyGroups, ok); err != nil { + return err + } + } + return nil } @@ -2084,6 +2248,81 @@ func awsRestjson1_serializeOpDocumentUpdateEntityInput(v *UpdateEntityInput, val return nil } +type awsRestjson1_serializeOpUpdatePricingPlan struct { +} + +func (*awsRestjson1_serializeOpUpdatePricingPlan) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdatePricingPlan) 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.(*UpdatePricingPlanInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/pricingplan") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdatePricingPlanInput(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_serializeOpHttpBindingsUpdatePricingPlanInput(v *UpdatePricingPlanInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdatePricingPlanInput(v *UpdatePricingPlanInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BundleNames != nil { + ok := object.Key("bundleNames") + if err := awsRestjson1_serializeDocumentPricingBundles(v.BundleNames, ok); err != nil { + return err + } + } + + if len(v.PricingMode) > 0 { + ok := object.Key("pricingMode") + ok.String(string(v.PricingMode)) + } + + return nil +} + type awsRestjson1_serializeOpUpdateScene struct { } @@ -2272,6 +2511,44 @@ func awsRestjson1_serializeOpDocumentUpdateWorkspaceInput(v *UpdateWorkspaceInpu return nil } +func awsRestjson1_serializeDocumentComponentPropertyGroupRequest(v *types.ComponentPropertyGroupRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.GroupType) > 0 { + ok := object.Key("groupType") + ok.String(string(v.GroupType)) + } + + if v.PropertyNames != nil { + ok := object.Key("propertyNames") + if err := awsRestjson1_serializeDocumentPropertyNames(v.PropertyNames, ok); err != nil { + return err + } + } + + if len(v.UpdateType) > 0 { + ok := object.Key("updateType") + ok.String(string(v.UpdateType)) + } + + return nil +} + +func awsRestjson1_serializeDocumentComponentPropertyGroupRequests(v map[string]types.ComponentPropertyGroupRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentComponentPropertyGroupRequest(&mapVar, om); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentComponentRequest(v *types.ComponentRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2293,6 +2570,13 @@ func awsRestjson1_serializeDocumentComponentRequest(v *types.ComponentRequest, v } } + if v.PropertyGroups != nil { + ok := object.Key("propertyGroups") + if err := awsRestjson1_serializeDocumentComponentPropertyGroupRequests(v.PropertyGroups, ok); err != nil { + return err + } + } + return nil } @@ -2324,6 +2608,13 @@ func awsRestjson1_serializeDocumentComponentUpdateRequest(v *types.ComponentUpda ok.String(*v.Description) } + if v.PropertyGroupUpdates != nil { + ok := object.Key("propertyGroupUpdates") + if err := awsRestjson1_serializeDocumentComponentPropertyGroupRequests(v.PropertyGroupUpdates, ok); err != nil { + return err + } + } + if v.PropertyUpdates != nil { ok := object.Key("propertyUpdates") if err := awsRestjson1_serializeDocumentPropertyRequests(v.PropertyUpdates, ok); err != nil { @@ -2732,6 +3023,36 @@ func awsRestjson1_serializeDocumentListEntitiesFilters(v []types.ListEntitiesFil return nil } +func awsRestjson1_serializeDocumentOrderBy(v *types.OrderBy, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Order) > 0 { + ok := object.Key("order") + ok.String(string(v.Order)) + } + + if v.PropertyName != nil { + ok := object.Key("propertyName") + ok.String(*v.PropertyName) + } + + return nil +} + +func awsRestjson1_serializeDocumentOrderByList(v []types.OrderBy, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentOrderBy(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentParentEntityUpdateRequest(v *types.ParentEntityUpdateRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2749,6 +3070,17 @@ func awsRestjson1_serializeDocumentParentEntityUpdateRequest(v *types.ParentEnti return nil } +func awsRestjson1_serializeDocumentPricingBundles(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_serializeDocumentPropertyDefinitionRequest(v *types.PropertyDefinitionRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2848,6 +3180,50 @@ func awsRestjson1_serializeDocumentPropertyFilters(v []types.PropertyFilter, val return nil } +func awsRestjson1_serializeDocumentPropertyGroupRequest(v *types.PropertyGroupRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.GroupType) > 0 { + ok := object.Key("groupType") + ok.String(string(v.GroupType)) + } + + if v.PropertyNames != nil { + ok := object.Key("propertyNames") + if err := awsRestjson1_serializeDocumentPropertyNames(v.PropertyNames, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentPropertyGroupsRequest(v map[string]types.PropertyGroupRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentPropertyGroupRequest(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentPropertyNames(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_serializeDocumentPropertyRequest(v *types.PropertyRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3013,6 +3389,27 @@ func awsRestjson1_serializeDocumentSelectedPropertyList(v []string, value smithy return nil } +func awsRestjson1_serializeDocumentTabularConditions(v *types.TabularConditions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OrderBy != nil { + ok := object.Key("orderBy") + if err := awsRestjson1_serializeDocumentOrderByList(v.OrderBy, ok); err != nil { + return err + } + } + + if v.PropertyFilters != nil { + ok := object.Key("propertyFilters") + if err := awsRestjson1_serializeDocumentPropertyFilters(v.PropertyFilters, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/iottwinmaker/types/enums.go b/service/iottwinmaker/types/enums.go index 7aa9caad5db..825018b4784 100644 --- a/service/iottwinmaker/types/enums.go +++ b/service/iottwinmaker/types/enums.go @@ -2,6 +2,26 @@ package types +type ColumnType string + +// Enum values for ColumnType +const ( + ColumnTypeNode ColumnType = "NODE" + ColumnTypeEdge ColumnType = "EDGE" + ColumnTypeValue ColumnType = "VALUE" +) + +// Values returns all known values for ColumnType. 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 (ColumnType) Values() []ColumnType { + return []ColumnType{ + "NODE", + "EDGE", + "VALUE", + } +} + type ComponentUpdateType string // Enum values for ComponentUpdateType @@ -40,6 +60,22 @@ func (ErrorCode) Values() []ErrorCode { } } +type GroupType string + +// Enum values for GroupType +const ( + GroupTypeTabular GroupType = "TABULAR" +) + +// Values returns all known values for GroupType. 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 (GroupType) Values() []GroupType { + return []GroupType{ + "TABULAR", + } +} + type InterpolationType string // Enum values for InterpolationType @@ -56,6 +92,24 @@ func (InterpolationType) Values() []InterpolationType { } } +type Order string + +// Enum values for Order +const ( + OrderAscending Order = "ASCENDING" + OrderDescending Order = "DESCENDING" +) + +// Values returns all known values for Order. 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 (Order) Values() []Order { + return []Order{ + "ASCENDING", + "DESCENDING", + } +} + type OrderByTime string // Enum values for OrderByTime @@ -92,6 +146,68 @@ func (ParentEntityUpdateType) Values() []ParentEntityUpdateType { } } +type PricingMode string + +// Enum values for PricingMode +const ( + PricingModeBasic PricingMode = "BASIC" + PricingModeStandard PricingMode = "STANDARD" + PricingModeTieredBundle PricingMode = "TIERED_BUNDLE" +) + +// Values returns all known values for PricingMode. 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 (PricingMode) Values() []PricingMode { + return []PricingMode{ + "BASIC", + "STANDARD", + "TIERED_BUNDLE", + } +} + +type PricingTier string + +// Enum values for PricingTier +const ( + PricingTierTier1 PricingTier = "TIER_1" + PricingTierTier2 PricingTier = "TIER_2" + PricingTierTier3 PricingTier = "TIER_3" + PricingTierTier4 PricingTier = "TIER_4" +) + +// Values returns all known values for PricingTier. 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 (PricingTier) Values() []PricingTier { + return []PricingTier{ + "TIER_1", + "TIER_2", + "TIER_3", + "TIER_4", + } +} + +type PropertyGroupUpdateType string + +// Enum values for PropertyGroupUpdateType +const ( + PropertyGroupUpdateTypeUpdate PropertyGroupUpdateType = "UPDATE" + PropertyGroupUpdateTypeDelete PropertyGroupUpdateType = "DELETE" + PropertyGroupUpdateTypeCreate PropertyGroupUpdateType = "CREATE" +) + +// Values returns all known values for PropertyGroupUpdateType. 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 (PropertyGroupUpdateType) Values() []PropertyGroupUpdateType { + return []PropertyGroupUpdateType{ + "UPDATE", + "DELETE", + "CREATE", + } +} + type PropertyUpdateType string // Enum values for PropertyUpdateType @@ -183,3 +299,27 @@ func (Type) Values() []Type { "MAP", } } + +type UpdateReason string + +// Enum values for UpdateReason +const ( + UpdateReasonDefault UpdateReason = "DEFAULT" + UpdateReasonPricingTierUpdate UpdateReason = "PRICING_TIER_UPDATE" + UpdateReasonEntityCountUpdate UpdateReason = "ENTITY_COUNT_UPDATE" + UpdateReasonPricingModeUpdate UpdateReason = "PRICING_MODE_UPDATE" + UpdateReasonOverwritten UpdateReason = "OVERWRITTEN" +) + +// Values returns all known values for UpdateReason. 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 (UpdateReason) Values() []UpdateReason { + return []UpdateReason{ + "DEFAULT", + "PRICING_TIER_UPDATE", + "ENTITY_COUNT_UPDATE", + "PRICING_MODE_UPDATE", + "OVERWRITTEN", + } +} diff --git a/service/iottwinmaker/types/errors.go b/service/iottwinmaker/types/errors.go index f4c2c1e207c..9e77c6a91b1 100644 --- a/service/iottwinmaker/types/errors.go +++ b/service/iottwinmaker/types/errors.go @@ -102,6 +102,25 @@ func (e *InternalServerException) ErrorMessage() string { func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } +// The query timeout exception. +type QueryTimeoutException struct { + Message *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 { return "QueryTimeoutException" } +func (e *QueryTimeoutException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The resource wasn't found. type ResourceNotFoundException struct { Message *string diff --git a/service/iottwinmaker/types/types.go b/service/iottwinmaker/types/types.go index c7a746862cd..d12bb8f8bb5 100644 --- a/service/iottwinmaker/types/types.go +++ b/service/iottwinmaker/types/types.go @@ -3,6 +3,7 @@ package types import ( + "github.com/aws/aws-sdk-go-v2/service/iottwinmaker/document" smithydocument "github.com/aws/smithy-go/document" "time" ) @@ -42,6 +43,68 @@ type BatchPutPropertyErrorEntry struct { noSmithyDocumentSerde } +// Information about pricing bundle. +type BundleInformation struct { + + // The bundle names. + // + // This member is required. + BundleNames []string + + // The pricing tier. + PricingTier PricingTier + + noSmithyDocumentSerde +} + +// A description of the column in the query results. +type ColumnDescription struct { + + // The name of the column description. + Name *string + + // The type of the column description. + Type ColumnType + + noSmithyDocumentSerde +} + +type ComponentPropertyGroupRequest struct { + + // The group type. + GroupType GroupType + + // The property names. + PropertyNames []string + + // The update type. + UpdateType PropertyGroupUpdateType + + noSmithyDocumentSerde +} + +// The component property group response. +type ComponentPropertyGroupResponse struct { + + // The group type. + // + // This member is required. + GroupType GroupType + + // A Boolean value that specifies whether the property group is inherited from a + // parent entity + // + // This member is required. + IsInherited *bool + + // The names of properties + // + // This member is required. + PropertyNames []string + + noSmithyDocumentSerde +} + // An object that sets information about a component type create or update request. type ComponentRequest struct { @@ -55,6 +118,9 @@ type ComponentRequest struct { // string in the mapping must be unique to this object. Properties map[string]PropertyRequest + // The property groups. + PropertyGroups map[string]ComponentPropertyGroupRequest + noSmithyDocumentSerde } @@ -78,6 +144,9 @@ type ComponentResponse struct { // string in the mapping must be unique to this object. Properties map[string]PropertyResponse + // The property groups. + PropertyGroups map[string]ComponentPropertyGroupResponse + // The status of the component type. Status *Status @@ -125,6 +194,9 @@ type ComponentUpdateRequest struct { // The description of the component type. Description *string + // The property group updates. + PropertyGroupUpdates map[string]ComponentPropertyGroupRequest + // An object that maps strings to the properties to set in the component type // update. Each string in the mapping must be unique to this object. PropertyUpdates map[string]PropertyRequest @@ -417,6 +489,21 @@ type ListEntitiesFilterMemberParentEntityId struct { func (*ListEntitiesFilterMemberParentEntityId) isListEntitiesFilter() {} +// Filter criteria that orders the return output. It can be sorted in ascending or +// descending order. +type OrderBy struct { + + // The property name. + // + // This member is required. + PropertyName *string + + // The set order that filters results. + Order Order + + noSmithyDocumentSerde +} + // The parent entity update request. type ParentEntityUpdateRequest struct { @@ -431,6 +518,38 @@ type ParentEntityUpdateRequest struct { noSmithyDocumentSerde } +// The pricing plan. +type PricingPlan struct { + + // The effective date and time of the pricing plan. + // + // This member is required. + EffectiveDateTime *time.Time + + // The pricing mode. + // + // This member is required. + PricingMode PricingMode + + // The set date and time for updating a pricing plan. + // + // This member is required. + UpdateDateTime *time.Time + + // The update reason, for changing a pricing plan. + // + // This member is required. + UpdateReason UpdateReason + + // The billable entity count. + BillableEntityCount *int64 + + // The pricing plan's bundle information. + BundleInformation *BundleInformation + + noSmithyDocumentSerde +} + // An object that sets information about a property. type PropertyDefinitionRequest struct { @@ -532,6 +651,39 @@ type PropertyFilter struct { noSmithyDocumentSerde } +type PropertyGroupRequest struct { + + // The group type. + GroupType GroupType + + // The names of properties. + PropertyNames []string + + noSmithyDocumentSerde +} + +// The property group response +type PropertyGroupResponse struct { + + // The group types. + // + // This member is required. + GroupType GroupType + + // A Boolean value that specifies whether the property group is inherited from a + // parent entity + // + // This member is required. + IsInherited *bool + + // The names of properties. + // + // This member is required. + PropertyNames []string + + noSmithyDocumentSerde +} + // The latest value of the property. type PropertyLatestValue struct { @@ -676,6 +828,15 @@ type RelationshipValue struct { noSmithyDocumentSerde } +// Represents a single row in the query results. +type Row struct { + + // The data in a row of query results. + RowData []document.Interface + + noSmithyDocumentSerde +} + // An object that contains information about a scene. type SceneSummary struct { @@ -723,6 +884,20 @@ type Status struct { noSmithyDocumentSerde } +// The tabular conditions. +type TabularConditions struct { + + // Filter criteria that orders the output. It can be sorted in ascending or + // descending order. + OrderBy []OrderBy + + // You can filter the request using various logical operators and a key-value + // format. For example: {"key": "serverType", "value": "webServer"} + PropertyFilters []PropertyFilter + + noSmithyDocumentSerde +} + // An object that contains information about a workspace. type WorkspaceSummary struct { diff --git a/service/iottwinmaker/validators.go b/service/iottwinmaker/validators.go index ff8a0109d9f..63813405850 100644 --- a/service/iottwinmaker/validators.go +++ b/service/iottwinmaker/validators.go @@ -190,6 +190,26 @@ func (m *validateOpDeleteWorkspace) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpExecuteQuery struct { +} + +func (*validateOpExecuteQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpExecuteQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ExecuteQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpExecuteQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetComponentType struct { } @@ -470,6 +490,26 @@ func (m *validateOpUpdateEntity) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpUpdatePricingPlan struct { +} + +func (*validateOpUpdatePricingPlan) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdatePricingPlan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdatePricingPlanInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdatePricingPlanInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateScene struct { } @@ -546,6 +586,10 @@ func addOpDeleteWorkspaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteWorkspace{}, middleware.After) } +func addOpExecuteQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpExecuteQuery{}, middleware.After) +} + func addOpGetComponentTypeValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetComponentType{}, middleware.After) } @@ -602,6 +646,10 @@ func addOpUpdateEntityValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateEntity{}, middleware.After) } +func addOpUpdatePricingPlanValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdatePricingPlan{}, middleware.After) +} + func addOpUpdateSceneValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateScene{}, middleware.After) } @@ -799,6 +847,38 @@ func validateLambdaFunction(v *types.LambdaFunction) error { } } +func validateOrderBy(v *types.OrderBy) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OrderBy"} + if v.PropertyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PropertyName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOrderByList(v []types.OrderBy) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OrderByList"} + for i := range v { + if err := validateOrderBy(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateParentEntityUpdateRequest(v *types.ParentEntityUpdateRequest) error { if v == nil { return nil @@ -940,6 +1020,23 @@ func validatePropertyValues(v []types.PropertyValue) error { } } +func validateTabularConditions(v *types.TabularConditions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TabularConditions"} + if v.OrderBy != nil { + if err := validateOrderByList(v.OrderBy); err != nil { + invalidParams.AddNested("OrderBy", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpBatchPutPropertyValuesInput(v *BatchPutPropertyValuesInput) error { if v == nil { return nil @@ -1124,6 +1221,24 @@ func validateOpDeleteWorkspaceInput(v *DeleteWorkspaceInput) error { } } +func validateOpExecuteQueryInput(v *ExecuteQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExecuteQueryInput"} + if v.WorkspaceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkspaceId")) + } + if v.QueryStatement == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryStatement")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetComponentTypeInput(v *GetComponentTypeInput) error { if v == nil { return nil @@ -1189,6 +1304,11 @@ func validateOpGetPropertyValueInput(v *GetPropertyValueInput) error { if v.WorkspaceId == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceId")) } + if v.TabularConditions != nil { + if err := validateTabularConditions(v.TabularConditions); err != nil { + invalidParams.AddNested("TabularConditions", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1381,6 +1501,21 @@ func validateOpUpdateEntityInput(v *UpdateEntityInput) error { } } +func validateOpUpdatePricingPlanInput(v *UpdatePricingPlanInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdatePricingPlanInput"} + if len(v.PricingMode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PricingMode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateSceneInput(v *UpdateSceneInput) error { if v == nil { return nil diff --git a/service/kinesis/internal/endpoints/endpoints.go b/service/kinesis/internal/endpoints/endpoints.go index 0c43d2fa40f..3223b4704ac 100644 --- a/service/kinesis/internal/endpoints/endpoints.go +++ b/service/kinesis/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/kms/internal/endpoints/endpoints.go b/service/kms/internal/endpoints/endpoints.go index 77f5f0f3d07..4513f2cc4fb 100644 --- a/service/kms/internal/endpoints/endpoints.go +++ b/service/kms/internal/endpoints/endpoints.go @@ -405,6 +405,15 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "kms-fips.eu-south-2.amazonaws.com", + }, endpoints.EndpointKey{ Region: "eu-south-2-fips", }: endpoints.Endpoint{ diff --git a/service/lambda/internal/endpoints/endpoints.go b/service/lambda/internal/endpoints/endpoints.go index 03aac3c82c4..4d618167c06 100644 --- a/service/lambda/internal/endpoints/endpoints.go +++ b/service/lambda/internal/endpoints/endpoints.go @@ -261,6 +261,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "lambda.eu-south-1.api.aws", }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.eu-south-2.api.aws", + }, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/m2/internal/endpoints/endpoints.go b/service/m2/internal/endpoints/endpoints.go index ab64a7e6bea..87cb739cae6 100644 --- a/service/m2/internal/endpoints/endpoints.go +++ b/service/m2/internal/endpoints/endpoints.go @@ -135,6 +135,15 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "ap-northeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, @@ -147,6 +156,12 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, diff --git a/service/marketplacemetering/internal/endpoints/endpoints.go b/service/marketplacemetering/internal/endpoints/endpoints.go index 799a8552610..6de5bdf2941 100644 --- a/service/marketplacemetering/internal/endpoints/endpoints.go +++ b/service/marketplacemetering/internal/endpoints/endpoints.go @@ -189,6 +189,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/neptune/internal/endpoints/endpoints.go b/service/neptune/internal/endpoints/endpoints.go index e7d9884bd05..7f53244f824 100644 --- a/service/neptune/internal/endpoints/endpoints.go +++ b/service/neptune/internal/endpoints/endpoints.go @@ -192,6 +192,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/opensearch/internal/endpoints/endpoints.go b/service/opensearch/internal/endpoints/endpoints.go index 0002ad23c0c..5fe380b384e 100644 --- a/service/opensearch/internal/endpoints/endpoints.go +++ b/service/opensearch/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/personalizeevents/serializers.go b/service/personalizeevents/serializers.go index ed3f8a8003c..73fcca77927 100644 --- a/service/personalizeevents/serializers.go +++ b/service/personalizeevents/serializers.go @@ -295,6 +295,13 @@ func awsRestjson1_serializeDocumentEvent(v *types.Event, value smithyjson.Value) ok.String(*v.ItemId) } + if v.MetricAttribution != nil { + ok := object.Key("metricAttribution") + if err := awsRestjson1_serializeDocumentMetricAttribution(v.MetricAttribution, ok); err != nil { + return err + } + } + if v.Properties != nil { ok := object.Key("properties") ok.String(*v.Properties) @@ -367,6 +374,18 @@ func awsRestjson1_serializeDocumentItemList(v []types.Item, value smithyjson.Val return nil } +func awsRestjson1_serializeDocumentMetricAttribution(v *types.MetricAttribution, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EventAttributionSource != nil { + ok := object.Key("eventAttributionSource") + ok.String(*v.EventAttributionSource) + } + + return nil +} + func awsRestjson1_serializeDocumentUser(v *types.User, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/personalizeevents/types/types.go b/service/personalizeevents/types/types.go index db7481921e9..27a27c261b0 100644 --- a/service/personalizeevents/types/types.go +++ b/service/personalizeevents/types/types.go @@ -34,13 +34,22 @@ type Event struct { EventValue *float32 // A list of item IDs that represents the sequence of items you have shown the - // user. For example, ["itemId1", "itemId2", "itemId3"]. + // user. For example, ["itemId1", "itemId2", "itemId3"]. Provide a list of items to + // manually record impressions data for an event. For more information on recording + // impressions data, see Recording impressions data + // (https://docs.aws.amazon.com/personalize/latest/dg/recording-events.html#putevents-including-impressions-data). Impression []string // The item ID key that corresponds to the ITEM_ID field of the Interactions // schema. ItemId *string + // Contains information about the metric attribution associated with an event. For + // more information about metric attributions, see Measuring impact of + // recommendations + // (https://docs.aws.amazon.com/personalize/latest/dg/measuring-recommendation-impact.html). + MetricAttribution *MetricAttribution + // A string map of event-specific data that you might choose to record. For // example, if a user rates a movie on your site, other than movie ID (itemId) and // rating (eventValue) , you might also send the number of movie ratings made by @@ -52,7 +61,16 @@ type Event struct { // This value conforms to the media type: application/json Properties *string - // The ID of the recommendation. + // The ID of the list of recommendations that contains the item the user interacted + // with. Provide a recommendationId to have Amazon Personalize implicitly record + // the recommendations you show your user as impressions data. Or provide a + // recommendationId if you use a metric attribution to measure the impact of + // recommendations. For more information on recording impressions data, see + // Recording impressions data + // (https://docs.aws.amazon.com/personalize/latest/dg/recording-events.html#putevents-including-impressions-data). + // For more information on creating a metric attribution see Measuring impact of + // recommendations + // (https://docs.aws.amazon.com/personalize/latest/dg/measuring-recommendation-impact.html). RecommendationId *string noSmithyDocumentSerde @@ -82,6 +100,20 @@ type Item struct { noSmithyDocumentSerde } +// Contains information about a metric attribution associated with an event. For +// more information about metric attributions, see Measuring impact of +// recommendations +// (https://docs.aws.amazon.com/personalize/latest/dg/measuring-recommendation-impact.html). +type MetricAttribution struct { + + // The source of the event, such as a third party. + // + // This member is required. + EventAttributionSource *string + + noSmithyDocumentSerde +} + // Represents user metadata added to a Users dataset using the PutUsers API. For // more information see Importing Users Incrementally // (https://docs.aws.amazon.com/personalize/latest/dg/importing-users.html). diff --git a/service/personalizeevents/validators.go b/service/personalizeevents/validators.go index d8fd14e9eb8..2bf16c564b6 100644 --- a/service/personalizeevents/validators.go +++ b/service/personalizeevents/validators.go @@ -93,6 +93,11 @@ func validateEvent(v *types.Event) error { if v.SentAt == nil { invalidParams.Add(smithy.NewErrParamRequired("SentAt")) } + if v.MetricAttribution != nil { + if err := validateMetricAttribution(v.MetricAttribution); err != nil { + invalidParams.AddNested("MetricAttribution", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -149,6 +154,21 @@ func validateItemList(v []types.Item) error { } } +func validateMetricAttribution(v *types.MetricAttribution) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricAttribution"} + if v.EventAttributionSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("EventAttributionSource")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateUser(v *types.User) error { if v == nil { return nil diff --git a/service/pi/internal/endpoints/endpoints.go b/service/pi/internal/endpoints/endpoints.go index bac5369020a..9d7ec91453c 100644 --- a/service/pi/internal/endpoints/endpoints.go +++ b/service/pi/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/proton/api_op_CreateEnvironment.go b/service/proton/api_op_CreateEnvironment.go index 262fed1cd49..da010c9310c 100644 --- a/service/proton/api_op_CreateEnvironment.go +++ b/service/proton/api_op_CreateEnvironment.go @@ -16,20 +16,14 @@ import ( // services. You can provision environments using the following methods: // // * Amazon -// Web Services-managed provisioning – Proton makes direct calls to provision your +// Web Services-managed provisioning: Proton makes direct calls to provision your // resources. // -// * Self-managed provisioning – Proton makes pull requests on your +// * Self-managed provisioning: Proton makes pull requests on your // repository to provide compiled infrastructure as code (IaC) files that your IaC // engine uses to provision resources. // -// * CodeBuild-based provisioning – Proton -// uses CodeBuild to run shell commands that you provide. Your commands can read -// inputs that Proton provides, and are responsible for provisioning or -// deprovisioning infrastructure and generating output values. -// -// For more -// information, see Environments +// For more information, see Environments // (https://docs.aws.amazon.com/proton/latest/userguide/ag-environments.html) and // Provisioning methods // (https://docs.aws.amazon.com/proton/latest/userguide/ag-works-prov-methods.html) @@ -98,29 +92,28 @@ type CreateEnvironmentInput struct { // A description of the environment that's being created and deployed. Description *string - // The ID of the environment account connection that you provide if you want Proton - // to provision infrastructure resources for your environment or for any of the - // service instances running in it in an environment account. For more information, - // see Environment account connections + // The ID of the environment account connection that you provide if you're + // provisioning your environment infrastructure resources to an environment + // account. For more information, see Environment account connections // (https://docs.aws.amazon.com/proton/latest/userguide/ag-env-account-connections.html) - // in the Proton User guide. If you specify the environmentAccountConnectionId - // parameter, don't specify protonServiceRoleArn, codebuildRoleArn, or - // provisioningRepository. + // in the Proton User guide. To use Amazon Web Services-managed provisioning for + // the environment, specify either the environmentAccountConnectionId or + // protonServiceRoleArn parameter and omit the provisioningRepository parameter. EnvironmentAccountConnectionId *string - // The Amazon Resource Name (ARN) of the IAM service role that allows Proton to - // provision infrastructure using Amazon Web Services-managed provisioning and - // CloudFormation on your behalf. To use Amazon Web Services-managed provisioning - // for the environment or for any service instance running in the environment, - // specify either the environmentAccountConnectionId or protonServiceRoleArn - // parameter. + // The Amazon Resource Name (ARN) of the Proton service role that allows Proton to + // make calls to other services on your behalf. To use Amazon Web Services-managed + // provisioning for the environment, specify either the + // environmentAccountConnectionId or protonServiceRoleArn parameter and omit the + // provisioningRepository parameter. ProtonServiceRoleArn *string // The linked repository that you use to host your rendered infrastructure // templates for self-managed provisioning. A linked repository is a repository // that has been registered with Proton. For more information, see - // CreateRepository. To use self-managed provisioning for the environment or for - // any service instance running in the environment, specify this parameter. + // CreateRepository. To use self-managed provisioning for the environment, specify + // this parameter and omit the environmentAccountConnectionId and + // protonServiceRoleArn parameters. ProvisioningRepository *types.RepositoryBranchInput // An optional list of metadata items that you can associate with the Proton diff --git a/service/proton/api_op_CreateEnvironmentAccountConnection.go b/service/proton/api_op_CreateEnvironmentAccountConnection.go index 7f31256f10e..8fe5a253f0b 100644 --- a/service/proton/api_op_CreateEnvironmentAccountConnection.go +++ b/service/proton/api_op_CreateEnvironmentAccountConnection.go @@ -52,10 +52,9 @@ type CreateEnvironmentAccountConnectionInput struct { // This member is required. ManagementAccountId *string - // The Amazon Resource Name (ARN) of an IAM service role in the environment - // account. Proton uses this role to provision infrastructure resources using - // Amazon Web Services-managed provisioning and CloudFormation in the associated - // environment account. + // The Amazon Resource Name (ARN) of the IAM service role that's created in the + // environment account. Proton uses this role to provision infrastructure resources + // in the associated environment account. // // This member is required. RoleArn *string @@ -70,12 +69,12 @@ type CreateEnvironmentAccountConnectionInput struct { // CodeBuild-based provisioning in the associated environment account. CodebuildRoleArn *string - // The Amazon Resource Name (ARN) of an IAM service role in the environment - // account. Proton uses this role to provision directly defined components in the - // associated environment account. It determines the scope of infrastructure that a - // component can provision in the account. You must specify componentRoleArn to - // allow directly defined components to be associated with any environments running - // in this account. For more information about components, see Proton components + // The Amazon Resource Name (ARN) of the IAM service role that Proton uses when + // provisioning directly defined components in the associated environment account. + // It determines the scope of infrastructure that a component can provision in the + // account. You must specify componentRoleArn to allow directly defined components + // to be associated with any environments running in this account. For more + // information about components, see Proton components // (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html) in the // Proton User Guide. ComponentRoleArn *string diff --git a/service/proton/api_op_ListServiceInstances.go b/service/proton/api_op_ListServiceInstances.go index e6da5de6fc6..c738a3ac83e 100644 --- a/service/proton/api_op_ListServiceInstances.go +++ b/service/proton/api_op_ListServiceInstances.go @@ -12,7 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// List service instances with summary data. +// List service instances with summary data. This action lists service instances of +// all services in the Amazon Web Services account. func (c *Client) ListServiceInstances(ctx context.Context, params *ListServiceInstancesInput, optFns ...func(*Options)) (*ListServiceInstancesOutput, error) { if params == nil { params = &ListServiceInstancesInput{} @@ -30,6 +31,10 @@ func (c *Client) ListServiceInstances(ctx context.Context, params *ListServiceIn type ListServiceInstancesInput struct { + // An array of filtering criteria that scope down the result list. By default, all + // service instances in the Amazon Web Services account are returned. + Filters []types.ListServiceInstancesFilter + // The maximum number of service instances to list. MaxResults *int32 @@ -40,6 +45,14 @@ type ListServiceInstancesInput struct { // The name of the service that the service instance belongs to. ServiceName *string + // The field that the result list is sorted by. When you choose to sort by + // serviceName, service instances within each service are sorted by service + // instance name. Default: serviceName + SortBy types.ListServiceInstancesSortBy + + // Result list sort order. Default: ASCENDING + SortOrder types.SortOrder + noSmithyDocumentSerde } diff --git a/service/proton/api_op_NotifyResourceDeploymentStatusChange.go b/service/proton/api_op_NotifyResourceDeploymentStatusChange.go index 05edf27bb7d..db1013f38ec 100644 --- a/service/proton/api_op_NotifyResourceDeploymentStatusChange.go +++ b/service/proton/api_op_NotifyResourceDeploymentStatusChange.go @@ -11,20 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Notify Proton of the following information related to a provisioned resource -// (environment, service instance, or service pipeline): -// -// * For CodeBuild-based -// provisioning -// (https://docs.aws.amazon.com/proton/latest/userguide/ag-works-prov-methods.html#ag-works-prov-methods-codebuild), -// provide your provisioned resource output values to Proton. -// -// * For self-managed -// provisioning -// (https://docs.aws.amazon.com/proton/latest/userguide/ag-works-prov-methods.html#ag-works-prov-methods-self), -// notify Proton about the status of your provisioned resource. To disambiguate -// between different deployments of the same resource, set deploymentId to a unique -// deployment ID of your choice. +// Notify Proton of status changes to a provisioned resource when you use +// self-managed provisioning. For more information, see Self-managed provisioning +// (https://docs.aws.amazon.com/proton/latest/userguide/ag-works-prov-methods.html#ag-works-prov-methods-self) +// in the Proton User Guide. func (c *Client) NotifyResourceDeploymentStatusChange(ctx context.Context, params *NotifyResourceDeploymentStatusChangeInput, optFns ...func(*Options)) (*NotifyResourceDeploymentStatusChangeOutput, error) { if params == nil { params = &NotifyResourceDeploymentStatusChangeInput{} @@ -42,17 +32,15 @@ func (c *Client) NotifyResourceDeploymentStatusChange(ctx context.Context, param type NotifyResourceDeploymentStatusChangeInput struct { - // The Amazon Resource Name (ARN) of your provisioned resource. + // The provisioned resource Amazon Resource Name (ARN). // // This member is required. ResourceArn *string - // The deployment ID for your provisioned resource. Proton uses it to disambiguate - // different deployments of the resource. Applicable to self-managed provisioning - // (https://docs.aws.amazon.com/proton/latest/userguide/ag-works-prov-methods.html#ag-works-prov-methods-self). + // The deployment ID for your provisioned resource. DeploymentId *string - // The output values generated by your provisioned resource. + // The provisioned resource state change detail data that's returned by Proton. Outputs []types.Output // The status of your provisioned resource. diff --git a/service/proton/api_op_UpdateEnvironment.go b/service/proton/api_op_UpdateEnvironment.go index 997085a0cb1..82c3e034ef1 100644 --- a/service/proton/api_op_UpdateEnvironment.go +++ b/service/proton/api_op_UpdateEnvironment.go @@ -12,22 +12,23 @@ import ( ) // Update an environment. If the environment is associated with an environment -// account connection, don't update or include the protonServiceRoleArn, -// codebuildRoleArn, and provisioningRepository parameters. You can only update to -// a new environment account connection if that connection was created in the same -// environment account that the current environment account connection was created -// in. The account connection must also be associated with the current environment. -// If the environment isn't associated with an environment account connection, -// don't update or include the environmentAccountConnectionId parameter. You can't -// update or connect the environment to an environment account connection if it -// isn't already associated with an environment connection. You can update either -// environmentAccountConnectionId or one or more of protonServiceRoleArn, -// codebuildRoleArn, and provisioningRepository. If the environment was configured -// for Amazon Web Services-managed or CodeBuild-based provisioning, omit the -// provisioningRepository parameter. If the environment was configured for -// self-managed provisioning, specify the provisioningRepository parameter and omit -// the protonServiceRoleArn, codebuildRoleArn, and provisioningRepository -// parameters. For more information, see Environments +// account connection, don't update or include the protonServiceRoleArn and +// provisioningRepository parameter to update or connect to an environment account +// connection. You can only update to a new environment account connection if that +// connection was created in the same environment account that the current +// environment account connection was created in. The account connection must also +// be associated with the current environment. If the environment isn't associated +// with an environment account connection, don't update or include the +// environmentAccountConnectionId parameter. You can't update or connect the +// environment to an environment account connection if it isn't already associated +// with an environment connection. You can update either the +// environmentAccountConnectionId or protonServiceRoleArn parameter and value. You +// can’t update both. If the environment was configured for Amazon Web +// Services-managed provisioning, omit the provisioningRepository parameter. If the +// environment was configured for self-managed provisioning, specify the +// provisioningRepository parameter and omit the protonServiceRoleArn and +// environmentAccountConnectionId parameters. For more information, see +// Environments // (https://docs.aws.amazon.com/proton/latest/userguide/ag-environments.html) and // Provisioning methods // (https://docs.aws.amazon.com/proton/latest/userguide/ag-works-prov-methods.html) @@ -100,20 +101,14 @@ type UpdateEnvironmentInput struct { // A description of the environment update. Description *string - // The ID of the environment account connection that you provide if you want Proton - // to provision infrastructure resources for your environment or for any of the - // service instances running in it in an environment account. For more information, - // see Environment account connections - // (https://docs.aws.amazon.com/proton/latest/userguide/ag-env-account-connections.html) - // in the Proton User guide. You can only update to a new environment account - // connection if it was created in the same environment account that the current - // environment account connection was created in and is associated with the current - // environment. + // The ID of the environment account connection. You can only update to a new + // environment account connection if it was created in the same environment account + // that the current environment account connection was created in and is associated + // with the current environment. EnvironmentAccountConnectionId *string - // The Amazon Resource Name (ARN) of the IAM service role that allows Proton to - // provision infrastructure using Amazon Web Services-managed provisioning and - // CloudFormation on your behalf. + // The Amazon Resource Name (ARN) of the Proton service role that allows Proton to + // make API calls to other services your behalf. ProtonServiceRoleArn *string // The linked repository that you use to host your rendered infrastructure diff --git a/service/proton/api_op_UpdateEnvironmentAccountConnection.go b/service/proton/api_op_UpdateEnvironmentAccountConnection.go index 2db435ad702..17ccf2a9122 100644 --- a/service/proton/api_op_UpdateEnvironmentAccountConnection.go +++ b/service/proton/api_op_UpdateEnvironmentAccountConnection.go @@ -52,10 +52,8 @@ type UpdateEnvironmentAccountConnectionInput struct { // Proton User Guide. ComponentRoleArn *string - // The Amazon Resource Name (ARN) of an IAM service role in the environment - // account. Proton uses this role to provision infrastructure resources using - // Amazon Web Services-managed provisioning and CloudFormation in the associated - // environment account. + // The Amazon Resource Name (ARN) of the IAM service role that's associated with + // the environment account connection to update. RoleArn *string noSmithyDocumentSerde diff --git a/service/proton/serializers.go b/service/proton/serializers.go index 6296aba63dd..a7afa9d2624 100644 --- a/service/proton/serializers.go +++ b/service/proton/serializers.go @@ -4210,6 +4210,36 @@ func awsAwsjson10_serializeDocumentEnvironmentTemplateFilterList(v []types.Envir return nil } +func awsAwsjson10_serializeDocumentListServiceInstancesFilter(v *types.ListServiceInstancesFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("key") + ok.String(string(v.Key)) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson10_serializeDocumentListServiceInstancesFilterList(v []types.ListServiceInstancesFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentListServiceInstancesFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson10_serializeDocumentOutput(v *types.Output, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5554,6 +5584,13 @@ func awsAwsjson10_serializeOpDocumentListServiceInstancesInput(v *ListServiceIns object := value.Object() defer object.Close() + if v.Filters != nil { + ok := object.Key("filters") + if err := awsAwsjson10_serializeDocumentListServiceInstancesFilterList(v.Filters, ok); err != nil { + return err + } + } + if v.MaxResults != nil { ok := object.Key("maxResults") ok.Integer(*v.MaxResults) @@ -5569,6 +5606,16 @@ func awsAwsjson10_serializeOpDocumentListServiceInstancesInput(v *ListServiceIns ok.String(*v.ServiceName) } + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + return nil } diff --git a/service/proton/types/enums.go b/service/proton/types/enums.go index 9899ec31491..352790c3781 100644 --- a/service/proton/types/enums.go +++ b/service/proton/types/enums.go @@ -113,6 +113,68 @@ func (EnvironmentAccountConnectionStatus) Values() []EnvironmentAccountConnectio } } +type ListServiceInstancesFilterBy string + +// Enum values for ListServiceInstancesFilterBy +const ( + ListServiceInstancesFilterByName ListServiceInstancesFilterBy = "name" + ListServiceInstancesFilterByDeploymentStatus ListServiceInstancesFilterBy = "deploymentStatus" + ListServiceInstancesFilterByTemplateName ListServiceInstancesFilterBy = "templateName" + ListServiceInstancesFilterByServiceName ListServiceInstancesFilterBy = "serviceName" + ListServiceInstancesFilterByDeployedTemplateVersionStatus ListServiceInstancesFilterBy = "deployedTemplateVersionStatus" + ListServiceInstancesFilterByEnvironmentName ListServiceInstancesFilterBy = "environmentName" + ListServiceInstancesFilterByLastDeploymentAttemptedAtBefore ListServiceInstancesFilterBy = "lastDeploymentAttemptedAtBefore" + ListServiceInstancesFilterByLastDeploymentAttemptedAtAfter ListServiceInstancesFilterBy = "lastDeploymentAttemptedAtAfter" + ListServiceInstancesFilterByCreatedAtBefore ListServiceInstancesFilterBy = "createdAtBefore" + ListServiceInstancesFilterByCreatedAtAfter ListServiceInstancesFilterBy = "createdAtAfter" +) + +// Values returns all known values for ListServiceInstancesFilterBy. 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 (ListServiceInstancesFilterBy) Values() []ListServiceInstancesFilterBy { + return []ListServiceInstancesFilterBy{ + "name", + "deploymentStatus", + "templateName", + "serviceName", + "deployedTemplateVersionStatus", + "environmentName", + "lastDeploymentAttemptedAtBefore", + "lastDeploymentAttemptedAtAfter", + "createdAtBefore", + "createdAtAfter", + } +} + +type ListServiceInstancesSortBy string + +// Enum values for ListServiceInstancesSortBy +const ( + ListServiceInstancesSortByName ListServiceInstancesSortBy = "name" + ListServiceInstancesSortByDeploymentStatus ListServiceInstancesSortBy = "deploymentStatus" + ListServiceInstancesSortByTemplateName ListServiceInstancesSortBy = "templateName" + ListServiceInstancesSortByServiceName ListServiceInstancesSortBy = "serviceName" + ListServiceInstancesSortByEnvironmentName ListServiceInstancesSortBy = "environmentName" + ListServiceInstancesSortByLastDeploymentAttemptedAt ListServiceInstancesSortBy = "lastDeploymentAttemptedAt" + ListServiceInstancesSortByCreatedAt ListServiceInstancesSortBy = "createdAt" +) + +// Values returns all known values for ListServiceInstancesSortBy. 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 (ListServiceInstancesSortBy) Values() []ListServiceInstancesSortBy { + return []ListServiceInstancesSortBy{ + "name", + "deploymentStatus", + "templateName", + "serviceName", + "environmentName", + "lastDeploymentAttemptedAt", + "createdAt", + } +} + type ProvisionedResourceEngine string // Enum values for ProvisionedResourceEngine @@ -302,6 +364,24 @@ func (ServiceTemplateSupportedComponentSourceType) Values() []ServiceTemplateSup } } +type SortOrder string + +// Enum values for SortOrder +const ( + SortOrderAscending SortOrder = "ASCENDING" + SortOrderDescending SortOrder = "DESCENDING" +) + +// Values returns all known values for SortOrder. 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 (SortOrder) Values() []SortOrder { + return []SortOrder{ + "ASCENDING", + "DESCENDING", + } +} + type SyncType string // Enum values for SyncType diff --git a/service/proton/types/types.go b/service/proton/types/types.go index e26b077dd46..6caf4612229 100644 --- a/service/proton/types/types.go +++ b/service/proton/types/types.go @@ -22,9 +22,9 @@ type AccountSettings struct { // Proton. For more information, see CreateRepository. PipelineProvisioningRepository *RepositoryBranch - // The Amazon Resource Name (ARN) of the service role that Proton uses for - // provisioning pipelines. Proton assumes this role for Amazon Web Services-managed - // provisioning. + // The Amazon Resource Name (ARN) of the service role you want to use for + // provisioning pipelines. Assumed by Proton for Amazon Web Services-managed + // provisioning, and by customer-owned automation for self-managed provisioning. PipelineServiceRoleArn *string noSmithyDocumentSerde @@ -252,7 +252,7 @@ type Environment struct { // The description of the environment. Description *string - // The ID of the environment account connection that Proton uses to provision + // The ID of the environment account connection that's used to provision // infrastructure resources in an environment account. EnvironmentAccountConnectionId *string @@ -260,9 +260,8 @@ type Environment struct { // are provisioned in. EnvironmentAccountId *string - // The Amazon Resource Name (ARN) of the IAM service role that allows Proton to - // provision infrastructure using Amazon Web Services-managed provisioning and - // CloudFormation on your behalf. + // The Amazon Resource Name (ARN) of the Proton service role that allows Proton to + // make calls to other services on your behalf. ProtonServiceRoleArn *string // When included, indicates that the environment template is for customer @@ -323,10 +322,7 @@ type EnvironmentAccountConnection struct { // This member is required. RequestedAt *time.Time - // The Amazon Resource Name (ARN) of an IAM service role in the environment - // account. Proton uses this role to provision infrastructure resources using - // Amazon Web Services-managed provisioning and CloudFormation in the associated - // environment account. + // The IAM service role that's associated with the environment account connection. // // This member is required. RoleArn *string @@ -706,6 +702,22 @@ type EnvironmentTemplateVersionSummary struct { noSmithyDocumentSerde } +// A filtering criterion to scope down the result list of the ListServiceInstances +// action. +type ListServiceInstancesFilter struct { + + // The name of a filtering criterion. + Key ListServiceInstancesFilterBy + + // A value to filter by. With the date/time keys (*At{Before,After}), the value is + // a valid RFC 3339 (https://datatracker.ietf.org/doc/html/rfc3339.html) string + // with no UTC offset and with an optional fractional precision (for example, + // 1985-04-12T23:20:50.52Z). + Value *string + + noSmithyDocumentSerde +} + // An infrastructure as code defined resource output. type Output struct { diff --git a/service/rbin/internal/endpoints/endpoints.go b/service/rbin/internal/endpoints/endpoints.go index 16e00e4d2e3..e9795478da1 100644 --- a/service/rbin/internal/endpoints/endpoints.go +++ b/service/rbin/internal/endpoints/endpoints.go @@ -183,6 +183,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/rds/api_op_CreateCustomDBEngineVersion.go b/service/rds/api_op_CreateCustomDBEngineVersion.go index f2a3c87fafe..548c2bc66c8 100644 --- a/service/rds/api_op_CreateCustomDBEngineVersion.go +++ b/service/rds/api_op_CreateCustomDBEngineVersion.go @@ -135,6 +135,15 @@ type CreateCustomDBEngineVersionOutput struct { // The creation time of the DB engine version. CreateTime *time.Time + // JSON string that lists the installation files and parameters that RDS Custom + // uses to create a custom engine version (CEV). RDS Custom applies the patches in + // the order in which they're listed in the manifest. You can set the Oracle home, + // Oracle base, and UNIX/Linux user and group using the installation parameters. + // For more information, see JSON fields in the CEV manifest + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.preparing.html#custom-cev.preparing.manifest.fields) + // in the Amazon RDS User Guide. + CustomDBEngineVersionManifest *string + // The description of the database engine. DBEngineDescription *string diff --git a/service/rds/api_op_CreateDBCluster.go b/service/rds/api_op_CreateDBCluster.go index c2b15038cd2..e6ec6b317ab 100644 --- a/service/rds/api_op_CreateDBCluster.go +++ b/service/rds/api_op_CreateDBCluster.go @@ -146,6 +146,9 @@ type CreateDBClusterInput struct { // DB clusters and Multi-AZ DB clusters DBSubnetGroupName *string + // Reserved for future use. + DBSystemId *string + // The name for your database of up to 64 alphanumeric characters. If you do not // provide a name, Amazon RDS doesn't create a database in the DB cluster you are // creating. Valid for: Aurora DB clusters and Multi-AZ DB clusters diff --git a/service/rds/api_op_DeleteCustomDBEngineVersion.go b/service/rds/api_op_DeleteCustomDBEngineVersion.go index 97211a54e47..bb376bfb514 100644 --- a/service/rds/api_op_DeleteCustomDBEngineVersion.go +++ b/service/rds/api_op_DeleteCustomDBEngineVersion.go @@ -71,6 +71,15 @@ type DeleteCustomDBEngineVersionOutput struct { // The creation time of the DB engine version. CreateTime *time.Time + // JSON string that lists the installation files and parameters that RDS Custom + // uses to create a custom engine version (CEV). RDS Custom applies the patches in + // the order in which they're listed in the manifest. You can set the Oracle home, + // Oracle base, and UNIX/Linux user and group using the installation parameters. + // For more information, see JSON fields in the CEV manifest + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.preparing.html#custom-cev.preparing.manifest.fields) + // in the Amazon RDS User Guide. + CustomDBEngineVersionManifest *string + // The description of the database engine. DBEngineDescription *string diff --git a/service/rds/api_op_ModifyCustomDBEngineVersion.go b/service/rds/api_op_ModifyCustomDBEngineVersion.go index a88713e2bff..f2250b1270a 100644 --- a/service/rds/api_op_ModifyCustomDBEngineVersion.go +++ b/service/rds/api_op_ModifyCustomDBEngineVersion.go @@ -76,6 +76,15 @@ type ModifyCustomDBEngineVersionOutput struct { // The creation time of the DB engine version. CreateTime *time.Time + // JSON string that lists the installation files and parameters that RDS Custom + // uses to create a custom engine version (CEV). RDS Custom applies the patches in + // the order in which they're listed in the manifest. You can set the Oracle home, + // Oracle base, and UNIX/Linux user and group using the installation parameters. + // For more information, see JSON fields in the CEV manifest + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.preparing.html#custom-cev.preparing.manifest.fields) + // in the Amazon RDS User Guide. + CustomDBEngineVersionManifest *string + // The description of the database engine. DBEngineDescription *string diff --git a/service/rds/deserializers.go b/service/rds/deserializers.go index 4d45b2ee501..314d8e911bd 100644 --- a/service/rds/deserializers.go +++ b/service/rds/deserializers.go @@ -22050,6 +22050,40 @@ func awsAwsquery_deserializeDocumentClusterPendingModifiedValues(v **types.Clust originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("AllocatedStorage", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.AllocatedStorage = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("BackupRetentionPeriod", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.BackupRetentionPeriod = ptr.Int32(int32(i64)) + } + case strings.EqualFold("DBClusterIdentifier", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -22092,6 +22126,23 @@ func awsAwsquery_deserializeDocumentClusterPendingModifiedValues(v **types.Clust sv.IAMDatabaseAuthenticationEnabled = ptr.Bool(xtv) } + case strings.EqualFold("Iops", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Iops = ptr.Int32(int32(i64)) + } + case strings.EqualFold("MasterUserPassword", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -22815,6 +22866,19 @@ func awsAwsquery_deserializeDocumentDBCluster(v **types.DBCluster, decoder smith sv.DBSubnetGroup = ptr.String(xtv) } + case strings.EqualFold("DBSystemId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DBSystemId = ptr.String(xtv) + } + case strings.EqualFold("DeletionProtection", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -25072,6 +25136,19 @@ func awsAwsquery_deserializeDocumentDBClusterSnapshot(v **types.DBClusterSnapsho sv.DBClusterSnapshotIdentifier = ptr.String(xtv) } + case strings.EqualFold("DBSystemId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DBSystemId = ptr.String(xtv) + } + case strings.EqualFold("Engine", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -25688,6 +25765,19 @@ func awsAwsquery_deserializeDocumentDBEngineVersion(v **types.DBEngineVersion, d sv.CreateTime = ptr.Time(t) } + case strings.EqualFold("CustomDBEngineVersionManifest", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CustomDBEngineVersionManifest = ptr.String(xtv) + } + case strings.EqualFold("DatabaseInstallationFilesS3BucketName", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -26478,6 +26568,19 @@ func awsAwsquery_deserializeDocumentDBInstance(v **types.DBInstance, decoder smi return err } + case strings.EqualFold("DBSystemId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DBSystemId = ptr.String(xtv) + } + case strings.EqualFold("DeletionProtection", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -44905,6 +45008,19 @@ func awsAwsquery_deserializeOpDocumentCreateCustomDBEngineVersionOutput(v **Crea sv.CreateTime = ptr.Time(t) } + case strings.EqualFold("CustomDBEngineVersionManifest", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CustomDBEngineVersionManifest = ptr.String(xtv) + } + case strings.EqualFold("DatabaseInstallationFilesS3BucketName", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -45975,6 +46091,19 @@ func awsAwsquery_deserializeOpDocumentDeleteCustomDBEngineVersionOutput(v **Dele sv.CreateTime = ptr.Time(t) } + case strings.EqualFold("CustomDBEngineVersionManifest", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CustomDBEngineVersionManifest = ptr.String(xtv) + } + case strings.EqualFold("DatabaseInstallationFilesS3BucketName", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -49346,6 +49475,19 @@ func awsAwsquery_deserializeOpDocumentModifyCustomDBEngineVersionOutput(v **Modi sv.CreateTime = ptr.Time(t) } + case strings.EqualFold("CustomDBEngineVersionManifest", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CustomDBEngineVersionManifest = ptr.String(xtv) + } + case strings.EqualFold("DatabaseInstallationFilesS3BucketName", t.Name.Local): val, err := decoder.Value() if err != nil { diff --git a/service/rds/internal/endpoints/endpoints.go b/service/rds/internal/endpoints/endpoints.go index 0c5169f050a..d9be1b70a14 100644 --- a/service/rds/internal/endpoints/endpoints.go +++ b/service/rds/internal/endpoints/endpoints.go @@ -192,6 +192,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/rds/serializers.go b/service/rds/serializers.go index 4fcfc16d143..767b3b44ef6 100644 --- a/service/rds/serializers.go +++ b/service/rds/serializers.go @@ -9949,6 +9949,11 @@ func awsAwsquery_serializeOpDocumentCreateDBClusterInput(v *CreateDBClusterInput objectKey.String(*v.DBSubnetGroupName) } + if v.DBSystemId != nil { + objectKey := object.Key("DBSystemId") + objectKey.String(*v.DBSystemId) + } + if v.DeletionProtection != nil { objectKey := object.Key("DeletionProtection") objectKey.Boolean(*v.DeletionProtection) diff --git a/service/rds/types/types.go b/service/rds/types/types.go index a9a05089846..f1fb3a0d089 100644 --- a/service/rds/types/types.go +++ b/service/rds/types/types.go @@ -211,6 +211,14 @@ type CloudwatchLogsExportConfiguration struct { // and contains changes that will be applied during the next maintenance window. type ClusterPendingModifiedValues struct { + // The allocated storage size in gibibytes (GiB) for all database engines except + // Amazon Aurora. For Aurora, AllocatedStorage always returns 1, because Aurora DB + // cluster storage size isn't fixed, but instead automatically adjusts as needed. + AllocatedStorage *int32 + + // The number of days for which automatic DB snapshots are retained. + BackupRetentionPeriod *int32 + // The DBClusterIdentifier value for the DB cluster. DBClusterIdentifier *string @@ -221,6 +229,10 @@ type ClusterPendingModifiedValues struct { // Access Management (IAM) accounts to database accounts is enabled. IAMDatabaseAuthenticationEnabled *bool + // The Provisioned IOPS (I/O operations per second) value. This setting is only for + // non-Aurora Multi-AZ DB clusters. + Iops *int32 + // The master credentials for the DB cluster. MasterUserPassword *string @@ -442,6 +454,9 @@ type DBCluster struct { // including the name, description, and subnets in the subnet group. DBSubnetGroup *string + // Reserved for future use. + DBSystemId *string + // Contains the name of the initial database of this DB cluster that was provided // at create time, if one was specified when the DB cluster was created. This same // name is returned for the life of the DB cluster. @@ -885,6 +900,9 @@ type DBClusterSnapshot struct { // Specifies the identifier for the DB cluster snapshot. DBClusterSnapshotIdentifier *string + // Reserved for future use. + DBSystemId *string + // Specifies the name of the database engine for this DB cluster snapshot. Engine *string @@ -998,6 +1016,15 @@ type DBEngineVersion struct { // The creation time of the DB engine version. CreateTime *time.Time + // JSON string that lists the installation files and parameters that RDS Custom + // uses to create a custom engine version (CEV). RDS Custom applies the patches in + // the order in which they're listed in the manifest. You can set the Oracle home, + // Oracle base, and UNIX/Linux user and group using the installation parameters. + // For more information, see JSON fields in the CEV manifest + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.preparing.html#custom-cev.preparing.manifest.fields) + // in the Amazon RDS User Guide. + CustomDBEngineVersionManifest *string + // The description of the database engine. DBEngineDescription *string @@ -1250,6 +1277,10 @@ type DBInstance struct { // including the name, description, and subnets in the subnet group. DBSubnetGroup *DBSubnetGroup + // The Oracle system ID (Oracle SID) for a container database (CDB). The Oracle SID + // is also the name of the CDB. This setting is valid for RDS Custom only. + DBSystemId *string + // Specifies the port that the DB instance listens on. If the DB instance is part // of a DB cluster, this can be a different port than the DB cluster port. DbInstancePort int32 diff --git a/service/redshift/internal/endpoints/endpoints.go b/service/redshift/internal/endpoints/endpoints.go index 962a7a73622..46fe178129b 100644 --- a/service/redshift/internal/endpoints/endpoints.go +++ b/service/redshift/internal/endpoints/endpoints.go @@ -183,6 +183,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/resourcegroupstaggingapi/internal/endpoints/endpoints.go b/service/resourcegroupstaggingapi/internal/endpoints/endpoints.go index 37fcf007257..4fa42687e49 100644 --- a/service/resourcegroupstaggingapi/internal/endpoints/endpoints.go +++ b/service/resourcegroupstaggingapi/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/s3/internal/endpoints/endpoints.go b/service/s3/internal/endpoints/endpoints.go index 3d1aea32fc2..c9e18369ad8 100644 --- a/service/s3/internal/endpoints/endpoints.go +++ b/service/s3/internal/endpoints/endpoints.go @@ -296,6 +296,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "s3.dualstack.eu-south-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "s3.dualstack.eu-south-2.amazonaws.com", + }, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{ diff --git a/service/s3control/internal/endpoints/s3/endpoints.go b/service/s3control/internal/endpoints/s3/endpoints.go index 5c340750160..de131352a71 100644 --- a/service/s3control/internal/endpoints/s3/endpoints.go +++ b/service/s3control/internal/endpoints/s3/endpoints.go @@ -294,6 +294,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "s3.dualstack.eu-south-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "s3.dualstack.eu-south-2.amazonaws.com", + }, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{ diff --git a/service/secretsmanager/internal/endpoints/endpoints.go b/service/secretsmanager/internal/endpoints/endpoints.go index 8792df89183..08f99f26cfe 100644 --- a/service/secretsmanager/internal/endpoints/endpoints.go +++ b/service/secretsmanager/internal/endpoints/endpoints.go @@ -192,6 +192,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/sfn/internal/endpoints/endpoints.go b/service/sfn/internal/endpoints/endpoints.go index 0f5fbf443a1..4e3d90da16c 100644 --- a/service/sfn/internal/endpoints/endpoints.go +++ b/service/sfn/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/sns/internal/endpoints/endpoints.go b/service/sns/internal/endpoints/endpoints.go index addfbf1583d..13d7c35aa26 100644 --- a/service/sns/internal/endpoints/endpoints.go +++ b/service/sns/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/sqs/internal/endpoints/endpoints.go b/service/sqs/internal/endpoints/endpoints.go index bdc0259e912..6ebd4d3089f 100644 --- a/service/sqs/internal/endpoints/endpoints.go +++ b/service/sqs/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/ssm/api_op_CreateActivation.go b/service/ssm/api_op_CreateActivation.go index 232d9927c54..e2cdcf01972 100644 --- a/service/ssm/api_op_CreateActivation.go +++ b/service/ssm/api_op_CreateActivation.go @@ -46,7 +46,8 @@ type CreateActivationInput struct { // for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com. // For more information, see Create an IAM service role for a hybrid environment // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html) - // in the Amazon Web Services Systems Manager User Guide. + // in the Amazon Web Services Systems Manager User Guide. You can't specify an IAM + // service-linked role for this parameter. You must create a unique role. // // This member is required. IamRole *string diff --git a/service/ssm/api_op_CreateOpsItem.go b/service/ssm/api_op_CreateOpsItem.go index d5ce9289f7f..906d701bfe2 100644 --- a/service/ssm/api_op_CreateOpsItem.go +++ b/service/ssm/api_op_CreateOpsItem.go @@ -57,6 +57,14 @@ type CreateOpsItemInput struct { // This member is required. Title *string + // The target Amazon Web Services account where you want to create an OpsItem. To + // make this call, your account must be configured to work with OpsItems across + // accounts. For more information, see Setting up OpsCenter to work with OpsItems + // across accounts + // (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-OpsCenter-multiple-accounts.html) + // in the Amazon Web Services Systems Manager User Guide. + AccountId *string + // The time a runbook workflow ended. Currently reported only for the OpsItem type // /aws/changerequest. ActualEndTime *time.Time @@ -91,8 +99,18 @@ type CreateOpsItemInput struct { // in the Amazon Web Services Systems Manager User Guide. OperationalData map[string]types.OpsItemDataValue - // The type of OpsItem to create. Currently, the only valid values are - // /aws/changerequest and /aws/issue. + // The type of OpsItem to create. Systems Manager supports the following types of + // OpsItems: + // + // * /aws/issue This type of OpsItem is used for default OpsItems + // created by OpsCenter. + // + // * /aws/changerequest This type of OpsItem is used by + // Change Manager for reviewing and approving or rejecting change requests. + // + // * + // /aws/insights This type of OpsItem is used by OpsCenter for aggregating and + // reporting on duplicate OpsItems. OpsItemType *string // The time specified in a change request for a runbook workflow to end. Currently @@ -130,6 +148,9 @@ type CreateOpsItemInput struct { type CreateOpsItemOutput struct { + // The OpsItem Amazon Resource Name (ARN). + OpsItemArn *string + // The ID of the OpsItem. OpsItemId *string diff --git a/service/ssm/api_op_DeleteResourcePolicy.go b/service/ssm/api_op_DeleteResourcePolicy.go new file mode 100644 index 00000000000..65af656626d --- /dev/null +++ b/service/ssm/api_op_DeleteResourcePolicy.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a Systems Manager resource policy. A resource policy helps you to define +// the IAM entity (for example, an Amazon Web Services account) that can manage +// your Systems Manager resources. Currently, OpsItemGroup is the only resource +// that supports Systems Manager resource policies. The resource policy for +// OpsItemGroup enables Amazon Web Services accounts to view and interact with +// OpsCenter operational work items (OpsItems). +func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) { + if params == nil { + params = &DeleteResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResourcePolicyInput struct { + + // ID of the current policy version. The hash helps to prevent multiple calls from + // attempting to overwrite a policy. + // + // This member is required. + PolicyHash *string + + // The policy ID. + // + // This member is required. + PolicyId *string + + // Amazon Resource Name (ARN) of the resource to which the policies are attached. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type DeleteResourcePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm", + OperationName: "DeleteResourcePolicy", + } +} diff --git a/service/ssm/api_op_GetOpsItem.go b/service/ssm/api_op_GetOpsItem.go index ba4475fecce..387e055dcb8 100644 --- a/service/ssm/api_op_GetOpsItem.go +++ b/service/ssm/api_op_GetOpsItem.go @@ -44,6 +44,9 @@ type GetOpsItemInput struct { // This member is required. OpsItemId *string + // The OpsItem Amazon Resource Name (ARN). + OpsItemArn *string + noSmithyDocumentSerde } diff --git a/service/ssm/api_op_GetResourcePolicies.go b/service/ssm/api_op_GetResourcePolicies.go new file mode 100644 index 00000000000..dc527ef6994 --- /dev/null +++ b/service/ssm/api_op_GetResourcePolicies.go @@ -0,0 +1,225 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns an array of the Policy object. +func (c *Client) GetResourcePolicies(ctx context.Context, params *GetResourcePoliciesInput, optFns ...func(*Options)) (*GetResourcePoliciesOutput, error) { + if params == nil { + params = &GetResourcePoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResourcePolicies", params, optFns, c.addOperationGetResourcePoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResourcePoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResourcePoliciesInput struct { + + // Amazon Resource Name (ARN) of the resource to which the policies are attached. + // + // This member is required. + ResourceArn *string + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type GetResourcePoliciesOutput struct { + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // An array of the Policy object. + Policies []types.GetResourcePoliciesResponseEntry + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetResourcePolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetResourcePolicies{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetResourcePoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// GetResourcePoliciesAPIClient is a client that implements the GetResourcePolicies +// operation. +type GetResourcePoliciesAPIClient interface { + GetResourcePolicies(context.Context, *GetResourcePoliciesInput, ...func(*Options)) (*GetResourcePoliciesOutput, error) +} + +var _ GetResourcePoliciesAPIClient = (*Client)(nil) + +// GetResourcePoliciesPaginatorOptions is the paginator options for +// GetResourcePolicies +type GetResourcePoliciesPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetResourcePoliciesPaginator is a paginator for GetResourcePolicies +type GetResourcePoliciesPaginator struct { + options GetResourcePoliciesPaginatorOptions + client GetResourcePoliciesAPIClient + params *GetResourcePoliciesInput + nextToken *string + firstPage bool +} + +// NewGetResourcePoliciesPaginator returns a new GetResourcePoliciesPaginator +func NewGetResourcePoliciesPaginator(client GetResourcePoliciesAPIClient, params *GetResourcePoliciesInput, optFns ...func(*GetResourcePoliciesPaginatorOptions)) *GetResourcePoliciesPaginator { + if params == nil { + params = &GetResourcePoliciesInput{} + } + + options := GetResourcePoliciesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetResourcePoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetResourcePoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetResourcePolicies page. +func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetResourcePoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.GetResourcePolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opGetResourcePolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm", + OperationName: "GetResourcePolicies", + } +} diff --git a/service/ssm/api_op_PutResourcePolicy.go b/service/ssm/api_op_PutResourcePolicy.go new file mode 100644 index 00000000000..61bd4fe9355 --- /dev/null +++ b/service/ssm/api_op_PutResourcePolicy.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates a Systems Manager resource policy. A resource policy helps +// you to define the IAM entity (for example, an Amazon Web Services account) that +// can manage your Systems Manager resources. Currently, OpsItemGroup is the only +// resource that supports Systems Manager resource policies. The resource policy +// for OpsItemGroup enables Amazon Web Services accounts to view and interact with +// OpsCenter operational work items (OpsItems). +func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolicyInput, optFns ...func(*Options)) (*PutResourcePolicyOutput, error) { + if params == nil { + params = &PutResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutResourcePolicy", params, optFns, c.addOperationPutResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutResourcePolicyInput struct { + + // A policy you want to associate with a resource. + // + // This member is required. + Policy *string + + // Amazon Resource Name (ARN) of the resource to which the policies are attached. + // + // This member is required. + ResourceArn *string + + // ID of the current policy version. The hash helps to prevent a situation where + // multiple users attempt to overwrite a policy. + PolicyHash *string + + // The policy ID. + PolicyId *string + + noSmithyDocumentSerde +} + +type PutResourcePolicyOutput struct { + + // ID of the current policy version. The hash helps to prevent a situation where + // multiple users attempt to overwrite a policy. You must provide this hash when + // updating or deleting a policy. + PolicyHash *string + + // The policy ID. To update a policy, you must specify PolicyId and PolicyHash. + PolicyId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm", + OperationName: "PutResourcePolicy", + } +} diff --git a/service/ssm/api_op_UpdateManagedInstanceRole.go b/service/ssm/api_op_UpdateManagedInstanceRole.go index 8fdc2c2043b..d22cc2424fa 100644 --- a/service/ssm/api_op_UpdateManagedInstanceRole.go +++ b/service/ssm/api_op_UpdateManagedInstanceRole.go @@ -31,7 +31,13 @@ func (c *Client) UpdateManagedInstanceRole(ctx context.Context, params *UpdateMa type UpdateManagedInstanceRoleInput struct { - // The IAM role you want to assign or change. + // The name of the Identity and Access Management (IAM) role that you want to + // assign to the managed node. This IAM role must provide AssumeRole permissions + // for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com. + // For more information, see Create an IAM service role for a hybrid environment + // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html) + // in the Amazon Web Services Systems Manager User Guide. You can't specify an IAM + // service-linked role for this parameter. You must create a unique role. // // This member is required. IamRole *string diff --git a/service/ssm/api_op_UpdateOpsItem.go b/service/ssm/api_op_UpdateOpsItem.go index 1c6fbdbce99..a90deafd800 100644 --- a/service/ssm/api_op_UpdateOpsItem.go +++ b/service/ssm/api_op_UpdateOpsItem.go @@ -88,6 +88,9 @@ type UpdateOpsItemInput struct { // Keys that you want to remove from the OperationalData map. OperationalDataToDelete []string + // The OpsItem Amazon Resource Name (ARN). + OpsItemArn *string + // The time specified in a change request for a runbook workflow to end. Currently // supported only for the OpsItem type /aws/changerequest. PlannedEndTime *time.Time diff --git a/service/ssm/deserializers.go b/service/ssm/deserializers.go index 34818531302..f4d3ea4b221 100644 --- a/service/ssm/deserializers.go +++ b/service/ssm/deserializers.go @@ -1249,6 +1249,9 @@ func awsAwsjson11_deserializeOpErrorCreateOpsItem(response *smithyhttp.Response, case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("OpsItemAccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemAccessDeniedException(response, errorBody) + case strings.EqualFold("OpsItemAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorOpsItemAlreadyExistsException(response, errorBody) @@ -2798,6 +2801,123 @@ func awsAwsjson11_deserializeOpErrorDeleteResourceDataSync(response *smithyhttp. } } +type awsAwsjson11_deserializeOpDeleteResourcePolicy struct { +} + +func (*awsAwsjson11_deserializeOpDeleteResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response, &metadata) + } + output := &DeleteResourcePolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteResourcePolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourcePolicyConflictException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyConflictException(response, errorBody) + + case strings.EqualFold("ResourcePolicyInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyInvalidParameterException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDeregisterManagedInstance struct { } @@ -8824,6 +8944,9 @@ func awsAwsjson11_deserializeOpErrorGetOpsItem(response *smithyhttp.Response, me case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("OpsItemAccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemAccessDeniedException(response, errorBody) + case strings.EqualFold("OpsItemNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) @@ -9788,6 +9911,120 @@ func awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response *smit } } +type awsAwsjson11_deserializeOpGetResourcePolicies struct { +} + +func (*awsAwsjson11_deserializeOpGetResourcePolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetResourcePolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetResourcePolicies(response, &metadata) + } + output := &GetResourcePoliciesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetResourcePoliciesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetResourcePolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourcePolicyInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyInvalidParameterException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpGetServiceSetting struct { } @@ -12467,14 +12704,14 @@ func awsAwsjson11_deserializeOpErrorPutParameter(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline struct { +type awsAwsjson11_deserializeOpPutResourcePolicy struct { } -func (*awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) ID() string { +func (*awsAwsjson11_deserializeOpPutResourcePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutResourcePolicy) 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) @@ -12488,9 +12725,9 @@ func (m *awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutResourcePolicy(response, &metadata) } - output := &RegisterDefaultPatchBaselineOutput{} + output := &PutResourcePolicyOutput{} out.Result = output var buff [1024]byte @@ -12510,7 +12747,7 @@ func (m *awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) HandleDeseriali return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRegisterDefaultPatchBaselineOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12524,7 +12761,7 @@ func (m *awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) HandleDeseriali return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutResourcePolicy(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)} @@ -12565,14 +12802,17 @@ func awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(response *smith } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidResourceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + case strings.EqualFold("ResourcePolicyConflictException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyConflictException(response, errorBody) + + case strings.EqualFold("ResourcePolicyInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourcePolicyLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -12584,14 +12824,14 @@ func awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(response *smith } } -type awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup struct { +type awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline struct { } -func (*awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) ID() string { +func (*awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) 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) @@ -12605,9 +12845,9 @@ func (m *awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(response, &metadata) } - output := &RegisterPatchBaselineForPatchGroupOutput{} + output := &RegisterDefaultPatchBaselineOutput{} out.Result = output var buff [1024]byte @@ -12627,7 +12867,7 @@ func (m *awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) HandleDes return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRegisterPatchBaselineForPatchGroupOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRegisterDefaultPatchBaselineOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12641,7 +12881,7 @@ func (m *awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) HandleDes return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(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)} @@ -12682,9 +12922,6 @@ func awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(response } switch { - case strings.EqualFold("AlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) - case strings.EqualFold("DoesNotExistException", errorCode): return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) @@ -12694,9 +12931,6 @@ func awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(response case strings.EqualFold("InvalidResourceId", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12707,14 +12941,14 @@ func awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(response } } -type awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow struct { +type awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup struct { } -func (*awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) ID() string { +func (*awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) 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) @@ -12728,9 +12962,9 @@ func (m *awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) HandleDe } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(response, &metadata) } - output := &RegisterTargetWithMaintenanceWindowOutput{} + output := &RegisterPatchBaselineForPatchGroupOutput{} out.Result = output var buff [1024]byte @@ -12750,7 +12984,7 @@ func (m *awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) HandleDe return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRegisterTargetWithMaintenanceWindowOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRegisterPatchBaselineForPatchGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12764,7 +12998,7 @@ func (m *awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) HandleDe return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(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)} @@ -12805,15 +13039,18 @@ func awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(response } switch { + case strings.EqualFold("AlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) + case strings.EqualFold("DoesNotExistException", errorCode): return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - case strings.EqualFold("IdempotentParameterMismatch", errorCode): - return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) @@ -12827,14 +13064,14 @@ func awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(response } } -type awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow struct { +type awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow struct { } -func (*awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) ID() string { +func (*awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) 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) @@ -12848,9 +13085,9 @@ func (m *awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRegisterTaskWithMaintenanceWindow(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(response, &metadata) } - output := &RegisterTaskWithMaintenanceWindowOutput{} + output := &RegisterTargetWithMaintenanceWindowOutput{} out.Result = output var buff [1024]byte @@ -12870,7 +13107,7 @@ func (m *awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) HandleDese return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRegisterTaskWithMaintenanceWindowOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRegisterTargetWithMaintenanceWindowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12884,7 +13121,7 @@ func (m *awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) HandleDese return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRegisterTaskWithMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(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)} @@ -12928,9 +13165,6 @@ func awsAwsjson11_deserializeOpErrorRegisterTaskWithMaintenanceWindow(response * case strings.EqualFold("DoesNotExistException", errorCode): return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - case strings.EqualFold("FeatureNotAvailableException", errorCode): - return awsAwsjson11_deserializeErrorFeatureNotAvailableException(response, errorBody) - case strings.EqualFold("IdempotentParameterMismatch", errorCode): return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) @@ -12950,14 +13184,14 @@ func awsAwsjson11_deserializeOpErrorRegisterTaskWithMaintenanceWindow(response * } } -type awsAwsjson11_deserializeOpRemoveTagsFromResource struct { +type awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow struct { } -func (*awsAwsjson11_deserializeOpRemoveTagsFromResource) ID() string { +func (*awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRemoveTagsFromResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) 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) @@ -12971,9 +13205,9 @@ func (m *awsAwsjson11_deserializeOpRemoveTagsFromResource) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRemoveTagsFromResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterTaskWithMaintenanceWindow(response, &metadata) } - output := &RemoveTagsFromResourceOutput{} + output := &RegisterTaskWithMaintenanceWindowOutput{} out.Result = output var buff [1024]byte @@ -12993,7 +13227,7 @@ func (m *awsAwsjson11_deserializeOpRemoveTagsFromResource) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRemoveTagsFromResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRegisterTaskWithMaintenanceWindowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13007,7 +13241,7 @@ func (m *awsAwsjson11_deserializeOpRemoveTagsFromResource) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRemoveTagsFromResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRegisterTaskWithMaintenanceWindow(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)} @@ -13048,17 +13282,20 @@ func awsAwsjson11_deserializeOpErrorRemoveTagsFromResource(response *smithyhttp. } switch { - case strings.EqualFold("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - case strings.EqualFold("InvalidResourceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + case strings.EqualFold("FeatureNotAvailableException", errorCode): + return awsAwsjson11_deserializeErrorFeatureNotAvailableException(response, errorBody) - case strings.EqualFold("InvalidResourceType", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) + case strings.EqualFold("IdempotentParameterMismatch", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) - case strings.EqualFold("TooManyUpdates", errorCode): - return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -13070,14 +13307,14 @@ func awsAwsjson11_deserializeOpErrorRemoveTagsFromResource(response *smithyhttp. } } -type awsAwsjson11_deserializeOpResetServiceSetting struct { +type awsAwsjson11_deserializeOpRemoveTagsFromResource struct { } -func (*awsAwsjson11_deserializeOpResetServiceSetting) ID() string { +func (*awsAwsjson11_deserializeOpRemoveTagsFromResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpResetServiceSetting) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRemoveTagsFromResource) 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) @@ -13091,9 +13328,9 @@ func (m *awsAwsjson11_deserializeOpResetServiceSetting) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorResetServiceSetting(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRemoveTagsFromResource(response, &metadata) } - output := &ResetServiceSettingOutput{} + output := &RemoveTagsFromResourceOutput{} out.Result = output var buff [1024]byte @@ -13113,7 +13350,7 @@ func (m *awsAwsjson11_deserializeOpResetServiceSetting) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentResetServiceSettingOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRemoveTagsFromResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13127,7 +13364,7 @@ func (m *awsAwsjson11_deserializeOpResetServiceSetting) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorResetServiceSetting(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRemoveTagsFromResource(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)} @@ -13171,8 +13408,11 @@ func awsAwsjson11_deserializeOpErrorResetServiceSetting(response *smithyhttp.Res case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("ServiceSettingNotFound", errorCode): - return awsAwsjson11_deserializeErrorServiceSettingNotFound(response, errorBody) + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + case strings.EqualFold("InvalidResourceType", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) case strings.EqualFold("TooManyUpdates", errorCode): return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) @@ -13187,14 +13427,14 @@ func awsAwsjson11_deserializeOpErrorResetServiceSetting(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpResumeSession struct { +type awsAwsjson11_deserializeOpResetServiceSetting struct { } -func (*awsAwsjson11_deserializeOpResumeSession) ID() string { +func (*awsAwsjson11_deserializeOpResetServiceSetting) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpResumeSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpResetServiceSetting) 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) @@ -13208,9 +13448,9 @@ func (m *awsAwsjson11_deserializeOpResumeSession) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorResumeSession(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorResetServiceSetting(response, &metadata) } - output := &ResumeSessionOutput{} + output := &ResetServiceSettingOutput{} out.Result = output var buff [1024]byte @@ -13230,7 +13470,7 @@ func (m *awsAwsjson11_deserializeOpResumeSession) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentResumeSessionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentResetServiceSettingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13244,7 +13484,7 @@ func (m *awsAwsjson11_deserializeOpResumeSession) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorResumeSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorResetServiceSetting(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)} @@ -13285,131 +13525,14 @@ func awsAwsjson11_deserializeOpErrorResumeSession(response *smithyhttp.Response, } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpSendAutomationSignal struct { -} - -func (*awsAwsjson11_deserializeOpSendAutomationSignal) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpSendAutomationSignal) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorSendAutomationSignal(response, &metadata) - } - output := &SendAutomationSignalOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentSendAutomationSignalOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorSendAutomationSignal(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - code := response.Header.Get("X-Amzn-ErrorType") - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - code, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) - - case strings.EqualFold("AutomationStepNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorAutomationStepNotFoundException(response, errorBody) - - case strings.EqualFold("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("ServiceSettingNotFound", errorCode): + return awsAwsjson11_deserializeErrorServiceSettingNotFound(response, errorBody) - case strings.EqualFold("InvalidAutomationSignalException", errorCode): - return awsAwsjson11_deserializeErrorInvalidAutomationSignalException(response, errorBody) + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -13421,14 +13544,14 @@ func awsAwsjson11_deserializeOpErrorSendAutomationSignal(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpSendCommand struct { +type awsAwsjson11_deserializeOpResumeSession struct { } -func (*awsAwsjson11_deserializeOpSendCommand) ID() string { +func (*awsAwsjson11_deserializeOpResumeSession) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpSendCommand) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpResumeSession) 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) @@ -13442,9 +13565,9 @@ func (m *awsAwsjson11_deserializeOpSendCommand) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorSendCommand(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorResumeSession(response, &metadata) } - output := &SendCommandOutput{} + output := &ResumeSessionOutput{} out.Result = output var buff [1024]byte @@ -13464,7 +13587,7 @@ func (m *awsAwsjson11_deserializeOpSendCommand) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentSendCommandOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentResumeSessionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13478,7 +13601,7 @@ func (m *awsAwsjson11_deserializeOpSendCommand) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorSendCommand(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorResumeSession(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)} @@ -13519,39 +13642,12 @@ func awsAwsjson11_deserializeOpErrorSendCommand(response *smithyhttp.Response, m } switch { - case strings.EqualFold("DuplicateInstanceId", errorCode): - return awsAwsjson11_deserializeErrorDuplicateInstanceId(response, errorBody) + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - - case strings.EqualFold("InvalidDocumentVersion", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) - - case strings.EqualFold("InvalidInstanceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) - - case strings.EqualFold("InvalidNotificationConfig", errorCode): - return awsAwsjson11_deserializeErrorInvalidNotificationConfig(response, errorBody) - - case strings.EqualFold("InvalidOutputFolder", errorCode): - return awsAwsjson11_deserializeErrorInvalidOutputFolder(response, errorBody) - - case strings.EqualFold("InvalidParameters", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameters(response, errorBody) - - case strings.EqualFold("InvalidRole", errorCode): - return awsAwsjson11_deserializeErrorInvalidRole(response, errorBody) - - case strings.EqualFold("MaxDocumentSizeExceeded", errorCode): - return awsAwsjson11_deserializeErrorMaxDocumentSizeExceeded(response, errorBody) - - case strings.EqualFold("UnsupportedPlatformType", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedPlatformType(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -13562,14 +13658,14 @@ func awsAwsjson11_deserializeOpErrorSendCommand(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpStartAssociationsOnce struct { +type awsAwsjson11_deserializeOpSendAutomationSignal struct { } -func (*awsAwsjson11_deserializeOpStartAssociationsOnce) ID() string { +func (*awsAwsjson11_deserializeOpSendAutomationSignal) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartAssociationsOnce) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpSendAutomationSignal) 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) @@ -13583,9 +13679,9 @@ func (m *awsAwsjson11_deserializeOpStartAssociationsOnce) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartAssociationsOnce(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorSendAutomationSignal(response, &metadata) } - output := &StartAssociationsOnceOutput{} + output := &SendAutomationSignalOutput{} out.Result = output var buff [1024]byte @@ -13605,7 +13701,7 @@ func (m *awsAwsjson11_deserializeOpStartAssociationsOnce) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartAssociationsOnceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentSendAutomationSignalOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13619,7 +13715,268 @@ func (m *awsAwsjson11_deserializeOpStartAssociationsOnce) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartAssociationsOnce(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorSendAutomationSignal(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) + + case strings.EqualFold("AutomationStepNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationStepNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAutomationSignalException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAutomationSignalException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpSendCommand struct { +} + +func (*awsAwsjson11_deserializeOpSendCommand) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpSendCommand) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorSendCommand(response, &metadata) + } + output := &SendCommandOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentSendCommandOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorSendCommand(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("DuplicateInstanceId", errorCode): + return awsAwsjson11_deserializeErrorDuplicateInstanceId(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidNotificationConfig", errorCode): + return awsAwsjson11_deserializeErrorInvalidNotificationConfig(response, errorBody) + + case strings.EqualFold("InvalidOutputFolder", errorCode): + return awsAwsjson11_deserializeErrorInvalidOutputFolder(response, errorBody) + + case strings.EqualFold("InvalidParameters", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameters(response, errorBody) + + case strings.EqualFold("InvalidRole", errorCode): + return awsAwsjson11_deserializeErrorInvalidRole(response, errorBody) + + case strings.EqualFold("MaxDocumentSizeExceeded", errorCode): + return awsAwsjson11_deserializeErrorMaxDocumentSizeExceeded(response, errorBody) + + case strings.EqualFold("UnsupportedPlatformType", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedPlatformType(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartAssociationsOnce struct { +} + +func (*awsAwsjson11_deserializeOpStartAssociationsOnce) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartAssociationsOnce) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartAssociationsOnce(response, &metadata) + } + output := &StartAssociationsOnceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartAssociationsOnceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartAssociationsOnce(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)} @@ -15607,6 +15964,9 @@ func awsAwsjson11_deserializeOpErrorUpdateOpsItem(response *smithyhttp.Response, case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("OpsItemAccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemAccessDeniedException(response, errorBody) + case strings.EqualFold("OpsItemAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorOpsItemAlreadyExistsException(response, errorBody) @@ -18973,6 +19333,41 @@ func awsAwsjson11_deserializeErrorMaxDocumentSizeExceeded(response *smithyhttp.R return output } +func awsAwsjson11_deserializeErrorOpsItemAccessDeniedException(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.OpsItemAccessDeniedException{} + err := awsAwsjson11_deserializeDocumentOpsItemAccessDeniedException(&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_deserializeErrorOpsItemAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -19918,6 +20313,111 @@ func awsAwsjson11_deserializeErrorResourceLimitExceededException(response *smith return output } +func awsAwsjson11_deserializeErrorResourcePolicyConflictException(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.ResourcePolicyConflictException{} + err := awsAwsjson11_deserializeDocumentResourcePolicyConflictException(&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_deserializeErrorResourcePolicyInvalidParameterException(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.ResourcePolicyInvalidParameterException{} + err := awsAwsjson11_deserializeDocumentResourcePolicyInvalidParameterException(&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_deserializeErrorResourcePolicyLimitExceededException(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.ResourcePolicyLimitExceededException{} + err := awsAwsjson11_deserializeDocumentResourcePolicyLimitExceededException(&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_deserializeErrorServiceSettingNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -26708,6 +27208,98 @@ func awsAwsjson11_deserializeDocumentFeatureNotAvailableException(v **types.Feat return nil } +func awsAwsjson11_deserializeDocumentGetResourcePoliciesResponseEntries(v *[]types.GetResourcePoliciesResponseEntry, 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.GetResourcePoliciesResponseEntry + if *v == nil { + cv = []types.GetResourcePoliciesResponseEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.GetResourcePoliciesResponseEntry + destAddr := &col + if err := awsAwsjson11_deserializeDocumentGetResourcePoliciesResponseEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentGetResourcePoliciesResponseEntry(v **types.GetResourcePoliciesResponseEntry, 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.GetResourcePoliciesResponseEntry + if *v == nil { + sv = &types.GetResourcePoliciesResponseEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Policy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Policy to be of type string, got %T instead", value) + } + sv.Policy = ptr.String(jtv) + } + + case "PolicyHash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyHash to be of type string, got %T instead", value) + } + sv.PolicyHash = ptr.String(jtv) + } + + case "PolicyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyId to be of type string, got %T instead", value) + } + sv.PolicyId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentHierarchyLevelLimitExceededException(v **types.HierarchyLevelLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -33059,6 +33651,15 @@ func awsAwsjson11_deserializeDocumentOpsItem(v **types.OpsItem, value interface{ return err } + case "OpsItemArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemArn to be of type string, got %T instead", value) + } + sv.OpsItemArn = ptr.String(jtv) + } + case "OpsItemId": if value != nil { jtv, ok := value.(string) @@ -33181,6 +33782,46 @@ func awsAwsjson11_deserializeDocumentOpsItem(v **types.OpsItem, value interface{ return nil } +func awsAwsjson11_deserializeDocumentOpsItemAccessDeniedException(v **types.OpsItemAccessDeniedException, 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.OpsItemAccessDeniedException + if *v == nil { + sv = &types.OpsItemAccessDeniedException{} + } 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_deserializeDocumentOpsItemAlreadyExistsException(v **types.OpsItemAlreadyExistsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -38136,7 +38777,347 @@ func awsAwsjson11_deserializeDocumentResourceDataSyncSourceRegionList(v *[]strin if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceDataSyncSourceRegion to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceDataSyncSourceRegion to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncSourceWithState(v **types.ResourceDataSyncSourceWithState, 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.ResourceDataSyncSourceWithState + if *v == nil { + sv = &types.ResourceDataSyncSourceWithState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AwsOrganizationsSource": + if err := awsAwsjson11_deserializeDocumentResourceDataSyncAwsOrganizationsSource(&sv.AwsOrganizationsSource, value); err != nil { + return err + } + + case "EnableAllOpsDataSources": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ResourceDataSyncEnableAllOpsDataSources to be of type *bool, got %T instead", value) + } + sv.EnableAllOpsDataSources = jtv + } + + case "IncludeFutureRegions": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ResourceDataSyncIncludeFutureRegions to be of type *bool, got %T instead", value) + } + sv.IncludeFutureRegions = jtv + } + + case "SourceRegions": + if err := awsAwsjson11_deserializeDocumentResourceDataSyncSourceRegionList(&sv.SourceRegions, value); err != nil { + return err + } + + case "SourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncSourceType to be of type string, got %T instead", value) + } + sv.SourceType = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncState to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceInUseException(v **types.ResourceInUseException, 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.ResourceInUseException + if *v == nil { + sv = &types.ResourceInUseException{} + } 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_deserializeDocumentResourceLimitExceededException(v **types.ResourceLimitExceededException, 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.ResourceLimitExceededException + if *v == nil { + sv = &types.ResourceLimitExceededException{} + } 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_deserializeDocumentResourcePolicyConflictException(v **types.ResourcePolicyConflictException, 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.ResourcePolicyConflictException + if *v == nil { + sv = &types.ResourcePolicyConflictException{} + } 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_deserializeDocumentResourcePolicyInvalidParameterException(v **types.ResourcePolicyInvalidParameterException, 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.ResourcePolicyInvalidParameterException + if *v == nil { + sv = &types.ResourcePolicyInvalidParameterException{} + } 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) + } + + case "ParameterNames": + if err := awsAwsjson11_deserializeDocumentResourcePolicyParameterNamesList(&sv.ParameterNames, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourcePolicyLimitExceededException(v **types.ResourcePolicyLimitExceededException, 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.ResourcePolicyLimitExceededException + if *v == nil { + sv = &types.ResourcePolicyLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Limit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Limit = int32(i64) + } + + case "LimitType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LimitType = ptr.String(jtv) + } + + 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_deserializeDocumentResourcePolicyParameterNamesList(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 } @@ -38147,163 +39128,6 @@ func awsAwsjson11_deserializeDocumentResourceDataSyncSourceRegionList(v *[]strin return nil } -func awsAwsjson11_deserializeDocumentResourceDataSyncSourceWithState(v **types.ResourceDataSyncSourceWithState, 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.ResourceDataSyncSourceWithState - if *v == nil { - sv = &types.ResourceDataSyncSourceWithState{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AwsOrganizationsSource": - if err := awsAwsjson11_deserializeDocumentResourceDataSyncAwsOrganizationsSource(&sv.AwsOrganizationsSource, value); err != nil { - return err - } - - case "EnableAllOpsDataSources": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected ResourceDataSyncEnableAllOpsDataSources to be of type *bool, got %T instead", value) - } - sv.EnableAllOpsDataSources = jtv - } - - case "IncludeFutureRegions": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected ResourceDataSyncIncludeFutureRegions to be of type *bool, got %T instead", value) - } - sv.IncludeFutureRegions = jtv - } - - case "SourceRegions": - if err := awsAwsjson11_deserializeDocumentResourceDataSyncSourceRegionList(&sv.SourceRegions, value); err != nil { - return err - } - - case "SourceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceDataSyncSourceType to be of type string, got %T instead", value) - } - sv.SourceType = ptr.String(jtv) - } - - case "State": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceDataSyncState to be of type string, got %T instead", value) - } - sv.State = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentResourceInUseException(v **types.ResourceInUseException, 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.ResourceInUseException - if *v == nil { - sv = &types.ResourceInUseException{} - } 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_deserializeDocumentResourceLimitExceededException(v **types.ResourceLimitExceededException, 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.ResourceLimitExceededException - if *v == nil { - sv = &types.ResourceLimitExceededException{} - } 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_deserializeDocumentReviewInformation(v **types.ReviewInformation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -40845,6 +41669,15 @@ func awsAwsjson11_deserializeOpDocumentCreateOpsItemOutput(v **CreateOpsItemOutp for key, value := range shape { switch key { + case "OpsItemArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemArn to be of type string, got %T instead", value) + } + sv.OpsItemArn = ptr.String(jtv) + } + case "OpsItemId": if value != nil { jtv, ok := value.(string) @@ -41335,6 +42168,37 @@ func awsAwsjson11_deserializeOpDocumentDeleteResourceDataSyncOutput(v **DeleteRe return nil } +func awsAwsjson11_deserializeOpDocumentDeleteResourcePolicyOutput(v **DeleteResourcePolicyOutput, 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 *DeleteResourcePolicyOutput + if *v == nil { + sv = &DeleteResourcePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDeregisterManagedInstanceOutput(v **DeregisterManagedInstanceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -45080,6 +45944,51 @@ func awsAwsjson11_deserializeOpDocumentGetPatchBaselineOutput(v **GetPatchBaseli return nil } +func awsAwsjson11_deserializeOpDocumentGetResourcePoliciesOutput(v **GetResourcePoliciesOutput, 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 *GetResourcePoliciesOutput + if *v == nil { + sv = &GetResourcePoliciesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Policies": + if err := awsAwsjson11_deserializeDocumentGetResourcePoliciesResponseEntries(&sv.Policies, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentGetServiceSettingOutput(v **GetServiceSettingOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -46094,6 +47003,55 @@ func awsAwsjson11_deserializeOpDocumentPutParameterOutput(v **PutParameterOutput return nil } +func awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(v **PutResourcePolicyOutput, 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 *PutResourcePolicyOutput + if *v == nil { + sv = &PutResourcePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PolicyHash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyHash to be of type string, got %T instead", value) + } + sv.PolicyHash = ptr.String(jtv) + } + + case "PolicyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyId to be of type string, got %T instead", value) + } + sv.PolicyId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentRegisterDefaultPatchBaselineOutput(v **RegisterDefaultPatchBaselineOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ssm/generated.json b/service/ssm/generated.json index eee795040f0..5b123f7a9e9 100644 --- a/service/ssm/generated.json +++ b/service/ssm/generated.json @@ -32,6 +32,7 @@ "api_op_DeleteParameters.go", "api_op_DeletePatchBaseline.go", "api_op_DeleteResourceDataSync.go", + "api_op_DeleteResourcePolicy.go", "api_op_DeregisterManagedInstance.go", "api_op_DeregisterPatchBaselineForPatchGroup.go", "api_op_DeregisterTargetFromMaintenanceWindow.go", @@ -92,6 +93,7 @@ "api_op_GetParametersByPath.go", "api_op_GetPatchBaseline.go", "api_op_GetPatchBaselineForPatchGroup.go", + "api_op_GetResourcePolicies.go", "api_op_GetServiceSetting.go", "api_op_LabelParameterVersion.go", "api_op_ListAssociationVersions.go", @@ -114,6 +116,7 @@ "api_op_PutComplianceItems.go", "api_op_PutInventory.go", "api_op_PutParameter.go", + "api_op_PutResourcePolicy.go", "api_op_RegisterDefaultPatchBaseline.go", "api_op_RegisterPatchBaselineForPatchGroup.go", "api_op_RegisterTargetWithMaintenanceWindow.go", diff --git a/service/ssm/internal/endpoints/endpoints.go b/service/ssm/internal/endpoints/endpoints.go index 2fe4d160c8e..61e46ce1d89 100644 --- a/service/ssm/internal/endpoints/endpoints.go +++ b/service/ssm/internal/endpoints/endpoints.go @@ -183,6 +183,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/ssm/serializers.go b/service/ssm/serializers.go index 65807eeab7b..aa6db0c0d76 100644 --- a/service/ssm/serializers.go +++ b/service/ssm/serializers.go @@ -1281,6 +1281,61 @@ func (m *awsAwsjson11_serializeOpDeleteResourceDataSync) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeleteResourcePolicy struct { +} + +func (*awsAwsjson11_serializeOpDeleteResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) 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.(*DeleteResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeleteResourcePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteResourcePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDeregisterManagedInstance struct { } @@ -4581,6 +4636,61 @@ func (m *awsAwsjson11_serializeOpGetPatchBaselineForPatchGroup) HandleSerialize( return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetResourcePolicies struct { +} + +func (*awsAwsjson11_serializeOpGetResourcePolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetResourcePolicies) 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.(*GetResourcePoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetResourcePolicies") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetResourcePoliciesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpGetServiceSetting struct { } @@ -5791,6 +5901,61 @@ func (m *awsAwsjson11_serializeOpPutParameter) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpPutResourcePolicy struct { +} + +func (*awsAwsjson11_serializeOpPutResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutResourcePolicy) 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.(*PutResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.PutResourcePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutResourcePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpRegisterDefaultPatchBaseline struct { } @@ -10813,6 +10978,11 @@ func awsAwsjson11_serializeOpDocumentCreateOpsItemInput(v *CreateOpsItemInput, v object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.ActualEndTime != nil { ok := object.Key("ActualEndTime") ok.Double(smithytime.FormatEpochSeconds(*v.ActualEndTime)) @@ -11207,6 +11377,28 @@ func awsAwsjson11_serializeOpDocumentDeleteResourceDataSyncInput(v *DeleteResour return nil } +func awsAwsjson11_serializeOpDocumentDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PolicyHash != nil { + ok := object.Key("PolicyHash") + ok.String(*v.PolicyHash) + } + + if v.PolicyId != nil { + ok := object.Key("PolicyId") + ok.String(*v.PolicyId) + } + + if v.ResourceArn != nil { + ok := object.Key("ResourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeregisterManagedInstanceInput(v *DeregisterManagedInstanceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -12440,6 +12632,11 @@ func awsAwsjson11_serializeOpDocumentGetOpsItemInput(v *GetOpsItemInput, value s object := value.Object() defer object.Close() + if v.OpsItemArn != nil { + ok := object.Key("OpsItemArn") + ok.String(*v.OpsItemArn) + } + if v.OpsItemId != nil { ok := object.Key("OpsItemId") ok.String(*v.OpsItemId) @@ -12644,6 +12841,28 @@ func awsAwsjson11_serializeOpDocumentGetPatchBaselineInput(v *GetPatchBaselineIn return nil } +func awsAwsjson11_serializeOpDocumentGetResourcePoliciesInput(v *GetResourcePoliciesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.ResourceArn != nil { + ok := object.Key("ResourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentGetServiceSettingInput(v *GetServiceSettingInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -13285,6 +13504,33 @@ func awsAwsjson11_serializeOpDocumentPutParameterInput(v *PutParameterInput, val return nil } +func awsAwsjson11_serializeOpDocumentPutResourcePolicyInput(v *PutResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Policy != nil { + ok := object.Key("Policy") + ok.String(*v.Policy) + } + + if v.PolicyHash != nil { + ok := object.Key("PolicyHash") + ok.String(*v.PolicyHash) + } + + if v.PolicyId != nil { + ok := object.Key("PolicyId") + ok.String(*v.PolicyId) + } + + if v.ResourceArn != nil { + ok := object.Key("ResourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentRegisterDefaultPatchBaselineInput(v *RegisterDefaultPatchBaselineInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -14394,6 +14640,11 @@ func awsAwsjson11_serializeOpDocumentUpdateOpsItemInput(v *UpdateOpsItemInput, v } } + if v.OpsItemArn != nil { + ok := object.Key("OpsItemArn") + ok.String(*v.OpsItemArn) + } + if v.OpsItemId != nil { ok := object.Key("OpsItemId") ok.String(*v.OpsItemId) diff --git a/service/ssm/types/enums.go b/service/ssm/types/enums.go index b8e9e51188b..03ee51b9057 100644 --- a/service/ssm/types/enums.go +++ b/service/ssm/types/enums.go @@ -1272,6 +1272,7 @@ const ( OpsItemFilterKeyChangeRequestTemplate OpsItemFilterKey = "ChangeRequestByTemplate" OpsItemFilterKeyChangeRequestTargetsResourceGroup OpsItemFilterKey = "ChangeRequestByTargetsResourceGroup" OpsItemFilterKeyInsightType OpsItemFilterKey = "InsightByType" + OpsItemFilterKeyAccountId OpsItemFilterKey = "AccountId" ) // Values returns all known values for OpsItemFilterKey. Note that this can be @@ -1306,6 +1307,7 @@ func (OpsItemFilterKey) Values() []OpsItemFilterKey { "ChangeRequestByTemplate", "ChangeRequestByTargetsResourceGroup", "InsightByType", + "AccountId", } } diff --git a/service/ssm/types/errors.go b/service/ssm/types/errors.go index bc038b0ba7c..3be060f6ee1 100644 --- a/service/ssm/types/errors.go +++ b/service/ssm/types/errors.go @@ -1710,6 +1710,27 @@ func (e *MaxDocumentSizeExceeded) ErrorMessage() string { func (e *MaxDocumentSizeExceeded) ErrorCode() string { return "MaxDocumentSizeExceeded" } func (e *MaxDocumentSizeExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// You don't have permission to view OpsItems in the specified account. Verify that +// your account is configured either as a Systems Manager delegated administrator +// or that you are logged into the Organizations management account. +type OpsItemAccessDeniedException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *OpsItemAccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsItemAccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsItemAccessDeniedException) ErrorCode() string { return "OpsItemAccessDeniedException" } +func (e *OpsItemAccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The OpsItem already exists. type OpsItemAlreadyExistsException struct { Message *string @@ -2324,6 +2345,83 @@ func (e *ResourceLimitExceededException) ErrorMessage() string { func (e *ResourceLimitExceededException) ErrorCode() string { return "ResourceLimitExceededException" } func (e *ResourceLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The hash provided in the call doesn't match the stored hash. This exception is +// thrown when trying to update an obsolete policy version or when multiple +// requests to update a policy are sent. +type ResourcePolicyConflictException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ResourcePolicyConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourcePolicyConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourcePolicyConflictException) ErrorCode() string { + return "ResourcePolicyConflictException" +} +func (e *ResourcePolicyConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// One or more parameters specified for the call aren't valid. Verify the +// parameters and their values and try again. +type ResourcePolicyInvalidParameterException struct { + Message *string + + ParameterNames []string + + noSmithyDocumentSerde +} + +func (e *ResourcePolicyInvalidParameterException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourcePolicyInvalidParameterException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourcePolicyInvalidParameterException) ErrorCode() string { + return "ResourcePolicyInvalidParameterException" +} +func (e *ResourcePolicyInvalidParameterException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The PutResourcePolicy API action enforces two limits. A policy can't be greater +// than 1024 bytes in size. And only one policy can be attached to OpsItemGroup. +// Verify these limits and try again. +type ResourcePolicyLimitExceededException struct { + Message *string + + Limit int32 + LimitType *string + + noSmithyDocumentSerde +} + +func (e *ResourcePolicyLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourcePolicyLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourcePolicyLimitExceededException) ErrorCode() string { + return "ResourcePolicyLimitExceededException" +} +func (e *ResourcePolicyLimitExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // The specified service setting wasn't found. Either the service name or the // setting hasn't been provisioned by the Amazon Web Services service team. type ServiceSettingNotFound struct { diff --git a/service/ssm/types/types.go b/service/ssm/types/types.go index 776475ef1ed..4a57b2072de 100644 --- a/service/ssm/types/types.go +++ b/service/ssm/types/types.go @@ -2163,6 +2163,31 @@ type FailureDetails struct { noSmithyDocumentSerde } +// A resource policy helps you to define the IAM entity (for example, an Amazon Web +// Services account) that can manage your Systems Manager resources. Currently, +// OpsItemGroup is the only resource that supports Systems Manager resource +// policies. The resource policy for OpsItemGroup enables Amazon Web Services +// accounts to view and interact with OpsCenter operational work items (OpsItems). +type GetResourcePoliciesResponseEntry struct { + + // A resource policy helps you to define the IAM entity (for example, an Amazon Web + // Services account) that can manage your Systems Manager resources. Currently, + // OpsItemGroup is the only resource that supports Systems Manager resource + // policies. The resource policy for OpsItemGroup enables Amazon Web Services + // accounts to view and interact with OpsCenter operational work items (OpsItems). + Policy *string + + // ID of the current policy version. The hash helps to prevent a situation where + // multiple users attempt to overwrite a policy. You must provide this hash when + // updating or deleting a policy. + PolicyHash *string + + // A policy ID. + PolicyId *string + + noSmithyDocumentSerde +} + // Status information about the aggregated associations. type InstanceAggregatedAssociationOverview struct { @@ -3553,11 +3578,24 @@ type OpsItem struct { // in the Amazon Web Services Systems Manager User Guide. OperationalData map[string]OpsItemDataValue + // The OpsItem Amazon Resource Name (ARN). + OpsItemArn *string + // The ID of the OpsItem. OpsItemId *string - // The type of OpsItem. Currently, the only valid values are /aws/changerequest and - // /aws/issue. + // The type of OpsItem. Systems Manager supports the following types of + // OpsItems: + // + // * /aws/issue This type of OpsItem is used for default OpsItems + // created by OpsCenter. + // + // * /aws/changerequest This type of OpsItem is used by + // Change Manager for reviewing and approving or rejecting change requests. + // + // * + // /aws/insights This type of OpsItem is used by OpsCenter for aggregating and + // reporting on duplicate OpsItems. OpsItemType *string // The time specified in a change request for a runbook workflow to end. Currently @@ -3792,8 +3830,18 @@ type OpsItemSummary struct { // The ID of the OpsItem. OpsItemId *string - // The type of OpsItem. Currently, the only valid values are /aws/changerequest and - // /aws/issue. + // The type of OpsItem. Systems Manager supports the following types of + // OpsItems: + // + // * /aws/issue This type of OpsItem is used for default OpsItems + // created by OpsCenter. + // + // * /aws/changerequest This type of OpsItem is used by + // Change Manager for reviewing and approving or rejecting change requests. + // + // * + // /aws/insights This type of OpsItem is used by OpsCenter for aggregating and + // reporting on duplicate OpsItems. OpsItemType *string // The time specified in a change request for a runbook workflow to end. Currently diff --git a/service/ssm/validators.go b/service/ssm/validators.go index d496e81536a..b37d00b9ecb 100644 --- a/service/ssm/validators.go +++ b/service/ssm/validators.go @@ -450,6 +450,26 @@ func (m *validateOpDeleteResourceDataSync) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpDeleteResourcePolicy struct { +} + +func (*validateOpDeleteResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeregisterManagedInstance struct { } @@ -1450,6 +1470,26 @@ func (m *validateOpGetPatchBaseline) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpGetResourcePolicies struct { +} + +func (*validateOpGetResourcePolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetResourcePolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetResourcePoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetResourcePoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetServiceSetting struct { } @@ -1810,6 +1850,26 @@ func (m *validateOpPutParameter) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpPutResourcePolicy struct { +} + +func (*validateOpPutResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRegisterDefaultPatchBaseline struct { } @@ -2498,6 +2558,10 @@ func addOpDeleteResourceDataSyncValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpDeleteResourceDataSync{}, middleware.After) } +func addOpDeleteResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResourcePolicy{}, middleware.After) +} + func addOpDeregisterManagedInstanceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeregisterManagedInstance{}, middleware.After) } @@ -2698,6 +2762,10 @@ func addOpGetPatchBaselineValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetPatchBaseline{}, middleware.After) } +func addOpGetResourcePoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResourcePolicies{}, middleware.After) +} + func addOpGetServiceSettingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetServiceSetting{}, middleware.After) } @@ -2770,6 +2838,10 @@ func addOpPutParameterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutParameter{}, middleware.After) } +func addOpPutResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutResourcePolicy{}, middleware.After) +} + func addOpRegisterDefaultPatchBaselineValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRegisterDefaultPatchBaseline{}, middleware.After) } @@ -4871,6 +4943,27 @@ func validateOpDeleteResourceDataSyncInput(v *DeleteResourceDataSyncInput) error } } +func validateOpDeleteResourcePolicyInput(v *DeleteResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.PolicyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyId")) + } + if v.PolicyHash == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyHash")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeregisterManagedInstanceInput(v *DeregisterManagedInstanceInput) error { if v == nil { return nil @@ -5743,6 +5836,21 @@ func validateOpGetPatchBaselineInput(v *GetPatchBaselineInput) error { } } +func validateOpGetResourcePoliciesInput(v *GetResourcePoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetResourcePoliciesInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetServiceSettingInput(v *GetServiceSettingInput) error { if v == nil { return nil @@ -6082,6 +6190,24 @@ func validateOpPutParameterInput(v *PutParameterInput) error { } } +func validateOpPutResourcePolicyInput(v *PutResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Policy == nil { + invalidParams.Add(smithy.NewErrParamRequired("Policy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRegisterDefaultPatchBaselineInput(v *RegisterDefaultPatchBaselineInput) error { if v == nil { return nil diff --git a/service/ssmincidents/api_op_CreateResponsePlan.go b/service/ssmincidents/api_op_CreateResponsePlan.go index 9392a039752..d072a7a4a1c 100644 --- a/service/ssmincidents/api_op_CreateResponsePlan.go +++ b/service/ssmincidents/api_op_CreateResponsePlan.go @@ -59,6 +59,9 @@ type CreateResponsePlanInput struct { // response plan engages during an incident. Engagements []string + // Information about third-party services integrated into the response plan. + Integrations []types.Integration + // A list of tags that you are adding to the response plan. Tags map[string]string diff --git a/service/ssmincidents/api_op_GetResponsePlan.go b/service/ssmincidents/api_op_GetResponsePlan.go index f7e5d815422..160d04bbe49 100644 --- a/service/ssmincidents/api_op_GetResponsePlan.go +++ b/service/ssmincidents/api_op_GetResponsePlan.go @@ -67,6 +67,10 @@ type GetResponsePlanOutput struct { // response plan engages during an incident. Engagements []string + // Information about third-party services integrated into the Incident Manager + // response plan. + Integrations []types.Integration + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/ssmincidents/api_op_UpdateResponsePlan.go b/service/ssmincidents/api_op_UpdateResponsePlan.go index 73d2e4c3813..43b3f469c63 100644 --- a/service/ssmincidents/api_op_UpdateResponsePlan.go +++ b/service/ssmincidents/api_op_UpdateResponsePlan.go @@ -89,6 +89,9 @@ type UpdateResponsePlanInput struct { // The short format name of the incident. The title can't contain spaces. IncidentTemplateTitle *string + // Information about third-party services integrated into the response plan. + Integrations []types.Integration + noSmithyDocumentSerde } diff --git a/service/ssmincidents/deserializers.go b/service/ssmincidents/deserializers.go index b1cf1e0abfe..085239dde9c 100644 --- a/service/ssmincidents/deserializers.go +++ b/service/ssmincidents/deserializers.go @@ -1661,6 +1661,11 @@ func awsRestjson1_deserializeOpDocumentGetResponsePlanOutput(v **GetResponsePlan return err } + case "integrations": + if err := awsRestjson1_deserializeDocumentIntegrations(&sv.Integrations, value); err != nil { + return err + } + case "name": if value != nil { jtv, ok := value.(string) @@ -5345,6 +5350,78 @@ func awsRestjson1_deserializeDocumentIncidentTemplate(v **types.IncidentTemplate return nil } +func awsRestjson1_deserializeDocumentIntegration(v *types.Integration, 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.Integration +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "pagerDutyConfiguration": + var mv types.PagerDutyConfiguration + destAddr := &mv + if err := awsRestjson1_deserializeDocumentPagerDutyConfiguration(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.IntegrationMemberPagerDutyConfiguration{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentIntegrations(v *[]types.Integration, 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.Integration + if *v == nil { + cv = []types.Integration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Integration + if err := awsRestjson1_deserializeDocumentIntegration(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5474,6 +5551,16 @@ loop: uv = &types.ItemValueMemberMetricDefinition{Value: mv} break loop + case "pagerDutyIncidentDetail": + var mv types.PagerDutyIncidentDetail + destAddr := &mv + if err := awsRestjson1_deserializeDocumentPagerDutyIncidentDetail(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ItemValueMemberPagerDutyIncidentDetail{Value: mv} + break loop + case "url": var mv string if value != nil { @@ -5570,6 +5657,158 @@ func awsRestjson1_deserializeDocumentNotificationTargetSet(v *[]types.Notificati return nil } +func awsRestjson1_deserializeDocumentPagerDutyConfiguration(v **types.PagerDutyConfiguration, 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.PagerDutyConfiguration + if *v == nil { + sv = &types.PagerDutyConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "pagerDutyIncidentConfiguration": + if err := awsRestjson1_deserializeDocumentPagerDutyIncidentConfiguration(&sv.PagerDutyIncidentConfiguration, value); err != nil { + return err + } + + case "secretId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SecretId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPagerDutyIncidentConfiguration(v **types.PagerDutyIncidentConfiguration, 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.PagerDutyIncidentConfiguration + if *v == nil { + sv = &types.PagerDutyIncidentConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "serviceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPagerDutyIncidentDetail(v **types.PagerDutyIncidentDetail, 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.PagerDutyIncidentDetail + if *v == nil { + sv = &types.PagerDutyIncidentDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "autoResolve": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AutoResolve = ptr.Bool(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "secretId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SecretId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentRegionInfo(v **types.RegionInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ssmincidents/serializers.go b/service/ssmincidents/serializers.go index 798c830a07f..0a90a07a718 100644 --- a/service/ssmincidents/serializers.go +++ b/service/ssmincidents/serializers.go @@ -195,6 +195,13 @@ func awsRestjson1_serializeOpDocumentCreateResponsePlanInput(v *CreateResponsePl } } + if v.Integrations != nil { + ok := object.Key("integrations") + if err := awsRestjson1_serializeDocumentIntegrations(v.Integrations, ok); err != nil { + return err + } + } + if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) @@ -2186,6 +2193,13 @@ func awsRestjson1_serializeOpDocumentUpdateResponsePlanInput(v *UpdateResponsePl ok.String(*v.IncidentTemplateTitle) } + if v.Integrations != nil { + ok := object.Key("integrations") + if err := awsRestjson1_serializeDocumentIntegrations(v.Integrations, ok); err != nil { + return err + } + } + return nil } @@ -2607,6 +2621,40 @@ func awsRestjson1_serializeDocumentIntegerList(v []int32, value smithyjson.Value return nil } +func awsRestjson1_serializeDocumentIntegration(v types.Integration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.IntegrationMemberPagerDutyConfiguration: + av := object.Key("pagerDutyConfiguration") + if err := awsRestjson1_serializeDocumentPagerDutyConfiguration(&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_serializeDocumentIntegrations(v []types.Integration, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if vv := v[i]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentIntegration(v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentItemIdentifier(v *types.ItemIdentifier, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2639,6 +2687,12 @@ func awsRestjson1_serializeDocumentItemValue(v types.ItemValue, value smithyjson av := object.Key("metricDefinition") av.String(uv.Value) + case *types.ItemValueMemberPagerDutyIncidentDetail: + av := object.Key("pagerDutyIncidentDetail") + if err := awsRestjson1_serializeDocumentPagerDutyIncidentDetail(&uv.Value, av); err != nil { + return err + } + case *types.ItemValueMemberUrl: av := object.Key("url") av.String(uv.Value) @@ -2682,6 +2736,64 @@ func awsRestjson1_serializeDocumentNotificationTargetSet(v []types.NotificationT return nil } +func awsRestjson1_serializeDocumentPagerDutyConfiguration(v *types.PagerDutyConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.PagerDutyIncidentConfiguration != nil { + ok := object.Key("pagerDutyIncidentConfiguration") + if err := awsRestjson1_serializeDocumentPagerDutyIncidentConfiguration(v.PagerDutyIncidentConfiguration, ok); err != nil { + return err + } + } + + if v.SecretId != nil { + ok := object.Key("secretId") + ok.String(*v.SecretId) + } + + return nil +} + +func awsRestjson1_serializeDocumentPagerDutyIncidentConfiguration(v *types.PagerDutyIncidentConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ServiceId != nil { + ok := object.Key("serviceId") + ok.String(*v.ServiceId) + } + + return nil +} + +func awsRestjson1_serializeDocumentPagerDutyIncidentDetail(v *types.PagerDutyIncidentDetail, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AutoResolve != nil { + ok := object.Key("autoResolve") + ok.Boolean(*v.AutoResolve) + } + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + if v.SecretId != nil { + ok := object.Key("secretId") + ok.String(*v.SecretId) + } + + return nil +} + func awsRestjson1_serializeDocumentRegionMapInput(v map[string]types.RegionMapInputValue, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/ssmincidents/types/types.go b/service/ssmincidents/types/types.go index 839880282b4..129e835ac36 100644 --- a/service/ssmincidents/types/types.go +++ b/service/ssmincidents/types/types.go @@ -445,6 +445,25 @@ type IncidentTemplate struct { noSmithyDocumentSerde } +// Information about third-party services integrated into a response plan. +// +// The following types satisfy this interface: +// +// IntegrationMemberPagerDutyConfiguration +type Integration interface { + isIntegration() +} + +// Information about the PagerDuty service where the response plan creates an +// incident. +type IntegrationMemberPagerDutyConfiguration struct { + Value PagerDutyConfiguration + + noSmithyDocumentSerde +} + +func (*IntegrationMemberPagerDutyConfiguration) isIntegration() {} + // Details and type of a related item. type ItemIdentifier struct { @@ -467,6 +486,7 @@ type ItemIdentifier struct { // // ItemValueMemberArn // ItemValueMemberMetricDefinition +// ItemValueMemberPagerDutyIncidentDetail // ItemValueMemberUrl type ItemValue interface { isItemValue() @@ -491,6 +511,15 @@ type ItemValueMemberMetricDefinition struct { func (*ItemValueMemberMetricDefinition) isItemValue() {} +// Details about an incident that is associated with a PagerDuty incident. +type ItemValueMemberPagerDutyIncidentDetail struct { + Value PagerDutyIncidentDetail + + noSmithyDocumentSerde +} + +func (*ItemValueMemberPagerDutyIncidentDetail) isItemValue() {} + // The URL, if the related item is a non-Amazon Web Services resource. type ItemValueMemberUrl struct { Value string @@ -518,6 +547,63 @@ type NotificationTargetItemMemberSnsTopicArn struct { func (*NotificationTargetItemMemberSnsTopicArn) isNotificationTargetItem() {} +// Details about the PagerDuty configuration for a response plan. +type PagerDutyConfiguration struct { + + // The name of the PagerDuty configuration. + // + // This member is required. + Name *string + + // Details about the PagerDuty service associated with the configuration. + // + // This member is required. + PagerDutyIncidentConfiguration *PagerDutyIncidentConfiguration + + // The ID of the Amazon Web Services Secrets Manager secret that stores your + // PagerDuty key, either a General Access REST API Key or User Token REST API Key, + // and other user credentials. + // + // This member is required. + SecretId *string + + noSmithyDocumentSerde +} + +// Details about the PagerDuty service where the response plan creates an incident. +type PagerDutyIncidentConfiguration struct { + + // The ID of the PagerDuty service that the response plan associates with an + // incident when it launches. + // + // This member is required. + ServiceId *string + + noSmithyDocumentSerde +} + +// Details about the PagerDuty incident associated with an incident created by an +// Incident Manager response plan. +type PagerDutyIncidentDetail struct { + + // The ID of the incident associated with the PagerDuty service for the response + // plan. + // + // This member is required. + Id *string + + // Indicates whether to resolve the PagerDuty incident when you resolve the + // associated Incident Manager incident. + AutoResolve *bool + + // The ID of the Amazon Web Services Secrets Manager secret that stores your + // PagerDuty key, either a General Access REST API Key or User Token REST API Key, + // and other user credentials. + SecretId *string + + noSmithyDocumentSerde +} + // Information about a Amazon Web Services Region in your replication set. type RegionInfo struct { @@ -834,6 +920,7 @@ func (*UnknownUnionMember) isChatChannel() {} func (*UnknownUnionMember) isCondition() {} func (*UnknownUnionMember) isDynamicSsmParameterValue() {} func (*UnknownUnionMember) isEventReference() {} +func (*UnknownUnionMember) isIntegration() {} func (*UnknownUnionMember) isItemValue() {} func (*UnknownUnionMember) isNotificationTargetItem() {} func (*UnknownUnionMember) isRelatedItemsUpdate() {} diff --git a/service/ssmincidents/types/types_exported_test.go b/service/ssmincidents/types/types_exported_test.go index 4374c21fb3d..4220b448738 100644 --- a/service/ssmincidents/types/types_exported_test.go +++ b/service/ssmincidents/types/types_exported_test.go @@ -153,6 +153,24 @@ func ExampleEventReference_outputUsage() { var _ *string var _ *string +func ExampleIntegration_outputUsage() { + var union types.Integration + // type switches can be used to check the union value + switch v := union.(type) { + case *types.IntegrationMemberPagerDutyConfiguration: + _ = v.Value // Value is types.PagerDutyConfiguration + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.PagerDutyConfiguration + func ExampleItemValue_outputUsage() { var union types.ItemValue // type switches can be used to check the union value @@ -163,6 +181,9 @@ func ExampleItemValue_outputUsage() { case *types.ItemValueMemberMetricDefinition: _ = v.Value // Value is string + case *types.ItemValueMemberPagerDutyIncidentDetail: + _ = v.Value // Value is types.PagerDutyIncidentDetail + case *types.ItemValueMemberUrl: _ = v.Value // Value is string @@ -175,6 +196,7 @@ func ExampleItemValue_outputUsage() { } } +var _ *types.PagerDutyIncidentDetail var _ *string var _ *string var _ *string diff --git a/service/ssmincidents/validators.go b/service/ssmincidents/validators.go index b5727434446..b1a96877a4a 100644 --- a/service/ssmincidents/validators.go +++ b/service/ssmincidents/validators.go @@ -777,6 +777,42 @@ func validateIncidentTemplate(v *types.IncidentTemplate) error { } } +func validateIntegration(v types.Integration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Integration"} + switch uv := v.(type) { + case *types.IntegrationMemberPagerDutyConfiguration: + if err := validatePagerDutyConfiguration(&uv.Value); err != nil { + invalidParams.AddNested("[pagerDutyConfiguration]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIntegrations(v []types.Integration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Integrations"} + for i := range v { + if err := validateIntegration(v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateItemIdentifier(v *types.ItemIdentifier) error { if v == nil { return nil @@ -784,6 +820,10 @@ func validateItemIdentifier(v *types.ItemIdentifier) error { invalidParams := smithy.InvalidParamsError{Context: "ItemIdentifier"} if v.Value == nil { invalidParams.Add(smithy.NewErrParamRequired("Value")) + } else if v.Value != nil { + if err := validateItemValue(v.Value); err != nil { + invalidParams.AddNested("Value", err.(smithy.InvalidParamsError)) + } } if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) @@ -795,6 +835,80 @@ func validateItemIdentifier(v *types.ItemIdentifier) error { } } +func validateItemValue(v types.ItemValue) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ItemValue"} + switch uv := v.(type) { + case *types.ItemValueMemberPagerDutyIncidentDetail: + if err := validatePagerDutyIncidentDetail(&uv.Value); err != nil { + invalidParams.AddNested("[pagerDutyIncidentDetail]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePagerDutyConfiguration(v *types.PagerDutyConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PagerDutyConfiguration"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.SecretId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SecretId")) + } + if v.PagerDutyIncidentConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("PagerDutyIncidentConfiguration")) + } else if v.PagerDutyIncidentConfiguration != nil { + if err := validatePagerDutyIncidentConfiguration(v.PagerDutyIncidentConfiguration); err != nil { + invalidParams.AddNested("PagerDutyIncidentConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePagerDutyIncidentConfiguration(v *types.PagerDutyIncidentConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PagerDutyIncidentConfiguration"} + if v.ServiceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePagerDutyIncidentDetail(v *types.PagerDutyIncidentDetail) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PagerDutyIncidentDetail"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRelatedItem(v *types.RelatedItem) error { if v == nil { return nil @@ -967,6 +1081,11 @@ func validateOpCreateResponsePlanInput(v *CreateResponsePlanInput) error { invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) } } + if v.Integrations != nil { + if err := validateIntegrations(v.Integrations); err != nil { + invalidParams.AddNested("Integrations", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1393,6 +1512,11 @@ func validateOpUpdateResponsePlanInput(v *UpdateResponsePlanInput) error { invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) } } + if v.Integrations != nil { + if err := validateIntegrations(v.Integrations); err != nil { + invalidParams.AddNested("Integrations", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/sts/internal/endpoints/endpoints.go b/service/sts/internal/endpoints/endpoints.go index 1b4c8cc99c1..c3ec70ed28d 100644 --- a/service/sts/internal/endpoints/endpoints.go +++ b/service/sts/internal/endpoints/endpoints.go @@ -185,6 +185,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/swf/internal/endpoints/endpoints.go b/service/swf/internal/endpoints/endpoints.go index 685d2530ca5..183e416bdaf 100644 --- a/service/swf/internal/endpoints/endpoints.go +++ b/service/swf/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/synthetics/internal/endpoints/endpoints.go b/service/synthetics/internal/endpoints/endpoints.go index 09f30bde4d1..770eff240a2 100644 --- a/service/synthetics/internal/endpoints/endpoints.go +++ b/service/synthetics/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/transfer/deserializers.go b/service/transfer/deserializers.go index f681b023238..0b2e829c7eb 100644 --- a/service/transfer/deserializers.go +++ b/service/transfer/deserializers.go @@ -256,6 +256,9 @@ func awsAwsjson11_deserializeOpErrorCreateAgreement(response *smithyhttp.Respons case strings.EqualFold("ServiceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -379,6 +382,9 @@ func awsAwsjson11_deserializeOpErrorCreateConnector(response *smithyhttp.Respons case strings.EqualFold("ServiceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -499,6 +505,9 @@ func awsAwsjson11_deserializeOpErrorCreateProfile(response *smithyhttp.Response, case strings.EqualFold("ServiceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5915,6 +5924,9 @@ func awsAwsjson11_deserializeOpErrorUpdateAccess(response *smithyhttp.Response, case strings.EqualFold("ServiceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6038,6 +6050,9 @@ func awsAwsjson11_deserializeOpErrorUpdateAgreement(response *smithyhttp.Respons case strings.EqualFold("ServiceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6158,6 +6173,9 @@ func awsAwsjson11_deserializeOpErrorUpdateCertificate(response *smithyhttp.Respo case strings.EqualFold("ServiceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6281,6 +6299,9 @@ func awsAwsjson11_deserializeOpErrorUpdateConnector(response *smithyhttp.Respons case strings.EqualFold("ServiceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6524,6 +6545,9 @@ func awsAwsjson11_deserializeOpErrorUpdateProfile(response *smithyhttp.Response, case strings.EqualFold("ServiceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, diff --git a/service/xray/api_op_CreateGroup.go b/service/xray/api_op_CreateGroup.go index 11dcb20b0d5..5621ea1be26 100644 --- a/service/xray/api_op_CreateGroup.go +++ b/service/xray/api_op_CreateGroup.go @@ -44,7 +44,7 @@ type CreateGroupInput struct { // InsightsEnabled boolean can be set to true to enable insights for the new group // or false to disable insights for the new group. // - // * The NotifcationsEnabled + // * The NotificationsEnabled // boolean can be set to true to enable insights notifications for the new group. // Notifications may only be enabled on a group with InsightsEnabled set to true. InsightsConfiguration *types.InsightsConfiguration diff --git a/service/xray/api_op_DeleteResourcePolicy.go b/service/xray/api_op_DeleteResourcePolicy.go new file mode 100644 index 00000000000..58f418701c9 --- /dev/null +++ b/service/xray/api_op_DeleteResourcePolicy.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package xray + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a resource policy from the target Amazon Web Services account. +func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) { + if params == nil { + params = &DeleteResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResourcePolicyInput struct { + + // The name of the resource policy to delete. + // + // This member is required. + PolicyName *string + + // Specifies a specific policy revision to delete. Provide a PolicyRevisionId to + // ensure an atomic delete operation. If the provided revision id does not match + // the latest policy revision id, an InvalidPolicyRevisionIdException exception is + // returned. + PolicyRevisionId *string + + noSmithyDocumentSerde +} + +type DeleteResourcePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "xray", + OperationName: "DeleteResourcePolicy", + } +} diff --git a/service/xray/api_op_ListResourcePolicies.go b/service/xray/api_op_ListResourcePolicies.go new file mode 100644 index 00000000000..30fff9fbb0b --- /dev/null +++ b/service/xray/api_op_ListResourcePolicies.go @@ -0,0 +1,199 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package xray + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/xray/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the list of resource policies in the target Amazon Web Services account. +func (c *Client) ListResourcePolicies(ctx context.Context, params *ListResourcePoliciesInput, optFns ...func(*Options)) (*ListResourcePoliciesOutput, error) { + if params == nil { + params = &ListResourcePoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListResourcePolicies", params, optFns, c.addOperationListResourcePoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListResourcePoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListResourcePoliciesInput struct { + + // Not currently supported. + NextToken *string + + noSmithyDocumentSerde +} + +type ListResourcePoliciesOutput struct { + + // Pagination token. Not currently supported. + NextToken *string + + // The list of resource policies in the target Amazon Web Services account. + ResourcePolicies []types.ResourcePolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListResourcePoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListResourcePolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListResourcePolicies{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourcePolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListResourcePoliciesAPIClient is a client that implements the +// ListResourcePolicies operation. +type ListResourcePoliciesAPIClient interface { + ListResourcePolicies(context.Context, *ListResourcePoliciesInput, ...func(*Options)) (*ListResourcePoliciesOutput, error) +} + +var _ ListResourcePoliciesAPIClient = (*Client)(nil) + +// ListResourcePoliciesPaginatorOptions is the paginator options for +// ListResourcePolicies +type ListResourcePoliciesPaginatorOptions struct { + // 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 +} + +// ListResourcePoliciesPaginator is a paginator for ListResourcePolicies +type ListResourcePoliciesPaginator struct { + options ListResourcePoliciesPaginatorOptions + client ListResourcePoliciesAPIClient + params *ListResourcePoliciesInput + nextToken *string + firstPage bool +} + +// NewListResourcePoliciesPaginator returns a new ListResourcePoliciesPaginator +func NewListResourcePoliciesPaginator(client ListResourcePoliciesAPIClient, params *ListResourcePoliciesInput, optFns ...func(*ListResourcePoliciesPaginatorOptions)) *ListResourcePoliciesPaginator { + if params == nil { + params = &ListResourcePoliciesInput{} + } + + options := ListResourcePoliciesPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListResourcePoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListResourcePoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListResourcePolicies page. +func (p *ListResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourcePoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.ListResourcePolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListResourcePolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "xray", + OperationName: "ListResourcePolicies", + } +} diff --git a/service/xray/api_op_ListTagsForResource.go b/service/xray/api_op_ListTagsForResource.go index 4f48418be0d..f6d8bca184a 100644 --- a/service/xray/api_op_ListTagsForResource.go +++ b/service/xray/api_op_ListTagsForResource.go @@ -4,6 +4,7 @@ package xray import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/xray/types" @@ -122,6 +123,85 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } +// ListTagsForResourceAPIClient is a client that implements the ListTagsForResource +// operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + +// ListTagsForResourcePaginatorOptions is the paginator options for +// ListTagsForResource +type ListTagsForResourcePaginatorOptions struct { + // 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 +} + +// ListTagsForResourcePaginator is a paginator for ListTagsForResource +type ListTagsForResourcePaginator struct { + options ListTagsForResourcePaginatorOptions + client ListTagsForResourceAPIClient + params *ListTagsForResourceInput + nextToken *string + firstPage bool +} + +// NewListTagsForResourcePaginator returns a new ListTagsForResourcePaginator +func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params *ListTagsForResourceInput, optFns ...func(*ListTagsForResourcePaginatorOptions)) *ListTagsForResourcePaginator { + if params == nil { + params = &ListTagsForResourceInput{} + } + + options := ListTagsForResourcePaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListTagsForResourcePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListTagsForResourcePaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListTagsForResource page. +func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/xray/api_op_PutResourcePolicy.go b/service/xray/api_op_PutResourcePolicy.go new file mode 100644 index 00000000000..7bd73572acb --- /dev/null +++ b/service/xray/api_op_PutResourcePolicy.go @@ -0,0 +1,149 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package xray + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/xray/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sets the resource policy to grant one or more Amazon Web Services services and +// accounts permissions to access X-Ray. Each resource policy will be associated +// with a specific Amazon Web Services account. Each Amazon Web Services account +// can have a maximum of 5 resource policies, and each policy name must be unique +// within that account. The maximum size of each resource policy is 5KB. +func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolicyInput, optFns ...func(*Options)) (*PutResourcePolicyOutput, error) { + if params == nil { + params = &PutResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutResourcePolicy", params, optFns, c.addOperationPutResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutResourcePolicyInput struct { + + // The resource policy document, which can be up to 5kb in size. + // + // This member is required. + PolicyDocument *string + + // The name of the resource policy. Must be unique within a specific Amazon Web + // Services account. + // + // This member is required. + PolicyName *string + + // A flag to indicate whether to bypass the resource policy lockout safety check. + // Setting this value to true increases the risk that the policy becomes + // unmanageable. Do not set this value to true indiscriminately. Use this parameter + // only when you include a policy in the request and you intend to prevent the + // principal that is making the request from making a subsequent PutResourcePolicy + // request. The default value is false. + BypassPolicyLockoutCheck bool + + // Specifies a specific policy revision, to ensure an atomic create operation. By + // default the resource policy is created if it does not exist, or updated with an + // incremented revision id. The revision id is unique to each policy in the + // account. If the policy revision id does not match the latest revision id, the + // operation will fail with an InvalidPolicyRevisionIdException exception. You can + // also provide a PolicyRevisionId of 0. In this case, the operation will fail with + // an InvalidPolicyRevisionIdException exception if a resource policy with the same + // name already exists. + PolicyRevisionId *string + + noSmithyDocumentSerde +} + +type PutResourcePolicyOutput struct { + + // The resource policy document, as provided in the PutResourcePolicyRequest. + ResourcePolicy *types.ResourcePolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "xray", + OperationName: "PutResourcePolicy", + } +} diff --git a/service/xray/api_op_UpdateGroup.go b/service/xray/api_op_UpdateGroup.go index 22fab68ae35..2fd90e7d5a6 100644 --- a/service/xray/api_op_UpdateGroup.go +++ b/service/xray/api_op_UpdateGroup.go @@ -44,7 +44,7 @@ type UpdateGroupInput struct { // InsightsEnabled boolean can be set to true to enable insights for the group or // false to disable insights for the group. // - // * The NotifcationsEnabled boolean can + // * The NotificationsEnabled boolean can // be set to true to enable insights notifications for the group. Notifications can // only be enabled on a group with InsightsEnabled set to true. InsightsConfiguration *types.InsightsConfiguration diff --git a/service/xray/deserializers.go b/service/xray/deserializers.go index 6d517a39fb3..43ed7df739f 100644 --- a/service/xray/deserializers.go +++ b/service/xray/deserializers.go @@ -573,6 +573,95 @@ func awsRestjson1_deserializeOpErrorDeleteGroup(response *smithyhttp.Response, m } } +type awsRestjson1_deserializeOpDeleteResourcePolicy struct { +} + +func (*awsRestjson1_deserializeOpDeleteResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteResourcePolicy) 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_deserializeOpErrorDeleteResourcePolicy(response, &metadata) + } + output := &DeleteResourcePolicyOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidPolicyRevisionIdException", errorCode): + return awsRestjson1_deserializeErrorInvalidPolicyRevisionIdException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ThrottledException", errorCode): + return awsRestjson1_deserializeErrorThrottledException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpDeleteSamplingRule struct { } @@ -3086,14 +3175,14 @@ func awsRestjson1_deserializeOpDocumentGetTraceSummariesOutput(v **GetTraceSumma return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpListResourcePolicies struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpListResourcePolicies) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListResourcePolicies) 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) @@ -3107,9 +3196,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_deserializeOpErrorListResourcePolicies(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListResourcePoliciesOutput{} out.Result = output var buff [1024]byte @@ -3130,7 +3219,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListResourcePoliciesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3143,7 +3232,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListResourcePolicies(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)} @@ -3187,9 +3276,6 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottledException", errorCode): return awsRestjson1_deserializeErrorThrottledException(response, errorBody) @@ -3203,7 +3289,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListResourcePoliciesOutput(v **ListResourcePoliciesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3216,9 +3302,9 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *ListResourcePoliciesOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &ListResourcePoliciesOutput{} } else { sv = *v } @@ -3229,13 +3315,13 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor 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 ResourcePolicyNextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } - case "Tags": - if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + case "ResourcePolicies": + if err := awsRestjson1_deserializeDocumentResourcePolicyList(&sv.ResourcePolicies, value); err != nil { return err } @@ -3248,14 +3334,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpPutEncryptionConfig struct { +type awsRestjson1_deserializeOpListTagsForResource struct { } -func (*awsRestjson1_deserializeOpPutEncryptionConfig) ID() string { +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutEncryptionConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -3269,9 +3355,9 @@ func (m *awsRestjson1_deserializeOpPutEncryptionConfig) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutEncryptionConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &PutEncryptionConfigOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -3292,7 +3378,7 @@ func (m *awsRestjson1_deserializeOpPutEncryptionConfig) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutEncryptionConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3305,7 +3391,7 @@ func (m *awsRestjson1_deserializeOpPutEncryptionConfig) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutEncryptionConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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)} @@ -3349,6 +3435,9 @@ func awsRestjson1_deserializeOpErrorPutEncryptionConfig(response *smithyhttp.Res case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottledException", errorCode): return awsRestjson1_deserializeErrorThrottledException(response, errorBody) @@ -3362,7 +3451,7 @@ func awsRestjson1_deserializeOpErrorPutEncryptionConfig(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentPutEncryptionConfigOutput(v **PutEncryptionConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3375,17 +3464,26 @@ func awsRestjson1_deserializeOpDocumentPutEncryptionConfigOutput(v **PutEncrypti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutEncryptionConfigOutput + var sv *ListTagsForResourceOutput if *v == nil { - sv = &PutEncryptionConfigOutput{} + sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EncryptionConfig": - if err := awsRestjson1_deserializeDocumentEncryptionConfig(&sv.EncryptionConfig, value); err != nil { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } @@ -3398,14 +3496,14 @@ func awsRestjson1_deserializeOpDocumentPutEncryptionConfigOutput(v **PutEncrypti return nil } -type awsRestjson1_deserializeOpPutTelemetryRecords struct { +type awsRestjson1_deserializeOpPutEncryptionConfig struct { } -func (*awsRestjson1_deserializeOpPutTelemetryRecords) ID() string { +func (*awsRestjson1_deserializeOpPutEncryptionConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutTelemetryRecords) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutEncryptionConfig) 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) @@ -3419,15 +3517,43 @@ func (m *awsRestjson1_deserializeOpPutTelemetryRecords) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutTelemetryRecords(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutEncryptionConfig(response, &metadata) } - output := &PutTelemetryRecordsOutput{} + output := &PutEncryptionConfigOutput{} 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_deserializeOpDocumentPutEncryptionConfigOutput(&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_deserializeOpErrorPutTelemetryRecords(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutEncryptionConfig(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)} @@ -3484,14 +3610,50 @@ func awsRestjson1_deserializeOpErrorPutTelemetryRecords(response *smithyhttp.Res } } -type awsRestjson1_deserializeOpPutTraceSegments struct { +func awsRestjson1_deserializeOpDocumentPutEncryptionConfigOutput(v **PutEncryptionConfigOutput, 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 *PutEncryptionConfigOutput + if *v == nil { + sv = &PutEncryptionConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EncryptionConfig": + if err := awsRestjson1_deserializeDocumentEncryptionConfig(&sv.EncryptionConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpPutTraceSegments) ID() string { +type awsRestjson1_deserializeOpPutResourcePolicy struct { +} + +func (*awsRestjson1_deserializeOpPutResourcePolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutTraceSegments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutResourcePolicy) 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) @@ -3505,9 +3667,9 @@ func (m *awsRestjson1_deserializeOpPutTraceSegments) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutTraceSegments(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutResourcePolicy(response, &metadata) } - output := &PutTraceSegmentsOutput{} + output := &PutResourcePolicyOutput{} out.Result = output var buff [1024]byte @@ -3528,7 +3690,7 @@ func (m *awsRestjson1_deserializeOpPutTraceSegments) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutTraceSegmentsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3541,7 +3703,7 @@ func (m *awsRestjson1_deserializeOpPutTraceSegments) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutTraceSegments(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutResourcePolicy(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)} @@ -3582,8 +3744,20 @@ func awsRestjson1_deserializeOpErrorPutTraceSegments(response *smithyhttp.Respon } switch { - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("InvalidPolicyRevisionIdException", errorCode): + return awsRestjson1_deserializeErrorInvalidPolicyRevisionIdException(response, errorBody) + + case strings.EqualFold("LockoutPreventionException", errorCode): + return awsRestjson1_deserializeErrorLockoutPreventionException(response, errorBody) + + case strings.EqualFold("MalformedPolicyDocumentException", errorCode): + return awsRestjson1_deserializeErrorMalformedPolicyDocumentException(response, errorBody) + + case strings.EqualFold("PolicyCountLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorPolicyCountLimitExceededException(response, errorBody) + + case strings.EqualFold("PolicySizeLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorPolicySizeLimitExceededException(response, errorBody) case strings.EqualFold("ThrottledException", errorCode): return awsRestjson1_deserializeErrorThrottledException(response, errorBody) @@ -3598,7 +3772,7 @@ func awsRestjson1_deserializeOpErrorPutTraceSegments(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentPutTraceSegmentsOutput(v **PutTraceSegmentsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutResourcePolicyOutput(v **PutResourcePolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3611,17 +3785,17 @@ func awsRestjson1_deserializeOpDocumentPutTraceSegmentsOutput(v **PutTraceSegmen return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutTraceSegmentsOutput + var sv *PutResourcePolicyOutput if *v == nil { - sv = &PutTraceSegmentsOutput{} + sv = &PutResourcePolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "UnprocessedTraceSegments": - if err := awsRestjson1_deserializeDocumentUnprocessedTraceSegmentList(&sv.UnprocessedTraceSegments, value); err != nil { + case "ResourcePolicy": + if err := awsRestjson1_deserializeDocumentResourcePolicy(&sv.ResourcePolicy, value); err != nil { return err } @@ -3634,14 +3808,14 @@ func awsRestjson1_deserializeOpDocumentPutTraceSegmentsOutput(v **PutTraceSegmen return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpPutTelemetryRecords struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpPutTelemetryRecords) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutTelemetryRecords) 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) @@ -3655,15 +3829,15 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutTelemetryRecords(response, &metadata) } - output := &TagResourceOutput{} + output := &PutTelemetryRecordsOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutTelemetryRecords(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)} @@ -3707,15 +3881,9 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottledException", errorCode): return awsRestjson1_deserializeErrorThrottledException(response, errorBody) - case strings.EqualFold("TooManyTagsException", errorCode): - return awsRestjson1_deserializeErrorTooManyTagsException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3726,14 +3894,14 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpUntagResource struct { +type awsRestjson1_deserializeOpPutTraceSegments struct { } -func (*awsRestjson1_deserializeOpUntagResource) ID() string { +func (*awsRestjson1_deserializeOpPutTraceSegments) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutTraceSegments) 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) @@ -3747,12 +3915,254 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutTraceSegments(response, &metadata) } - output := &UntagResourceOutput{} + output := &PutTraceSegmentsOutput{} out.Result = output - return out, metadata, err + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentPutTraceSegmentsOutput(&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_deserializeOpErrorPutTraceSegments(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ThrottledException", errorCode): + return awsRestjson1_deserializeErrorThrottledException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutTraceSegmentsOutput(v **PutTraceSegmentsOutput, 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 *PutTraceSegmentsOutput + if *v == nil { + sv = &PutTraceSegmentsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "UnprocessedTraceSegments": + if err := awsRestjson1_deserializeDocumentUnprocessedTraceSegmentList(&sv.UnprocessedTraceSegments, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottledException", errorCode): + return awsRestjson1_deserializeErrorThrottledException(response, errorBody) + + case strings.EqualFold("TooManyTagsException", errorCode): + return awsRestjson1_deserializeErrorTooManyTagsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err } func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { @@ -4115,8 +4525,8 @@ func awsRestjson1_deserializeOpDocumentUpdateSamplingRuleOutput(v **UpdateSampli return nil } -func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidRequestException{} +func awsRestjson1_deserializeErrorInvalidPolicyRevisionIdException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidPolicyRevisionIdException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4134,7 +4544,7 @@ func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.R return err } - err := awsRestjson1_deserializeDocumentInvalidRequestException(&output, shape) + err := awsRestjson1_deserializeDocumentInvalidPolicyRevisionIdException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4151,8 +4561,8 @@ func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.R return output } -func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceNotFoundException{} +func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidRequestException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4170,7 +4580,7 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp return err } - err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + err := awsRestjson1_deserializeDocumentInvalidRequestException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4187,8 +4597,8 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp return output } -func awsRestjson1_deserializeErrorRuleLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.RuleLimitExceededException{} +func awsRestjson1_deserializeErrorLockoutPreventionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.LockoutPreventionException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4206,7 +4616,7 @@ func awsRestjson1_deserializeErrorRuleLimitExceededException(response *smithyhtt return err } - err := awsRestjson1_deserializeDocumentRuleLimitExceededException(&output, shape) + err := awsRestjson1_deserializeDocumentLockoutPreventionException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4223,7 +4633,187 @@ func awsRestjson1_deserializeErrorRuleLimitExceededException(response *smithyhtt return output } -func awsRestjson1_deserializeErrorThrottledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsRestjson1_deserializeErrorMalformedPolicyDocumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.MalformedPolicyDocumentException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentMalformedPolicyDocumentException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorPolicyCountLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PolicyCountLimitExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentPolicyCountLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorPolicySizeLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PolicySizeLimitExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentPolicySizeLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorRuleLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.RuleLimitExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentRuleLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ThrottledException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6819,6 +7409,46 @@ func awsRestjson1_deserializeDocumentInstanceIdDetail(v **types.InstanceIdDetail return nil } +func awsRestjson1_deserializeDocumentInvalidPolicyRevisionIdException(v **types.InvalidPolicyRevisionIdException, 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.InvalidPolicyRevisionIdException + if *v == nil { + sv = &types.InvalidPolicyRevisionIdException{} + } 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 ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInvalidRequestException(v **types.InvalidRequestException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6859,6 +7489,166 @@ func awsRestjson1_deserializeDocumentInvalidRequestException(v **types.InvalidRe return nil } +func awsRestjson1_deserializeDocumentLockoutPreventionException(v **types.LockoutPreventionException, 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.LockoutPreventionException + if *v == nil { + sv = &types.LockoutPreventionException{} + } 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 ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMalformedPolicyDocumentException(v **types.MalformedPolicyDocumentException, 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.MalformedPolicyDocumentException + if *v == nil { + sv = &types.MalformedPolicyDocumentException{} + } 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 ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPolicyCountLimitExceededException(v **types.PolicyCountLimitExceededException, 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.PolicyCountLimitExceededException + if *v == nil { + sv = &types.PolicyCountLimitExceededException{} + } 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 ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPolicySizeLimitExceededException(v **types.PolicySizeLimitExceededException, 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.PolicySizeLimitExceededException + if *v == nil { + sv = &types.PolicySizeLimitExceededException{} + } 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 ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentRequestImpactStatistics(v **types.RequestImpactStatistics, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7018,6 +7808,114 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsRestjson1_deserializeDocumentResourcePolicy(v **types.ResourcePolicy, 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.ResourcePolicy + if *v == nil { + sv = &types.ResourcePolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "PolicyDocument": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyDocument to be of type string, got %T instead", value) + } + sv.PolicyDocument = ptr.String(jtv) + } + + case "PolicyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyName to be of type string, got %T instead", value) + } + sv.PolicyName = ptr.String(jtv) + } + + case "PolicyRevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyRevisionId to be of type string, got %T instead", value) + } + sv.PolicyRevisionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourcePolicyList(v *[]types.ResourcePolicy, 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.ResourcePolicy + if *v == nil { + cv = []types.ResourcePolicy{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourcePolicy + destAddr := &col + if err := awsRestjson1_deserializeDocumentResourcePolicy(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentResponseTimeRootCause(v **types.ResponseTimeRootCause, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/xray/generated.json b/service/xray/generated.json index 048197d69fa..67fa7c922d6 100644 --- a/service/xray/generated.json +++ b/service/xray/generated.json @@ -12,6 +12,7 @@ "api_op_CreateGroup.go", "api_op_CreateSamplingRule.go", "api_op_DeleteGroup.go", + "api_op_DeleteResourcePolicy.go", "api_op_DeleteSamplingRule.go", "api_op_GetEncryptionConfig.go", "api_op_GetGroup.go", @@ -27,8 +28,10 @@ "api_op_GetTimeSeriesServiceStatistics.go", "api_op_GetTraceGraph.go", "api_op_GetTraceSummaries.go", + "api_op_ListResourcePolicies.go", "api_op_ListTagsForResource.go", "api_op_PutEncryptionConfig.go", + "api_op_PutResourcePolicy.go", "api_op_PutTelemetryRecords.go", "api_op_PutTraceSegments.go", "api_op_TagResource.go", diff --git a/service/xray/internal/endpoints/endpoints.go b/service/xray/internal/endpoints/endpoints.go index 54219b059e9..d9e663a295e 100644 --- a/service/xray/internal/endpoints/endpoints.go +++ b/service/xray/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/xray/serializers.go b/service/xray/serializers.go index 94d64bb0913..188c08c3b02 100644 --- a/service/xray/serializers.go +++ b/service/xray/serializers.go @@ -328,6 +328,79 @@ func awsRestjson1_serializeOpDocumentDeleteGroupInput(v *DeleteGroupInput, value return nil } +type awsRestjson1_serializeOpDeleteResourcePolicy struct { +} + +func (*awsRestjson1_serializeOpDeleteResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteResourcePolicy) 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.(*DeleteResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/DeleteResourcePolicy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDeleteResourcePolicyInput(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_serializeOpHttpBindingsDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PolicyName != nil { + ok := object.Key("PolicyName") + ok.String(*v.PolicyName) + } + + if v.PolicyRevisionId != nil { + ok := object.Key("PolicyRevisionId") + ok.String(*v.PolicyRevisionId) + } + + return nil +} + type awsRestjson1_serializeOpDeleteSamplingRule struct { } @@ -1488,6 +1561,74 @@ func awsRestjson1_serializeOpDocumentGetTraceSummariesInput(v *GetTraceSummaries return nil } +type awsRestjson1_serializeOpListResourcePolicies struct { +} + +func (*awsRestjson1_serializeOpListResourcePolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListResourcePolicies) 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.(*ListResourcePoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ListResourcePolicies") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListResourcePoliciesInput(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_serializeOpHttpBindingsListResourcePoliciesInput(v *ListResourcePoliciesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListResourcePoliciesInput(v *ListResourcePoliciesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListTagsForResource struct { } @@ -1634,6 +1775,89 @@ func awsRestjson1_serializeOpDocumentPutEncryptionConfigInput(v *PutEncryptionCo return nil } +type awsRestjson1_serializeOpPutResourcePolicy struct { +} + +func (*awsRestjson1_serializeOpPutResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutResourcePolicy) 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.(*PutResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/PutResourcePolicy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutResourcePolicyInput(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_serializeOpHttpBindingsPutResourcePolicyInput(v *PutResourcePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutResourcePolicyInput(v *PutResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BypassPolicyLockoutCheck { + ok := object.Key("BypassPolicyLockoutCheck") + ok.Boolean(v.BypassPolicyLockoutCheck) + } + + if v.PolicyDocument != nil { + ok := object.Key("PolicyDocument") + ok.String(*v.PolicyDocument) + } + + if v.PolicyName != nil { + ok := object.Key("PolicyName") + ok.String(*v.PolicyName) + } + + if v.PolicyRevisionId != nil { + ok := object.Key("PolicyRevisionId") + ok.String(*v.PolicyRevisionId) + } + + return nil +} + type awsRestjson1_serializeOpPutTelemetryRecords struct { } diff --git a/service/xray/types/errors.go b/service/xray/types/errors.go index 5ff7028e990..ee2ebbc2a72 100644 --- a/service/xray/types/errors.go +++ b/service/xray/types/errors.go @@ -7,6 +7,29 @@ import ( smithy "github.com/aws/smithy-go" ) +// A policy revision id was provided which does not match the latest policy +// revision. This exception is also if a policy revision id of 0 is provided via +// PutResourcePolicy and a policy with the same name already exists. +type InvalidPolicyRevisionIdException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InvalidPolicyRevisionIdException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidPolicyRevisionIdException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidPolicyRevisionIdException) ErrorCode() string { + return "InvalidPolicyRevisionIdException" +} +func (e *InvalidPolicyRevisionIdException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The request is missing required parameters or has invalid parameters. type InvalidRequestException struct { Message *string @@ -26,6 +49,90 @@ func (e *InvalidRequestException) ErrorMessage() string { func (e *InvalidRequestException) ErrorCode() string { return "InvalidRequestException" } func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The provided resource policy would prevent the caller of this request from +// calling PutResourcePolicy in the future. +type LockoutPreventionException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *LockoutPreventionException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *LockoutPreventionException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *LockoutPreventionException) ErrorCode() string { return "LockoutPreventionException" } +func (e *LockoutPreventionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Invalid policy document provided in request. +type MalformedPolicyDocumentException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *MalformedPolicyDocumentException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *MalformedPolicyDocumentException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *MalformedPolicyDocumentException) ErrorCode() string { + return "MalformedPolicyDocumentException" +} +func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Exceeded the maximum number of resource policies for a target Amazon Web +// Services account. +type PolicyCountLimitExceededException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *PolicyCountLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PolicyCountLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PolicyCountLimitExceededException) ErrorCode() string { + return "PolicyCountLimitExceededException" +} +func (e *PolicyCountLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Exceeded the maximum size for a resource policy. +type PolicySizeLimitExceededException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *PolicySizeLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PolicySizeLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PolicySizeLimitExceededException) ErrorCode() string { + return "PolicySizeLimitExceededException" +} +func (e *PolicySizeLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The resource was not found. Verify that the name or Amazon Resource Name (ARN) // of the resource is correct. type ResourceNotFoundException struct { diff --git a/service/xray/types/types.go b/service/xray/types/types.go index f14b6a6def5..d1b3971751d 100644 --- a/service/xray/types/types.go +++ b/service/xray/types/types.go @@ -623,6 +623,27 @@ type ResourceARNDetail struct { noSmithyDocumentSerde } +// A resource policy grants one or more Amazon Web Services services and accounts +// permissions to access X-Ray. Each resource policy is associated with a specific +// Amazon Web Services account. +type ResourcePolicy struct { + + // When the policy was last updated, in Unix time seconds. + LastUpdatedTime *time.Time + + // The resource policy document, which can be up to 5kb in size. + PolicyDocument *string + + // The name of the resource policy. Must be unique within a specific Amazon Web + // Services account. + PolicyName *string + + // Returns the current policy revision id for this policy name. + PolicyRevisionId *string + + noSmithyDocumentSerde +} + // The root cause information for a response time warning. type ResponseTimeRootCause struct { diff --git a/service/xray/validators.go b/service/xray/validators.go index e179f6c0dc4..d03c48314e1 100644 --- a/service/xray/validators.go +++ b/service/xray/validators.go @@ -70,6 +70,26 @@ func (m *validateOpCreateSamplingRule) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDeleteResourcePolicy struct { +} + +func (*validateOpDeleteResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetInsightEvents struct { } @@ -290,6 +310,26 @@ func (m *validateOpPutEncryptionConfig) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpPutResourcePolicy struct { +} + +func (*validateOpPutResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpPutTelemetryRecords struct { } @@ -402,6 +442,10 @@ func addOpCreateSamplingRuleValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpCreateSamplingRule{}, middleware.After) } +func addOpDeleteResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResourcePolicy{}, middleware.After) +} + func addOpGetInsightEventsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetInsightEvents{}, middleware.After) } @@ -446,6 +490,10 @@ func addOpPutEncryptionConfigValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpPutEncryptionConfig{}, middleware.After) } +func addOpPutResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutResourcePolicy{}, middleware.After) +} + func addOpPutTelemetryRecordsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutTelemetryRecords{}, middleware.After) } @@ -660,6 +708,21 @@ func validateOpCreateSamplingRuleInput(v *CreateSamplingRuleInput) error { } } +func validateOpDeleteResourcePolicyInput(v *DeleteResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteResourcePolicyInput"} + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetInsightEventsInput(v *GetInsightEventsInput) error { if v == nil { return nil @@ -847,6 +910,24 @@ func validateOpPutEncryptionConfigInput(v *PutEncryptionConfigInput) error { } } +func validateOpPutResourcePolicyInput(v *PutResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutResourcePolicyInput"} + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if v.PolicyDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpPutTelemetryRecordsInput(v *PutTelemetryRecordsInput) error { if v == nil { return nil