diff --git a/.changelog/2ed111acf01d4504a55d6424b948a146.json b/.changelog/2ed111acf01d4504a55d6424b948a146.json new file mode 100644 index 00000000000..d4eecefb294 --- /dev/null +++ b/.changelog/2ed111acf01d4504a55d6424b948a146.json @@ -0,0 +1,8 @@ +{ + "id": "2ed111ac-f01d-4504-a55d-6424b948a146", + "type": "bugfix", + "description": "Update to not escape HTML when encoding the policy.", + "modules": [ + "feature/cloudfront/sign" + ] +} \ No newline at end of file diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json new file mode 100644 index 00000000000..4b555c0a959 --- /dev/null +++ b/.changelog/41575353444b40ffbf474f4155544f00.json @@ -0,0 +1,10 @@ +{ + "id": "41575353-444b-40ff-bf47-4f4155544f00", + "type": "release", + "description": "New AWS service client module", + "modules": [ + "service/chimesdkidentity", + "service/chimesdkmessaging", + "service/snowdevicemanagement" + ] +} \ No newline at end of file diff --git a/.changelog/4bd5af6ccf0b4a1ca43659ea5c56b78d.json b/.changelog/4bd5af6ccf0b4a1ca43659ea5c56b78d.json new file mode 100644 index 00000000000..82d97aef911 --- /dev/null +++ b/.changelog/4bd5af6ccf0b4a1ca43659ea5c56b78d.json @@ -0,0 +1,25 @@ +{ + "id": "4bd5af6c-cf0b-4a1c-a436-59ea5c56b78d", + "type": "feature", + "description": "API client updated", + "modules": [ + "service/athena", + "service/autoscaling", + "service/chime", + "service/chimesdkidentity", + "service/chimesdkmessaging", + "service/codebuild", + "service/connect", + "service/ebs", + "service/ecs", + "service/lexmodelsv2", + "service/lightsail", + "service/nimble", + "service/rekognition", + "service/route53", + "service/snowdevicemanagement", + "service/ssm", + "service/synthetics", + "service/wafv2" + ] +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/athena.2017-05-18.json b/codegen/sdk-codegen/aws-models/athena.2017-05-18.json index 1c099a6cc42..db53d0de74f 100644 --- a/codegen/sdk-codegen/aws-models/athena.2017-05-18.json +++ b/codegen/sdk-codegen/aws-models/athena.2017-05-18.json @@ -148,7 +148,7 @@ "name": "athena" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "

Amazon Athena is an interactive query service that lets you use standard SQL to\n analyze data directly in Amazon S3. You can point Athena at your data in Amazon S3 and\n run ad-hoc queries and get results in seconds. Athena is serverless, so there is no\n infrastructure to set up or manage. You pay only for the queries you run. Athena scales\n automatically—executing queries in parallel—so results are fast, even with large\n datasets and complex queries. For more information, see What is Amazon\n Athena in the Amazon Athena User Guide.

\n

If you connect to Athena using the JDBC driver, use version 1.1.0 of the driver or\n later with the Amazon Athena API. Earlier version drivers do not support the API. For\n more information and to download the driver, see Accessing\n Amazon Athena with JDBC.

\n

For code samples using the AWS SDK for Java, see Examples and\n Code Samples in the Amazon Athena User Guide.

", + "smithy.api#documentation": "

Amazon Athena is an interactive query service that lets you use standard SQL\n to analyze data directly in Amazon S3. You can point Athena at your\n data in Amazon S3 and run ad-hoc queries and get results in seconds. Athena is serverless, so there is no infrastructure to set up or manage. You pay\n only for the queries you run. Athena scales automatically—executing queries\n in parallel—so results are fast, even with large datasets and complex queries. For more\n information, see What is Amazon Athena in the Amazon Athena User\n Guide.

\n

If you connect to Athena using the JDBC driver, use version 1.1.0 of the\n driver or later with the Amazon Athena API. Earlier version drivers do not\n support the API. For more information and to download the driver, see Accessing\n Amazon Athena with JDBC.

\n

For code samples using the Amazon Web Services SDK for Java, see Examples and\n Code Samples in the Amazon Athena User\n Guide.

", "smithy.api#title": "Amazon Athena" } }, @@ -284,7 +284,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$" } }, "com.amazonaws.athena#Column": { @@ -422,7 +422,7 @@ "min": 0, "max": 255 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$" } }, "com.amazonaws.athena#CreateDataCatalog": { @@ -442,7 +442,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates (registers) a data catalog with the specified name and properties. Catalogs\n created are visible to all users of the same AWS account.

" + "smithy.api#documentation": "

Creates (registers) a data catalog with the specified name and properties. Catalogs\n created are visible to all users of the same Amazon Web Services account.

" } }, "com.amazonaws.athena#CreateDataCatalogInput": { @@ -451,14 +451,14 @@ "Name": { "target": "com.amazonaws.athena#CatalogNameString", "traits": { - "smithy.api#documentation": "

The name of the data catalog to create. The catalog name must be unique for the AWS\n account and can use a maximum of 128 alphanumeric, underscore, at sign, or hyphen\n characters.

", + "smithy.api#documentation": "

The name of the data catalog to create. The catalog name must be unique for the\n Amazon Web Services account and can use a maximum of 128 alphanumeric, underscore, at\n sign, or hyphen characters.

", "smithy.api#required": {} } }, "Type": { "target": "com.amazonaws.athena#DataCatalogType", "traits": { - "smithy.api#documentation": "

The type of data catalog to create: LAMBDA for a federated catalog or\n HIVE for an external hive metastore.

\n \n

Do not use the GLUE type. This refers to the\n AwsDataCatalog that already exists in your account, of which you\n can have only one. Specifying the GLUE type will result in an\n INVALID_INPUT error.

\n
", + "smithy.api#documentation": "

The type of data catalog to create: LAMBDA for a federated catalog,\n HIVE for an external hive metastore, or GLUE for an\n Glue Data Catalog.

", "smithy.api#required": {} } }, @@ -471,7 +471,7 @@ "Parameters": { "target": "com.amazonaws.athena#ParametersMap", "traits": { - "smithy.api#documentation": "

Specifies the Lambda function or functions to use for creating the data catalog. This\n is a mapping whose values depend on the catalog type.

\n " + "smithy.api#documentation": "

Specifies the Lambda function or functions to use for creating the data\n catalog. This is a mapping whose values depend on the catalog type.

\n " } }, "Tags": { @@ -503,7 +503,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a named query in the specified workgroup. Requires that you have access to the\n workgroup.

\n

For code samples using the AWS SDK for Java, see Examples and\n Code Samples in the Amazon Athena User Guide.

", + "smithy.api#documentation": "

Creates a named query in the specified workgroup. Requires that you have access to the\n workgroup.

\n

For code samples using the Amazon Web Services SDK for Java, see Examples and\n Code Samples in the Amazon Athena User\n Guide.

", "smithy.api#idempotent": {} } }, @@ -540,7 +540,7 @@ "ClientRequestToken": { "target": "com.amazonaws.athena#IdempotencyToken", "traits": { - "smithy.api#documentation": "

A unique case-sensitive string used to ensure the request to create the query is\n idempotent (executes only once). If another CreateNamedQuery request is\n received, the same response is returned and another query is not created. If a parameter\n has changed, for example, the QueryString, an error is returned.

\n \n

This token is listed as not required because AWS SDKs (for example the AWS SDK for\n Java) auto-generate the token for users. If you are not using the AWS SDK or the AWS\n CLI, you must provide this token or the action will fail.

\n
", + "smithy.api#documentation": "

A unique case-sensitive string used to ensure the request to create the query is\n idempotent (executes only once). If another CreateNamedQuery request is\n received, the same response is returned and another query is not created. If a parameter\n has changed, for example, the QueryString, an error is returned.

\n \n

This token is listed as not required because Amazon Web Services SDKs (for example\n the Amazon Web Services SDK for Java) auto-generate the token for users. If you are\n not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide\n this token or the action will fail.

\n
", "smithy.api#idempotencyToken": {} } }, @@ -652,7 +652,7 @@ "Configuration": { "target": "com.amazonaws.athena#WorkGroupConfiguration", "traits": { - "smithy.api#documentation": "

The configuration for the workgroup, which includes the location in Amazon S3 where\n query results are stored, the encryption configuration, if any, used for encrypting\n query results, whether the Amazon CloudWatch Metrics are enabled for the workgroup, the\n limit for the amount of bytes scanned (cutoff) per query, if it is specified, and\n whether workgroup's settings (specified with EnforceWorkGroupConfiguration) in the\n WorkGroupConfiguration override client-side settings. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

" + "smithy.api#documentation": "

The configuration for the workgroup, which includes the location in Amazon S3\n where query results are stored, the encryption configuration, if any, used for\n encrypting query results, whether the Amazon CloudWatch Metrics are enabled for the\n workgroup, the limit for the amount of bytes scanned (cutoff) per query, if it is\n specified, and whether workgroup's settings (specified with\n EnforceWorkGroupConfiguration) in the\n WorkGroupConfiguration override client-side settings. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

" } }, "Description": { @@ -679,7 +679,7 @@ "Name": { "target": "com.amazonaws.athena#CatalogNameString", "traits": { - "smithy.api#documentation": "

The name of the data catalog. The catalog name must be unique for the AWS account and\n can use a maximum of 128 alphanumeric, underscore, at sign, or hyphen characters.

", + "smithy.api#documentation": "

The name of the data catalog. The catalog name must be unique for the Amazon Web Services account and can use a maximum of 128 alphanumeric, underscore, at sign,\n or hyphen characters.

", "smithy.api#required": {} } }, @@ -692,19 +692,19 @@ "Type": { "target": "com.amazonaws.athena#DataCatalogType", "traits": { - "smithy.api#documentation": "

The type of data catalog: LAMBDA for a federated catalog or\n HIVE for an external hive metastore. GLUE refers to the\n AwsDataCatalog that already exists in your account, of which you can\n have only one.

", + "smithy.api#documentation": "

The type of data catalog to create: LAMBDA for a federated catalog,\n HIVE for an external hive metastore, or GLUE for an\n Glue Data Catalog.

", "smithy.api#required": {} } }, "Parameters": { "target": "com.amazonaws.athena#ParametersMap", "traits": { - "smithy.api#documentation": "

Specifies the Lambda function or functions to use for the data catalog. This is a\n mapping whose values depend on the catalog type.

\n " + "smithy.api#documentation": "

Specifies the Lambda function or functions to use for the data catalog.\n This is a mapping whose values depend on the catalog type.

\n " } } }, "traits": { - "smithy.api#documentation": "

Contains information about a data catalog in an AWS account.

" + "smithy.api#documentation": "

Contains information about a data catalog in an Amazon Web Services account.

" } }, "com.amazonaws.athena#DataCatalogSummary": { @@ -864,7 +864,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the named query if you have access to the workgroup in which the query was\n saved.

\n

For code samples using the AWS SDK for Java, see Examples and\n Code Samples in the Amazon Athena User Guide.

", + "smithy.api#documentation": "

Deletes the named query if you have access to the workgroup in which the query was\n saved.

\n

For code samples using the Amazon Web Services SDK for Java, see Examples and\n Code Samples in the Amazon Athena User\n Guide.

", "smithy.api#idempotent": {} } }, @@ -989,7 +989,7 @@ "EncryptionOption": { "target": "com.amazonaws.athena#EncryptionOption", "traits": { - "smithy.api#documentation": "

Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys\n (SSE-S3), server-side encryption with KMS-managed keys\n (SSE-KMS), or client-side encryption with KMS-managed keys (CSE-KMS) is\n used.

\n

If a query runs in a workgroup and the workgroup overrides client-side settings, then\n the workgroup's setting for encryption is used. It specifies whether query results must\n be encrypted, for all queries that run in this workgroup.

", + "smithy.api#documentation": "

Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (SSE-S3), server-side encryption with KMS-managed keys\n (SSE-KMS), or client-side encryption with KMS-managed keys (CSE-KMS) is\n used.

\n

If a query runs in a workgroup and the workgroup overrides client-side settings, then\n the workgroup's setting for encryption is used. It specifies whether query results must\n be encrypted, for all queries that run in this workgroup.

", "smithy.api#required": {} } }, @@ -1001,7 +1001,7 @@ } }, "traits": { - "smithy.api#documentation": "

If query results are encrypted in Amazon S3, indicates the encryption option used (for\n example, SSE-KMS or CSE-KMS) and key information.

" + "smithy.api#documentation": "

If query results are encrypted in Amazon S3, indicates the encryption option\n used (for example, SSE-KMS or CSE-KMS) and key\n information.

" } }, "com.amazonaws.athena#EncryptionOption": { @@ -1029,13 +1029,13 @@ "SelectedEngineVersion": { "target": "com.amazonaws.athena#NameString", "traits": { - "smithy.api#documentation": "

The engine version requested by the user. Possible values are determined by the output of ListEngineVersions, including Auto. The default is Auto.

" + "smithy.api#documentation": "

The engine version requested by the user. Possible values are determined by the output\n of ListEngineVersions, including Auto. The default is Auto.

" } }, "EffectiveEngineVersion": { "target": "com.amazonaws.athena#NameString", "traits": { - "smithy.api#documentation": "

Read only. The engine version on which the query runs. If the user requests\n a valid engine version other than Auto, the effective engine version is the same as the\n engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a CreateWorkGroup or UpdateWorkGroup operation, the \n EffectiveEngineVersion field is ignored.

" + "smithy.api#documentation": "

Read only. The engine version on which the query runs. If the user requests a valid\n engine version other than Auto, the effective engine version is the same as the engine\n version that the user requested. If the user requests Auto, the effective engine version\n is chosen by Athena. When a request to update the engine version is made by\n a CreateWorkGroup or UpdateWorkGroup operation, the\n EffectiveEngineVersion field is ignored.

" } } }, @@ -1329,7 +1329,7 @@ } ], "traits": { - "smithy.api#documentation": "

Streams the results of a single query execution specified by\n QueryExecutionId from the Athena query results location in Amazon S3.\n For more information, see Query Results in the Amazon\n Athena User Guide. This request does not execute the query but returns\n results. Use StartQueryExecution to run a query.

\n

To stream query results successfully, the IAM principal with permission to call\n GetQueryResults also must have permissions to the Amazon S3\n GetObject action for the Athena query results location.

\n \n

IAM principals with permission to the Amazon S3 GetObject action for\n the query results location are able to retrieve query results from Amazon S3 even if\n permission to the GetQueryResults action is denied. To restrict user or\n role access, ensure that Amazon S3 permissions to the Athena query location are\n denied.

\n
", + "smithy.api#documentation": "

Streams the results of a single query execution specified by\n QueryExecutionId from the Athena query results location in\n Amazon S3. For more information, see Query Results in the Amazon Athena User Guide. This request does not execute the query\n but returns results. Use StartQueryExecution to run a query.

\n

To stream query results successfully, the IAM principal with permission to call\n GetQueryResults also must have permissions to the Amazon S3\n GetObject action for the Athena query results location.

\n \n

IAM principals with permission to the Amazon S3\n GetObject action for the query results location are able to retrieve\n query results from Amazon S3 even if permission to the\n GetQueryResults action is denied. To restrict user or role access,\n ensure that Amazon S3 permissions to the Athena query location\n are denied.

\n
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1350,7 +1350,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the\n NextToken from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } }, "MaxResults": { @@ -1367,7 +1367,7 @@ "UpdateCount": { "target": "com.amazonaws.athena#Long", "traits": { - "smithy.api#documentation": "

The number of rows inserted with a CREATE TABLE AS SELECT statement.

" + "smithy.api#documentation": "

The number of rows inserted with a CREATE TABLE AS SELECT statement.\n

" } }, "ResultSet": { @@ -1379,7 +1379,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the\n NextToken from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } } } @@ -1533,7 +1533,7 @@ "min": 1, "max": 255 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$" } }, "com.amazonaws.athena#ListDataCatalogs": { @@ -1553,7 +1553,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the data catalogs in the current AWS account.

", + "smithy.api#documentation": "

Lists the data catalogs in the current Amazon Web Services account.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1568,7 +1568,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the NextToken\n from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } }, "MaxResults": { @@ -1591,7 +1591,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the NextToken\n from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } } } @@ -1638,7 +1638,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the\n NextToken from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } }, "MaxResults": { @@ -1661,7 +1661,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the NextToken\n from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } } } @@ -1692,7 +1692,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the\n NextToken from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } }, "MaxResults": { @@ -1715,7 +1715,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the\n NextToken from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } } } @@ -1737,7 +1737,7 @@ } ], "traits": { - "smithy.api#documentation": "

Provides a list of available query IDs only for queries saved in the specified\n workgroup. Requires that you have access to the specified workgroup. If a workgroup is\n not specified, lists the saved queries for the primary workgroup.

\n

For code samples using the AWS SDK for Java, see Examples and\n Code Samples in the Amazon Athena User Guide.

", + "smithy.api#documentation": "

Provides a list of available query IDs only for queries saved in the specified\n workgroup. Requires that you have access to the specified workgroup. If a workgroup is\n not specified, lists the saved queries for the primary workgroup.

\n

For code samples using the Amazon Web Services SDK for Java, see Examples and\n Code Samples in the Amazon Athena User\n Guide.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1751,7 +1751,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the\n NextToken from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } }, "MaxResults": { @@ -1780,7 +1780,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the\n NextToken from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } } } @@ -1823,7 +1823,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the\n NextToken from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } }, "MaxResults": { @@ -1846,7 +1846,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the\n NextToken from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } } } @@ -1868,7 +1868,7 @@ } ], "traits": { - "smithy.api#documentation": "

Provides a list of available query execution IDs for the queries in the specified\n workgroup. If a workgroup is not specified, returns a list of query execution IDs for\n the primary workgroup. Requires you to have access to the workgroup in which the queries\n ran.

\n

For code samples using the AWS SDK for Java, see Examples and\n Code Samples in the Amazon Athena User Guide.

", + "smithy.api#documentation": "

Provides a list of available query execution IDs for the queries in the specified\n workgroup. If a workgroup is not specified, returns a list of query execution IDs for\n the primary workgroup. Requires you to have access to the workgroup in which the queries\n ran.

\n

For code samples using the Amazon Web Services SDK for Java, see Examples and\n Code Samples in the Amazon Athena User\n Guide.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1882,7 +1882,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the\n NextToken from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } }, "MaxResults": { @@ -1971,7 +1971,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the NextToken\n from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } }, "MaxResults": { @@ -1994,7 +1994,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the NextToken\n from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } } } @@ -2019,7 +2019,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the tags associated with an Athena workgroup or data catalog resource.

", + "smithy.api#documentation": "

Lists the tags associated with an Athena workgroup or data catalog\n resource.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -2100,7 +2100,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the\n NextToken from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } }, "MaxResults": { @@ -2123,7 +2123,7 @@ "NextToken": { "target": "com.amazonaws.athena#Token", "traits": { - "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue pagination if\n a previous request was truncated. To obtain the next set of pages, pass in the\n NextToken from the response object of the previous page call.

" + "smithy.api#documentation": "

A token generated by the Athena service that specifies where to continue\n pagination if a previous request was truncated. To obtain the next set of pages, pass in\n the NextToken from the response object of the previous page call.

" } } } @@ -2241,7 +2241,7 @@ } }, "traits": { - "smithy.api#documentation": "

An exception that Athena received when it called a custom metastore. Occurs if the\n error is not caused by user input (InvalidRequestException) or from the\n Athena platform (InternalServerException). For example, if a user-created\n Lambda function is missing permissions, the Lambda 4XX exception is\n returned in a MetadataException.

", + "smithy.api#documentation": "

An exception that Athena received when it called a custom metastore.\n Occurs if the error is not caused by user input (InvalidRequestException)\n or from the Athena platform (InternalServerException). For\n example, if a user-created Lambda function is missing permissions, the\n Lambda\n 4XX exception is returned in a MetadataException.

", "smithy.api#error": "client" } }, @@ -2428,13 +2428,13 @@ "StatementType": { "target": "com.amazonaws.athena#StatementType", "traits": { - "smithy.api#documentation": "

The type of query statement that was run. DDL indicates DDL query\n statements. DML indicates DML (Data Manipulation Language) query\n statements, such as CREATE TABLE AS SELECT. UTILITY indicates\n query statements other than DDL and DML, such as SHOW CREATE TABLE, or\n DESCRIBE .

" + "smithy.api#documentation": "

The type of query statement that was run. DDL indicates DDL query\n statements. DML indicates DML (Data Manipulation Language) query\n statements, such as CREATE TABLE AS SELECT. UTILITY indicates\n query statements other than DDL and DML, such as SHOW CREATE TABLE, or\n DESCRIBE TABLE.

" } }, "ResultConfiguration": { "target": "com.amazonaws.athena#ResultConfiguration", "traits": { - "smithy.api#documentation": "

The location in Amazon S3 where query results were stored and the encryption option,\n if any, used for query results. These are known as \"client-side settings\". If workgroup\n settings override client-side settings, then the query uses the location for the query\n results and the encryption configuration that are specified for the workgroup.

" + "smithy.api#documentation": "

The location in Amazon S3 where query results were stored and the encryption\n option, if any, used for query results. These are known as \"client-side settings\". If\n workgroup settings override client-side settings, then the query uses the location for\n the query results and the encryption configuration that are specified for the\n workgroup.

" } }, "QueryExecutionContext": { @@ -2478,7 +2478,7 @@ "Database": { "target": "com.amazonaws.athena#DatabaseString", "traits": { - "smithy.api#documentation": "

The name of the database used in the query execution.

" + "smithy.api#documentation": "

The name of the database used in the query execution. The database must exist in the catalog.

" } }, "Catalog": { @@ -2558,7 +2558,7 @@ "DataManifestLocation": { "target": "com.amazonaws.athena#String", "traits": { - "smithy.api#documentation": "

The location and file name of a data manifest file. The manifest file is saved to the\n Athena query results location in Amazon S3. The manifest file tracks files that the\n query wrote to Amazon S3. If the query fails, the manifest file also tracks files that\n the query intended to write. The manifest is useful for identifying orphaned files\n resulting from a failed query. For more information, see Working with Query Results, Output Files, and\n Query History in the Amazon Athena User Guide.

" + "smithy.api#documentation": "

The location and file name of a data manifest file. The manifest file is saved to the\n Athena query results location in Amazon S3. The manifest file\n tracks files that the query wrote to Amazon S3. If the query fails, the manifest\n file also tracks files that the query intended to write. The manifest is useful for\n identifying orphaned files resulting from a failed query. For more information, see\n Working with Query\n Results, Output Files, and Query History in the Amazon Athena User Guide.

" } }, "TotalExecutionTimeInMillis": { @@ -2570,19 +2570,19 @@ "QueryQueueTimeInMillis": { "target": "com.amazonaws.athena#Long", "traits": { - "smithy.api#documentation": "

The number of milliseconds that the query was in your query queue waiting for\n resources. Note that if transient errors occur, Athena might automatically add the query\n back to the queue.

" + "smithy.api#documentation": "

The number of milliseconds that the query was in your query queue waiting for\n resources. Note that if transient errors occur, Athena might automatically\n add the query back to the queue.

" } }, "QueryPlanningTimeInMillis": { "target": "com.amazonaws.athena#Long", "traits": { - "smithy.api#documentation": "

The number of milliseconds that Athena took to plan the query processing flow. This\n includes the time spent retrieving table partitions from the data source. Note that\n because the query engine performs the query planning, query planning time is a subset of\n engine processing time.

" + "smithy.api#documentation": "

The number of milliseconds that Athena took to plan the query processing\n flow. This includes the time spent retrieving table partitions from the data source.\n Note that because the query engine performs the query planning, query planning time is a\n subset of engine processing time.

" } }, "ServiceProcessingTimeInMillis": { "target": "com.amazonaws.athena#Long", "traits": { - "smithy.api#documentation": "

The number of milliseconds that Athena took to finalize and publish the query results\n after the query engine finished running the query.

" + "smithy.api#documentation": "

The number of milliseconds that Athena took to finalize and publish the\n query results after the query engine finished running the query.

" } } }, @@ -2596,7 +2596,7 @@ "State": { "target": "com.amazonaws.athena#QueryExecutionState", "traits": { - "smithy.api#documentation": "

The state of query execution. QUEUED indicates that the query has been\n submitted to the service, and Athena will execute the query as soon as resources are\n available. RUNNING indicates that the query is in execution phase.\n SUCCEEDED indicates that the query completed without errors.\n FAILED indicates that the query experienced an error and did not\n complete processing. CANCELLED indicates that a user input interrupted\n query execution.

\n \n

Athena automatically retries your queries in cases of certain transient errors. As\n a result, you may see the query state transition from RUNNING or\n FAILED to QUEUED.

\n
" + "smithy.api#documentation": "

The state of query execution. QUEUED indicates that the query has been\n submitted to the service, and Athena will execute the query as soon as\n resources are available. RUNNING indicates that the query is in execution\n phase. SUCCEEDED indicates that the query completed without errors.\n FAILED indicates that the query experienced an error and did not\n complete processing. CANCELLED indicates that a user input interrupted\n query execution.

\n \n

Athena automatically retries your queries in cases of certain\n transient errors. As a result, you may see the query state transition from\n RUNNING or FAILED to QUEUED.

\n
" } }, "StateChangeReason": { @@ -2652,18 +2652,18 @@ "OutputLocation": { "target": "com.amazonaws.athena#String", "traits": { - "smithy.api#documentation": "

The location in Amazon S3 where your query results are stored, such as\n s3://path/to/query/bucket/. To run the query, you must specify the\n query results location using one of the ways: either for individual queries using either\n this setting (client-side), or in the workgroup, using WorkGroupConfiguration. If none of them is set, Athena issues an error\n that no output location is provided. For more information, see Query Results. If\n workgroup settings override client-side settings, then the query uses the settings\n specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

" + "smithy.api#documentation": "

The location in Amazon S3 where your query results are stored, such as\n s3://path/to/query/bucket/. To run the query, you must specify the\n query results location using one of the ways: either for individual queries using either\n this setting (client-side), or in the workgroup, using WorkGroupConfiguration. If none of them is set, Athena\n issues an error that no output location is provided. For more information, see Query Results. If\n workgroup settings override client-side settings, then the query uses the settings\n specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

" } }, "EncryptionConfiguration": { "target": "com.amazonaws.athena#EncryptionConfiguration", "traits": { - "smithy.api#documentation": "

If query results are encrypted in Amazon S3, indicates the encryption option used (for\n example, SSE-KMS or CSE-KMS) and key information. This is a\n client-side setting. If workgroup settings override client-side settings, then the query\n uses the encryption configuration that is specified for the workgroup, and also uses the\n location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.

" + "smithy.api#documentation": "

If query results are encrypted in Amazon S3, indicates the encryption option\n used (for example, SSE-KMS or CSE-KMS) and key information.\n This is a client-side setting. If workgroup settings override client-side settings, then\n the query uses the encryption configuration that is specified for the workgroup, and\n also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.

" } } }, "traits": { - "smithy.api#documentation": "

The location in Amazon S3 where query results are stored and the encryption option, if\n any, used for query results. These are known as \"client-side settings\". If workgroup\n settings override client-side settings, then the query uses the workgroup\n settings.

" + "smithy.api#documentation": "

The location in Amazon S3 where query results are stored and the encryption\n option, if any, used for query results. These are known as \"client-side settings\". If\n workgroup settings override client-side settings, then the query uses the workgroup\n settings.

" } }, "com.amazonaws.athena#ResultConfigurationUpdates": { @@ -2672,13 +2672,13 @@ "OutputLocation": { "target": "com.amazonaws.athena#String", "traits": { - "smithy.api#documentation": "

The location in Amazon S3 where your query results are stored, such as\n s3://path/to/query/bucket/. For more information, see Query Results If\n workgroup settings override client-side settings, then the query uses the location for\n the query results and the encryption configuration that are specified for the workgroup.\n The \"workgroup settings override\" is specified in EnforceWorkGroupConfiguration\n (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

" + "smithy.api#documentation": "

The location in Amazon S3 where your query results are stored, such as\n s3://path/to/query/bucket/. For more information, see Query Results If\n workgroup settings override client-side settings, then the query uses the location for\n the query results and the encryption configuration that are specified for the workgroup.\n The \"workgroup settings override\" is specified in\n EnforceWorkGroupConfiguration (true/false) in the\n WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

" } }, "RemoveOutputLocation": { "target": "com.amazonaws.athena#BoxedBoolean", "traits": { - "smithy.api#documentation": "

If set to \"true\", indicates that the previously-specified query results location (also\n known as a client-side setting) for queries in this workgroup should be ignored and set\n to null. If set to \"false\" or not set, and a value is present in the OutputLocation in\n ResultConfigurationUpdates (the client-side setting), the OutputLocation in the\n workgroup's ResultConfiguration will be updated with the new value. For more\n information, see Workgroup Settings Override\n Client-Side Settings.

" + "smithy.api#documentation": "

If set to \"true\", indicates that the previously-specified query results location (also\n known as a client-side setting) for queries in this workgroup should be ignored and set\n to null. If set to \"false\" or not set, and a value is present in the\n OutputLocation in ResultConfigurationUpdates (the\n client-side setting), the OutputLocation in the workgroup's\n ResultConfiguration will be updated with the new value. For more\n information, see Workgroup Settings Override\n Client-Side Settings.

" } }, "EncryptionConfiguration": { @@ -2690,7 +2690,7 @@ "RemoveEncryptionConfiguration": { "target": "com.amazonaws.athena#BoxedBoolean", "traits": { - "smithy.api#documentation": "

If set to \"true\", indicates that the previously-specified encryption configuration\n (also known as the client-side setting) for queries in this workgroup should be ignored\n and set to null. If set to \"false\" or not set, and a value is present in the\n EncryptionConfiguration in ResultConfigurationUpdates (the client-side setting), the\n EncryptionConfiguration in the workgroup's ResultConfiguration will be updated with the\n new value. For more information, see Workgroup Settings Override\n Client-Side Settings.

" + "smithy.api#documentation": "

If set to \"true\", indicates that the previously-specified encryption configuration\n (also known as the client-side setting) for queries in this workgroup should be ignored\n and set to null. If set to \"false\" or not set, and a value is present in the\n EncryptionConfiguration in ResultConfigurationUpdates (the\n client-side setting), the EncryptionConfiguration in the workgroup's\n ResultConfiguration will be updated with the new value. For more\n information, see Workgroup Settings Override\n Client-Side Settings.

" } } }, @@ -2772,7 +2772,7 @@ } ], "traits": { - "smithy.api#documentation": "

Runs the SQL query statements contained in the Query. Requires you to\n have access to the workgroup in which the query ran. Running queries against an external\n catalog requires GetDataCatalog permission to the catalog. For code\n samples using the AWS SDK for Java, see Examples and\n Code Samples in the Amazon Athena User Guide.

", + "smithy.api#documentation": "

Runs the SQL query statements contained in the Query. Requires you to\n have access to the workgroup in which the query ran. Running queries against an external\n catalog requires GetDataCatalog permission to the catalog. For code\n samples using the Amazon Web Services SDK for Java, see Examples and\n Code Samples in the Amazon Athena User\n Guide.

", "smithy.api#idempotent": {} } }, @@ -2789,7 +2789,7 @@ "ClientRequestToken": { "target": "com.amazonaws.athena#IdempotencyToken", "traits": { - "smithy.api#documentation": "

A unique case-sensitive string used to ensure the request to create the query is\n idempotent (executes only once). If another StartQueryExecution request is\n received, the same response is returned and another query is not created. If a parameter\n has changed, for example, the QueryString, an error is returned.

\n \n

This token is listed as not required because AWS SDKs (for example the AWS SDK for\n Java) auto-generate the token for users. If you are not using the AWS SDK or the AWS\n CLI, you must provide this token or the action will fail.

\n
", + "smithy.api#documentation": "

A unique case-sensitive string used to ensure the request to create the query is\n idempotent (executes only once). If another StartQueryExecution request is\n received, the same response is returned and another query is not created. If a parameter\n has changed, for example, the QueryString, an error is returned.

\n \n

This token is listed as not required because Amazon Web Services SDKs (for example\n the Amazon Web Services SDK for Java) auto-generate the token for users. If you are\n not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide\n this token or the action will fail.

\n
", "smithy.api#idempotencyToken": {} } }, @@ -2831,7 +2831,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[a-zA-Z_][a-zA-Z0-9_@:]{1,256}" + "smithy.api#pattern": "^[a-zA-Z_][a-zA-Z0-9_@:]{1,256}$" } }, "com.amazonaws.athena#StatementType": { @@ -2870,7 +2870,7 @@ } ], "traits": { - "smithy.api#documentation": "

Stops a query execution. Requires you to have access to the workgroup in which the\n query ran.

\n

For code samples using the AWS SDK for Java, see Examples and\n Code Samples in the Amazon Athena User Guide.

", + "smithy.api#documentation": "

Stops a query execution. Requires you to have access to the workgroup in which the\n query ran.

\n

For code samples using the Amazon Web Services SDK for Java, see Examples and\n Code Samples in the Amazon Athena User\n Guide.

", "smithy.api#idempotent": {} } }, @@ -2919,7 +2919,7 @@ "TableType": { "target": "com.amazonaws.athena#TableTypeString", "traits": { - "smithy.api#documentation": "

The type of table. In Athena, only EXTERNAL_TABLE is supported.

" + "smithy.api#documentation": "

The type of table. In Athena, only EXTERNAL_TABLE is\n supported.

" } }, "Columns": { @@ -2977,7 +2977,7 @@ } }, "traits": { - "smithy.api#documentation": "

A label that you assign to a resource. In Athena, a resource can be a workgroup or\n data catalog. Each tag consists of a key and an optional value, both of which you\n define. For example, you can use tags to categorize Athena workgroups or data catalogs\n by purpose, owner, or environment. Use a consistent set of tag keys to make it easier to\n search and filter workgroups or data catalogs in your account. For best practices, see\n Tagging Best Practices. Tag keys can be from 1 to 128 UTF-8 Unicode\n characters, and tag values can be from 0 to 256 UTF-8 Unicode characters. Tags can use\n letters and numbers representable in UTF-8, and the following characters: + - = . _ : /\n @. Tag keys and values are case-sensitive. Tag keys must be unique per resource. If you\n specify more than one tag, separate them by commas.

" + "smithy.api#documentation": "

A label that you assign to a resource. In Athena, a resource can be a\n workgroup or data catalog. Each tag consists of a key and an optional value, both of\n which you define. For example, you can use tags to categorize Athena\n workgroups or data catalogs by purpose, owner, or environment. Use a consistent set of\n tag keys to make it easier to search and filter workgroups or data catalogs in your\n account. For best practices, see Tagging Best Practices. Tag keys can be from 1 to 128 UTF-8 Unicode\n characters, and tag values can be from 0 to 256 UTF-8 Unicode characters. Tags can use\n letters and numbers representable in UTF-8, and the following characters: + - = . _ : /\n @. Tag keys and values are case-sensitive. Tag keys must be unique per resource. If you\n specify more than one tag, separate them by commas.

" } }, "com.amazonaws.athena#TagKey": { @@ -3021,7 +3021,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds one or more tags to an Athena resource. A tag is a label that you assign to a\n resource. In Athena, a resource can be a workgroup or data catalog. Each tag consists of\n a key and an optional value, both of which you define. For example, you can use tags to\n categorize Athena workgroups or data catalogs by purpose, owner, or environment. Use a\n consistent set of tag keys to make it easier to search and filter workgroups or data\n catalogs in your account. For best practices, see Tagging Best Practices. Tag keys can be from 1 to 128 UTF-8 Unicode\n characters, and tag values can be from 0 to 256 UTF-8 Unicode characters. Tags can use\n letters and numbers representable in UTF-8, and the following characters: + - = . _ : /\n @. Tag keys and values are case-sensitive. Tag keys must be unique per resource. If you\n specify more than one tag, separate them by commas.

" + "smithy.api#documentation": "

Adds one or more tags to an Athena resource. A tag is a label that you\n assign to a resource. In Athena, a resource can be a workgroup or data\n catalog. Each tag consists of a key and an optional value, both of which you define. For\n example, you can use tags to categorize Athena workgroups or data catalogs\n by purpose, owner, or environment. Use a consistent set of tag keys to make it easier to\n search and filter workgroups or data catalogs in your account. For best practices, see\n Tagging Best Practices. Tag keys can be from 1 to 128 UTF-8 Unicode\n characters, and tag values can be from 0 to 256 UTF-8 Unicode characters. Tags can use\n letters and numbers representable in UTF-8, and the following characters: + - = . _ : /\n @. Tag keys and values are case-sensitive. Tag keys must be unique per resource. If you\n specify more than one tag, separate them by commas.

" } }, "com.amazonaws.athena#TagResourceInput": { @@ -3030,14 +3030,14 @@ "ResourceARN": { "target": "com.amazonaws.athena#AmazonResourceName", "traits": { - "smithy.api#documentation": "

Specifies the ARN of the Athena resource (workgroup or data catalog) to which tags are\n to be added.

", + "smithy.api#documentation": "

Specifies the ARN of the Athena resource (workgroup or data catalog) to\n which tags are to be added.

", "smithy.api#required": {} } }, "Tags": { "target": "com.amazonaws.athena#TagList", "traits": { - "smithy.api#documentation": "

A collection of one or more tags, separated by commas, to be added to an Athena\n workgroup or data catalog resource.

", + "smithy.api#documentation": "

A collection of one or more tags, separated by commas, to be added to an Athena workgroup or data catalog resource.

", "smithy.api#required": {} } } @@ -3102,7 +3102,7 @@ "min": 0, "max": 4096 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$" } }, "com.amazonaws.athena#UnprocessedNamedQueryId": { @@ -3241,14 +3241,14 @@ "Name": { "target": "com.amazonaws.athena#CatalogNameString", "traits": { - "smithy.api#documentation": "

The name of the data catalog to update. The catalog name must be unique for the AWS\n account and can use a maximum of 128 alphanumeric, underscore, at sign, or hyphen\n characters.

", + "smithy.api#documentation": "

The name of the data catalog to update. The catalog name must be unique for the\n Amazon Web Services account and can use a maximum of 128 alphanumeric, underscore, at\n sign, or hyphen characters.

", "smithy.api#required": {} } }, "Type": { "target": "com.amazonaws.athena#DataCatalogType", "traits": { - "smithy.api#documentation": "

Specifies the type of data catalog to update. Specify LAMBDA for a\n federated catalog or HIVE for an external hive metastore.

\n \n

Do not use the GLUE type. This refers to the\n AwsDataCatalog that already exists in your account, of which you\n can have only one. Specifying the GLUE type will result in an\n INVALID_INPUT error.

\n
", + "smithy.api#documentation": "

Specifies the type of data catalog to update. Specify LAMBDA for a\n federated catalog, HIVE for an external hive metastore, or\n GLUE for an Glue Data Catalog.

", "smithy.api#required": {} } }, @@ -3261,7 +3261,7 @@ "Parameters": { "target": "com.amazonaws.athena#ParametersMap", "traits": { - "smithy.api#documentation": "

Specifies the Lambda function or functions to use for updating the data catalog. This\n is a mapping whose values depend on the catalog type.

\n " + "smithy.api#documentation": "

Specifies the Lambda function or functions to use for updating the data\n catalog. This is a mapping whose values depend on the catalog type.

\n " } } } @@ -3402,7 +3402,7 @@ "Configuration": { "target": "com.amazonaws.athena#WorkGroupConfiguration", "traits": { - "smithy.api#documentation": "

The configuration of the workgroup, which includes the location in Amazon S3 where\n query results are stored, the encryption configuration, if any, used for query results;\n whether the Amazon CloudWatch Metrics are enabled for the workgroup; whether workgroup\n settings override client-side settings; and the data usage limits for the amount of data\n scanned per query or per workgroup. The workgroup settings override is specified in\n EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

" + "smithy.api#documentation": "

The configuration of the workgroup, which includes the location in Amazon S3\n where query results are stored, the encryption configuration, if any, used for query\n results; whether the Amazon CloudWatch Metrics are enabled for the workgroup;\n whether workgroup settings override client-side settings; and the data usage limits for\n the amount of data scanned per query or per workgroup. The workgroup settings override\n is specified in EnforceWorkGroupConfiguration (true/false) in the\n WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

" } }, "Description": { @@ -3419,7 +3419,7 @@ } }, "traits": { - "smithy.api#documentation": "

A workgroup, which contains a name, description, creation time, state, and other\n configuration, listed under WorkGroup$Configuration. Each workgroup\n enables you to isolate queries for you or your group of users from other queries in the\n same account, to configure the query results location and the encryption configuration\n (known as workgroup settings), to enable sending query metrics to Amazon CloudWatch, and\n to establish per-query data usage control limits for all queries in a workgroup. The\n workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false)\n in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

" + "smithy.api#documentation": "

A workgroup, which contains a name, description, creation time, state, and other\n configuration, listed under WorkGroup$Configuration. Each workgroup\n enables you to isolate queries for you or your group of users from other queries in the\n same account, to configure the query results location and the encryption configuration\n (known as workgroup settings), to enable sending query metrics to Amazon CloudWatch,\n and to establish per-query data usage control limits for all queries in a workgroup. The\n workgroup settings override is specified in EnforceWorkGroupConfiguration\n (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

" } }, "com.amazonaws.athena#WorkGroupConfiguration": { @@ -3428,7 +3428,7 @@ "ResultConfiguration": { "target": "com.amazonaws.athena#ResultConfiguration", "traits": { - "smithy.api#documentation": "

The configuration for the workgroup, which includes the location in Amazon S3 where\n query results are stored and the encryption option, if any, used for query results. To\n run the query, you must specify the query results location using one of the ways: either\n in the workgroup using this setting, or for individual queries (client-side), using\n ResultConfiguration$OutputLocation. If none of them is set, Athena\n issues an error that no output location is provided. For more information, see Query\n Results.

" + "smithy.api#documentation": "

The configuration for the workgroup, which includes the location in Amazon S3\n where query results are stored and the encryption option, if any, used for query\n results. To run the query, you must specify the query results location using one of the\n ways: either in the workgroup using this setting, or for individual queries\n (client-side), using ResultConfiguration$OutputLocation. If none of\n them is set, Athena issues an error that no output location is provided. For\n more information, see Query Results.

" } }, "EnforceWorkGroupConfiguration": { @@ -3452,18 +3452,18 @@ "RequesterPaysEnabled": { "target": "com.amazonaws.athena#BoxedBoolean", "traits": { - "smithy.api#documentation": "

If set to true, allows members assigned to a workgroup to reference\n Amazon S3 Requester Pays buckets in queries. If set to false, workgroup\n members cannot query data from Requester Pays buckets, and queries that retrieve data\n from Requester Pays buckets cause an error. The default is false. For more\n information about Requester Pays buckets, see Requester Pays Buckets\n in the Amazon Simple Storage Service Developer Guide.

" + "smithy.api#documentation": "

If set to true, allows members assigned to a workgroup to reference\n Amazon S3 Requester Pays buckets in queries. If set to false,\n workgroup members cannot query data from Requester Pays buckets, and queries that\n retrieve data from Requester Pays buckets cause an error. The default is\n false. For more information about Requester Pays buckets, see Requester\n Pays Buckets in the Amazon Simple Storage Service Developer\n Guide.

" } }, "EngineVersion": { "target": "com.amazonaws.athena#EngineVersion", "traits": { - "smithy.api#documentation": "

The engine version that all queries running on\n the workgroup use. Queries on the AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this setting.

" + "smithy.api#documentation": "

The engine version that all queries running on the workgroup use. Queries on the\n AmazonAthenaPreviewFunctionality workgroup run on the preview engine\n regardless of this setting.

" } } }, "traits": { - "smithy.api#documentation": "

The configuration of the workgroup, which includes the location in Amazon S3 where\n query results are stored, the encryption option, if any, used for query results, whether\n the Amazon CloudWatch Metrics are enabled for the workgroup and whether workgroup\n settings override query settings, and the data usage limits for the amount of data\n scanned per query or per workgroup. The workgroup settings override is specified in\n EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

" + "smithy.api#documentation": "

The configuration of the workgroup, which includes the location in Amazon S3\n where query results are stored, the encryption option, if any, used for query results,\n whether the Amazon CloudWatch Metrics are enabled for the workgroup and whether\n workgroup settings override query settings, and the data usage limits for the amount of\n data scanned per query or per workgroup. The workgroup settings override is specified in\n EnforceWorkGroupConfiguration (true/false) in the\n WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

" } }, "com.amazonaws.athena#WorkGroupConfigurationUpdates": { @@ -3484,7 +3484,7 @@ "PublishCloudWatchMetricsEnabled": { "target": "com.amazonaws.athena#BoxedBoolean", "traits": { - "smithy.api#documentation": "

Indicates whether this workgroup enables publishing metrics to Amazon\n CloudWatch.

" + "smithy.api#documentation": "

Indicates whether this workgroup enables publishing metrics to Amazon CloudWatch.

" } }, "BytesScannedCutoffPerQuery": { @@ -3502,18 +3502,18 @@ "RequesterPaysEnabled": { "target": "com.amazonaws.athena#BoxedBoolean", "traits": { - "smithy.api#documentation": "

If set to true, allows members assigned to a workgroup to specify Amazon\n S3 Requester Pays buckets in queries. If set to false, workgroup members\n cannot query data from Requester Pays buckets, and queries that retrieve data from\n Requester Pays buckets cause an error. The default is false. For more\n information about Requester Pays buckets, see Requester Pays Buckets\n in the Amazon Simple Storage Service Developer Guide.

" + "smithy.api#documentation": "

If set to true, allows members assigned to a workgroup to specify Amazon S3 Requester Pays buckets in queries. If set to false, workgroup\n members cannot query data from Requester Pays buckets, and queries that retrieve data\n from Requester Pays buckets cause an error. The default is false. For more\n information about Requester Pays buckets, see Requester Pays Buckets\n in the Amazon Simple Storage Service Developer Guide.

" } }, "EngineVersion": { "target": "com.amazonaws.athena#EngineVersion", "traits": { - "smithy.api#documentation": "

The engine version requested when a workgroup is updated. After the update, all queries on the workgroup run on the requested engine version. If no value was previously set, the default is Auto. Queries on the AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this setting.

" + "smithy.api#documentation": "

The engine version requested when a workgroup is updated. After the update, all\n queries on the workgroup run on the requested engine version. If no value was previously\n set, the default is Auto. Queries on the AmazonAthenaPreviewFunctionality\n workgroup run on the preview engine regardless of this setting.

" } } }, "traits": { - "smithy.api#documentation": "

The configuration information that will be updated for this workgroup, which includes\n the location in Amazon S3 where query results are stored, the encryption option, if any,\n used for query results, whether the Amazon CloudWatch Metrics are enabled for the\n workgroup, whether the workgroup settings override the client-side settings, and the\n data usage limit for the amount of bytes scanned per query, if it is specified.

" + "smithy.api#documentation": "

The configuration information that will be updated for this workgroup, which includes\n the location in Amazon S3 where query results are stored, the encryption option,\n if any, used for query results, whether the Amazon CloudWatch Metrics are enabled\n for the workgroup, whether the workgroup settings override the client-side settings, and\n the data usage limit for the amount of bytes scanned per query, if it is\n specified.

" } }, "com.amazonaws.athena#WorkGroupDescriptionString": { @@ -3528,7 +3528,7 @@ "com.amazonaws.athena#WorkGroupName": { "type": "string", "traits": { - "smithy.api#pattern": "[a-zA-Z0-9._-]{1,128}" + "smithy.api#pattern": "^[a-zA-Z0-9._-]{1,128}$" } }, "com.amazonaws.athena#WorkGroupState": { @@ -3576,7 +3576,7 @@ "EngineVersion": { "target": "com.amazonaws.athena#EngineVersion", "traits": { - "smithy.api#documentation": "

The engine version setting for all queries on the workgroup. Queries on the AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this setting.

" + "smithy.api#documentation": "

The engine version setting for all queries on the workgroup. Queries on the\n AmazonAthenaPreviewFunctionality workgroup run on the preview engine\n regardless of this setting.

" } } }, diff --git a/codegen/sdk-codegen/aws-models/autoscaling.2011-01-01.json b/codegen/sdk-codegen/aws-models/autoscaling.2011-01-01.json index 8e6d4d4bfbd..5b357418236 100644 --- a/codegen/sdk-codegen/aws-models/autoscaling.2011-01-01.json +++ b/codegen/sdk-codegen/aws-models/autoscaling.2011-01-01.json @@ -2970,6 +2970,20 @@ } } }, + "com.amazonaws.autoscaling#DesiredConfiguration": { + "type": "structure", + "members": { + "LaunchTemplate": { + "target": "com.amazonaws.autoscaling#LaunchTemplateSpecification" + }, + "MixedInstancesPolicy": { + "target": "com.amazonaws.autoscaling#MixedInstancesPolicy" + } + }, + "traits": { + "smithy.api#documentation": "

Describes the desired configuration for an instance refresh.

\n

If you specify a desired configuration, you must specify either a\n LaunchTemplate or a MixedInstancesPolicy.

" + } + }, "com.amazonaws.autoscaling#DetachInstances": { "type": "operation", "input": { @@ -3806,6 +3820,15 @@ "traits": { "smithy.api#documentation": "

Additional progress details for an Auto Scaling group that has a warm pool.

" } + }, + "Preferences": { + "target": "com.amazonaws.autoscaling#RefreshPreferences" + }, + "DesiredConfiguration": { + "target": "com.amazonaws.autoscaling#DesiredConfiguration", + "traits": { + "smithy.api#documentation": "

Describes the specific update you want to deploy.

" + } } }, "traits": { @@ -3979,7 +4002,7 @@ } }, "traits": { - "smithy.api#documentation": "

Describes an instances distribution for an Auto Scaling group with a MixedInstancesPolicy.

\n

The instances distribution specifies the distribution of On-Demand Instances and Spot\n Instances, the maximum price to pay for Spot Instances, and how the Auto Scaling group allocates\n instance types to fulfill On-Demand and Spot capacities.

\n

When you update SpotAllocationStrategy, SpotInstancePools,\n or SpotMaxPrice, this update action does not deploy any changes across the\n running Amazon EC2 instances in the group. Your existing Spot Instances continue to run\n as long as the maximum price for those instances is higher than the current Spot price.\n When scale out occurs, Amazon EC2 Auto Scaling launches instances based on the new settings. When scale\n in occurs, Amazon EC2 Auto Scaling terminates instances according to the group's termination\n policies.

" + "smithy.api#documentation": "

Describes an instances distribution for an Auto Scaling group with a MixedInstancesPolicy.

\n

The instances distribution specifies the distribution of On-Demand Instances and Spot\n Instances, the maximum price to pay for Spot Instances, and how the Auto Scaling group allocates\n instance types to fulfill On-Demand and Spot capacities.

\n

When you modify SpotAllocationStrategy, SpotInstancePools,\n or SpotMaxPrice in the UpdateAutoScalingGroup API call,\n this update action does not deploy any changes across the running Amazon EC2 instances\n in the group. Your existing Spot Instances continue to run as long as the maximum price\n for those instances is higher than the current Spot price. When scale out occurs,\n Amazon EC2 Auto Scaling launches instances based on the new settings. When scale in occurs, Amazon EC2 Auto Scaling\n terminates instances according to the group's termination policies.

" } }, "com.amazonaws.autoscaling#InstancesToUpdate": { @@ -4235,7 +4258,7 @@ } }, "traits": { - "smithy.api#documentation": "

Describes a launch template and overrides.

\n

You specify these properties as part of a mixed instances policy.

\n

When you update the launch template or overrides, existing Amazon EC2 instances continue to\n run. When scale out occurs, Amazon EC2 Auto Scaling launches instances to match the new settings. When\n scale in occurs, Amazon EC2 Auto Scaling terminates instances according to the group's termination\n policies.

" + "smithy.api#documentation": "

Describes a launch template and overrides.

\n

You specify these properties as part of a mixed instances policy.

\n

When you update the launch template or overrides in the UpdateAutoScalingGroup API call, existing Amazon EC2 instances continue to\n run. When scale out occurs, Amazon EC2 Auto Scaling launches instances to match the new settings. When\n scale in occurs, Amazon EC2 Auto Scaling terminates instances according to the group's termination\n policies.

" } }, "com.amazonaws.autoscaling#LaunchTemplateName": { @@ -4297,7 +4320,7 @@ } }, "traits": { - "smithy.api#documentation": "

Describes the Amazon EC2 launch template and the launch template version that can be used\n by an Auto Scaling group to configure Amazon EC2 instances.

\n

The launch template that is specified must be configured for use with an Auto Scaling group.\n For more information, see Creating a launch\n template for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.

" + "smithy.api#documentation": "

Describes the launch template and the version of the launch template that Amazon EC2 Auto Scaling\n uses to launch Amazon EC2 instances. For more information about launch templates, see Launch\n templates in the Amazon EC2 Auto Scaling User Guide.

" } }, "com.amazonaws.autoscaling#LifecycleActionResult": { @@ -4867,7 +4890,7 @@ "LaunchTemplate": { "target": "com.amazonaws.autoscaling#LaunchTemplate", "traits": { - "smithy.api#documentation": "

Specifies the launch template to use and optionally the instance types (overrides)\n that are used to provision EC2 instances to fulfill On-Demand and Spot capacities.\n Required when creating a mixed instances policy.

" + "smithy.api#documentation": "

Specifies the launch template to use and the instance types (overrides) that are used\n to provision EC2 instances to fulfill On-Demand and Spot capacities. Required when\n creating a mixed instances policy.

" } }, "InstancesDistribution": { @@ -4878,7 +4901,7 @@ } }, "traits": { - "smithy.api#documentation": "

Describes a mixed instances policy for an Auto Scaling group. With mixed instances, your Auto Scaling\n group can provision a combination of On-Demand Instances and Spot Instances across\n multiple instance types. For more information, see Auto Scaling groups with multiple\n instance types and purchase options in the Amazon EC2 Auto Scaling User\n Guide.

\n

You can create a mixed instances policy for a new Auto Scaling group, or you can create it for\n an existing group by updating the group to specify MixedInstancesPolicy as\n the top-level property instead of a launch configuration or launch template.

" + "smithy.api#documentation": "

Describes a mixed instances policy. A mixed instances policy contains the instance\n types Amazon EC2 Auto Scaling can launch, and other information Amazon EC2 Auto Scaling can use to launch instances to\n help you optimize your costs. For more information, see Auto Scaling groups with multiple\n instance types and purchase options in the Amazon EC2 Auto Scaling User\n Guide.

" } }, "com.amazonaws.autoscaling#MonitoringEnabled": { @@ -5822,7 +5845,7 @@ "MinHealthyPercentage": { "target": "com.amazonaws.autoscaling#IntPercent", "traits": { - "smithy.api#documentation": "

The amount of capacity in the Auto Scaling group that must remain healthy during an instance\n refresh to allow the operation to continue, as a percentage of the desired capacity of\n the Auto Scaling group (rounded up to the nearest integer). The default is 90.\n

" + "smithy.api#documentation": "

The amount of capacity in the Auto Scaling group that must remain healthy during an instance\n refresh to allow the operation to continue. The value is expressed as a percentage of\n the desired capacity of the Auto Scaling group (rounded up to the nearest integer). The default\n is 90.

\n

Setting the minimum healthy percentage to 100 percent limits the rate of replacement\n to one instance at a time. In contrast, setting it to 0 percent has the effect of\n replacing all instances at the same time.

" } }, "InstanceWarmup": { @@ -5842,10 +5865,16 @@ "traits": { "smithy.api#documentation": "

The amount of time, in seconds, to wait after a checkpoint before continuing. This\n property is optional, but if you specify a value for it, you must also specify a value\n for CheckpointPercentages. If you specify a value for\n CheckpointPercentages and not for CheckpointDelay, the\n CheckpointDelay defaults to 3600 (1 hour).

" } + }, + "SkipMatching": { + "target": "com.amazonaws.autoscaling#SkipMatching", + "traits": { + "smithy.api#documentation": "

A boolean value that indicates whether skip matching is enabled. If true, then\n Amazon EC2 Auto Scaling skips replacing instances that match the desired configuration. If no desired\n configuration is specified, then it skips replacing instances that have the same\n configuration that is already set on the group. The default is\n false.

" + } } }, "traits": { - "smithy.api#documentation": "

Describes information used to start an instance refresh.

\n

All properties are optional. However, if you specify a value for\n CheckpointDelay, you must also provide a value for\n CheckpointPercentages.

" + "smithy.api#documentation": "

Describes the preferences for an instance refresh.

" } }, "com.amazonaws.autoscaling#RefreshStrategy": { @@ -6467,6 +6496,12 @@ "smithy.api#box": {} } }, + "com.amazonaws.autoscaling#SkipMatching": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, "com.amazonaws.autoscaling#SpotInstancePools": { "type": "integer", "traits": { @@ -6502,7 +6537,7 @@ } ], "traits": { - "smithy.api#documentation": "

Starts a new instance refresh operation, which triggers a rolling replacement of\n previously launched instances in the Auto Scaling group with a new group of instances.

\n

This operation is part of the instance refresh\n feature in Amazon EC2 Auto Scaling, which helps you update instances in your Auto Scaling group\n after you make configuration changes.

\n

If the call succeeds, it creates a new instance refresh request with a unique ID that\n you can use to track its progress. To query its status, call the DescribeInstanceRefreshes API. To describe the instance refreshes that\n have already run, call the DescribeInstanceRefreshes API. To cancel an\n instance refresh operation in progress, use the CancelInstanceRefresh\n API.

" + "smithy.api#documentation": "

Starts a new instance refresh operation. An instance refresh performs a rolling\n replacement of all or some instances in an Auto Scaling group. Each instance is terminated first\n and then replaced, which temporarily reduces the capacity available within your Auto Scaling\n group.

\n

This operation is part of the instance refresh\n feature in Amazon EC2 Auto Scaling, which helps you update instances in your Auto Scaling group.\n This feature is helpful, for example, when you have a new AMI or a new user data script.\n You just need to create a new launch template that specifies the new AMI or user data\n script. Then start an instance refresh to immediately begin the process of updating\n instances in the group.

\n

If the call succeeds, it creates a new instance refresh request with a unique ID that\n you can use to track its progress. To query its status, call the DescribeInstanceRefreshes API. To describe the instance refreshes that\n have already run, call the DescribeInstanceRefreshes API. To cancel an\n instance refresh operation in progress, use the CancelInstanceRefresh\n API.

" } }, "com.amazonaws.autoscaling#StartInstanceRefreshAnswer": { @@ -6529,13 +6564,19 @@ "Strategy": { "target": "com.amazonaws.autoscaling#RefreshStrategy", "traits": { - "smithy.api#documentation": "

The strategy to use for the instance refresh. The only valid value is\n Rolling.

\n

A rolling update is an update that is applied to all instances in an Auto Scaling group until\n all instances have been updated. A rolling update can fail due to failed health checks\n or if instances are on standby or are protected from scale in. If the rolling update\n process fails, any instances that were already replaced are not rolled back to their\n previous configuration.

" + "smithy.api#documentation": "

The strategy to use for the instance refresh. The only valid value is\n Rolling.

\n

A rolling update helps you update your instances gradually. A rolling update can fail\n due to failed health checks or if instances are on standby or are protected from scale\n in. If the rolling update process fails, any instances that are replaced are not rolled\n back to their previous configuration.

" + } + }, + "DesiredConfiguration": { + "target": "com.amazonaws.autoscaling#DesiredConfiguration", + "traits": { + "smithy.api#documentation": "

The desired configuration. For example, the desired configuration can specify a new\n launch template or a new version of the current launch template.

\n

Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling group to\n reflect the new desired configuration.

\n \n

When you specify a new launch template or a new version of the current launch\n template for your desired configuration, consider enabling the\n SkipMatching property in preferences. If it's enabled, Amazon EC2 Auto Scaling\n skips replacing instances that already use the specified launch template and\n version. This can help you reduce the number of replacements that are required to\n apply updates.

\n
" } }, "Preferences": { "target": "com.amazonaws.autoscaling#RefreshPreferences", "traits": { - "smithy.api#documentation": "

Set of preferences associated with the instance refresh request.

\n

If not provided, the default values are used. For MinHealthyPercentage,\n the default value is 90. For InstanceWarmup, the default is to\n use the value specified for the health check grace period for the Auto Scaling group.

\n

For more information, see RefreshPreferences in the Amazon EC2 Auto Scaling API\n Reference.

" + "smithy.api#documentation": "

Set of preferences associated with the instance refresh request. If not provided, the\n default values are used.

" } } } diff --git a/codegen/sdk-codegen/aws-models/chime.2018-05-01.json b/codegen/sdk-codegen/aws-models/chime.2018-05-01.json index d4e3e5869e0..78f89d7e40d 100644 --- a/codegen/sdk-codegen/aws-models/chime.2018-05-01.json +++ b/codegen/sdk-codegen/aws-models/chime.2018-05-01.json @@ -871,7 +871,10 @@ "type": "structure", "members": { "InvitedBy": { - "target": "com.amazonaws.chime#Identity" + "target": "com.amazonaws.chime#Identity", + "traits": { + "smithy.api#documentation": "

The identifier of the member who invited another member.

" + } }, "Type": { "target": "com.amazonaws.chime#ChannelMembershipType", @@ -893,7 +896,7 @@ } }, "traits": { - "smithy.api#documentation": "

The membership information, including member ARNs, the channel ARN, and membership types.

" + "smithy.api#documentation": "

The membership information, including member ARNs, the channel ARN, and membership\n types.

" } }, "com.amazonaws.chime#BatchCreateAttendee": { @@ -1011,7 +1014,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds a specified number of users to a channel.

", + "smithy.api#documentation": "

Adds a specified number of users to a channel.

", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -1068,7 +1071,7 @@ "Type": { "target": "com.amazonaws.chime#ChannelMembershipType", "traits": { - "smithy.api#documentation": "

The membership type of a user, DEFAULT or HIDDEN. Default members are always returned as part of \n ListChannelMemberships. Hidden members are only returned if the type filter in ListChannelMemberships equals \n HIDDEN. Otherwise hidden members are not returned. This is only supported by moderators.

" + "smithy.api#documentation": "

The membership type of a user, DEFAULT or HIDDEN. Default\n members are always returned as part of ListChannelMemberships. Hidden members\n are only returned if the type filter in ListChannelMemberships equals\n HIDDEN. Otherwise hidden members are not returned. This is only supported\n by moderators.

" } }, "MemberArns": { @@ -1099,7 +1102,7 @@ "Errors": { "target": "com.amazonaws.chime#BatchCreateChannelMembershipErrors", "traits": { - "smithy.api#documentation": "

If the action fails for one or more of the memberships in the request, a list of the memberships is returned, along with error codes and error messages.

" + "smithy.api#documentation": "

If the action fails for one or more of the memberships in the request, a list of the\n memberships is returned, along with error codes and error messages.

" } } } @@ -1846,10 +1849,7 @@ "target": "com.amazonaws.chime#ChannelSummary" }, "AppInstanceUserMembershipSummary": { - "target": "com.amazonaws.chime#AppInstanceUserMembershipSummary", - "traits": { - "smithy.api#documentation": "

Returns the channel membership data for an AppInstance.

" - } + "target": "com.amazonaws.chime#AppInstanceUserMembershipSummary" } }, "traits": { @@ -2088,7 +2088,10 @@ "type": "structure", "members": { "ChannelSummary": { - "target": "com.amazonaws.chime#ChannelSummary" + "target": "com.amazonaws.chime#ChannelSummary", + "traits": { + "smithy.api#documentation": "

Summary of the details of a Channel.

" + } } }, "traits": { @@ -2264,7 +2267,7 @@ } }, "traits": { - "smithy.api#documentation": "

The request could not be processed because of conflict in the current state of the\n resource.

", + "smithy.api#documentation": "

The request could not be processed because of conflict in the current state of the\n resource.

", "smithy.api#error": "client", "smithy.api#httpError": 409 } @@ -2907,7 +2910,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a channel to which you can add users and send messages.

\n\n

\n Restriction: You can't change a channel's privacy.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Creates a channel to which you can add users and send messages.

\n\n

\n Restriction: You can't change a channel's\n privacy.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -2953,7 +2956,7 @@ } ], "traits": { - "smithy.api#documentation": "

Permanently bans a member from a channel. Moderators can't add banned members to a channel.\n To undo a ban, you first have to DeleteChannelBan, and then\n CreateChannelMembership. Bans are cleaned up when you delete users or\n channels.

\n

If you ban a user who is already part of a channel, that user is automatically kicked from the channel.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Permanently bans a member from a channel. Moderators can't add banned members to a\n channel. To undo a ban, you first have to DeleteChannelBan, and then\n CreateChannelMembership. Bans are cleaned up when you delete users or\n channels.

\n

If you ban a user who is already part of a channel, that user is automatically kicked\n from the channel.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -3003,7 +3006,7 @@ "Member": { "target": "com.amazonaws.chime#Identity", "traits": { - "smithy.api#documentation": "

The ChannelArn and BannedIdentity of the member in the ban response.

" + "smithy.api#documentation": "

The ChannelArn and BannedIdentity of the member in the ban\n response.

" } } } @@ -3043,7 +3046,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds a user to a channel. The InvitedBy response field is derived from the\n request header. A channel member can:

\n\n \n\n

Privacy settings impact this action as follows:

\n\n \n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Adds a user to a channel. The InvitedBy response field is derived from the\n request header. A channel member can:

\n\n \n\n

Privacy settings impact this action as follows:

\n\n \n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -3075,7 +3078,7 @@ "Type": { "target": "com.amazonaws.chime#ChannelMembershipType", "traits": { - "smithy.api#documentation": "

The membership type of a user, DEFAULT or HIDDEN. Default members are always returned as part of \nListChannelMemberships. Hidden members are only returned if the type filter in ListChannelMemberships equals \nHIDDEN. Otherwise hidden members are not returned. This is only supported by moderators.

", + "smithy.api#documentation": "

The membership type of a user, DEFAULT or HIDDEN. Default\n members are always returned as part of ListChannelMemberships. Hidden members\n are only returned if the type filter in ListChannelMemberships equals\n HIDDEN. Otherwise hidden members are not returned. This is only supported\n by moderators.

", "smithy.api#required": {} } }, @@ -3140,7 +3143,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new ChannelModerator. A channel moderator can:

\n\n \n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Creates a new ChannelModerator. A channel moderator can:

\n\n \n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -3215,13 +3218,13 @@ "Mode": { "target": "com.amazonaws.chime#ChannelMode", "traits": { - "smithy.api#documentation": "

The channel mode: UNRESTRICTED or RESTRICTED. Administrators, moderators, and channel members can add themselves \n and other members to unrestricted channels. Only administrators and moderators can add members to restricted channels.

" + "smithy.api#documentation": "

The channel mode: UNRESTRICTED or RESTRICTED. Administrators,\n moderators, and channel members can add themselves and other members to unrestricted\n channels. Only administrators and moderators can add members to restricted channels.

" } }, "Privacy": { "target": "com.amazonaws.chime#ChannelPrivacy", "traits": { - "smithy.api#documentation": "

The channel's privacy level: PUBLIC or PRIVATE. Private channels aren't discoverable by users outside the channel. \n Public channels are discoverable by anyone in the AppInstance.

" + "smithy.api#documentation": "

The channel's privacy level: PUBLIC or PRIVATE. Private\n channels aren't discoverable by users outside the channel. Public channels are discoverable\n by anyone in the AppInstance.

" } }, "Metadata": { @@ -4919,7 +4922,7 @@ } ], "traits": { - "smithy.api#documentation": "

Immediately makes a channel and its memberships inaccessible and marks them for deletion. This is an irreversible process.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Immediately makes a channel and its memberships inaccessible and marks them for\n deletion. This is an irreversible process.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -4956,7 +4959,7 @@ } ], "traits": { - "smithy.api#documentation": "

Removes a user from a channel's ban list.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Removes a user from a channel's ban list.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -5024,7 +5027,7 @@ } ], "traits": { - "smithy.api#documentation": "

Removes a member from a channel.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Removes a member from a channel.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -5089,7 +5092,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a channel message. Only admins can perform this action. Deletion makes messages\n inaccessible immediately. A background process deletes any revisions created by\n UpdateChannelMessage.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Deletes a channel message. Only admins can perform this action. Deletion makes messages\n inaccessible immediately. A background process deletes any revisions created by\n UpdateChannelMessage.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -5154,7 +5157,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a channel moderator.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Deletes a channel moderator.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -6284,7 +6287,7 @@ } ], "traits": { - "smithy.api#documentation": "

\nReturns the full details of an \nAppInstanceUser\n.\n

", + "smithy.api#documentation": "

Returns the full details of an AppInstanceUser.

", "smithy.api#endpoint": { "hostPrefix": "identity-" }, @@ -6348,7 +6351,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the full details of a channel in an Amazon Chime AppInstance.

\n\n \n\n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Returns the full details of a channel in an Amazon Chime\n AppInstance.

\n\n \n\n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -6391,7 +6394,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the full details of a channel ban.

\n\n \n\n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Returns the full details of a channel ban.

\n\n \n\n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -6473,7 +6476,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the full details of a user's channel membership.

\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Returns the full details of a user's channel membership.

\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -6513,7 +6516,7 @@ } ], "traits": { - "smithy.api#documentation": "

\nReturns the details of a channel based on the membership of the specified AppInstanceUser.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Returns the details of a channel based on the membership of the specified\n AppInstanceUser.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -6631,7 +6634,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the full details of a channel moderated by the specified AppInstanceUser.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Returns the full details of a channel moderated by the specified\n AppInstanceUser.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -6713,7 +6716,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the full details of a single ChannelModerator.

\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Returns the full details of a single ChannelModerator.

\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -7151,7 +7154,7 @@ "Region": { "target": "com.amazonaws.chime#TranscribeMedicalRegion", "traits": { - "smithy.api#documentation": "

The AWS Region passed to Amazon Transcribe Medical. If you don't specify a Region, Amazon Chime uses the Region closest to the meeting's Region.

" + "smithy.api#documentation": "

The AWS Region passed to Amazon Transcribe Medical. If you don't specify a Region, Amazon Chime uses the meeting's Region.

" } } }, @@ -7190,7 +7193,7 @@ "Region": { "target": "com.amazonaws.chime#TranscribeRegion", "traits": { - "smithy.api#documentation": "

The AWS Region passed to Amazon Transcribe. If you don't specify a Region, Amazon Chime uses the Region closest to the meeting's Region.

" + "smithy.api#documentation": "

The AWS Region passed to Amazon Transcribe. If you don't specify a Region, Amazon Chime uses the meeting's Region.

" } } }, @@ -7816,7 +7819,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the full details of a channel message.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the \n value in the header.

\n
", + "smithy.api#documentation": "

Gets the full details of a channel message.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -9905,7 +9908,7 @@ } ], "traits": { - "smithy.api#documentation": "

\nList all \nAppInstanceUsers\ncreated under a single AppInstance.\n

", + "smithy.api#documentation": "

List all AppInstanceUsers\n created under a single AppInstance.\n

", "smithy.api#endpoint": { "hostPrefix": "identity-" }, @@ -10331,7 +10334,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists all the users banned from a particular channel.

\n\n \n\n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Lists all the users banned from a particular channel.

\n\n \n\n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -10433,7 +10436,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists all channel memberships in a channel.

\n\n \n\n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Lists all channel memberships in a channel.

\n\n \n\n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -10478,7 +10481,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists all channels that a particular AppInstanceUser is a part of. Only an\n AppInstanceAdmin can call the API with a user ARN that is not their\n own.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Lists all channels that a particular AppInstanceUser is a part of. Only an\n AppInstanceAdmin can call the API with a user ARN that is not their own.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -10558,7 +10561,7 @@ "Type": { "target": "com.amazonaws.chime#ChannelMembershipType", "traits": { - "smithy.api#documentation": "

The membership type of a user, DEFAULT or HIDDEN. Default members are always returned as part of \n ListChannelMemberships. Hidden members are only returned if the type filter in ListChannelMemberships equals \n HIDDEN. Otherwise hidden members are not returned.

", + "smithy.api#documentation": "

The membership type of a user, DEFAULT or HIDDEN. Default\n members are always returned as part of ListChannelMemberships. Hidden members\n are only returned if the type filter in ListChannelMemberships equals\n HIDDEN. Otherwise hidden members are not returned.

", "smithy.api#httpQuery": "type" } }, @@ -10572,7 +10575,7 @@ "NextToken": { "target": "com.amazonaws.chime#NextToken", "traits": { - "smithy.api#documentation": "

The token passed by previous API calls until all requested channel memberships are returned.

", + "smithy.api#documentation": "

The token passed by previous API calls until all requested channel memberships are\n returned.

", "smithy.api#httpQuery": "next-token" } }, @@ -10603,7 +10606,7 @@ "NextToken": { "target": "com.amazonaws.chime#NextToken", "traits": { - "smithy.api#documentation": "

The token passed by previous API calls until all requested channel memberships are returned.

" + "smithy.api#documentation": "

The token passed by previous API calls until all requested channel memberships are\n returned.

" } } } @@ -10637,7 +10640,7 @@ } ], "traits": { - "smithy.api#documentation": "

List all the messages in a channel. Returns a paginated list of ChannelMessages. By default, sorted by creation timestamp in descending order.

\n \n

Redacted messages appear in the results as empty, since they are only redacted, not deleted.\n Deleted messages do not appear in the results. This action always returns the latest\n version of an edited message.

\n

Also, the x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the \n value in the header.

\n
", + "smithy.api#documentation": "

List all the messages in a channel. Returns a paginated list of\n ChannelMessages. By default, sorted by creation timestamp in descending\n order.

\n \n

Redacted messages appear in the results as empty, since they are only redacted, not\n deleted. Deleted messages do not appear in the results. This action always returns the\n latest version of an edited message.

\n

Also, the x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -10667,7 +10670,7 @@ "SortOrder": { "target": "com.amazonaws.chime#SortOrder", "traits": { - "smithy.api#documentation": "

The order in which you want messages sorted. Default is Descending, based on time created.

", + "smithy.api#documentation": "

The order in which you want messages sorted. Default is Descending, based on time\n created.

", "smithy.api#httpQuery": "sort-order" } }, @@ -10760,7 +10763,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists all the moderators for a channel.

\n\n \n\n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Lists all the moderators for a channel.

\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -10797,7 +10800,7 @@ "NextToken": { "target": "com.amazonaws.chime#NextToken", "traits": { - "smithy.api#documentation": "

The token passed by previous API calls until all requested moderators are returned.

", + "smithy.api#documentation": "

The token passed by previous API calls until all requested moderators are\n returned.

", "smithy.api#httpQuery": "next-token" } }, @@ -10822,7 +10825,7 @@ "NextToken": { "target": "com.amazonaws.chime#NextToken", "traits": { - "smithy.api#documentation": "

The token passed by previous API calls until all requested moderators are returned.

" + "smithy.api#documentation": "

The token passed by previous API calls until all requested moderators are\n returned.

" } }, "ChannelModerators": { @@ -10862,7 +10865,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists all Channels created under a single Chime App as a paginated list. You can specify filters to narrow results.

\n\n

\n Functionality & restrictions\n

\n \n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Lists all Channels created under a single Chime App as a paginated list. You can specify\n filters to narrow results.

\n\n

\n Functionality & restrictions\n

\n \n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -10907,7 +10910,7 @@ } ], "traits": { - "smithy.api#documentation": "

A list of the channels moderated by an AppInstanceUser.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

A list of the channels moderated by an AppInstanceUser.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -10943,7 +10946,7 @@ "NextToken": { "target": "com.amazonaws.chime#NextToken", "traits": { - "smithy.api#documentation": "

The token returned from previous API requests until the number of channels moderated by the user is reached.

", + "smithy.api#documentation": "

The token returned from previous API requests until the number of channels moderated by\n the user is reached.

", "smithy.api#httpQuery": "next-token" } }, @@ -10968,7 +10971,7 @@ "NextToken": { "target": "com.amazonaws.chime#NextToken", "traits": { - "smithy.api#documentation": "

The token returned from previous API requests until the number of channels moderated by the user is reached.

" + "smithy.api#documentation": "

The token returned from previous API requests until the number of channels moderated by\n the user is reached.

" } } } @@ -10987,7 +10990,7 @@ "Privacy": { "target": "com.amazonaws.chime#ChannelPrivacy", "traits": { - "smithy.api#documentation": "

The privacy setting. PUBLIC retrieves all the public channels. PRIVATE retrieves private channels. Only an \n AppInstanceAdmin can retrieve private channels.\n

", + "smithy.api#documentation": "

The privacy setting. PUBLIC retrieves all the public channels.\n PRIVATE retrieves private channels. Only an AppInstanceAdmin\n can retrieve private channels.

", "smithy.api#httpQuery": "privacy" } }, @@ -11026,7 +11029,7 @@ "NextToken": { "target": "com.amazonaws.chime#NextToken", "traits": { - "smithy.api#documentation": "

The token returned from previous API requests until the number of channels is reached.

" + "smithy.api#documentation": "

The token returned from previous API requests until the number of channels is\n reached.

" } } } @@ -14671,7 +14674,7 @@ } ], "traits": { - "smithy.api#documentation": "

Redacts message content, but not metadata. The message exists in the back end, but the action returns null content, and the state shows as redacted.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Redacts message content, but not metadata. The message exists in the back end, but the\n action returns null content, and the state shows as redacted.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -15457,7 +15460,7 @@ } ], "traits": { - "smithy.api#documentation": "

Sends a message to a particular channel that the member is a part of.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n\n

Also, STANDARD messages can contain 4KB of data and the 1KB of metadata. CONTROL messages can contain 30 bytes of \n data and no metadata.

\n
", + "smithy.api#documentation": "

Sends a message to a particular channel that the member is a part of.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n\n

Also, STANDARD messages can contain 4KB of data and the 1KB of metadata.\n CONTROL messages can contain 30 bytes of data and no metadata.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -16523,6 +16526,10 @@ { "value": "eu-west-1", "name": "EU_WEST_1" + }, + { + "value": "auto", + "name": "AUTO" } ] } @@ -16620,6 +16627,10 @@ { "value": "sa-east-1", "name": "SA_EAST_1" + }, + { + "value": "auto", + "name": "AUTO" } ] } @@ -17679,7 +17690,7 @@ "AppInstanceArn": { "target": "com.amazonaws.chime#ChimeArn", "traits": { - "smithy.api#documentation": "

The ARN of the AppInstance.

" + "smithy.api#documentation": "

The ARN of the AppInstance.

" } } } @@ -17874,7 +17885,7 @@ } ], "traits": { - "smithy.api#documentation": "

Update a channel's attributes.

\n

\n Restriction: You can't change a channel's privacy.\n

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Update a channel's attributes.

\n

\n Restriction: You can't change a channel's privacy.

\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -17917,7 +17928,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the content of a message.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

Updates the content of a message.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, @@ -18017,7 +18028,7 @@ } ], "traits": { - "smithy.api#documentation": "

The details of the time when a user last read messages in a channel.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes \n the API call as the value in the header.

\n
", + "smithy.api#documentation": "

The details of the time when a user last read messages in a channel.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", "smithy.api#endpoint": { "hostPrefix": "messaging-" }, diff --git a/codegen/sdk-codegen/aws-models/chimesdkidentity.2021-04-20.json b/codegen/sdk-codegen/aws-models/chimesdkidentity.2021-04-20.json new file mode 100644 index 00000000000..93ac1615003 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/chimesdkidentity.2021-04-20.json @@ -0,0 +1,1884 @@ +{ + "smithy": "1.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "HttpResponseCodeSemantics", + "namespace": "*" + }, + { + "id": "PaginatedTrait", + "namespace": "*" + }, + { + "id": "HttpHeaderTrait", + "namespace": "*" + }, + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "Service", + "namespace": "*" + } + ] + }, + "shapes": { + "com.amazonaws.chimesdkidentity#AppInstance": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the messaging instance.

" + } + }, + "Name": { + "target": "com.amazonaws.chimesdkidentity#NonEmptyResourceName", + "traits": { + "smithy.api#documentation": "

The name of an AppInstance.

" + } + }, + "CreatedTimestamp": { + "target": "com.amazonaws.chimesdkidentity#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which an AppInstance was created. In epoch milliseconds.

" + } + }, + "LastUpdatedTimestamp": { + "target": "com.amazonaws.chimesdkidentity#Timestamp", + "traits": { + "smithy.api#documentation": "

The time an AppInstance was last updated. In epoch milliseconds.

" + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkidentity#Metadata", + "traits": { + "smithy.api#documentation": "

The metadata of an AppInstance.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details of an AppInstance, an instance of an Amazon Chime SDK messaging\n application.

" + } + }, + "com.amazonaws.chimesdkidentity#AppInstanceAdmin": { + "type": "structure", + "members": { + "Admin": { + "target": "com.amazonaws.chimesdkidentity#Identity", + "traits": { + "smithy.api#documentation": "

The AppInstanceAdmin data.

" + } + }, + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance for which the user is an administrator.

" + } + }, + "CreatedTimestamp": { + "target": "com.amazonaws.chimesdkidentity#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which an administrator was created.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details of an AppInstanceAdmin.

" + } + }, + "com.amazonaws.chimesdkidentity#AppInstanceAdminList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkidentity#AppInstanceAdminSummary" + } + }, + "com.amazonaws.chimesdkidentity#AppInstanceAdminSummary": { + "type": "structure", + "members": { + "Admin": { + "target": "com.amazonaws.chimesdkidentity#Identity", + "traits": { + "smithy.api#documentation": "

The details of the AppInstanceAdmin.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary of the details of an AppInstanceAdmin.

" + } + }, + "com.amazonaws.chimesdkidentity#AppInstanceList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkidentity#AppInstanceSummary" + } + }, + "com.amazonaws.chimesdkidentity#AppInstanceRetentionSettings": { + "type": "structure", + "members": { + "ChannelRetentionSettings": { + "target": "com.amazonaws.chimesdkidentity#ChannelRetentionSettings", + "traits": { + "smithy.api#documentation": "

The length of time in days to retain the messages in a channel.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details of the data-retention settings for an AppInstance.

" + } + }, + "com.amazonaws.chimesdkidentity#AppInstanceSummary": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstance ARN.

" + } + }, + "Name": { + "target": "com.amazonaws.chimesdkidentity#NonEmptyResourceName", + "traits": { + "smithy.api#documentation": "

The name of the AppInstance.

" + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkidentity#Metadata", + "traits": { + "smithy.api#documentation": "

The metadata of the AppInstance.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary of the data for an AppInstance.

" + } + }, + "com.amazonaws.chimesdkidentity#AppInstanceUser": { + "type": "structure", + "members": { + "AppInstanceUserArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstanceUser.

" + } + }, + "Name": { + "target": "com.amazonaws.chimesdkidentity#UserName", + "traits": { + "smithy.api#documentation": "

The name of the AppInstanceUser.

" + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkidentity#Metadata", + "traits": { + "smithy.api#documentation": "

The metadata of the AppInstanceUser.

" + } + }, + "CreatedTimestamp": { + "target": "com.amazonaws.chimesdkidentity#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which the AppInstanceUser was created.

" + } + }, + "LastUpdatedTimestamp": { + "target": "com.amazonaws.chimesdkidentity#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which the AppInstanceUser was last updated.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details of an AppInstanceUser.

" + } + }, + "com.amazonaws.chimesdkidentity#AppInstanceUserList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkidentity#AppInstanceUserSummary" + } + }, + "com.amazonaws.chimesdkidentity#AppInstanceUserSummary": { + "type": "structure", + "members": { + "AppInstanceUserArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstanceUser.

" + } + }, + "Name": { + "target": "com.amazonaws.chimesdkidentity#UserName", + "traits": { + "smithy.api#documentation": "

The name of an AppInstanceUser.

" + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkidentity#Metadata", + "traits": { + "smithy.api#documentation": "

The metadata of the AppInstanceUser.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary of the details of an AppInstanceUser.

" + } + }, + "com.amazonaws.chimesdkidentity#BadRequestException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkidentity#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkidentity#String" + } + }, + "traits": { + "smithy.api#documentation": "

The input parameters don't match the service's restrictions.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.chimesdkidentity#ChannelRetentionSettings": { + "type": "structure", + "members": { + "RetentionDays": { + "target": "com.amazonaws.chimesdkidentity#RetentionDays", + "traits": { + "smithy.api#documentation": "

The time in days to retain the messages in a channel.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details of the retention settings for a channel.

" + } + }, + "com.amazonaws.chimesdkidentity#ChimeArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 5, + "max": 1600 + }, + "smithy.api#pattern": "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$" + } + }, + "com.amazonaws.chimesdkidentity#ChimeIdentityService": { + "type": "service", + "version": "2021-04-20", + "operations": [ + { + "target": "com.amazonaws.chimesdkidentity#CreateAppInstance" + }, + { + "target": "com.amazonaws.chimesdkidentity#CreateAppInstanceAdmin" + }, + { + "target": "com.amazonaws.chimesdkidentity#CreateAppInstanceUser" + }, + { + "target": "com.amazonaws.chimesdkidentity#DeleteAppInstance" + }, + { + "target": "com.amazonaws.chimesdkidentity#DeleteAppInstanceAdmin" + }, + { + "target": "com.amazonaws.chimesdkidentity#DeleteAppInstanceUser" + }, + { + "target": "com.amazonaws.chimesdkidentity#DescribeAppInstance" + }, + { + "target": "com.amazonaws.chimesdkidentity#DescribeAppInstanceAdmin" + }, + { + "target": "com.amazonaws.chimesdkidentity#DescribeAppInstanceUser" + }, + { + "target": "com.amazonaws.chimesdkidentity#GetAppInstanceRetentionSettings" + }, + { + "target": "com.amazonaws.chimesdkidentity#ListAppInstanceAdmins" + }, + { + "target": "com.amazonaws.chimesdkidentity#ListAppInstances" + }, + { + "target": "com.amazonaws.chimesdkidentity#ListAppInstanceUsers" + }, + { + "target": "com.amazonaws.chimesdkidentity#PutAppInstanceRetentionSettings" + }, + { + "target": "com.amazonaws.chimesdkidentity#UpdateAppInstance" + }, + { + "target": "com.amazonaws.chimesdkidentity#UpdateAppInstanceUser" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Chime SDK Identity", + "arnNamespace": "chime", + "cloudFormationName": "ChimeSDKIdentity", + "cloudTrailEventSource": "chimesdkidentity.amazonaws.com", + "endpointPrefix": "identity-chime" + }, + "aws.auth#sigv4": { + "name": "chime" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

The Amazon Chime SDK Identity APIs in this section allow software developers to create\n and manage unique instances of their messaging applications. These APIs provide the\n overarching framework for creating and sending messages. For more information about the\n identity APIs, refer to .

", + "smithy.api#title": "Amazon Chime SDK Identity" + } + }, + "com.amazonaws.chimesdkidentity#ClientRequestToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 64 + }, + "smithy.api#pattern": "^[-_a-zA-Z0-9]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkidentity#ConflictException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkidentity#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkidentity#String" + } + }, + "traits": { + "smithy.api#documentation": "

The request could not be processed because of conflict in the current state of the\n resource.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.chimesdkidentity#CreateAppInstance": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#CreateAppInstanceRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkidentity#CreateAppInstanceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an Amazon Chime SDK messaging AppInstance under an AWS account.\n Only SDK messaging customers use this API. CreateAppInstance supports\n idempotency behavior as described in the AWS API Standard.

\n

identity

", + "smithy.api#http": { + "method": "POST", + "uri": "/app-instances", + "code": 201 + } + } + }, + "com.amazonaws.chimesdkidentity#CreateAppInstanceAdmin": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#CreateAppInstanceAdminRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkidentity#CreateAppInstanceAdminResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Promotes an AppInstanceUser to an AppInstanceAdmin. The\n promoted user can perform the following actions.

\n\n \n\n

Only an AppInstanceUser can be promoted to an AppInstanceAdmin\n role.

", + "smithy.api#http": { + "method": "POST", + "uri": "/app-instances/{AppInstanceArn}/admins", + "code": 201 + } + } + }, + "com.amazonaws.chimesdkidentity#CreateAppInstanceAdminRequest": { + "type": "structure", + "members": { + "AppInstanceAdminArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the administrator of the current AppInstance.

", + "smithy.api#required": {} + } + }, + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkidentity#CreateAppInstanceAdminResponse": { + "type": "structure", + "members": { + "AppInstanceAdmin": { + "target": "com.amazonaws.chimesdkidentity#Identity", + "traits": { + "smithy.api#documentation": "

The name and ARN of the admin for the AppInstance.

" + } + }, + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the of the admin for the AppInstance.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#CreateAppInstanceRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.chimesdkidentity#NonEmptyResourceName", + "traits": { + "smithy.api#documentation": "

The name of the AppInstance.

", + "smithy.api#required": {} + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkidentity#Metadata", + "traits": { + "smithy.api#documentation": "

The metadata of the AppInstance. Limited to a 1KB string in UTF-8.

" + } + }, + "ClientRequestToken": { + "target": "com.amazonaws.chimesdkidentity#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

The ClientRequestToken of the AppInstance.

", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.chimesdkidentity#TagList", + "traits": { + "smithy.api#documentation": "

Tags assigned to the AppInstanceUser.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#CreateAppInstanceResponse": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the AppInstance.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#CreateAppInstanceUser": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#CreateAppInstanceUserRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkidentity#CreateAppInstanceUserResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a user under an Amazon Chime AppInstance. The request consists of a\n unique appInstanceUserId and Name for that user.

", + "smithy.api#http": { + "method": "POST", + "uri": "/app-instance-users", + "code": 201 + } + } + }, + "com.amazonaws.chimesdkidentity#CreateAppInstanceUserRequest": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance request.

", + "smithy.api#required": {} + } + }, + "AppInstanceUserId": { + "target": "com.amazonaws.chimesdkidentity#UserId", + "traits": { + "smithy.api#documentation": "

The user ID of the AppInstance.

", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.chimesdkidentity#UserName", + "traits": { + "smithy.api#documentation": "

The user's name.

", + "smithy.api#required": {} + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkidentity#Metadata", + "traits": { + "smithy.api#documentation": "

The request's metadata. Limited to a 1KB string in UTF-8.

" + } + }, + "ClientRequestToken": { + "target": "com.amazonaws.chimesdkidentity#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

The token assigned to the user requesting an AppInstance.

", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.chimesdkidentity#TagList", + "traits": { + "smithy.api#documentation": "

Tags assigned to the AppInstanceUser.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#CreateAppInstanceUserResponse": { + "type": "structure", + "members": { + "AppInstanceUserArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The user's ARN.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#DeleteAppInstance": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#DeleteAppInstanceRequest" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an AppInstance and all associated data asynchronously.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/app-instances/{AppInstanceArn}", + "code": 204 + } + } + }, + "com.amazonaws.chimesdkidentity#DeleteAppInstanceAdmin": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#DeleteAppInstanceAdminRequest" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Demotes an AppInstanceAdmin to an AppInstanceUser. This action\n does not delete the user.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}", + "code": 204 + } + } + }, + "com.amazonaws.chimesdkidentity#DeleteAppInstanceAdminRequest": { + "type": "structure", + "members": { + "AppInstanceAdminArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance's administrator.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkidentity#DeleteAppInstanceRequest": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkidentity#DeleteAppInstanceUser": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#DeleteAppInstanceUserRequest" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an AppInstanceUser.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/app-instance-users/{AppInstanceUserArn}", + "code": 204 + } + } + }, + "com.amazonaws.chimesdkidentity#DeleteAppInstanceUserRequest": { + "type": "structure", + "members": { + "AppInstanceUserArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the user request being deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkidentity#DescribeAppInstance": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#DescribeAppInstanceRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkidentity#DescribeAppInstanceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the full details of an AppInstance.

", + "smithy.api#http": { + "method": "GET", + "uri": "/app-instances/{AppInstanceArn}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkidentity#DescribeAppInstanceAdmin": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#DescribeAppInstanceAdminRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkidentity#DescribeAppInstanceAdminResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the full details of an AppInstanceAdmin.

", + "smithy.api#http": { + "method": "GET", + "uri": "/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkidentity#DescribeAppInstanceAdminRequest": { + "type": "structure", + "members": { + "AppInstanceAdminArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstanceAdmin.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkidentity#DescribeAppInstanceAdminResponse": { + "type": "structure", + "members": { + "AppInstanceAdmin": { + "target": "com.amazonaws.chimesdkidentity#AppInstanceAdmin", + "traits": { + "smithy.api#documentation": "

The ARN and name of the AppInstanceUser, the ARN of the\n AppInstance, and the created and last-updated timestamps. All timestamps\n use epoch milliseconds.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#DescribeAppInstanceRequest": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkidentity#DescribeAppInstanceResponse": { + "type": "structure", + "members": { + "AppInstance": { + "target": "com.amazonaws.chimesdkidentity#AppInstance", + "traits": { + "smithy.api#documentation": "

The ARN, metadata, created and last-updated timestamps, and the name of the\n AppInstance. All timestamps use epoch milliseconds.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#DescribeAppInstanceUser": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#DescribeAppInstanceUserRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkidentity#DescribeAppInstanceUserResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the full details of an AppInstanceUser.

", + "smithy.api#http": { + "method": "GET", + "uri": "/app-instance-users/{AppInstanceUserArn}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkidentity#DescribeAppInstanceUserRequest": { + "type": "structure", + "members": { + "AppInstanceUserArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstanceUser.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkidentity#DescribeAppInstanceUserResponse": { + "type": "structure", + "members": { + "AppInstanceUser": { + "target": "com.amazonaws.chimesdkidentity#AppInstanceUser", + "traits": { + "smithy.api#documentation": "

The name of the AppInstanceUser.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#ErrorCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "BadRequest", + "name": "BadRequest" + }, + { + "value": "Conflict", + "name": "Conflict" + }, + { + "value": "Forbidden", + "name": "Forbidden" + }, + { + "value": "NotFound", + "name": "NotFound" + }, + { + "value": "PreconditionFailed", + "name": "PreconditionFailed" + }, + { + "value": "ResourceLimitExceeded", + "name": "ResourceLimitExceeded" + }, + { + "value": "ServiceFailure", + "name": "ServiceFailure" + }, + { + "value": "AccessDenied", + "name": "AccessDenied" + }, + { + "value": "ServiceUnavailable", + "name": "ServiceUnavailable" + }, + { + "value": "Throttled", + "name": "Throttled" + }, + { + "value": "Throttling", + "name": "Throttling" + }, + { + "value": "Unauthorized", + "name": "Unauthorized" + }, + { + "value": "Unprocessable", + "name": "Unprocessable" + }, + { + "value": "VoiceConnectorGroupAssociationsExist", + "name": "VoiceConnectorGroupAssociationsExist" + }, + { + "value": "PhoneNumberAssociationsExist", + "name": "PhoneNumberAssociationsExist" + } + ] + } + }, + "com.amazonaws.chimesdkidentity#ForbiddenException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkidentity#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkidentity#String" + } + }, + "traits": { + "smithy.api#documentation": "

The client is permanently forbidden from making the request.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.chimesdkidentity#GetAppInstanceRetentionSettings": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#GetAppInstanceRetentionSettingsRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkidentity#GetAppInstanceRetentionSettingsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets the retention settings for an AppInstance.

", + "smithy.api#http": { + "method": "GET", + "uri": "/app-instances/{AppInstanceArn}/retention-settings", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkidentity#GetAppInstanceRetentionSettingsRequest": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkidentity#GetAppInstanceRetentionSettingsResponse": { + "type": "structure", + "members": { + "AppInstanceRetentionSettings": { + "target": "com.amazonaws.chimesdkidentity#AppInstanceRetentionSettings", + "traits": { + "smithy.api#documentation": "

The retention settings for the AppInstance.

" + } + }, + "InitiateDeletionTimestamp": { + "target": "com.amazonaws.chimesdkidentity#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp representing the time at which the specified items are retained, in Epoch\n Seconds.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#Identity": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN in an Identity.

" + } + }, + "Name": { + "target": "com.amazonaws.chimesdkidentity#ResourceName", + "traits": { + "smithy.api#documentation": "

The name in an Identity.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details of a user.

" + } + }, + "com.amazonaws.chimesdkidentity#ListAppInstanceAdmins": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#ListAppInstanceAdminsRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkidentity#ListAppInstanceAdminsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of the administrators in the AppInstance.

", + "smithy.api#http": { + "method": "GET", + "uri": "/app-instances/{AppInstanceArn}/admins", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.chimesdkidentity#ListAppInstanceAdminsRequest": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.chimesdkidentity#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of administrators that you want to return.

", + "smithy.api#httpQuery": "max-results" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkidentity#NextToken", + "traits": { + "smithy.api#documentation": "

The token returned from previous API requests until the number of administrators is\n reached.

", + "smithy.api#httpQuery": "next-token" + } + } + } + }, + "com.amazonaws.chimesdkidentity#ListAppInstanceAdminsResponse": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

" + } + }, + "AppInstanceAdmins": { + "target": "com.amazonaws.chimesdkidentity#AppInstanceAdminList", + "traits": { + "smithy.api#documentation": "

The information for each administrator.

" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkidentity#NextToken", + "traits": { + "smithy.api#documentation": "

The token returned from previous API requests until the number of administrators is\n reached.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#ListAppInstanceUsers": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#ListAppInstanceUsersRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkidentity#ListAppInstanceUsersResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

List all AppInstanceUsers created under a single\n AppInstance.

", + "smithy.api#http": { + "method": "GET", + "uri": "/app-instance-users", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.chimesdkidentity#ListAppInstanceUsersRequest": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

", + "smithy.api#httpQuery": "app-instance-arn", + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.chimesdkidentity#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of requests that you want returned.

", + "smithy.api#httpQuery": "max-results" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkidentity#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API calls until all requested users are returned.

", + "smithy.api#httpQuery": "next-token" + } + } + } + }, + "com.amazonaws.chimesdkidentity#ListAppInstanceUsersResponse": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

" + } + }, + "AppInstanceUsers": { + "target": "com.amazonaws.chimesdkidentity#AppInstanceUserList", + "traits": { + "smithy.api#documentation": "

The information for each requested AppInstanceUser.

" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkidentity#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API calls until all requested users are returned.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#ListAppInstances": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#ListAppInstancesRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkidentity#ListAppInstancesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all Amazon Chime AppInstances created under a single AWS\n account.

", + "smithy.api#http": { + "method": "GET", + "uri": "/app-instances", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.chimesdkidentity#ListAppInstancesRequest": { + "type": "structure", + "members": { + "MaxResults": { + "target": "com.amazonaws.chimesdkidentity#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of AppInstances that you want to return.

", + "smithy.api#httpQuery": "max-results" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkidentity#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API requests until you reach the maximum number of\n AppInstances.

", + "smithy.api#httpQuery": "next-token" + } + } + } + }, + "com.amazonaws.chimesdkidentity#ListAppInstancesResponse": { + "type": "structure", + "members": { + "AppInstances": { + "target": "com.amazonaws.chimesdkidentity#AppInstanceList", + "traits": { + "smithy.api#documentation": "

The information for each AppInstance.

" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkidentity#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API requests until the maximum number of\n AppInstances is reached.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.chimesdkidentity#Metadata": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": ".*", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkidentity#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": ".*", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkidentity#NonEmptyResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[\\u0009\\u000A\\u000D\\u0020-\\u007E\\u0085\\u00A0-\\uD7FF\\uE000-\\uFFFD\\u10000-\\u10FFFF]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkidentity#PutAppInstanceRetentionSettings": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#PutAppInstanceRetentionSettingsRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkidentity#PutAppInstanceRetentionSettingsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Sets the amount of time in days that a given AppInstance retains\n data.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/app-instances/{AppInstanceArn}/retention-settings", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkidentity#PutAppInstanceRetentionSettingsRequest": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AppInstanceRetentionSettings": { + "target": "com.amazonaws.chimesdkidentity#AppInstanceRetentionSettings", + "traits": { + "smithy.api#documentation": "

The time in days to retain data. Data type: number.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkidentity#PutAppInstanceRetentionSettingsResponse": { + "type": "structure", + "members": { + "AppInstanceRetentionSettings": { + "target": "com.amazonaws.chimesdkidentity#AppInstanceRetentionSettings", + "traits": { + "smithy.api#documentation": "

The time in days to retain data. Data type: number.

" + } + }, + "InitiateDeletionTimestamp": { + "target": "com.amazonaws.chimesdkidentity#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which the API deletes data.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#ResourceLimitExceededException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkidentity#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkidentity#String" + } + }, + "traits": { + "smithy.api#documentation": "

The request exceeds the resource limit.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.chimesdkidentity#ResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^[\\u0009\\u000A\\u000D\\u0020-\\u007E\\u0085\\u00A0-\\uD7FF\\uE000-\\uFFFD\\u10000-\\u10FFFF]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkidentity#RetentionDays": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 5475 + } + } + }, + "com.amazonaws.chimesdkidentity#ServiceFailureException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkidentity#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkidentity#String" + } + }, + "traits": { + "smithy.api#documentation": "

The service encountered an unexpected error.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.chimesdkidentity#ServiceUnavailableException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkidentity#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkidentity#String" + } + }, + "traits": { + "smithy.api#documentation": "

The service is currently unavailable.

", + "smithy.api#error": "server", + "smithy.api#httpError": 503 + } + }, + "com.amazonaws.chimesdkidentity#String": { + "type": "string" + }, + "com.amazonaws.chimesdkidentity#Tag": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.chimesdkidentity#TagKey", + "traits": { + "smithy.api#documentation": "

The key of the tag.

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.chimesdkidentity#TagValue", + "traits": { + "smithy.api#documentation": "

The value of the tag.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a tag applied to a resource.

" + } + }, + "com.amazonaws.chimesdkidentity#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkidentity#TagList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkidentity#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.chimesdkidentity#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkidentity#ThrottledClientException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkidentity#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkidentity#String" + } + }, + "traits": { + "smithy.api#documentation": "

The client exceeded its request rate limit.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.chimesdkidentity#Timestamp": { + "type": "timestamp" + }, + "com.amazonaws.chimesdkidentity#UnauthorizedClientException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkidentity#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkidentity#String" + } + }, + "traits": { + "smithy.api#documentation": "

The client is not currently authorized to make the request.

", + "smithy.api#error": "client", + "smithy.api#httpError": 401 + } + }, + "com.amazonaws.chimesdkidentity#UpdateAppInstance": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#UpdateAppInstanceRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkidentity#UpdateAppInstanceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates AppInstance metadata.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/app-instances/{AppInstanceArn}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkidentity#UpdateAppInstanceRequest": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.chimesdkidentity#NonEmptyResourceName", + "traits": { + "smithy.api#documentation": "

The name that you want to change.

", + "smithy.api#required": {} + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkidentity#Metadata", + "traits": { + "smithy.api#documentation": "

The metadata that you want to change.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkidentity#UpdateAppInstanceResponse": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#UpdateAppInstanceUser": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkidentity#UpdateAppInstanceUserRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkidentity#UpdateAppInstanceUserResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkidentity#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkidentity#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkidentity#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates the details of an AppInstanceUser. You can update names and\n metadata.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/app-instance-users/{AppInstanceUserArn}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkidentity#UpdateAppInstanceUserRequest": { + "type": "structure", + "members": { + "AppInstanceUserArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstanceUser.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.chimesdkidentity#UserName", + "traits": { + "smithy.api#documentation": "

The name of the AppInstanceUser.

", + "smithy.api#required": {} + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkidentity#Metadata", + "traits": { + "smithy.api#documentation": "

The metadata of the AppInstanceUser.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkidentity#UpdateAppInstanceUserResponse": { + "type": "structure", + "members": { + "AppInstanceUserArn": { + "target": "com.amazonaws.chimesdkidentity#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstanceUser.

" + } + } + } + }, + "com.amazonaws.chimesdkidentity#UserId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[A-Za-z0-9]([A-Za-z0-9\\:\\-\\_\\.\\@]{0,62}[A-Za-z0-9])?$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkidentity#UserName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "\\S", + "smithy.api#sensitive": {} + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/chimesdkmessaging.2021-05-15.json b/codegen/sdk-codegen/aws-models/chimesdkmessaging.2021-05-15.json new file mode 100644 index 00000000000..0877d8ea9ca --- /dev/null +++ b/codegen/sdk-codegen/aws-models/chimesdkmessaging.2021-05-15.json @@ -0,0 +1,3774 @@ +{ + "smithy": "1.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "HttpResponseCodeSemantics", + "namespace": "*" + }, + { + "id": "PaginatedTrait", + "namespace": "*" + }, + { + "id": "HttpHeaderTrait", + "namespace": "*" + }, + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "Service", + "namespace": "*" + } + ] + }, + "shapes": { + "com.amazonaws.chimesdkmessaging#AppInstanceUserMembershipSummary": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMembershipType", + "traits": { + "smithy.api#documentation": "

The type of ChannelMembership.

" + } + }, + "ReadMarkerTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which a message was last read.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary of the membership details of an AppInstanceUser.

" + } + }, + "com.amazonaws.chimesdkmessaging#BadRequestException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmessaging#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkmessaging#String" + } + }, + "traits": { + "smithy.api#documentation": "

The input parameters don't match the service's restrictions.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.chimesdkmessaging#BatchChannelMemberships": { + "type": "structure", + "members": { + "InvitedBy": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The identifier of the member who invited another member.

" + } + }, + "Type": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMembershipType", + "traits": { + "smithy.api#documentation": "

The membership types set for the channel users.

" + } + }, + "Members": { + "target": "com.amazonaws.chimesdkmessaging#Members", + "traits": { + "smithy.api#documentation": "

The users successfully added to the request.

" + } + }, + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel to which you're adding users.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The membership information, including member ARNs, the channel ARN, and membership\n types.

" + } + }, + "com.amazonaws.chimesdkmessaging#BatchCreateChannelMembership": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#BatchCreateChannelMembershipRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#BatchCreateChannelMembershipResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Adds a specified number of users to a channel.

", + "smithy.api#http": { + "method": "POST", + "uri": "/channels/{ChannelArn}/memberships?operation=batch-create", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmessaging#BatchCreateChannelMembershipError": { + "type": "structure", + "members": { + "MemberArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the member that the service couldn't add.

" + } + }, + "ErrorCode": { + "target": "com.amazonaws.chimesdkmessaging#ErrorCode", + "traits": { + "smithy.api#documentation": "

The error code.

" + } + }, + "ErrorMessage": { + "target": "com.amazonaws.chimesdkmessaging#String", + "traits": { + "smithy.api#documentation": "

The error message.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A list of failed member ARNs, error codes, and error messages.

" + } + }, + "com.amazonaws.chimesdkmessaging#BatchCreateChannelMembershipErrors": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmessaging#BatchCreateChannelMembershipError" + } + }, + "com.amazonaws.chimesdkmessaging#BatchCreateChannelMembershipRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel to which you're adding users.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMembershipType", + "traits": { + "smithy.api#documentation": "

The membership type of a user, DEFAULT or HIDDEN. Default\n members are always returned as part of ListChannelMemberships. Hidden members\n are only returned if the type filter in ListChannelMemberships equals\n HIDDEN. Otherwise hidden members are not returned. This is only supported\n by moderators.

" + } + }, + "MemberArns": { + "target": "com.amazonaws.chimesdkmessaging#MemberArns", + "traits": { + "smithy.api#documentation": "

The ARNs of the members you want to add to the channel.

", + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#BatchCreateChannelMembershipResponse": { + "type": "structure", + "members": { + "BatchChannelMemberships": { + "target": "com.amazonaws.chimesdkmessaging#BatchChannelMemberships", + "traits": { + "smithy.api#documentation": "

The list of channel memberships in the response.

" + } + }, + "Errors": { + "target": "com.amazonaws.chimesdkmessaging#BatchCreateChannelMembershipErrors", + "traits": { + "smithy.api#documentation": "

If the action fails for one or more of the memberships in the request, a list of the\n memberships is returned, along with error codes and error messages.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#Channel": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.chimesdkmessaging#NonEmptyResourceName", + "traits": { + "smithy.api#documentation": "

The name of a channel.

" + } + }, + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of a channel.

" + } + }, + "Mode": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMode", + "traits": { + "smithy.api#documentation": "

The mode of the channel.

" + } + }, + "Privacy": { + "target": "com.amazonaws.chimesdkmessaging#ChannelPrivacy", + "traits": { + "smithy.api#documentation": "

The channel's privacy setting.

" + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkmessaging#Metadata", + "traits": { + "smithy.api#documentation": "

The channel's metadata.

" + } + }, + "CreatedBy": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The AppInstanceUser who created the channel.

" + } + }, + "CreatedTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which the AppInstanceUser created the channel.

" + } + }, + "LastMessageTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which a member sent the last message in the channel.

" + } + }, + "LastUpdatedTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which a channel was last updated.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details of a channel.

" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelBan": { + "type": "structure", + "members": { + "Member": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The member being banned from the channel.

" + } + }, + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel from which a member is being banned.

" + } + }, + "CreatedTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which the ban was created.

" + } + }, + "CreatedBy": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The AppInstanceUser who created the ban.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details of a channel ban.

" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelBanSummary": { + "type": "structure", + "members": { + "Member": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The member being banned from a channel.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary of the details of a ChannelBan.

" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelBanSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmessaging#ChannelBanSummary" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelMembership": { + "type": "structure", + "members": { + "InvitedBy": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The identifier of the member who invited another member.

" + } + }, + "Type": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMembershipType", + "traits": { + "smithy.api#documentation": "

The membership type set for the channel member.

" + } + }, + "Member": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The data of the channel member.

" + } + }, + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the member's channel.

" + } + }, + "CreatedTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which the channel membership was created.

" + } + }, + "LastUpdatedTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which a channel membership was last updated.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details of a channel member.

" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelMembershipForAppInstanceUserSummary": { + "type": "structure", + "members": { + "ChannelSummary": { + "target": "com.amazonaws.chimesdkmessaging#ChannelSummary", + "traits": { + "smithy.api#documentation": "

Returns the channel data for an AppInstance.

" + } + }, + "AppInstanceUserMembershipSummary": { + "target": "com.amazonaws.chimesdkmessaging#AppInstanceUserMembershipSummary", + "traits": { + "smithy.api#documentation": "

Returns the channel membership data for an AppInstance.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary of the channel membership details of an AppInstanceUser.

" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelMembershipForAppInstanceUserSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMembershipForAppInstanceUserSummary" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelMembershipSummary": { + "type": "structure", + "members": { + "Member": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

A member's summary data.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary of the details of a ChannelMembership.

" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelMembershipSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMembershipSummary" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelMembershipType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DEFAULT", + "name": "DEFAULT" + }, + { + "value": "HIDDEN", + "name": "HIDDEN" + } + ] + } + }, + "com.amazonaws.chimesdkmessaging#ChannelMessage": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

" + } + }, + "MessageId": { + "target": "com.amazonaws.chimesdkmessaging#MessageId", + "traits": { + "smithy.api#documentation": "

The ID of a message.

" + } + }, + "Content": { + "target": "com.amazonaws.chimesdkmessaging#Content", + "traits": { + "smithy.api#documentation": "

The message content.

" + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkmessaging#Metadata", + "traits": { + "smithy.api#documentation": "

The message metadata.

" + } + }, + "Type": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMessageType", + "traits": { + "smithy.api#documentation": "

The message type.

" + } + }, + "CreatedTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which the message was created.

" + } + }, + "LastEditedTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which a message was edited.

" + } + }, + "LastUpdatedTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which a message was updated.

" + } + }, + "Sender": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The message sender.

" + } + }, + "Redacted": { + "target": "com.amazonaws.chimesdkmessaging#NonNullableBoolean", + "traits": { + "smithy.api#documentation": "

Hides the content of a message.

" + } + }, + "Persistence": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMessagePersistenceType", + "traits": { + "smithy.api#documentation": "

The persistence setting for a channel message.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details of a message in a channel.

" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelMessagePersistenceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PERSISTENT", + "name": "PERSISTENT" + }, + { + "value": "NON_PERSISTENT", + "name": "NON_PERSISTENT" + } + ] + } + }, + "com.amazonaws.chimesdkmessaging#ChannelMessageSummary": { + "type": "structure", + "members": { + "MessageId": { + "target": "com.amazonaws.chimesdkmessaging#MessageId", + "traits": { + "smithy.api#documentation": "

The ID of the message.

" + } + }, + "Content": { + "target": "com.amazonaws.chimesdkmessaging#Content", + "traits": { + "smithy.api#documentation": "

The content of the message.

" + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkmessaging#Metadata", + "traits": { + "smithy.api#documentation": "

The metadata of the message.

" + } + }, + "Type": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMessageType", + "traits": { + "smithy.api#documentation": "

The type of message.

" + } + }, + "CreatedTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which the message summary was created.

" + } + }, + "LastUpdatedTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which a message was last updated.

" + } + }, + "LastEditedTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which a message was last edited.

" + } + }, + "Sender": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The message sender.

" + } + }, + "Redacted": { + "target": "com.amazonaws.chimesdkmessaging#NonNullableBoolean", + "traits": { + "smithy.api#documentation": "

Indicates whether a message was redacted.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary of the messages in a Channel.

" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelMessageSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMessageSummary" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelMessageType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "STANDARD", + "name": "STANDARD" + }, + { + "value": "CONTROL", + "name": "CONTROL" + } + ] + } + }, + "com.amazonaws.chimesdkmessaging#ChannelMode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "UNRESTRICTED", + "name": "UNRESTRICTED" + }, + { + "value": "RESTRICTED", + "name": "RESTRICTED" + } + ] + } + }, + "com.amazonaws.chimesdkmessaging#ChannelModeratedByAppInstanceUserSummary": { + "type": "structure", + "members": { + "ChannelSummary": { + "target": "com.amazonaws.chimesdkmessaging#ChannelSummary", + "traits": { + "smithy.api#documentation": "

Summary of the details of a Channel.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary of the details of a moderated channel.

" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelModeratedByAppInstanceUserSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmessaging#ChannelModeratedByAppInstanceUserSummary" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelModerator": { + "type": "structure", + "members": { + "Moderator": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The moderator's data.

" + } + }, + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the moderator's channel.

" + } + }, + "CreatedTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which the moderator was created.

" + } + }, + "CreatedBy": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The AppInstanceUser who created the moderator.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details of a channel moderator.

" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelModeratorSummary": { + "type": "structure", + "members": { + "Moderator": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The data for a moderator.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary of the details of a ChannelModerator.

" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelModeratorSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmessaging#ChannelModeratorSummary" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelPrivacy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PUBLIC", + "name": "PUBLIC" + }, + { + "value": "PRIVATE", + "name": "PRIVATE" + } + ] + } + }, + "com.amazonaws.chimesdkmessaging#ChannelSummary": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.chimesdkmessaging#NonEmptyResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel.

" + } + }, + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

" + } + }, + "Mode": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMode", + "traits": { + "smithy.api#documentation": "

The mode of the channel.

" + } + }, + "Privacy": { + "target": "com.amazonaws.chimesdkmessaging#ChannelPrivacy", + "traits": { + "smithy.api#documentation": "

The privacy setting of the channel.

" + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkmessaging#Metadata", + "traits": { + "smithy.api#documentation": "

The metadata of the channel.

" + } + }, + "LastMessageTimestamp": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which the last message in a channel was sent.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary of the details of a Channel.

" + } + }, + "com.amazonaws.chimesdkmessaging#ChannelSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmessaging#ChannelSummary" + } + }, + "com.amazonaws.chimesdkmessaging#ChimeArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 5, + "max": 1600 + }, + "smithy.api#pattern": "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$" + } + }, + "com.amazonaws.chimesdkmessaging#ChimeMessagingService": { + "type": "service", + "version": "2021-05-15", + "operations": [ + { + "target": "com.amazonaws.chimesdkmessaging#BatchCreateChannelMembership" + }, + { + "target": "com.amazonaws.chimesdkmessaging#CreateChannel" + }, + { + "target": "com.amazonaws.chimesdkmessaging#CreateChannelBan" + }, + { + "target": "com.amazonaws.chimesdkmessaging#CreateChannelMembership" + }, + { + "target": "com.amazonaws.chimesdkmessaging#CreateChannelModerator" + }, + { + "target": "com.amazonaws.chimesdkmessaging#DeleteChannel" + }, + { + "target": "com.amazonaws.chimesdkmessaging#DeleteChannelBan" + }, + { + "target": "com.amazonaws.chimesdkmessaging#DeleteChannelMembership" + }, + { + "target": "com.amazonaws.chimesdkmessaging#DeleteChannelMessage" + }, + { + "target": "com.amazonaws.chimesdkmessaging#DeleteChannelModerator" + }, + { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannel" + }, + { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelBan" + }, + { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelMembership" + }, + { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelMembershipForAppInstanceUser" + }, + { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelModeratedByAppInstanceUser" + }, + { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelModerator" + }, + { + "target": "com.amazonaws.chimesdkmessaging#GetChannelMessage" + }, + { + "target": "com.amazonaws.chimesdkmessaging#GetMessagingSessionEndpoint" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ListChannelBans" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ListChannelMemberships" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ListChannelMembershipsForAppInstanceUser" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ListChannelMessages" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ListChannelModerators" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ListChannels" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ListChannelsModeratedByAppInstanceUser" + }, + { + "target": "com.amazonaws.chimesdkmessaging#RedactChannelMessage" + }, + { + "target": "com.amazonaws.chimesdkmessaging#SendChannelMessage" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UpdateChannel" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UpdateChannelMessage" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UpdateChannelReadMarker" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Chime SDK Messaging", + "arnNamespace": "chime", + "cloudFormationName": "ChimeSDKMessaging", + "cloudTrailEventSource": "chimesdkmessaging.amazonaws.com", + "endpointPrefix": "messaging-chime" + }, + "aws.auth#sigv4": { + "name": "chime" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

The Amazon Chime SDK Messaging APIs in this section allow software developers to send\n and receive messages in custom messaging applications. These APIs depend on the frameworks\n provided by the Amazon Chime SDK Identity APIs. For more information about the messaging\n APIs, see .

", + "smithy.api#title": "Amazon Chime SDK Messaging" + } + }, + "com.amazonaws.chimesdkmessaging#ClientRequestToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 64 + }, + "smithy.api#pattern": "^[-_a-zA-Z0-9]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmessaging#ConflictException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmessaging#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkmessaging#String" + } + }, + "traits": { + "smithy.api#documentation": "

The request could not be processed because of conflict in the current state of the\n resource.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.chimesdkmessaging#Content": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 4096 + }, + "smithy.api#pattern": "^[\\s\\S]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmessaging#CreateChannel": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#CreateChannelRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#CreateChannelResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a channel to which you can add users and send messages.

\n\n

\n Restriction: You can't change a channel's\n privacy.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "POST", + "uri": "/channels", + "code": 201 + } + } + }, + "com.amazonaws.chimesdkmessaging#CreateChannelBan": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#CreateChannelBanRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#CreateChannelBanResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Permanently bans a member from a channel. Moderators can't add banned members to a\n channel. To undo a ban, you first have to DeleteChannelBan, and then\n CreateChannelMembership. Bans are cleaned up when you delete users or\n channels.

\n

If you ban a user who is already part of a channel, that user is automatically kicked\n from the channel.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "POST", + "uri": "/channels/{ChannelArn}/bans", + "code": 201 + } + } + }, + "com.amazonaws.chimesdkmessaging#CreateChannelBanRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the ban request.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MemberArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the member being banned.

", + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#CreateChannelBanResponse": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the response to the ban request.

" + } + }, + "Member": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The ChannelArn and BannedIdentity of the member in the ban\n response.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#CreateChannelMembership": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#CreateChannelMembershipRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#CreateChannelMembershipResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Adds a user to a channel. The InvitedBy response field is derived from the\n request header. A channel member can:

\n\n \n\n

Privacy settings impact this action as follows:

\n\n \n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "POST", + "uri": "/channels/{ChannelArn}/memberships", + "code": 201 + } + } + }, + "com.amazonaws.chimesdkmessaging#CreateChannelMembershipRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel to which you're adding users.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MemberArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the member you want to add to the channel.

", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMembershipType", + "traits": { + "smithy.api#documentation": "

The membership type of a user, DEFAULT or HIDDEN. Default\n members are always returned as part of ListChannelMemberships. Hidden members\n are only returned if the type filter in ListChannelMemberships equals\n HIDDEN. Otherwise hidden members are not returned. This is only supported\n by moderators.

", + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#CreateChannelMembershipResponse": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

" + } + }, + "Member": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The ARN and metadata of the member being added.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#CreateChannelModerator": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#CreateChannelModeratorRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#CreateChannelModeratorResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a new ChannelModerator. A channel moderator can:

\n\n \n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "POST", + "uri": "/channels/{ChannelArn}/moderators", + "code": 201 + } + } + }, + "com.amazonaws.chimesdkmessaging#CreateChannelModeratorRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChannelModeratorArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the moderator.

", + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#CreateChannelModeratorResponse": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

" + } + }, + "ChannelModerator": { + "target": "com.amazonaws.chimesdkmessaging#Identity", + "traits": { + "smithy.api#documentation": "

The ARNs of the channel and the moderator.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#CreateChannelRequest": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel request.

", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.chimesdkmessaging#NonEmptyResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel.

", + "smithy.api#required": {} + } + }, + "Mode": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMode", + "traits": { + "smithy.api#documentation": "

The channel mode: UNRESTRICTED or RESTRICTED. Administrators,\n moderators, and channel members can add themselves and other members to unrestricted\n channels. Only administrators and moderators can add members to restricted channels.

" + } + }, + "Privacy": { + "target": "com.amazonaws.chimesdkmessaging#ChannelPrivacy", + "traits": { + "smithy.api#documentation": "

The channel's privacy level: PUBLIC or PRIVATE. Private\n channels aren't discoverable by users outside the channel. Public channels are discoverable\n by anyone in the AppInstance.

" + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkmessaging#Metadata", + "traits": { + "smithy.api#documentation": "

The metadata of the creation request. Limited to 1KB and UTF-8.

" + } + }, + "ClientRequestToken": { + "target": "com.amazonaws.chimesdkmessaging#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

The client token for the request. An Idempotency token.

", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.chimesdkmessaging#TagList", + "traits": { + "smithy.api#documentation": "

The tags for the creation request.

" + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#CreateChannelResponse": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DeleteChannel": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#DeleteChannelRequest" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Immediately makes a channel and its memberships inaccessible and marks them for\n deletion. This is an irreversible process.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/channels/{ChannelArn}", + "code": 204 + } + } + }, + "com.amazonaws.chimesdkmessaging#DeleteChannelBan": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#DeleteChannelBanRequest" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes a user from a channel's ban list.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/channels/{ChannelArn}/bans/{MemberArn}", + "code": 204 + } + } + }, + "com.amazonaws.chimesdkmessaging#DeleteChannelBanRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel from which the AppInstanceUser was banned.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MemberArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstanceUser that you want to reinstate.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DeleteChannelMembership": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#DeleteChannelMembershipRequest" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes a member from a channel.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/channels/{ChannelArn}/memberships/{MemberArn}", + "code": 204 + } + } + }, + "com.amazonaws.chimesdkmessaging#DeleteChannelMembershipRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel from which you want to remove the user.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MemberArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the member that you're removing from the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DeleteChannelMessage": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#DeleteChannelMessageRequest" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a channel message. Only admins can perform this action. Deletion makes messages\n inaccessible immediately. A background process deletes any revisions created by\n UpdateChannelMessage.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/channels/{ChannelArn}/messages/{MessageId}", + "code": 204 + } + } + }, + "com.amazonaws.chimesdkmessaging#DeleteChannelMessageRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MessageId": { + "target": "com.amazonaws.chimesdkmessaging#MessageId", + "traits": { + "smithy.api#documentation": "

The ID of the message being deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DeleteChannelModerator": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#DeleteChannelModeratorRequest" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a channel moderator.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/channels/{ChannelArn}/moderators/{ChannelModeratorArn}", + "code": 204 + } + } + }, + "com.amazonaws.chimesdkmessaging#DeleteChannelModeratorRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChannelModeratorArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the moderator being deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DeleteChannelRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel being deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannel": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the full details of a channel in an Amazon Chime\n AppInstance.

\n\n \n\n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels/{ChannelArn}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelBan": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelBanRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelBanResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#NotFoundException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the full details of a channel ban.

\n\n \n\n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels/{ChannelArn}/bans/{MemberArn}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelBanRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel from which the user is banned.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MemberArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the member being banned.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelBanResponse": { + "type": "structure", + "members": { + "ChannelBan": { + "target": "com.amazonaws.chimesdkmessaging#ChannelBan", + "traits": { + "smithy.api#documentation": "

The details of the ban.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelMembership": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelMembershipRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelMembershipResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#NotFoundException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the full details of a user's channel membership.

\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels/{ChannelArn}/memberships/{MemberArn}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelMembershipForAppInstanceUser": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelMembershipForAppInstanceUserRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelMembershipForAppInstanceUserResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the details of a channel based on the membership of the specified\n AppInstanceUser.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels/{ChannelArn}?scope=app-instance-user-membership", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelMembershipForAppInstanceUserRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel to which the user belongs.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AppInstanceUserArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the user in a channel.

", + "smithy.api#httpQuery": "app-instance-user-arn", + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelMembershipForAppInstanceUserResponse": { + "type": "structure", + "members": { + "ChannelMembership": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMembershipForAppInstanceUserSummary", + "traits": { + "smithy.api#documentation": "

The channel to which a user belongs.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelMembershipRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MemberArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the member.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelMembershipResponse": { + "type": "structure", + "members": { + "ChannelMembership": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMembership", + "traits": { + "smithy.api#documentation": "

The details of the membership.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelModeratedByAppInstanceUser": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelModeratedByAppInstanceUserRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelModeratedByAppInstanceUserResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the full details of a channel moderated by the specified\n AppInstanceUser.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels/{ChannelArn}?scope=app-instance-user-moderated-channel", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelModeratedByAppInstanceUserRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the moderated channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AppInstanceUserArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstanceUser in the moderated channel.

", + "smithy.api#httpQuery": "app-instance-user-arn", + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelModeratedByAppInstanceUserResponse": { + "type": "structure", + "members": { + "Channel": { + "target": "com.amazonaws.chimesdkmessaging#ChannelModeratedByAppInstanceUserSummary", + "traits": { + "smithy.api#documentation": "

The moderated channel.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelModerator": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelModeratorRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#DescribeChannelModeratorResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#NotFoundException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the full details of a single ChannelModerator.

\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels/{ChannelArn}/moderators/{ChannelModeratorArn}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelModeratorRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChannelModeratorArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel moderator.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelModeratorResponse": { + "type": "structure", + "members": { + "ChannelModerator": { + "target": "com.amazonaws.chimesdkmessaging#ChannelModerator", + "traits": { + "smithy.api#documentation": "

The details of the channel moderator.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#DescribeChannelResponse": { + "type": "structure", + "members": { + "Channel": { + "target": "com.amazonaws.chimesdkmessaging#Channel", + "traits": { + "smithy.api#documentation": "

The channel details.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ErrorCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "BadRequest", + "name": "BadRequest" + }, + { + "value": "Conflict", + "name": "Conflict" + }, + { + "value": "Forbidden", + "name": "Forbidden" + }, + { + "value": "NotFound", + "name": "NotFound" + }, + { + "value": "PreconditionFailed", + "name": "PreconditionFailed" + }, + { + "value": "ResourceLimitExceeded", + "name": "ResourceLimitExceeded" + }, + { + "value": "ServiceFailure", + "name": "ServiceFailure" + }, + { + "value": "AccessDenied", + "name": "AccessDenied" + }, + { + "value": "ServiceUnavailable", + "name": "ServiceUnavailable" + }, + { + "value": "Throttled", + "name": "Throttled" + }, + { + "value": "Throttling", + "name": "Throttling" + }, + { + "value": "Unauthorized", + "name": "Unauthorized" + }, + { + "value": "Unprocessable", + "name": "Unprocessable" + }, + { + "value": "VoiceConnectorGroupAssociationsExist", + "name": "VoiceConnectorGroupAssociationsExist" + }, + { + "value": "PhoneNumberAssociationsExist", + "name": "PhoneNumberAssociationsExist" + } + ] + } + }, + "com.amazonaws.chimesdkmessaging#ForbiddenException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmessaging#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkmessaging#String" + } + }, + "traits": { + "smithy.api#documentation": "

The client is permanently forbidden from making the request.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.chimesdkmessaging#GetChannelMessage": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#GetChannelMessageRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#GetChannelMessageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#NotFoundException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets the full details of a channel message.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels/{ChannelArn}/messages/{MessageId}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmessaging#GetChannelMessageRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MessageId": { + "target": "com.amazonaws.chimesdkmessaging#MessageId", + "traits": { + "smithy.api#documentation": "

The ID of the message.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#GetChannelMessageResponse": { + "type": "structure", + "members": { + "ChannelMessage": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMessage", + "traits": { + "smithy.api#documentation": "

The details of and content in the message.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#GetMessagingSessionEndpoint": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#GetMessagingSessionEndpointRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#GetMessagingSessionEndpointResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

The details of the endpoint for the messaging session.

", + "smithy.api#http": { + "method": "GET", + "uri": "/endpoints/messaging-session", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmessaging#GetMessagingSessionEndpointRequest": { + "type": "structure", + "members": {} + }, + "com.amazonaws.chimesdkmessaging#GetMessagingSessionEndpointResponse": { + "type": "structure", + "members": { + "Endpoint": { + "target": "com.amazonaws.chimesdkmessaging#MessagingSessionEndpoint", + "traits": { + "smithy.api#documentation": "

The endpoint returned in the response.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#Identity": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN in an Identity.

" + } + }, + "Name": { + "target": "com.amazonaws.chimesdkmessaging#ResourceName", + "traits": { + "smithy.api#documentation": "

The name in an Identity.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details of a user.

" + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelBans": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelBansRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelBansResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all the users banned from a particular channel.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels/{ChannelArn}/bans", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelBansRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.chimesdkmessaging#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of bans that you want returned.

", + "smithy.api#httpQuery": "max-results" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API calls until all requested bans are returned.

", + "smithy.api#httpQuery": "next-token" + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelBansResponse": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API calls until all requested bans are returned.

" + } + }, + "ChannelBans": { + "target": "com.amazonaws.chimesdkmessaging#ChannelBanSummaryList", + "traits": { + "smithy.api#documentation": "

The information for each requested ban.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelMemberships": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelMembershipsRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelMembershipsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all channel memberships in a channel.

\n\n \n\n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels/{ChannelArn}/memberships", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelMembershipsForAppInstanceUser": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelMembershipsForAppInstanceUserRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelMembershipsForAppInstanceUserResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all channels that a particular AppInstanceUser is a part of. Only an\n AppInstanceAdmin can call the API with a user ARN that is not their own.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels?scope=app-instance-user-memberships", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelMembershipsForAppInstanceUserRequest": { + "type": "structure", + "members": { + "AppInstanceUserArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstanceUsers

", + "smithy.api#httpQuery": "app-instance-user-arn" + } + }, + "MaxResults": { + "target": "com.amazonaws.chimesdkmessaging#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of users that you want returned.

", + "smithy.api#httpQuery": "max-results" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token returned from previous API requests until the number of channel memberships is\n reached.

", + "smithy.api#httpQuery": "next-token" + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelMembershipsForAppInstanceUserResponse": { + "type": "structure", + "members": { + "ChannelMemberships": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMembershipForAppInstanceUserSummaryList", + "traits": { + "smithy.api#documentation": "

The token passed by previous API calls until all requested users are returned.

" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API calls until all requested users are returned.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelMembershipsRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The maximum number of channel memberships that you want returned.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMembershipType", + "traits": { + "smithy.api#documentation": "

The membership type of a user, DEFAULT or HIDDEN. Default\n members are always returned as part of ListChannelMemberships. Hidden members\n are only returned if the type filter in ListChannelMemberships equals\n HIDDEN. Otherwise hidden members are not returned.

", + "smithy.api#httpQuery": "type" + } + }, + "MaxResults": { + "target": "com.amazonaws.chimesdkmessaging#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of channel memberships that you want returned.

", + "smithy.api#httpQuery": "max-results" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API calls until all requested channel memberships are\n returned.

", + "smithy.api#httpQuery": "next-token" + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelMembershipsResponse": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

" + } + }, + "ChannelMemberships": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMembershipSummaryList", + "traits": { + "smithy.api#documentation": "

The information for the requested channel memberships.

" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API calls until all requested channel memberships are\n returned.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelMessages": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelMessagesRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelMessagesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

List all the messages in a channel. Returns a paginated list of\n ChannelMessages. By default, sorted by creation timestamp in descending\n order.

\n \n

Redacted messages appear in the results as empty, since they are only redacted, not\n deleted. Deleted messages do not appear in the results. This action always returns the\n latest version of an edited message.

\n

Also, the x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels/{ChannelArn}/messages", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelMessagesRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "SortOrder": { + "target": "com.amazonaws.chimesdkmessaging#SortOrder", + "traits": { + "smithy.api#documentation": "

The order in which you want messages sorted. Default is Descending, based on time\n created.

", + "smithy.api#httpQuery": "sort-order" + } + }, + "NotBefore": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The initial or starting time stamp for your requested messages.

", + "smithy.api#httpQuery": "not-before" + } + }, + "NotAfter": { + "target": "com.amazonaws.chimesdkmessaging#Timestamp", + "traits": { + "smithy.api#documentation": "

The final or ending time stamp for your requested messages.

", + "smithy.api#httpQuery": "not-after" + } + }, + "MaxResults": { + "target": "com.amazonaws.chimesdkmessaging#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of messages that you want returned.

", + "smithy.api#httpQuery": "max-results" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API calls until all requested messages are returned.

", + "smithy.api#httpQuery": "next-token" + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelMessagesResponse": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel containing the requested messages.

" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API calls until all requested messages are returned.

" + } + }, + "ChannelMessages": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMessageSummaryList", + "traits": { + "smithy.api#documentation": "

The information about, and content of, each requested message.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelModerators": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelModeratorsRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelModeratorsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all the moderators for a channel.

\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels/{ChannelArn}/moderators", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelModeratorsRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.chimesdkmessaging#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of moderators that you want returned.

", + "smithy.api#httpQuery": "max-results" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API calls until all requested moderators are\n returned.

", + "smithy.api#httpQuery": "next-token" + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelModeratorsResponse": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API calls until all requested moderators are\n returned.

" + } + }, + "ChannelModerators": { + "target": "com.amazonaws.chimesdkmessaging#ChannelModeratorSummaryList", + "traits": { + "smithy.api#documentation": "

The information about and names of each moderator.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannels": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelsRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all Channels created under a single Chime App as a paginated list. You can specify\n filters to narrow results.

\n\n

\n Functionality & restrictions\n

\n \n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelsModeratedByAppInstanceUser": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelsModeratedByAppInstanceUserRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#ListChannelsModeratedByAppInstanceUserResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

A list of the channels moderated by an AppInstanceUser.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/channels?scope=app-instance-user-moderated-channels", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelsModeratedByAppInstanceUserRequest": { + "type": "structure", + "members": { + "AppInstanceUserArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the user in the moderated channel.

", + "smithy.api#httpQuery": "app-instance-user-arn" + } + }, + "MaxResults": { + "target": "com.amazonaws.chimesdkmessaging#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of channels in the request.

", + "smithy.api#httpQuery": "max-results" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token returned from previous API requests until the number of channels moderated by\n the user is reached.

", + "smithy.api#httpQuery": "next-token" + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelsModeratedByAppInstanceUserResponse": { + "type": "structure", + "members": { + "Channels": { + "target": "com.amazonaws.chimesdkmessaging#ChannelModeratedByAppInstanceUserSummaryList", + "traits": { + "smithy.api#documentation": "

The moderated channels in the request.

" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token returned from previous API requests until the number of channels moderated by\n the user is reached.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelsRequest": { + "type": "structure", + "members": { + "AppInstanceArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the AppInstance.

", + "smithy.api#httpQuery": "app-instance-arn", + "smithy.api#required": {} + } + }, + "Privacy": { + "target": "com.amazonaws.chimesdkmessaging#ChannelPrivacy", + "traits": { + "smithy.api#documentation": "

The privacy setting. PUBLIC retrieves all the public channels.\n PRIVATE retrieves private channels. Only an AppInstanceAdmin\n can retrieve private channels.

", + "smithy.api#httpQuery": "privacy" + } + }, + "MaxResults": { + "target": "com.amazonaws.chimesdkmessaging#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of channels that you want to return.

", + "smithy.api#httpQuery": "max-results" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token passed by previous API calls until all requested channels are returned.

", + "smithy.api#httpQuery": "next-token" + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ListChannelsResponse": { + "type": "structure", + "members": { + "Channels": { + "target": "com.amazonaws.chimesdkmessaging#ChannelSummaryList", + "traits": { + "smithy.api#documentation": "

The information about each channel.

" + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmessaging#NextToken", + "traits": { + "smithy.api#documentation": "

The token returned from previous API requests until the number of channels is\n reached.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.chimesdkmessaging#MemberArns": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.chimesdkmessaging#Members": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmessaging#Identity" + } + }, + "com.amazonaws.chimesdkmessaging#MessageId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[-_a-zA-Z0-9]*$" + } + }, + "com.amazonaws.chimesdkmessaging#MessagingSessionEndpoint": { + "type": "structure", + "members": { + "Url": { + "target": "com.amazonaws.chimesdkmessaging#UrlType", + "traits": { + "smithy.api#documentation": "

The endpoint to which you establish a websocket connection.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The websocket endpoint used to connect to Amazon Chime SDK messaging.

" + } + }, + "com.amazonaws.chimesdkmessaging#Metadata": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": ".*", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmessaging#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": ".*", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmessaging#NonEmptyContent": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + }, + "smithy.api#pattern": "^[\\s\\S]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmessaging#NonEmptyResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[\\u0009\\u000A\\u000D\\u0020-\\u007E\\u0085\\u00A0-\\uD7FF\\uE000-\\uFFFD\\u10000-\\u10FFFF]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmessaging#NonNullableBoolean": { + "type": "boolean" + }, + "com.amazonaws.chimesdkmessaging#NotFoundException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmessaging#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkmessaging#String" + } + }, + "traits": { + "smithy.api#documentation": "

One or more of the resources in the request does not exist in the system.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.chimesdkmessaging#RedactChannelMessage": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#RedactChannelMessageRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#RedactChannelMessageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Redacts message content, but not metadata. The message exists in the back end, but the\n action returns null content, and the state shows as redacted.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "POST", + "uri": "/channels/{ChannelArn}/messages/{MessageId}?operation=redact", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmessaging#RedactChannelMessageRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel containing the messages that you want to redact.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MessageId": { + "target": "com.amazonaws.chimesdkmessaging#MessageId", + "traits": { + "smithy.api#documentation": "

The ID of the message being redacted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#RedactChannelMessageResponse": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel containing the messages that you want to redact.

" + } + }, + "MessageId": { + "target": "com.amazonaws.chimesdkmessaging#MessageId", + "traits": { + "smithy.api#documentation": "

The ID of the message being redacted.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ResourceLimitExceededException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmessaging#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkmessaging#String" + } + }, + "traits": { + "smithy.api#documentation": "

The request exceeds the resource limit.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.chimesdkmessaging#ResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^[\\u0009\\u000A\\u000D\\u0020-\\u007E\\u0085\\u00A0-\\uD7FF\\uE000-\\uFFFD\\u10000-\\u10FFFF]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmessaging#SendChannelMessage": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#SendChannelMessageRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#SendChannelMessageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Sends a message to a particular channel that the member is a part of.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n\n

Also, STANDARD messages can contain 4KB of data and the 1KB of metadata.\n CONTROL messages can contain 30 bytes of data and no metadata.

\n
", + "smithy.api#http": { + "method": "POST", + "uri": "/channels/{ChannelArn}/messages", + "code": 201 + } + } + }, + "com.amazonaws.chimesdkmessaging#SendChannelMessageRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Content": { + "target": "com.amazonaws.chimesdkmessaging#NonEmptyContent", + "traits": { + "smithy.api#documentation": "

The content of the message.

", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMessageType", + "traits": { + "smithy.api#documentation": "

The type of message, STANDARD or CONTROL.

", + "smithy.api#required": {} + } + }, + "Persistence": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMessagePersistenceType", + "traits": { + "smithy.api#documentation": "

Boolean that controls whether the message is persisted on the back end. Required.

", + "smithy.api#required": {} + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkmessaging#Metadata", + "traits": { + "smithy.api#documentation": "

The optional metadata for each message.

" + } + }, + "ClientRequestToken": { + "target": "com.amazonaws.chimesdkmessaging#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

The Idempotency token for each client request.

", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#SendChannelMessageResponse": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

" + } + }, + "MessageId": { + "target": "com.amazonaws.chimesdkmessaging#MessageId", + "traits": { + "smithy.api#documentation": "

The ID string assigned to each message.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#ServiceFailureException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmessaging#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkmessaging#String" + } + }, + "traits": { + "smithy.api#documentation": "

The service encountered an unexpected error.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.chimesdkmessaging#ServiceUnavailableException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmessaging#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkmessaging#String" + } + }, + "traits": { + "smithy.api#documentation": "

The service is currently unavailable.

", + "smithy.api#error": "server", + "smithy.api#httpError": 503 + } + }, + "com.amazonaws.chimesdkmessaging#SortOrder": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ASCENDING", + "name": "ASCENDING" + }, + { + "value": "DESCENDING", + "name": "DESCENDING" + } + ] + } + }, + "com.amazonaws.chimesdkmessaging#String": { + "type": "string" + }, + "com.amazonaws.chimesdkmessaging#Tag": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.chimesdkmessaging#TagKey", + "traits": { + "smithy.api#documentation": "

The key of the tag.

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.chimesdkmessaging#TagValue", + "traits": { + "smithy.api#documentation": "

The value of the tag.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a tag applied to a resource.

" + } + }, + "com.amazonaws.chimesdkmessaging#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmessaging#TagList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmessaging#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.chimesdkmessaging#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmessaging#ThrottledClientException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmessaging#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkmessaging#String" + } + }, + "traits": { + "smithy.api#documentation": "

The client exceeded its request rate limit.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.chimesdkmessaging#Timestamp": { + "type": "timestamp" + }, + "com.amazonaws.chimesdkmessaging#UnauthorizedClientException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmessaging#ErrorCode" + }, + "Message": { + "target": "com.amazonaws.chimesdkmessaging#String" + } + }, + "traits": { + "smithy.api#documentation": "

The client is not currently authorized to make the request.

", + "smithy.api#error": "client", + "smithy.api#httpError": 401 + } + }, + "com.amazonaws.chimesdkmessaging#UpdateChannel": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#UpdateChannelRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#UpdateChannelResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Update a channel's attributes.

\n

\n Restriction: You can't change a channel's privacy.

\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "PUT", + "uri": "/channels/{ChannelArn}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmessaging#UpdateChannelMessage": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#UpdateChannelMessageRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#UpdateChannelMessageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates the content of a message.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "PUT", + "uri": "/channels/{ChannelArn}/messages/{MessageId}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmessaging#UpdateChannelMessageRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MessageId": { + "target": "com.amazonaws.chimesdkmessaging#MessageId", + "traits": { + "smithy.api#documentation": "

The ID string of the message being updated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Content": { + "target": "com.amazonaws.chimesdkmessaging#Content", + "traits": { + "smithy.api#documentation": "

The content of the message being updated.

" + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkmessaging#Metadata", + "traits": { + "smithy.api#documentation": "

The metadata of the message being updated.

" + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#UpdateChannelMessageResponse": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

" + } + }, + "MessageId": { + "target": "com.amazonaws.chimesdkmessaging#MessageId", + "traits": { + "smithy.api#documentation": "

The ID string of the message being updated.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#UpdateChannelReadMarker": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmessaging#UpdateChannelReadMarkerRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmessaging#UpdateChannelReadMarkerResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmessaging#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ConflictException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceFailureException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#ThrottledClientException" + }, + { + "target": "com.amazonaws.chimesdkmessaging#UnauthorizedClientException" + } + ], + "traits": { + "smithy.api#documentation": "

The details of the time when a user last read messages in a channel.

\n\n \n

The x-amz-chime-bearer request header is mandatory. Use the\n AppInstanceUserArn of the user that makes the API call as the value in\n the header.

\n
", + "smithy.api#http": { + "method": "PUT", + "uri": "/channels/{ChannelArn}/readMarker", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmessaging#UpdateChannelReadMarkerRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#UpdateChannelReadMarkerResponse": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#UpdateChannelRequest": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.chimesdkmessaging#NonEmptyResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel.

", + "smithy.api#required": {} + } + }, + "Mode": { + "target": "com.amazonaws.chimesdkmessaging#ChannelMode", + "traits": { + "smithy.api#documentation": "

The mode of the update request.

", + "smithy.api#required": {} + } + }, + "Metadata": { + "target": "com.amazonaws.chimesdkmessaging#Metadata", + "traits": { + "smithy.api#documentation": "

The metadata for the update request.

" + } + }, + "ChimeBearer": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The AppInstanceUserArn of the user that makes the API call.

", + "smithy.api#httpHeader": "x-amz-chime-bearer", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmessaging#UpdateChannelResponse": { + "type": "structure", + "members": { + "ChannelArn": { + "target": "com.amazonaws.chimesdkmessaging#ChimeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the channel.

" + } + } + } + }, + "com.amazonaws.chimesdkmessaging#UrlType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 4096 + } + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/codebuild.2016-10-06.json b/codegen/sdk-codegen/aws-models/codebuild.2016-10-06.json index e514a8e41b2..30c6d31dc83 100644 --- a/codegen/sdk-codegen/aws-models/codebuild.2016-10-06.json +++ b/codegen/sdk-codegen/aws-models/codebuild.2016-10-06.json @@ -37,7 +37,7 @@ } }, "traits": { - "smithy.api#documentation": "

An AWS service limit was exceeded for the calling AWS account.

", + "smithy.api#documentation": "

An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.

", "smithy.api#error": "client" } }, @@ -270,7 +270,7 @@ "names": { "target": "com.amazonaws.codebuild#ProjectNames", "traits": { - "smithy.api#documentation": "

The names or ARNs of the build projects. To get information about a project shared\n with your AWS account, its ARN must be specified. You cannot specify a shared project\n using its name.

", + "smithy.api#documentation": "

The names or ARNs of the build projects. To get information about a project shared\n with your Amazon Web Services account, its ARN must be specified. You cannot specify a shared project\n using its name.

", "smithy.api#required": {} } } @@ -397,7 +397,7 @@ "computeTypesAllowed": { "target": "com.amazonaws.codebuild#ComputeTypesAllowed", "traits": { - "smithy.api#documentation": "

An array of strings that specify the compute types that are allowed for the batch\n build. See Build environment\n compute types in the AWS CodeBuild User Guide for these values.\n

" + "smithy.api#documentation": "

An array of strings that specify the compute types that are allowed for the batch\n build. See Build environment\n compute types in the CodeBuild User Guide for these values.\n

" } } }, @@ -411,7 +411,7 @@ "com.amazonaws.codebuild#BucketOwnerAccess": { "type": "string", "traits": { - "smithy.api#documentation": "

Specifies the access for objects that are uploaded to an Amazon S3 bucket that is owned by\n another account.

\n

By default, only the account that uploads the objects to the bucket has access to\n these objects. This property allows you to give the bucket owner access to these\n objects.

\n
\n
NONE
\n
\n

The bucket owner does not have access to the objects. This is the\n default.

\n
\n
READ_ONLY
\n
\n

The bucket owner has read only access to the objects. The uploading account\n retains ownership of the objects.

\n
\n
FULL
\n
\n

The bucket owner has full access to the objects. Object ownership is determined\n by the following criteria:

\n
    \n
  • \n

    If the bucket is configured with the Bucket\n owner preferred setting, the bucket owner owns the\n objects. The uploading account will have object access as specified\n by the bucket's policy.

    \n
  • \n
  • \n

    Otherwise, the uploading account retains ownership of the\n objects.

    \n
  • \n
\n

For more information about Amazon S3 object ownership, see Controlling ownership of uploaded objects using S3\n Object Ownership in the Amazon Simple Storage Service User\n Guide.

\n
\n
", + "smithy.api#documentation": "

Specifies the bucket owner's access for objects that another account uploads to their\n Amazon S3 bucket. By default, only the account that uploads the objects to the bucket has\n access to these objects. This property allows you to give the bucket owner access to\n these objects.

\n \n

To use this property, your CodeBuild service role must have the\n s3:PutBucketAcl permission. This permission allows CodeBuild to modify\n the access control list for the bucket.

\n
\n

This property can be one of the following values:

\n
\n
NONE
\n
\n

The bucket owner does not have access to the objects. This is the\n default.

\n
\n
READ_ONLY
\n
\n

The bucket owner has read-only access to the objects. The uploading account\n retains ownership of the objects.

\n
\n
FULL
\n
\n

The bucket owner has full access to the objects. Object ownership is determined\n by the following criteria:

\n
    \n
  • \n

    If the bucket is configured with the Bucket\n owner preferred setting, the bucket owner owns the\n objects. The uploading account will have object access as specified\n by the bucket's policy.

    \n
  • \n
  • \n

    Otherwise, the uploading account retains ownership of the\n objects.

    \n
  • \n
\n

For more information about Amazon S3 object ownership, see Controlling ownership of uploaded objects using S3\n Object Ownership in the Amazon Simple Storage Service User\n Guide.

\n
\n
", "smithy.api#enum": [ { "value": "NONE", @@ -476,19 +476,19 @@ "sourceVersion": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

Any version identifier for the version of the source code to be built. If\n sourceVersion is specified at the project level, then this\n sourceVersion (at the build level) takes precedence.

\n

For more information, see Source Version Sample\n with CodeBuild in the AWS CodeBuild User Guide.

" + "smithy.api#documentation": "

Any version identifier for the version of the source code to be built. If\n sourceVersion is specified at the project level, then this\n sourceVersion (at the build level) takes precedence.

\n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide.

" } }, "resolvedSourceVersion": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

An identifier for the version of this build's source code.

\n " + "smithy.api#documentation": "

An identifier for the version of this build's source code.

\n " } }, "projectName": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The name of the AWS CodeBuild project.

" + "smithy.api#documentation": "

The name of the CodeBuild project.

" } }, "phases": { @@ -512,7 +512,7 @@ "secondarySourceVersions": { "target": "com.amazonaws.codebuild#ProjectSecondarySourceVersions", "traits": { - "smithy.api#documentation": "

An array of ProjectSourceVersion objects. Each\n ProjectSourceVersion must be one of:

\n " + "smithy.api#documentation": "

An array of ProjectSourceVersion objects. Each\n ProjectSourceVersion must be one of:

\n " } }, "artifacts": { @@ -548,13 +548,13 @@ "logs": { "target": "com.amazonaws.codebuild#LogsLocation", "traits": { - "smithy.api#documentation": "

Information about the build's logs in Amazon CloudWatch Logs.

" + "smithy.api#documentation": "

Information about the build's logs in CloudWatch Logs.

" } }, "timeoutInMinutes": { "target": "com.amazonaws.codebuild#WrapperInt", "traits": { - "smithy.api#documentation": "

How long, in minutes, for AWS CodeBuild to wait before timing out this build if it does not\n get marked as completed.

" + "smithy.api#documentation": "

How long, in minutes, for CodeBuild to wait before timing out this build if it does not\n get marked as completed.

" } }, "queuedTimeoutInMinutes": { @@ -572,13 +572,13 @@ "initiator": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The entity that started the build. Valid values include:

\n " + "smithy.api#documentation": "

The entity that started the build. Valid values include:

\n " } }, "vpcConfig": { "target": "com.amazonaws.codebuild#VpcConfig", "traits": { - "smithy.api#documentation": "

If your AWS CodeBuild project accesses resources in an Amazon VPC, you provide this parameter\n that identifies the VPC ID and the list of security group IDs and subnet IDs. The\n security groups and subnets must belong to the same VPC. You must provide at least one\n security group and one subnet ID.

" + "smithy.api#documentation": "

If your CodeBuild project accesses resources in an Amazon VPC, you provide this parameter\n that identifies the VPC ID and the list of security group IDs and subnet IDs. The\n security groups and subnets must belong to the same VPC. You must provide at least one\n security group and one subnet ID.

" } }, "networkInterface": { @@ -590,13 +590,13 @@ "encryptionKey": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" + "smithy.api#documentation": "

The Key Management Service customer master key (CMK) to be used for encrypting the build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" } }, "exportedEnvironmentVariables": { "target": "com.amazonaws.codebuild#ExportedEnvironmentVariables", "traits": { - "smithy.api#documentation": "

A list of exported environment variables for this build.

\n

Exported environment variables are used in conjunction with AWS CodePipeline to export\n environment variables from the current build stage to subsequent stages in the pipeline.\n For more information, see Working with variables in the AWS CodePipeline User Guide.

" + "smithy.api#documentation": "

A list of exported environment variables for this build.

\n

Exported environment variables are used in conjunction with CodePipeline to export\n environment variables from the current build stage to subsequent stages in the pipeline.\n For more information, see Working with variables in the CodePipeline User Guide.

" } }, "reportArns": { @@ -735,7 +735,7 @@ "resolvedSourceVersion": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The identifier of the resolved version of this batch build's source code.

\n " + "smithy.api#documentation": "

The identifier of the resolved version of this batch build's source code.

\n " } }, "projectName": { @@ -762,7 +762,7 @@ "secondarySourceVersions": { "target": "com.amazonaws.codebuild#ProjectSecondarySourceVersions", "traits": { - "smithy.api#documentation": "

An array of ProjectSourceVersion objects. Each\n ProjectSourceVersion must be one of:

\n " + "smithy.api#documentation": "

An array of ProjectSourceVersion objects. Each\n ProjectSourceVersion must be one of:

\n " } }, "artifacts": { @@ -813,7 +813,7 @@ "initiator": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The entity that started the batch build. Valid values include:

\n " + "smithy.api#documentation": "

The entity that started the batch build. Valid values include:

\n " } }, "vpcConfig": { @@ -822,7 +822,7 @@ "encryptionKey": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the batch build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" + "smithy.api#documentation": "

The Key Management Service customer master key (CMK) to be used for encrypting the batch build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" } }, "buildBatchNumber": { @@ -1180,7 +1180,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains information that defines how the AWS CodeBuild build project reports the build status\n to the source provider.

" + "smithy.api#documentation": "

Contains information that defines how the CodeBuild build project reports the build status\n to the source provider.

" } }, "com.amazonaws.codebuild#BuildSummaries": { @@ -1283,25 +1283,25 @@ "status": { "target": "com.amazonaws.codebuild#LogsConfigStatusType", "traits": { - "smithy.api#documentation": "

The current status of the logs in Amazon CloudWatch Logs for a build project. Valid values are:

\n ", + "smithy.api#documentation": "

The current status of the logs in CloudWatch Logs for a build project. Valid values are:

\n ", "smithy.api#required": {} } }, "groupName": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The group name of the logs in Amazon CloudWatch Logs. For more information, see Working\n with Log Groups and Log Streams.

" + "smithy.api#documentation": "

The group name of the logs in CloudWatch Logs. For more information, see Working\n with Log Groups and Log Streams.

" } }, "streamName": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The prefix of the stream name of the Amazon CloudWatch Logs. For more information, see Working\n with Log Groups and Log Streams.

" + "smithy.api#documentation": "

The prefix of the stream name of the CloudWatch Logs. For more information, see Working\n with Log Groups and Log Streams.

" } } }, "traits": { - "smithy.api#documentation": "

Information about Amazon CloudWatch Logs for a build project.

" + "smithy.api#documentation": "

Information about CloudWatch Logs for a build project.

" } }, "com.amazonaws.codebuild#CodeBuild_20161006": { @@ -1434,6 +1434,9 @@ { "target": "com.amazonaws.codebuild#UpdateProject" }, + { + "target": "com.amazonaws.codebuild#UpdateProjectVisibility" + }, { "target": "com.amazonaws.codebuild#UpdateReportGroup" }, @@ -1453,7 +1456,7 @@ "name": "codebuild" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "AWS CodeBuild\n

AWS CodeBuild is a fully managed build service in the cloud. AWS CodeBuild compiles your source code,\n runs unit tests, and produces artifacts that are ready to deploy. AWS CodeBuild eliminates the\n need to provision, manage, and scale your own build servers. It provides prepackaged\n build environments for the most popular programming languages and build tools, such as\n Apache Maven, Gradle, and more. You can also fully customize build environments in AWS CodeBuild\n to use your own build tools. AWS CodeBuild scales automatically to meet peak build requests. You\n pay only for the build time you consume. For more information about AWS CodeBuild, see the \n AWS CodeBuild User\n Guide.\n

", + "smithy.api#documentation": "CodeBuild\n

CodeBuild is a fully managed build service in the cloud. CodeBuild compiles your source code,\n runs unit tests, and produces artifacts that are ready to deploy. CodeBuild eliminates the\n need to provision, manage, and scale your own build servers. It provides prepackaged\n build environments for the most popular programming languages and build tools, such as\n Apache Maven, Gradle, and more. You can also fully customize build environments in CodeBuild\n to use your own build tools. CodeBuild scales automatically to meet peak build requests. You\n pay only for the build time you consume. For more information about CodeBuild, see the \n CodeBuild User\n Guide.\n

", "smithy.api#title": "AWS CodeBuild" } }, @@ -1659,7 +1662,7 @@ "sourceVersion": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

A version of the build input to be built for this project. If not specified, the latest\n version is used. If specified, it must be one of:

\n \n

If sourceVersion is specified at the build level, then that version takes\n precedence over this sourceVersion (at the project level).

\n

For more information, see Source Version Sample\n with CodeBuild in the AWS CodeBuild User Guide. \n

" + "smithy.api#documentation": "

A version of the build input to be built for this project. If not specified, the latest\n version is used. If specified, it must be one of:

\n \n

If sourceVersion is specified at the build level, then that version takes\n precedence over this sourceVersion (at the project level).

\n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide. \n

" } }, "secondarySourceVersions": { @@ -1697,14 +1700,14 @@ "serviceRole": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services\n on behalf of the AWS account.

", + "smithy.api#documentation": "

The ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services\n on behalf of the Amazon Web Services account.

", "smithy.api#required": {} } }, "timeoutInMinutes": { "target": "com.amazonaws.codebuild#TimeOut", "traits": { - "smithy.api#documentation": "

How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before it times out\n any build that has not been marked as completed. The default is 60 minutes.

" + "smithy.api#documentation": "

How long, in minutes, from 5 to 480 (8 hours), for CodeBuild to wait before it times out\n any build that has not been marked as completed. The default is 60 minutes.

" } }, "queuedTimeoutInMinutes": { @@ -1716,19 +1719,19 @@ "encryptionKey": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).\n

" + "smithy.api#documentation": "

The Key Management Service customer master key (CMK) to be used for encrypting the build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).\n

" } }, "tags": { "target": "com.amazonaws.codebuild#TagList", "traits": { - "smithy.api#documentation": "

A list of tag key and value pairs associated with this build project.

\n

These tags are available for use by AWS services that support AWS CodeBuild build project\n tags.

" + "smithy.api#documentation": "

A list of tag key and value pairs associated with this build project.

\n

These tags are available for use by Amazon Web Services services that support CodeBuild build project\n tags.

" } }, "vpcConfig": { "target": "com.amazonaws.codebuild#VpcConfig", "traits": { - "smithy.api#documentation": "

VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC.

" + "smithy.api#documentation": "

VpcConfig enables CodeBuild to access resources in an Amazon VPC.

" } }, "badgeEnabled": { @@ -1740,7 +1743,7 @@ "logsConfig": { "target": "com.amazonaws.codebuild#LogsConfig", "traits": { - "smithy.api#documentation": "

Information about logs for the build project. These can be logs in Amazon CloudWatch Logs, logs\n uploaded to a specified S3 bucket, or both.

" + "smithy.api#documentation": "

Information about logs for the build project. These can be logs in CloudWatch Logs, logs\n uploaded to a specified S3 bucket, or both.

" } }, "fileSystemLocations": { @@ -1824,7 +1827,7 @@ "tags": { "target": "com.amazonaws.codebuild#TagList", "traits": { - "smithy.api#documentation": "

\n A list of tag key and value pairs associated with this report group.\n

\n

These tags are available for use by AWS services that support AWS CodeBuild report group\n tags.

" + "smithy.api#documentation": "

\n A list of tag key and value pairs associated with this report group.\n

\n

These tags are available for use by Amazon Web Services services that support CodeBuild report group\n tags.

" } } } @@ -1863,7 +1866,7 @@ } ], "traits": { - "smithy.api#documentation": "

For an existing AWS CodeBuild build project that has its source code stored in a GitHub or\n Bitbucket repository, enables AWS CodeBuild to start rebuilding the source code every time a\n code change is pushed to the repository.

\n \n

If you enable webhooks for an AWS CodeBuild project, and the project is used as a build\n step in AWS CodePipeline, then two identical builds are created for each commit. One build is\n triggered through webhooks, and one through AWS CodePipeline. Because billing is on a per-build\n basis, you are billed for both builds. Therefore, if you are using AWS CodePipeline, we\n recommend that you disable webhooks in AWS CodeBuild. In the AWS CodeBuild console, clear the\n Webhook box. For more information, see step 5 in Change a Build Project's Settings.

\n
" + "smithy.api#documentation": "

For an existing CodeBuild build project that has its source code stored in a GitHub or\n Bitbucket repository, enables CodeBuild to start rebuilding the source code every time a\n code change is pushed to the repository.

\n \n

If you enable webhooks for an CodeBuild project, and the project is used as a build\n step in CodePipeline, then two identical builds are created for each commit. One build is\n triggered through webhooks, and one through CodePipeline. Because billing is on a per-build\n basis, you are billed for both builds. Therefore, if you are using CodePipeline, we\n recommend that you disable webhooks in CodeBuild. In the CodeBuild console, clear the\n Webhook box. For more information, see step 5 in Change a Build Project's Settings.

\n
" } }, "com.amazonaws.codebuild#CreateWebhookInput": { @@ -1872,7 +1875,7 @@ "projectName": { "target": "com.amazonaws.codebuild#ProjectName", "traits": { - "smithy.api#documentation": "

The name of the AWS CodeBuild project.

", + "smithy.api#documentation": "

The name of the CodeBuild project.

", "smithy.api#required": {} } }, @@ -1902,7 +1905,7 @@ "webhook": { "target": "com.amazonaws.codebuild#Webhook", "traits": { - "smithy.api#documentation": "

Information about a webhook that connects repository events to a build project in\n AWS CodeBuild.

" + "smithy.api#documentation": "

Information about a webhook that connects repository events to a build project in\n CodeBuild.

" } } } @@ -2191,7 +2194,7 @@ } ], "traits": { - "smithy.api#documentation": "

For an existing AWS CodeBuild build project that has its source code stored in a GitHub or\n Bitbucket repository, stops AWS CodeBuild from rebuilding the source code every time a code\n change is pushed to the repository.

" + "smithy.api#documentation": "

For an existing CodeBuild build project that has its source code stored in a GitHub or\n Bitbucket repository, stops CodeBuild from rebuilding the source code every time a code\n change is pushed to the repository.

" } }, "com.amazonaws.codebuild#DeleteWebhookInput": { @@ -2200,7 +2203,7 @@ "projectName": { "target": "com.amazonaws.codebuild#ProjectName", "traits": { - "smithy.api#documentation": "

The name of the AWS CodeBuild project.

", + "smithy.api#documentation": "

The name of the CodeBuild project.

", "smithy.api#required": {} } } @@ -2394,7 +2397,7 @@ } }, "traits": { - "smithy.api#documentation": "

Information about a Docker image that is managed by AWS CodeBuild.

" + "smithy.api#documentation": "

Information about a Docker image that is managed by CodeBuild.

" } }, "com.amazonaws.codebuild#EnvironmentImages": { @@ -2420,7 +2423,7 @@ } }, "traits": { - "smithy.api#documentation": "

A set of Docker images that are related by programming language and are managed by\n AWS CodeBuild.

" + "smithy.api#documentation": "

A set of Docker images that are related by programming language and are managed by\n CodeBuild.

" } }, "com.amazonaws.codebuild#EnvironmentLanguages": { @@ -2446,7 +2449,7 @@ } }, "traits": { - "smithy.api#documentation": "

A set of Docker images that are related by platform and are managed by AWS CodeBuild.

" + "smithy.api#documentation": "

A set of Docker images that are related by platform and are managed by CodeBuild.

" } }, "com.amazonaws.codebuild#EnvironmentPlatforms": { @@ -2495,14 +2498,14 @@ "value": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The value of the environment variable.

\n \n

We strongly discourage the use of PLAINTEXT environment variables to\n store sensitive values, especially AWS secret key IDs and secret access keys.\n PLAINTEXT environment variables can be displayed in plain text\n using the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI). For sensitive values, we recommend you use an\n environment variable of type PARAMETER_STORE or\n SECRETS_MANAGER.

\n
", + "smithy.api#documentation": "

The value of the environment variable.

\n \n

We strongly discourage the use of PLAINTEXT environment variables to\n store sensitive values, especially Amazon Web Services secret key IDs and secret access keys.\n PLAINTEXT environment variables can be displayed in plain text\n using the CodeBuild console and the CLI. For sensitive values, we recommend you use an\n environment variable of type PARAMETER_STORE or\n SECRETS_MANAGER.

\n
", "smithy.api#required": {} } }, "type": { "target": "com.amazonaws.codebuild#EnvironmentVariableType", "traits": { - "smithy.api#documentation": "

The type of environment variable. Valid values include:

\n " + "smithy.api#documentation": "

The type of environment variable. Valid values include:

\n " } } }, @@ -2552,7 +2555,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains information about an exported environment variable.

\n

Exported environment variables are used in conjunction with AWS CodePipeline to export\n environment variables from the current build stage to subsequent stages in the pipeline.\n For more information, see Working with variables in the AWS CodePipeline User Guide.

\n \n

During a build, the value of a variable is available starting with the\n install phase. It can be updated between the start of the\n install phase and the end of the post_build phase.\n After the post_build phase ends, the value of exported variables cannot\n change.

\n
" + "smithy.api#documentation": "

Contains information about an exported environment variable.

\n

Exported environment variables are used in conjunction with CodePipeline to export\n environment variables from the current build stage to subsequent stages in the pipeline.\n For more information, see Working with variables in the CodePipeline User Guide.

\n \n

During a build, the value of a variable is available starting with the\n install phase. It can be updated between the start of the\n install phase and the end of the post_build phase.\n After the post_build phase ends, the value of exported variables cannot\n change.

\n
" } }, "com.amazonaws.codebuild#ExportedEnvironmentVariables": { @@ -2704,13 +2707,13 @@ "fetchSubmodules": { "target": "com.amazonaws.codebuild#WrapperBoolean", "traits": { - "smithy.api#documentation": "

Set to true to fetch Git submodules for your AWS CodeBuild build project.

", + "smithy.api#documentation": "

Set to true to fetch Git submodules for your CodeBuild build project.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Information about the Git submodules configuration for an AWS CodeBuild build project.\n

" + "smithy.api#documentation": "

Information about the Git submodules configuration for an CodeBuild build project.\n

" } }, "com.amazonaws.codebuild#Identifiers": { @@ -2760,7 +2763,7 @@ } ], "traits": { - "smithy.api#documentation": "

Imports the source repository credentials for an AWS CodeBuild project that has its\n source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository.

" + "smithy.api#documentation": "

Imports the source repository credentials for an CodeBuild project that has its\n source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository.

" } }, "com.amazonaws.codebuild#ImportSourceCredentialsInput": { @@ -2789,7 +2792,7 @@ "authType": { "target": "com.amazonaws.codebuild#AuthType", "traits": { - "smithy.api#documentation": "

The type of authentication used to connect to a GitHub, GitHub Enterprise, or\n Bitbucket repository. An OAUTH connection is not supported by the API and must be\n created using the AWS CodeBuild console.

", + "smithy.api#documentation": "

The type of authentication used to connect to a GitHub, GitHub Enterprise, or\n Bitbucket repository. An OAUTH connection is not supported by the API and must be\n created using the CodeBuild console.

", "smithy.api#required": {} } }, @@ -2850,7 +2853,7 @@ "projectName": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The name of the AWS CodeBuild build project that the cache is reset for.

", + "smithy.api#documentation": "

The name of the CodeBuild build project that the cache is reset for.

", "smithy.api#required": {} } } @@ -3117,7 +3120,7 @@ "projectName": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The name of the AWS CodeBuild project.

", + "smithy.api#documentation": "

The name of the CodeBuild project.

", "smithy.api#required": {} } }, @@ -3195,7 +3198,7 @@ "target": "com.amazonaws.codebuild#ListCuratedEnvironmentImagesOutput" }, "traits": { - "smithy.api#documentation": "

Gets information about Docker images that are managed by AWS CodeBuild.

" + "smithy.api#documentation": "

Gets information about Docker images that are managed by CodeBuild.

" } }, "com.amazonaws.codebuild#ListCuratedEnvironmentImagesInput": { @@ -3208,7 +3211,7 @@ "platforms": { "target": "com.amazonaws.codebuild#EnvironmentPlatforms", "traits": { - "smithy.api#documentation": "

Information about supported platforms for Docker images that are managed by\n AWS CodeBuild.

" + "smithy.api#documentation": "

Information about supported platforms for Docker images that are managed by\n CodeBuild.

" } } } @@ -3289,7 +3292,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n Gets a list ARNs for the report groups in the current AWS account.\n

", + "smithy.api#documentation": "

\n Gets a list ARNs for the report groups in the current Amazon Web Services account.\n

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -3339,7 +3342,7 @@ "reportGroups": { "target": "com.amazonaws.codebuild#ReportGroupArns", "traits": { - "smithy.api#documentation": "

\n The list of ARNs for the report groups in the current AWS account.\n

" + "smithy.api#documentation": "

\n The list of ARNs for the report groups in the current Amazon Web Services account.\n

" } } } @@ -3358,7 +3361,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n Returns a list of ARNs for the reports in the current AWS account.\n

", + "smithy.api#documentation": "

\n Returns a list of ARNs for the reports in the current Amazon Web Services account.\n

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -3487,7 +3490,7 @@ "reports": { "target": "com.amazonaws.codebuild#ReportArns", "traits": { - "smithy.api#documentation": "

\n The list of returned ARNs for the reports in the current AWS account.\n

" + "smithy.api#documentation": "

\n The list of returned ARNs for the reports in the current Amazon Web Services account.\n

" } } } @@ -3506,7 +3509,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets a list of projects that are shared with other AWS accounts or users.

", + "smithy.api#documentation": "

Gets a list of projects that are shared with other Amazon Web Services accounts or users.

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -3521,7 +3524,7 @@ "sortBy": { "target": "com.amazonaws.codebuild#SharedResourceSortByType", "traits": { - "smithy.api#documentation": "

The criterion to be used to list build projects shared with the current AWS account\n or user. Valid values include:

\n " + "smithy.api#documentation": "

The criterion to be used to list build projects shared with the current Amazon Web Services account\n or user. Valid values include:

\n " } }, "sortOrder": { @@ -3556,7 +3559,7 @@ "projects": { "target": "com.amazonaws.codebuild#ProjectArns", "traits": { - "smithy.api#documentation": "

The list of ARNs for the build projects shared with the current AWS account or user.\n

" + "smithy.api#documentation": "

The list of ARNs for the build projects shared with the current Amazon Web Services account or user.\n

" } } } @@ -3575,7 +3578,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets a list of report groups that are shared with other AWS accounts or users.\n

", + "smithy.api#documentation": "

Gets a list of report groups that are shared with other Amazon Web Services accounts or users.\n

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -3596,7 +3599,7 @@ "sortBy": { "target": "com.amazonaws.codebuild#SharedResourceSortByType", "traits": { - "smithy.api#documentation": "

The criterion to be used to list report groups shared with the current AWS account or\n user. Valid values include:

\n " + "smithy.api#documentation": "

The criterion to be used to list report groups shared with the current Amazon Web Services account or\n user. Valid values include:

\n " } }, "nextToken": { @@ -3625,7 +3628,7 @@ "reportGroups": { "target": "com.amazonaws.codebuild#ReportGroupArns", "traits": { - "smithy.api#documentation": "

The list of ARNs for the report groups shared with the current AWS account or user.\n

" + "smithy.api#documentation": "

The list of ARNs for the report groups shared with the current Amazon Web Services account or user.\n

" } } } @@ -3668,7 +3671,7 @@ "cloudWatchLogs": { "target": "com.amazonaws.codebuild#CloudWatchLogsConfig", "traits": { - "smithy.api#documentation": "

Information about Amazon CloudWatch Logs for a build project. Amazon CloudWatch Logs are enabled by default.

" + "smithy.api#documentation": "

Information about CloudWatch Logs for a build project. CloudWatch Logs are enabled by default.

" } }, "s3Logs": { @@ -3679,7 +3682,7 @@ } }, "traits": { - "smithy.api#documentation": "

Information about logs for a build project. These can be logs in Amazon CloudWatch Logs, built in a\n specified S3 bucket, or both.

" + "smithy.api#documentation": "

Information about logs for a build project. These can be logs in CloudWatch Logs, built in a\n specified S3 bucket, or both.

" } }, "com.amazonaws.codebuild#LogsConfigStatusType": { @@ -3703,19 +3706,19 @@ "groupName": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The name of the Amazon CloudWatch Logs group for the build logs.

" + "smithy.api#documentation": "

The name of the CloudWatch Logs group for the build logs.

" } }, "streamName": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The name of the Amazon CloudWatch Logs stream for the build logs.

" + "smithy.api#documentation": "

The name of the CloudWatch Logs stream for the build logs.

" } }, "deepLink": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The URL to an individual build log in Amazon CloudWatch Logs.

" + "smithy.api#documentation": "

The URL to an individual build log in CloudWatch Logs.

" } }, "s3DeepLink": { @@ -3727,7 +3730,7 @@ "cloudWatchLogsArn": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The ARN of Amazon CloudWatch Logs for a build project. Its format is\n arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}.\n For more information, see Resources Defined by Amazon CloudWatch Logs.

" + "smithy.api#documentation": "

The ARN of CloudWatch Logs for a build project. Its format is\n arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}.\n For more information, see Resources Defined by CloudWatch Logs.

" } }, "s3LogsArn": { @@ -3739,7 +3742,7 @@ "cloudWatchLogs": { "target": "com.amazonaws.codebuild#CloudWatchLogsConfig", "traits": { - "smithy.api#documentation": "

Information about Amazon CloudWatch Logs for a build project.

" + "smithy.api#documentation": "

Information about CloudWatch Logs for a build project.

" } }, "s3Logs": { @@ -3750,7 +3753,7 @@ } }, "traits": { - "smithy.api#documentation": "

Information about build logs in Amazon CloudWatch Logs.

" + "smithy.api#documentation": "

Information about build logs in CloudWatch Logs.

" } }, "com.amazonaws.codebuild#NetworkInterface": { @@ -3907,7 +3910,7 @@ "sourceVersion": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

A version of the build input to be built for this project. If not specified, the\n latest version is used. If specified, it must be one of:

\n \n

If sourceVersion is specified at the build level, then that version\n takes precedence over this sourceVersion (at the project level).

\n

For more information, see Source Version Sample\n with CodeBuild in the AWS CodeBuild User Guide. \n

" + "smithy.api#documentation": "

A version of the build input to be built for this project. If not specified, the\n latest version is used. If specified, it must be one of:

\n \n

If sourceVersion is specified at the build level, then that version\n takes precedence over this sourceVersion (at the project level).

\n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide. \n

" } }, "secondarySourceVersions": { @@ -3943,13 +3946,13 @@ "serviceRole": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services\n on behalf of the AWS account.

" + "smithy.api#documentation": "

The ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services\n on behalf of the Amazon Web Services account.

" } }, "timeoutInMinutes": { "target": "com.amazonaws.codebuild#TimeOut", "traits": { - "smithy.api#documentation": "

How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any\n related build that did not get marked as completed. The default is 60 minutes.

" + "smithy.api#documentation": "

How long, in minutes, from 5 to 480 (8 hours), for CodeBuild to wait before timing out any\n related build that did not get marked as completed. The default is 60 minutes.

" } }, "queuedTimeoutInMinutes": { @@ -3961,13 +3964,13 @@ "encryptionKey": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).\n

" + "smithy.api#documentation": "

The Key Management Service customer master key (CMK) to be used for encrypting the build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/). If you don't specify a \n value, CodeBuild uses the managed CMK for Amazon Simple Storage Service (Amazon S3).\n

" } }, "tags": { "target": "com.amazonaws.codebuild#TagList", "traits": { - "smithy.api#documentation": "

A list of tag key and value pairs associated with this build project.

\n

These tags are available for use by AWS services that support AWS CodeBuild build project\n tags.

" + "smithy.api#documentation": "

A list of tag key and value pairs associated with this build project.

\n

These tags are available for use by Amazon Web Services services that support CodeBuild build project\n tags.

" } }, "created": { @@ -3985,13 +3988,13 @@ "webhook": { "target": "com.amazonaws.codebuild#Webhook", "traits": { - "smithy.api#documentation": "

Information about a webhook that connects repository events to a build project in\n AWS CodeBuild.

" + "smithy.api#documentation": "

Information about a webhook that connects repository events to a build project in\n CodeBuild.

" } }, "vpcConfig": { "target": "com.amazonaws.codebuild#VpcConfig", "traits": { - "smithy.api#documentation": "

Information about the VPC configuration that AWS CodeBuild accesses.

" + "smithy.api#documentation": "

Information about the VPC configuration that CodeBuild accesses.

" } }, "badge": { @@ -4003,7 +4006,7 @@ "logsConfig": { "target": "com.amazonaws.codebuild#LogsConfig", "traits": { - "smithy.api#documentation": "

Information about logs for the build project. A project can create logs in Amazon CloudWatch Logs, an\n S3 bucket, or both.

" + "smithy.api#documentation": "

Information about logs for the build project. A project can create logs in CloudWatch Logs, an\n S3 bucket, or both.

" } }, "fileSystemLocations": { @@ -4023,6 +4026,21 @@ "traits": { "smithy.api#documentation": "

The maximum number of concurrent builds that are allowed for this project.

\n

New builds are only started if the current number of builds is less than or equal to this limit. \n If the current build count meets this limit, new builds are throttled and are not run.

" } + }, + "projectVisibility": { + "target": "com.amazonaws.codebuild#ProjectVisibilityType" + }, + "publicProjectAlias": { + "target": "com.amazonaws.codebuild#NonEmptyString", + "traits": { + "smithy.api#documentation": "

Contains the project identifier used with the public build APIs.

" + } + }, + "resourceAccessRole": { + "target": "com.amazonaws.codebuild#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for\n the project's builds.

" + } } }, "traits": { @@ -4047,38 +4065,38 @@ "type": { "target": "com.amazonaws.codebuild#ArtifactsType", "traits": { - "smithy.api#documentation": "

The type of build output artifact. Valid values include:

\n ", + "smithy.api#documentation": "

The type of build output artifact. Valid values include:

\n ", "smithy.api#required": {} } }, "location": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

Information about the build output artifact location:

\n " + "smithy.api#documentation": "

Information about the build output artifact location:

\n " } }, "path": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

Along with namespaceType and name, the pattern that AWS CodeBuild\n uses to name and store the output artifact:

\n \n

For example, if path is set to MyArtifacts,\n namespaceType is set to NONE, and name is set\n to MyArtifact.zip, the output artifact is stored in the output bucket at\n MyArtifacts/MyArtifact.zip.

" + "smithy.api#documentation": "

Along with namespaceType and name, the pattern that CodeBuild\n uses to name and store the output artifact:

\n \n

For example, if path is set to MyArtifacts,\n namespaceType is set to NONE, and name is set\n to MyArtifact.zip, the output artifact is stored in the output bucket at\n MyArtifacts/MyArtifact.zip.

" } }, "namespaceType": { "target": "com.amazonaws.codebuild#ArtifactNamespace", "traits": { - "smithy.api#documentation": "

Along with path and name, the pattern that AWS CodeBuild uses to\n determine the name and location to store the output artifact:

\n \n

For example, if path is set to MyArtifacts,\n namespaceType is set to BUILD_ID, and name is\n set to MyArtifact.zip, the output artifact is stored in\n MyArtifacts//MyArtifact.zip.

" + "smithy.api#documentation": "

Along with path and name, the pattern that CodeBuild uses to\n determine the name and location to store the output artifact:

\n \n

For example, if path is set to MyArtifacts,\n namespaceType is set to BUILD_ID, and name is\n set to MyArtifact.zip, the output artifact is stored in\n MyArtifacts//MyArtifact.zip.

" } }, "name": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

Along with path and namespaceType, the pattern that AWS CodeBuild\n uses to name and store the output artifact:

\n \n

For example:

\n " + "smithy.api#documentation": "

Along with path and namespaceType, the pattern that CodeBuild\n uses to name and store the output artifact:

\n \n

For example:

\n " } }, "packaging": { "target": "com.amazonaws.codebuild#ArtifactPackaging", "traits": { - "smithy.api#documentation": "

The type of build output artifact to create:

\n " + "smithy.api#documentation": "

The type of build output artifact to create:

\n " } }, "overrideArtifactName": { @@ -4219,21 +4237,21 @@ "type": { "target": "com.amazonaws.codebuild#EnvironmentType", "traits": { - "smithy.api#documentation": "

The type of build environment to use for related builds.

\n ", + "smithy.api#documentation": "

The type of build environment to use for related builds.

\n \n \n

For more information, see Build environment compute types in the CodeBuild\n user guide.

", "smithy.api#required": {} } }, "image": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The image tag or image digest that identifies the Docker image to use for this build\n project. Use the following formats:

\n ", + "smithy.api#documentation": "

The image tag or image digest that identifies the Docker image to use for this build\n project. Use the following formats:

\n \n

For more information, see Docker images provided by CodeBuild in the CodeBuild user\n guide.

", "smithy.api#required": {} } }, "computeType": { "target": "com.amazonaws.codebuild#ComputeType", "traits": { - "smithy.api#documentation": "

Information about the compute resources the build project uses. Available values\n include:

\n \n

If you use BUILD_GENERAL1_LARGE:

\n \n

For more information, see Build Environment\n Compute Types in the AWS CodeBuild User Guide.\n

", + "smithy.api#documentation": "

Information about the compute resources the build project uses. Available values\n include:

\n \n

If you use BUILD_GENERAL1_LARGE:

\n \n

For more information, see Build Environment\n Compute Types in the CodeBuild User Guide.\n

", "smithy.api#required": {} } }, @@ -4252,7 +4270,7 @@ "certificate": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The ARN of the Amazon S3 bucket, path prefix, and object key that contains the PEM-encoded\n certificate for the build project. For more information, see certificate in the\n AWS CodeBuild User Guide.

" + "smithy.api#documentation": "

The ARN of the Amazon S3 bucket, path prefix, and object key that contains the PEM-encoded\n certificate for the build project. For more information, see certificate in the\n CodeBuild User Guide.

" } }, "registryCredential": { @@ -4264,7 +4282,7 @@ "imagePullCredentialsType": { "target": "com.amazonaws.codebuild#ImagePullCredentialsType", "traits": { - "smithy.api#documentation": "

The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid\n values:

\n \n

When you use a cross-account or private registry image, you must use SERVICE_ROLE\n credentials. When you use an AWS CodeBuild curated image, you must use CODEBUILD credentials.\n

" + "smithy.api#documentation": "

The type of credentials CodeBuild uses to pull images in your build. There are two valid\n values:

\n \n

When you use a cross-account or private registry image, you must use SERVICE_ROLE\n credentials. When you use an CodeBuild curated image, you must use CODEBUILD credentials.\n

" } } }, @@ -4284,7 +4302,7 @@ "location": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

A string that specifies the location of the file system created by Amazon EFS. Its\n format is efs-dns-name:/directory-path. You can find the DNS name of file\n system when you view it in the AWS EFS console. The directory path is a path to a\n directory in the file system that CodeBuild mounts. For example, if the DNS name of a\n file system is fs-abcd1234.efs.us-west-2.amazonaws.com, and its mount\n directory is my-efs-mount-directory, then the location is\n fs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory.

\n

The directory path in the format efs-dns-name:/directory-path is\n optional. If you do not specify a directory path, the location is only the DNS name and\n CodeBuild mounts the entire file system.

" + "smithy.api#documentation": "

A string that specifies the location of the file system created by Amazon EFS. Its\n format is efs-dns-name:/directory-path. You can find the DNS name of file\n system when you view it in the Amazon EFS console. The directory path is a path to a\n directory in the file system that CodeBuild mounts. For example, if the DNS name of a\n file system is fs-abcd1234.efs.us-west-2.amazonaws.com, and its mount\n directory is my-efs-mount-directory, then the location is\n fs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory.

\n

The directory path in the format efs-dns-name:/directory-path is\n optional. If you do not specify a directory path, the location is only the DNS name and\n CodeBuild mounts the entire file system.

" } }, "mountPoint": { @@ -4302,7 +4320,7 @@ "mountOptions": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The mount options for a file system created by AWS EFS. The default mount options\n used by CodeBuild are\n nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2. For\n more information, see Recommended NFS Mount\n Options.

" + "smithy.api#documentation": "

The mount options for a file system created by Amazon EFS. The default mount options\n used by CodeBuild are\n nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2. For\n more information, see Recommended NFS Mount\n Options.

" } } }, @@ -4375,14 +4393,14 @@ "type": { "target": "com.amazonaws.codebuild#SourceType", "traits": { - "smithy.api#documentation": "

The type of repository that contains the source code to be built. Valid values\n include:

\n ", + "smithy.api#documentation": "

The type of repository that contains the source code to be built. Valid values\n include:

\n ", "smithy.api#required": {} } }, "location": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

Information about the location of the source code to be built. Valid values\n include:

\n " + "smithy.api#documentation": "

Information about the location of the source code to be built. Valid values\n include:

\n \n

\n If you specify CODEPIPELINE for the Type property, don't specify this \n property. For all of the other types, you must specify Location.\n

" } }, "gitCloneDepth": { @@ -4400,19 +4418,19 @@ "buildspec": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The buildspec file declaration to use for the builds in this build project.

\n

If this value is set, it can be either an inline buildspec definition, the path to an\n alternate buildspec file relative to the value of the built-in\n CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket.\n The bucket must be in the same AWS Region as the build project. Specify the buildspec\n file using its ARN (for example,\n arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not\n provided or is set to an empty string, the source code must contain a buildspec file in\n its root directory. For more information, see Buildspec File Name and Storage Location.

" + "smithy.api#documentation": "

The buildspec file declaration to use for the builds in this build project.

\n

If this value is set, it can be either an inline buildspec definition, the path to an\n alternate buildspec file relative to the value of the built-in\n CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket.\n The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec\n file using its ARN (for example,\n arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not\n provided or is set to an empty string, the source code must contain a buildspec file in\n its root directory. For more information, see Buildspec File Name and Storage Location.

" } }, "auth": { "target": "com.amazonaws.codebuild#SourceAuth", "traits": { - "smithy.api#documentation": "

Information about the authorization settings for AWS CodeBuild to access the source code to be\n built.

\n

This information is for the AWS CodeBuild console's use only. Your code should not get or set\n this information directly.

" + "smithy.api#documentation": "

Information about the authorization settings for CodeBuild to access the source code to be\n built.

\n

This information is for the CodeBuild console's use only. Your code should not get or set\n this information directly.

" } }, "reportBuildStatus": { "target": "com.amazonaws.codebuild#WrapperBoolean", "traits": { - "smithy.api#documentation": "

Set to true to report the status of a build's start and finish to your source\n provider. This option is valid only when your source provider is GitHub, GitHub\n Enterprise, or Bitbucket. If this is set and you use a different source provider, an\n invalidInputException is thrown.

\n

To be able to report the build status to the source provider, the user associated with the source provider must\nhave write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see Source provider access in the AWS CodeBuild User Guide.

\n \n

The status of a build triggered by a webhook is always reported to your source\n provider.

\n
" + "smithy.api#documentation": "

Set to true to report the status of a build's start and finish to your source\n provider. This option is valid only when your source provider is GitHub, GitHub\n Enterprise, or Bitbucket. If this is set and you use a different source provider, an\n invalidInputException is thrown.

\n

To be able to report the build status to the source provider, the user associated with the source provider must\nhave write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see Source provider access in the CodeBuild User Guide.

\n \n

The status of a build triggered by a webhook is always reported to your source\n provider.

\n
" } }, "buildStatusConfig": { @@ -4451,7 +4469,7 @@ "sourceVersion": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The source version for the corresponding source identifier. If specified, must be one\n of:

\n \n

For more information, see Source Version Sample\n with CodeBuild in the AWS CodeBuild User Guide.

", + "smithy.api#documentation": "

The source version for the corresponding source identifier. If specified, must be one\n of:

\n \n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide.

", "smithy.api#required": {} } } @@ -4472,6 +4490,22 @@ } } }, + "com.amazonaws.codebuild#ProjectVisibilityType": { + "type": "string", + "traits": { + "smithy.api#documentation": "

Specifies the visibility of the project's builds. Possible values are:

\n\n
\n
PUBLIC_READ
\n
\n

The project builds are visible to the public.

\n
\n
PRIVATE
\n
\n

The project builds are not visible to the public.

\n
\n
", + "smithy.api#enum": [ + { + "value": "PUBLIC_READ", + "name": "PUBLIC_READ" + }, + { + "value": "PRIVATE", + "name": "PRIVATE" + } + ] + } + }, "com.amazonaws.codebuild#Projects": { "type": "list", "member": { @@ -4504,7 +4538,7 @@ "policy": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

A JSON-formatted resource policy. For more information, see Sharing\n a Project and Sharing a Report Group in the AWS CodeBuild User Guide.\n

", + "smithy.api#documentation": "

A JSON-formatted resource policy. For more information, see Sharing\n a Project and Sharing a Report Group in the CodeBuild User Guide.\n

", "smithy.api#required": {} } }, @@ -4534,20 +4568,20 @@ "credential": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager.

\n \n

The credential can use the name of the credentials only if they\n exist in your current AWS Region.

\n
", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) or name of credentials created using Secrets Manager.

\n \n

The credential can use the name of the credentials only if they\n exist in your current Amazon Web Services Region.

\n
", "smithy.api#required": {} } }, "credentialProvider": { "target": "com.amazonaws.codebuild#CredentialProviderType", "traits": { - "smithy.api#documentation": "

The service that created the credentials to access a private Docker registry. The\n valid value, SECRETS_MANAGER, is for AWS Secrets Manager.

", + "smithy.api#documentation": "

The service that created the credentials to access a private Docker registry. The\n valid value, SECRETS_MANAGER, is for Secrets Manager.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Information about credentials that provide access to a private Docker registry. When\n this is set:

\n \n

For more information, see Private Registry with\n AWS Secrets Manager Sample for AWS CodeBuild.

" + "smithy.api#documentation": "

Information about credentials that provide access to a private Docker registry. When\n this is set:

\n \n

For more information, see Private Registry with\n Secrets Manager Sample for CodeBuild.

" } }, "com.amazonaws.codebuild#Report": { @@ -4748,7 +4782,7 @@ "tags": { "target": "com.amazonaws.codebuild#TagList", "traits": { - "smithy.api#documentation": "

A list of tag key and value pairs associated with this report group.

\n

These tags are available for use by AWS services that support AWS CodeBuild report group\n tags.

" + "smithy.api#documentation": "

A list of tag key and value pairs associated with this report group.

\n

These tags are available for use by Amazon Web Services services that support CodeBuild report group\n tags.

" } }, "status": { @@ -5025,7 +5059,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a resolved build artifact. A resolve artifact is an artifact that is built and\n deployed to the destination, such as Amazon S3.

" + "smithy.api#documentation": "

Represents a resolved build artifact. A resolved artifact is an artifact that is built and\n deployed to the destination, such as Amazon S3.

" } }, "com.amazonaws.codebuild#ResolvedSecondaryArtifacts": { @@ -5042,7 +5076,7 @@ } }, "traits": { - "smithy.api#documentation": "

The specified AWS resource cannot be created, because an AWS resource with the same\n settings already exists.

", + "smithy.api#documentation": "

The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same\n settings already exists.

", "smithy.api#error": "client" } }, @@ -5054,7 +5088,7 @@ } }, "traits": { - "smithy.api#documentation": "

The specified AWS resource cannot be found.

", + "smithy.api#documentation": "

The specified Amazon Web Services resource cannot be found.

", "smithy.api#error": "client" } }, @@ -5113,7 +5147,7 @@ "idempotencyToken": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

A unique, case sensitive identifier you provide to ensure the idempotency of the\n RetryBuildBatch request. The token is included in the\n RetryBuildBatch request and is valid for five minutes. If you repeat\n the RetryBuildBatch request with the same token, but change a parameter,\n AWS CodeBuild returns a parameter mismatch error.

" + "smithy.api#documentation": "

A unique, case sensitive identifier you provide to ensure the idempotency of the\n RetryBuildBatch request. The token is included in the\n RetryBuildBatch request and is valid for five minutes. If you repeat\n the RetryBuildBatch request with the same token, but change a parameter,\n CodeBuild returns a parameter mismatch error.

" } }, "retryType": { @@ -5159,7 +5193,7 @@ "idempotencyToken": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

A unique, case sensitive identifier you provide to ensure the idempotency of the\n RetryBuild request. The token is included in the\n RetryBuild request and is valid for five minutes. If you repeat\n the RetryBuild request with the same token, but change a parameter,\n AWS CodeBuild returns a parameter mismatch error.

" + "smithy.api#documentation": "

A unique, case sensitive identifier you provide to ensure the idempotency of the\n RetryBuild request. The token is included in the\n RetryBuild request and is valid for five minutes. If you repeat\n the RetryBuild request with the same token, but change a parameter,\n CodeBuild returns a parameter mismatch error.

" } } } @@ -5214,7 +5248,7 @@ "bucketOwner": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The AWS account identifier of the owner of the Amazon S3 bucket. This allows report data to be exported to an Amazon S3 bucket\n that is owned by an account other than the account running the build.

" + "smithy.api#documentation": "

The Amazon Web Services account identifier of the owner of the Amazon S3 bucket. This allows report data to be exported to an Amazon S3 bucket\n that is owned by an account other than the account running the build.

" } }, "path": { @@ -5226,7 +5260,7 @@ "packaging": { "target": "com.amazonaws.codebuild#ReportPackagingType", "traits": { - "smithy.api#documentation": "

The type of build output artifact to create. Valid values include:

\n " + "smithy.api#documentation": "

The type of build output artifact to create. Valid values include:

\n " } }, "encryptionKey": { @@ -5334,7 +5368,7 @@ } }, "traits": { - "smithy.api#documentation": "

Information about the authorization settings for AWS CodeBuild to access the source code to be\n built.

\n

This information is for the AWS CodeBuild console's use only. Your code should not get or set\n this information directly.

" + "smithy.api#documentation": "

Information about the authorization settings for CodeBuild to access the source code to be\n built.

\n

This information is for the CodeBuild console's use only. Your code should not get or set\n this information directly.

" } }, "com.amazonaws.codebuild#SourceAuthType": { @@ -5483,7 +5517,7 @@ "sourceVersion": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The version of the batch build input to be built, for this build only. If not specified,\n the latest version is used. If specified, the contents depends on the source\n provider:

\n
\n
AWS CodeCommit
\n
\n

The commit ID, branch, or Git tag to use.

\n
\n
GitHub
\n
\n

The commit ID, pull request ID, branch name, or tag name that corresponds\n to the version of the source code you want to build. If a pull request ID is\n specified, it must use the format pr/pull-request-ID (for\n example pr/25). If a branch name is specified, the branch's\n HEAD commit ID is used. If not specified, the default branch's HEAD commit\n ID is used.

\n
\n
Bitbucket
\n
\n

The commit ID, branch name, or tag name that corresponds to the version of\n the source code you want to build. If a branch name is specified, the\n branch's HEAD commit ID is used. If not specified, the default branch's HEAD\n commit ID is used.

\n
\n
Amazon S3
\n
\n

The version ID of the object that represents the build input ZIP file to\n use.

\n
\n
\n

If sourceVersion is specified at the project level, then this\n sourceVersion (at the build level) takes precedence.

\n

For more information, see Source Version Sample\n with CodeBuild in the AWS CodeBuild User Guide.

" + "smithy.api#documentation": "

The version of the batch build input to be built, for this build only. If not specified,\n the latest version is used. If specified, the contents depends on the source\n provider:

\n
\n
CodeCommit
\n
\n

The commit ID, branch, or Git tag to use.

\n
\n
GitHub
\n
\n

The commit ID, pull request ID, branch name, or tag name that corresponds\n to the version of the source code you want to build. If a pull request ID is\n specified, it must use the format pr/pull-request-ID (for\n example pr/25). If a branch name is specified, the branch's\n HEAD commit ID is used. If not specified, the default branch's HEAD commit\n ID is used.

\n
\n
Bitbucket
\n
\n

The commit ID, branch name, or tag name that corresponds to the version of\n the source code you want to build. If a branch name is specified, the\n branch's HEAD commit ID is used. If not specified, the default branch's HEAD\n commit ID is used.

\n
\n
Amazon S3
\n
\n

The version ID of the object that represents the build input ZIP file to\n use.

\n
\n
\n

If sourceVersion is specified at the project level, then this\n sourceVersion (at the build level) takes precedence.

\n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide.

" } }, "artifactsOverride": { @@ -5537,7 +5571,7 @@ "buildspecOverride": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

A buildspec file declaration that overrides, for this build only, the latest one\n already defined in the build project.

\n

If this value is set, it can be either an inline buildspec definition, the path to an\n alternate buildspec file relative to the value of the built-in\n CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket.\n The bucket must be in the same AWS Region as the build project. Specify the buildspec\n file using its ARN (for example,\n arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not\n provided or is set to an empty string, the source code must contain a buildspec file in\n its root directory. For more information, see Buildspec File Name and Storage Location.

" + "smithy.api#documentation": "

A buildspec file declaration that overrides, for this build only, the latest one\n already defined in the build project.

\n

If this value is set, it can be either an inline buildspec definition, the path to an\n alternate buildspec file relative to the value of the built-in\n CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket.\n The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec\n file using its ARN (for example,\n arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not\n provided or is set to an empty string, the source code must contain a buildspec file in\n its root directory. For more information, see Buildspec File Name and Storage Location.

" } }, "insecureSslOverride": { @@ -5609,13 +5643,13 @@ "encryptionKeyOverride": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The AWS Key Management Service (AWS KMS) customer master key (CMK) that overrides the one specified in the batch build\n project. The CMK key encrypts the build output artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" + "smithy.api#documentation": "

The Key Management Service customer master key (CMK) that overrides the one specified in the batch build\n project. The CMK key encrypts the build output artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" } }, "idempotencyToken": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

A unique, case sensitive identifier you provide to ensure the idempotency of the\n StartBuildBatch request. The token is included in the\n StartBuildBatch request and is valid for five minutes. If you repeat\n the StartBuildBatch request with the same token, but change a parameter,\n AWS CodeBuild returns a parameter mismatch error.

" + "smithy.api#documentation": "

A unique, case sensitive identifier you provide to ensure the idempotency of the\n StartBuildBatch request. The token is included in the\n StartBuildBatch request and is valid for five minutes. If you repeat\n the StartBuildBatch request with the same token, but change a parameter,\n CodeBuild returns a parameter mismatch error.

" } }, "logsConfigOverride": { @@ -5633,7 +5667,7 @@ "imagePullCredentialsTypeOverride": { "target": "com.amazonaws.codebuild#ImagePullCredentialsType", "traits": { - "smithy.api#documentation": "

The type of credentials AWS CodeBuild uses to pull images in your batch build. There are two valid\n values:

\n
\n
CODEBUILD
\n
\n

Specifies that AWS CodeBuild uses its own credentials. This requires that you\n modify your ECR repository policy to trust AWS CodeBuild's service principal.

\n
\n
SERVICE_ROLE
\n
\n

Specifies that AWS CodeBuild uses your build project's service role.

\n
\n
\n

When using a cross-account or private registry image, you must use\n SERVICE_ROLE credentials. When using an AWS CodeBuild curated image,\n you must use CODEBUILD credentials.

" + "smithy.api#documentation": "

The type of credentials CodeBuild uses to pull images in your batch build. There are two valid\n values:

\n
\n
CODEBUILD
\n
\n

Specifies that CodeBuild uses its own credentials. This requires that you\n modify your ECR repository policy to trust CodeBuild's service principal.

\n
\n
SERVICE_ROLE
\n
\n

Specifies that CodeBuild uses your build project's service role.

\n
\n
\n

When using a cross-account or private registry image, you must use\n SERVICE_ROLE credentials. When using an CodeBuild curated image,\n you must use CODEBUILD credentials.

" } }, "buildBatchConfigOverride": { @@ -5667,7 +5701,7 @@ "projectName": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The name of the AWS CodeBuild build project to start running a build.

", + "smithy.api#documentation": "

The name of the CodeBuild build project to start running a build.

", "smithy.api#required": {} } }, @@ -5686,7 +5720,7 @@ "sourceVersion": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The version of the build input to be built, for this build only. If not specified,\n the latest version is used. If specified, the contents depends on the source\n provider:

\n
\n
AWS CodeCommit
\n
\n

The commit ID, branch, or Git tag to use.

\n
\n
GitHub
\n
\n

The commit ID, pull request ID, branch name, or tag name that corresponds\n to the version of the source code you want to build. If a pull request ID is\n specified, it must use the format pr/pull-request-ID (for\n example pr/25). If a branch name is specified, the branch's\n HEAD commit ID is used. If not specified, the default branch's HEAD commit\n ID is used.

\n
\n
Bitbucket
\n
\n

The commit ID, branch name, or tag name that corresponds to the version of\n the source code you want to build. If a branch name is specified, the\n branch's HEAD commit ID is used. If not specified, the default branch's HEAD\n commit ID is used.

\n
\n
Amazon S3
\n
\n

The version ID of the object that represents the build input ZIP file to\n use.

\n
\n
\n

If sourceVersion is specified at the project level, then this\n sourceVersion (at the build level) takes precedence.

\n

For more information, see Source Version Sample\n with CodeBuild in the AWS CodeBuild User Guide.

" + "smithy.api#documentation": "

The version of the build input to be built, for this build only. If not specified,\n the latest version is used. If specified, the contents depends on the source\n provider:

\n
\n
CodeCommit
\n
\n

The commit ID, branch, or Git tag to use.

\n
\n
GitHub
\n
\n

The commit ID, pull request ID, branch name, or tag name that corresponds\n to the version of the source code you want to build. If a pull request ID is\n specified, it must use the format pr/pull-request-ID (for\n example pr/25). If a branch name is specified, the branch's\n HEAD commit ID is used. If not specified, the default branch's HEAD commit\n ID is used.

\n
\n
Bitbucket
\n
\n

The commit ID, branch name, or tag name that corresponds to the version of\n the source code you want to build. If a branch name is specified, the\n branch's HEAD commit ID is used. If not specified, the default branch's HEAD\n commit ID is used.

\n
\n
Amazon S3
\n
\n

The version ID of the object that represents the build input ZIP file to\n use.

\n
\n
\n

If sourceVersion is specified at the project level, then this\n sourceVersion (at the build level) takes precedence.

\n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide.

" } }, "artifactsOverride": { @@ -5734,13 +5768,13 @@ "gitSubmodulesConfigOverride": { "target": "com.amazonaws.codebuild#GitSubmodulesConfig", "traits": { - "smithy.api#documentation": "

Information about the Git submodules configuration for this build of an AWS CodeBuild build\n project.

" + "smithy.api#documentation": "

Information about the Git submodules configuration for this build of an CodeBuild build\n project.

" } }, "buildspecOverride": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

A buildspec file declaration that overrides, for this build only, the latest one\n already defined in the build project.

\n

If this value is set, it can be either an inline buildspec definition, the path to an\n alternate buildspec file relative to the value of the built-in\n CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket.\n The bucket must be in the same AWS Region as the build project. Specify the buildspec\n file using its ARN (for example,\n arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not\n provided or is set to an empty string, the source code must contain a buildspec file in\n its root directory. For more information, see Buildspec File Name and Storage Location.

" + "smithy.api#documentation": "

A buildspec file declaration that overrides, for this build only, the latest one\n already defined in the build project.

\n

If this value is set, it can be either an inline buildspec definition, the path to an\n alternate buildspec file relative to the value of the built-in\n CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket.\n The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec\n file using its ARN (for example,\n arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not\n provided or is set to an empty string, the source code must contain a buildspec file in\n its root directory. For more information, see Buildspec File Name and Storage Location.

" } }, "insecureSslOverride": { @@ -5752,7 +5786,7 @@ "reportBuildStatusOverride": { "target": "com.amazonaws.codebuild#WrapperBoolean", "traits": { - "smithy.api#documentation": "

Set to true to report to your source provider the status of a build's start and\n completion. If you use this option with a source provider other than GitHub, GitHub\n Enterprise, or Bitbucket, an invalidInputException is thrown.

\n

To be able to report the build status to the source provider, the user associated with the source provider must\nhave write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see Source provider access in the AWS CodeBuild User Guide.

\n \n

The status of a build triggered by a webhook is always reported to your source\n provider.

\n
" + "smithy.api#documentation": "

Set to true to report to your source provider the status of a build's start and\n completion. If you use this option with a source provider other than GitHub, GitHub\n Enterprise, or Bitbucket, an invalidInputException is thrown.

\n

To be able to report the build status to the source provider, the user associated with the source provider must\nhave write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see Source provider access in the CodeBuild User Guide.

\n \n

The status of a build triggered by a webhook is always reported to your source\n provider.

\n
" } }, "buildStatusConfigOverride": { @@ -5818,13 +5852,13 @@ "encryptionKeyOverride": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The AWS Key Management Service (AWS KMS) customer master key (CMK) that overrides the one specified in the build\n project. The CMK key encrypts the build output artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" + "smithy.api#documentation": "

The Key Management Service customer master key (CMK) that overrides the one specified in the build\n project. The CMK key encrypts the build output artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" } }, "idempotencyToken": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

A unique, case sensitive identifier you provide to ensure the idempotency of the\n StartBuild request. The token is included in the StartBuild request and is valid for 5\n minutes. If you repeat the StartBuild request with the same token, but change a\n parameter, AWS CodeBuild returns a parameter mismatch error.

" + "smithy.api#documentation": "

A unique, case sensitive identifier you provide to ensure the idempotency of the\n StartBuild request. The token is included in the StartBuild request and is valid for 5\n minutes. If you repeat the StartBuild request with the same token, but change a\n parameter, CodeBuild returns a parameter mismatch error.

" } }, "logsConfigOverride": { @@ -5842,7 +5876,7 @@ "imagePullCredentialsTypeOverride": { "target": "com.amazonaws.codebuild#ImagePullCredentialsType", "traits": { - "smithy.api#documentation": "

The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid\n values:

\n
\n
CODEBUILD
\n
\n

Specifies that AWS CodeBuild uses its own credentials. This requires that you\n modify your ECR repository policy to trust AWS CodeBuild's service principal.

\n
\n
SERVICE_ROLE
\n
\n

Specifies that AWS CodeBuild uses your build project's service role.

\n
\n
\n

When using a cross-account or private registry image, you must use\n SERVICE_ROLE credentials. When using an AWS CodeBuild curated image,\n you must use CODEBUILD credentials.

" + "smithy.api#documentation": "

The type of credentials CodeBuild uses to pull images in your build. There are two valid\n values:

\n
\n
CODEBUILD
\n
\n

Specifies that CodeBuild uses its own credentials. This requires that you\n modify your ECR repository policy to trust CodeBuild's service principal.

\n
\n
SERVICE_ROLE
\n
\n

Specifies that CodeBuild uses your build project's service role.

\n
\n
\n

When using a cross-account or private registry image, you must use\n SERVICE_ROLE credentials. When using an CodeBuild curated image,\n you must use CODEBUILD credentials.

" } }, "debugSessionEnabled": { @@ -6010,7 +6044,7 @@ } }, "traits": { - "smithy.api#documentation": "

A tag, consisting of a key and a value.

\n

This tag is available for use by AWS services that support tags in AWS CodeBuild.

" + "smithy.api#documentation": "

A tag, consisting of a key and a value.

\n

This tag is available for use by Amazon Web Services services that support tags in CodeBuild.

" } }, "com.amazonaws.codebuild#TagList": { @@ -6200,7 +6234,7 @@ "sourceVersion": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

A version of the build input to be built for this project. If not specified, the\n latest version is used. If specified, it must be one of:

\n \n

If sourceVersion is specified at the build level, then that version\n takes precedence over this sourceVersion (at the project level).

\n

For more information, see Source Version Sample\n with CodeBuild in the AWS CodeBuild User Guide. \n

" + "smithy.api#documentation": "

A version of the build input to be built for this project. If not specified, the\n latest version is used. If specified, it must be one of:

\n \n

If sourceVersion is specified at the build level, then that version\n takes precedence over this sourceVersion (at the project level).

\n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide. \n

" } }, "secondarySourceVersions": { @@ -6236,13 +6270,13 @@ "serviceRole": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The replacement ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent\n AWS services on behalf of the AWS account.

" + "smithy.api#documentation": "

The replacement ARN of the IAM role that enables CodeBuild to interact with dependent\n Amazon Web Services services on behalf of the Amazon Web Services account.

" } }, "timeoutInMinutes": { "target": "com.amazonaws.codebuild#TimeOut", "traits": { - "smithy.api#documentation": "

The replacement value in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before\n timing out any related build that did not get marked as completed.

" + "smithy.api#documentation": "

The replacement value in minutes, from 5 to 480 (8 hours), for CodeBuild to wait before\n timing out any related build that did not get marked as completed.

" } }, "queuedTimeoutInMinutes": { @@ -6254,19 +6288,19 @@ "encryptionKey": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).\n

" + "smithy.api#documentation": "

The Key Management Service customer master key (CMK) to be used for encrypting the build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).\n

" } }, "tags": { "target": "com.amazonaws.codebuild#TagList", "traits": { - "smithy.api#documentation": "

An updated list of tag key and value pairs associated with this build project.

\n

These tags are available for use by AWS services that support AWS CodeBuild build project\n tags.

" + "smithy.api#documentation": "

An updated list of tag key and value pairs associated with this build project.

\n

These tags are available for use by Amazon Web Services services that support CodeBuild build project\n tags.

" } }, "vpcConfig": { "target": "com.amazonaws.codebuild#VpcConfig", "traits": { - "smithy.api#documentation": "

VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC.

" + "smithy.api#documentation": "

VpcConfig enables CodeBuild to access resources in an Amazon VPC.

" } }, "badgeEnabled": { @@ -6278,7 +6312,7 @@ "logsConfig": { "target": "com.amazonaws.codebuild#LogsConfig", "traits": { - "smithy.api#documentation": "

Information about logs for the build project. A project can create logs in Amazon CloudWatch Logs,\n logs in an S3 bucket, or both.

" + "smithy.api#documentation": "

Information about logs for the build project. A project can create logs in CloudWatch Logs,\n logs in an S3 bucket, or both.

" } }, "fileSystemLocations": { @@ -6309,6 +6343,70 @@ } } }, + "com.amazonaws.codebuild#UpdateProjectVisibility": { + "type": "operation", + "input": { + "target": "com.amazonaws.codebuild#UpdateProjectVisibilityInput" + }, + "output": { + "target": "com.amazonaws.codebuild#UpdateProjectVisibilityOutput" + }, + "errors": [ + { + "target": "com.amazonaws.codebuild#InvalidInputException" + }, + { + "target": "com.amazonaws.codebuild#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Changes the public visibility for a project. The project's build results, logs, and\n artifacts are available to the general public. For more information, see Public build\n projects in the CodeBuild User Guide.

\n \n

The following should be kept in mind when making your projects public:

\n
    \n
  • \n

    All of a project's build results, logs, and artifacts, including builds that were run\n when the project was private, are available to the general public.

    \n
  • \n
  • \n

    All build logs and artifacts are available to the public. Environment variables, source\n code, and other sensitive information may have been output to the build logs and artifacts.\n You must be careful about what information is output to the build logs. Some best practice\n are:

    \n
      \n
    • \n

      Do not store sensitive values, especially Amazon Web Services access key IDs and secret access\n keys, in environment variables. We recommend that you use an Amazon EC2 Systems Manager Parameter Store\n or Secrets Manager to store sensitive values.

      \n
    • \n
    • \n

      Follow Best\n practices for using webhooks in the CodeBuild User\n Guide to limit which entities can trigger a build, and do\n not store the buildspec in the project itself, to ensure that your webhooks are as\n secure as possible.

      \n
    • \n
    \n
  • \n
  • \n

    A malicious user can use public builds to distribute malicious artifacts. We recommend\n that you review all pull requests to verify that the pull request is a legitimate change. We\n also recommend that you validate any artifacts with their checksums to make sure that the\n correct artifacts are being downloaded.

    \n
  • \n
\n
" + } + }, + "com.amazonaws.codebuild#UpdateProjectVisibilityInput": { + "type": "structure", + "members": { + "projectArn": { + "target": "com.amazonaws.codebuild#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the build project.

", + "smithy.api#required": {} + } + }, + "projectVisibility": { + "target": "com.amazonaws.codebuild#ProjectVisibilityType", + "traits": { + "smithy.api#required": {} + } + }, + "resourceAccessRole": { + "target": "com.amazonaws.codebuild#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for\n the project's builds.

" + } + } + } + }, + "com.amazonaws.codebuild#UpdateProjectVisibilityOutput": { + "type": "structure", + "members": { + "projectArn": { + "target": "com.amazonaws.codebuild#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the build project.

" + } + }, + "publicProjectAlias": { + "target": "com.amazonaws.codebuild#NonEmptyString", + "traits": { + "smithy.api#documentation": "

Contains the project identifier used with the public build APIs.

" + } + }, + "projectVisibility": { + "target": "com.amazonaws.codebuild#ProjectVisibilityType" + } + } + }, "com.amazonaws.codebuild#UpdateReportGroup": { "type": "operation", "input": { @@ -6348,7 +6446,7 @@ "tags": { "target": "com.amazonaws.codebuild#TagList", "traits": { - "smithy.api#documentation": "

\n An updated list of tag key and value pairs associated with this report group.\n

\n

These tags are available for use by AWS services that support AWS CodeBuild report group\n tags.

" + "smithy.api#documentation": "

\n An updated list of tag key and value pairs associated with this report group.\n

\n

These tags are available for use by Amazon Web Services services that support CodeBuild report group\n tags.

" } } } @@ -6384,7 +6482,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the webhook associated with an AWS CodeBuild build project.

\n \n

If you use Bitbucket for your repository, rotateSecret is ignored.\n

\n
" + "smithy.api#documentation": "

Updates the webhook associated with an CodeBuild build project.

\n \n

If you use Bitbucket for your repository, rotateSecret is ignored.\n

\n
" } }, "com.amazonaws.codebuild#UpdateWebhookInput": { @@ -6393,7 +6491,7 @@ "projectName": { "target": "com.amazonaws.codebuild#ProjectName", "traits": { - "smithy.api#documentation": "

The name of the AWS CodeBuild project.

", + "smithy.api#documentation": "

The name of the CodeBuild project.

", "smithy.api#required": {} } }, @@ -6429,7 +6527,7 @@ "webhook": { "target": "com.amazonaws.codebuild#Webhook", "traits": { - "smithy.api#documentation": "

Information about a repository's webhook that is associated with a project in AWS CodeBuild.\n

" + "smithy.api#documentation": "

Information about a repository's webhook that is associated with a project in CodeBuild.\n

" } } } @@ -6467,7 +6565,7 @@ } }, "traits": { - "smithy.api#documentation": "

Information about the VPC configuration that AWS CodeBuild accesses.

" + "smithy.api#documentation": "

Information about the VPC configuration that CodeBuild accesses.

" } }, "com.amazonaws.codebuild#Webhook": { @@ -6482,7 +6580,7 @@ "payloadUrl": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The AWS CodeBuild endpoint where webhook events are sent.

" + "smithy.api#documentation": "

The CodeBuild endpoint where webhook events are sent.

" } }, "secret": { @@ -6517,7 +6615,7 @@ } }, "traits": { - "smithy.api#documentation": "

Information about a webhook that connects repository events to a build project in\n AWS CodeBuild.

" + "smithy.api#documentation": "

Information about a webhook that connects repository events to a build project in\n CodeBuild.

" } }, "com.amazonaws.codebuild#WebhookBuildType": { diff --git a/codegen/sdk-codegen/aws-models/connect.2017-08-08.json b/codegen/sdk-codegen/aws-models/connect.2017-08-08.json index ac0199f7a29..1730e2c0df1 100644 --- a/codegen/sdk-codegen/aws-models/connect.2017-08-08.json +++ b/codegen/sdk-codegen/aws-models/connect.2017-08-08.json @@ -58,6 +58,177 @@ } } }, + "com.amazonaws.connect#AgentStatus": { + "type": "structure", + "members": { + "AgentStatusARN": { + "target": "com.amazonaws.connect#ARN", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the agent status.

" + } + }, + "AgentStatusId": { + "target": "com.amazonaws.connect#AgentStatusId", + "traits": { + "smithy.api#documentation": "

The identifier of the agent status.

" + } + }, + "Name": { + "target": "com.amazonaws.connect#AgentStatusName", + "traits": { + "smithy.api#documentation": "

The name of the agent status.

" + } + }, + "Description": { + "target": "com.amazonaws.connect#AgentStatusDescription", + "traits": { + "smithy.api#documentation": "

The description of the agent status.

" + } + }, + "Type": { + "target": "com.amazonaws.connect#AgentStatusType", + "traits": { + "smithy.api#documentation": "

The type of agent status.

" + } + }, + "DisplayOrder": { + "target": "com.amazonaws.connect#AgentStatusOrderNumber", + "traits": { + "smithy.api#documentation": "

The display order of the agent status.

" + } + }, + "State": { + "target": "com.amazonaws.connect#AgentStatusState", + "traits": { + "smithy.api#documentation": "

The state of the agent status.

" + } + }, + "Tags": { + "target": "com.amazonaws.connect#TagMap", + "traits": { + "smithy.api#documentation": "

One or more tags.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains information about an agent status.

" + } + }, + "com.amazonaws.connect#AgentStatusDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 250 + } + } + }, + "com.amazonaws.connect#AgentStatusId": { + "type": "string" + }, + "com.amazonaws.connect#AgentStatusName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 127 + } + } + }, + "com.amazonaws.connect#AgentStatusOrderNumber": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.connect#AgentStatusState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ENABLED", + "name": "ENABLED" + }, + { + "value": "DISABLED", + "name": "DISABLED" + } + ] + } + }, + "com.amazonaws.connect#AgentStatusSummary": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.connect#AgentStatusId", + "traits": { + "smithy.api#documentation": "

The identifier for an agent status.

" + } + }, + "Arn": { + "target": "com.amazonaws.connect#ARN", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the agent status.

" + } + }, + "Name": { + "target": "com.amazonaws.connect#AgentStatusName", + "traits": { + "smithy.api#documentation": "

The name of the agent status.

" + } + }, + "Type": { + "target": "com.amazonaws.connect#AgentStatusType", + "traits": { + "smithy.api#documentation": "

The type of the agent status.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary information for an agent status.

" + } + }, + "com.amazonaws.connect#AgentStatusSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.connect#AgentStatusSummary" + } + }, + "com.amazonaws.connect#AgentStatusType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ROUTABLE", + "name": "ROUTABLE" + }, + { + "value": "CUSTOM", + "name": "CUSTOM" + }, + { + "value": "OFFLINE", + "name": "OFFLINE" + } + ] + } + }, + "com.amazonaws.connect#AgentStatusTypes": { + "type": "list", + "member": { + "target": "com.amazonaws.connect#AgentStatusType" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 3 + } + } + }, "com.amazonaws.connect#AgentUsername": { "type": "string", "traits": { @@ -104,9 +275,15 @@ { "target": "com.amazonaws.connect#AssociateSecurityKey" }, + { + "target": "com.amazonaws.connect#CreateAgentStatus" + }, { "target": "com.amazonaws.connect#CreateContactFlow" }, + { + "target": "com.amazonaws.connect#CreateHoursOfOperation" + }, { "target": "com.amazonaws.connect#CreateInstance" }, @@ -131,6 +308,9 @@ { "target": "com.amazonaws.connect#CreateUserHierarchyGroup" }, + { + "target": "com.amazonaws.connect#DeleteHoursOfOperation" + }, { "target": "com.amazonaws.connect#DeleteInstance" }, @@ -149,6 +329,9 @@ { "target": "com.amazonaws.connect#DeleteUserHierarchyGroup" }, + { + "target": "com.amazonaws.connect#DescribeAgentStatus" + }, { "target": "com.amazonaws.connect#DescribeContactFlow" }, @@ -218,6 +401,9 @@ { "target": "com.amazonaws.connect#GetMetricData" }, + { + "target": "com.amazonaws.connect#ListAgentStatuses" + }, { "target": "com.amazonaws.connect#ListApprovedOrigins" }, @@ -317,6 +503,9 @@ { "target": "com.amazonaws.connect#UntagResource" }, + { + "target": "com.amazonaws.connect#UpdateAgentStatus" + }, { "target": "com.amazonaws.connect#UpdateContactAttributes" }, @@ -326,6 +515,9 @@ { "target": "com.amazonaws.connect#UpdateContactFlowName" }, + { + "target": "com.amazonaws.connect#UpdateHoursOfOperation" + }, { "target": "com.amazonaws.connect#UpdateInstanceAttribute" }, @@ -965,6 +1157,9 @@ "com.amazonaws.connect#AutoAccept": { "type": "boolean" }, + "com.amazonaws.connect#Boolean": { + "type": "boolean" + }, "com.amazonaws.connect#BotName": { "type": "string", "traits": { @@ -1063,15 +1258,6 @@ } } }, - "com.amazonaws.connect#CommonDescriptionLength250": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 250 - } - } - }, "com.amazonaws.connect#CommonNameLength127": { "type": "string", "traits": { @@ -1318,6 +1504,109 @@ "target": "com.amazonaws.connect#Reference" } }, + "com.amazonaws.connect#CreateAgentStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#CreateAgentStatusRequest" + }, + "output": { + "target": "com.amazonaws.connect#CreateAgentStatusResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#DuplicateResourceException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#LimitExceededException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Creates an agent status for the specified Amazon Connect instance.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/agent-status/{InstanceId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#CreateAgentStatusRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.connect#AgentStatusName", + "traits": { + "smithy.api#documentation": "

The name of the status.

", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.connect#AgentStatusDescription", + "traits": { + "smithy.api#documentation": "

The description of the status.

" + } + }, + "State": { + "target": "com.amazonaws.connect#AgentStatusState", + "traits": { + "smithy.api#documentation": "

The state of the status.

", + "smithy.api#required": {} + } + }, + "DisplayOrder": { + "target": "com.amazonaws.connect#AgentStatusOrderNumber", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

The display order of the status.

" + } + }, + "Tags": { + "target": "com.amazonaws.connect#TagMap", + "traits": { + "smithy.api#documentation": "

One or more tags.

" + } + } + } + }, + "com.amazonaws.connect#CreateAgentStatusResponse": { + "type": "structure", + "members": { + "AgentStatusARN": { + "target": "com.amazonaws.connect#ARN", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the agent status.

" + } + }, + "AgentStatusId": { + "target": "com.amazonaws.connect#AgentStatusId", + "traits": { + "smithy.api#documentation": "

The identifier of the agent status.

" + } + } + } + }, "com.amazonaws.connect#CreateContactFlow": { "type": "operation", "input": { @@ -1424,6 +1713,109 @@ } } }, + "com.amazonaws.connect#CreateHoursOfOperation": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#CreateHoursOfOperationRequest" + }, + "output": { + "target": "com.amazonaws.connect#CreateHoursOfOperationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#DuplicateResourceException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#LimitExceededException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Creates hours of operation.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/hours-of-operations/{InstanceId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#CreateHoursOfOperationRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.connect#CommonNameLength127", + "traits": { + "smithy.api#documentation": "

The name of the hours of operation.

", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.connect#HoursOfOperationDescription", + "traits": { + "smithy.api#documentation": "

The description of the hours of operation.

" + } + }, + "TimeZone": { + "target": "com.amazonaws.connect#TimeZone", + "traits": { + "smithy.api#documentation": "

The time zone of the hours of operation.

", + "smithy.api#required": {} + } + }, + "Config": { + "target": "com.amazonaws.connect#HoursOfOperationConfigList", + "traits": { + "smithy.api#documentation": "

Configuration information for the hours of operation: day, start time, and end time.

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.connect#TagMap", + "traits": { + "smithy.api#documentation": "

One or more tags.

" + } + } + } + }, + "com.amazonaws.connect#CreateHoursOfOperationResponse": { + "type": "structure", + "members": { + "HoursOfOperationId": { + "target": "com.amazonaws.connect#HoursOfOperationId", + "traits": { + "smithy.api#documentation": "

The identifier for the hours of operation.

" + } + }, + "HoursOfOperationArn": { + "target": "com.amazonaws.connect#ARN", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the hours of operation.

" + } + } + } + }, "com.amazonaws.connect#CreateInstance": { "type": "operation", "input": { @@ -2421,6 +2813,58 @@ } } }, + "com.amazonaws.connect#DeleteHoursOfOperation": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#DeleteHoursOfOperationRequest" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Deletes an hours of operation.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/hours-of-operations/{InstanceId}/{HoursOfOperationId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#DeleteHoursOfOperationRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "HoursOfOperationId": { + "target": "com.amazonaws.connect#HoursOfOperationId", + "traits": { + "smithy.api#documentation": "

The identifier for the hours of operation.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.connect#DeleteInstance": { "type": "operation", "input": { @@ -2717,9 +3161,75 @@ "UserId": { "target": "com.amazonaws.connect#UserId", "traits": { - "smithy.api#documentation": "

The identifier of the user.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The identifier of the user.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.connect#DescribeAgentStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#DescribeAgentStatusRequest" + }, + "output": { + "target": "com.amazonaws.connect#DescribeAgentStatusResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Describes an agent status.

", + "smithy.api#http": { + "method": "GET", + "uri": "/agent-status/{InstanceId}/{AgentStatusId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#DescribeAgentStatusRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AgentStatusId": { + "target": "com.amazonaws.connect#AgentStatusId", + "traits": { + "smithy.api#documentation": "

The identifier for the agent status.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.connect#DescribeAgentStatusResponse": { + "type": "structure", + "members": { + "AgentStatus": { + "target": "com.amazonaws.connect#AgentStatus", + "traits": { + "smithy.api#documentation": "

The agent status.

" } } } @@ -4916,7 +5426,7 @@ } }, "Description": { - "target": "com.amazonaws.connect#CommonDescriptionLength250", + "target": "com.amazonaws.connect#HoursOfOperationDescription", "traits": { "smithy.api#documentation": "

The description for the hours of operation.

" } @@ -4950,19 +5460,22 @@ "Day": { "target": "com.amazonaws.connect#HoursOfOperationDays", "traits": { - "smithy.api#documentation": "

The day that the hours of operation applies to.

" + "smithy.api#documentation": "

The day that the hours of operation applies to.

", + "smithy.api#required": {} } }, "StartTime": { "target": "com.amazonaws.connect#HoursOfOperationTimeSlice", "traits": { - "smithy.api#documentation": "

The start time that your contact center is open.

" + "smithy.api#documentation": "

The start time that your contact center is open.

", + "smithy.api#required": {} } }, "EndTime": { "target": "com.amazonaws.connect#HoursOfOperationTimeSlice", "traits": { - "smithy.api#documentation": "

The end time that your contact center is closes.

" + "smithy.api#documentation": "

The end time that your contact center is closes.

", + "smithy.api#required": {} } } }, @@ -4974,6 +5487,12 @@ "type": "list", "member": { "target": "com.amazonaws.connect#HoursOfOperationConfig" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } } }, "com.amazonaws.connect#HoursOfOperationDays": { @@ -5011,6 +5530,15 @@ ] } }, + "com.amazonaws.connect#HoursOfOperationDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 250 + } + } + }, "com.amazonaws.connect#HoursOfOperationId": { "type": "string" }, @@ -5055,13 +5583,17 @@ "Hours": { "target": "com.amazonaws.connect#Hours24Format", "traits": { - "smithy.api#documentation": "

The hours.

" + "smithy.api#box": {}, + "smithy.api#documentation": "

The hours.

", + "smithy.api#required": {} } }, "Minutes": { "target": "com.amazonaws.connect#MinutesLimit60", "traits": { - "smithy.api#documentation": "

The minutes.

" + "smithy.api#box": {}, + "smithy.api#documentation": "

The minutes.

", + "smithy.api#required": {} } } }, @@ -5700,6 +6232,98 @@ "smithy.api#httpError": 429 } }, + "com.amazonaws.connect#ListAgentStatusRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.connect#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.connect#MaxResult1000", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

The maximum number of results to return per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "AgentStatusTypes": { + "target": "com.amazonaws.connect#AgentStatusTypes", + "traits": { + "smithy.api#documentation": "

Available agent status types.

", + "smithy.api#httpQuery": "AgentStatusTypes" + } + } + } + }, + "com.amazonaws.connect#ListAgentStatusResponse": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.connect#NextToken", + "traits": { + "smithy.api#documentation": "

If there are additional results, this is the token for the next set of results.

" + } + }, + "AgentStatusSummaryList": { + "target": "com.amazonaws.connect#AgentStatusSummaryList", + "traits": { + "smithy.api#documentation": "

A summary of agent statuses.

" + } + } + } + }, + "com.amazonaws.connect#ListAgentStatuses": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#ListAgentStatusRequest" + }, + "output": { + "target": "com.amazonaws.connect#ListAgentStatusResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Lists agent statuses.

", + "smithy.api#http": { + "method": "GET", + "uri": "/agent-status/{InstanceId}", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "AgentStatusSummaryList", + "pageSize": "MaxResults" + } + } + }, "com.amazonaws.connect#ListApprovedOrigins": { "type": "operation", "input": { @@ -10731,7 +11355,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds the specified tags to the specified resource.

\n

The supported resource types are users, routing profiles, queues, quick connects, and\n contact flows.

\n

For sample policies that use tags, see Amazon Connect Identity-Based\n Policy Examples in the Amazon Connect Administrator Guide.

", + "smithy.api#documentation": "

Adds the specified tags to the specified resource.

\n

The supported resource types are users, routing profiles, queues, quick connects, \n contact flows, agent status, and hours of operation.

\n

For sample policies that use tags, see Amazon Connect Identity-Based\n Policy Examples in the Amazon Connect Administrator Guide.

", "smithy.api#http": { "method": "POST", "uri": "/tags/{resourceArn}", @@ -10898,6 +11522,104 @@ } } }, + "com.amazonaws.connect#UpdateAgentStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#UpdateAgentStatusRequest" + }, + "errors": [ + { + "target": "com.amazonaws.connect#DuplicateResourceException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#LimitExceededException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Updates agent status.

", + "smithy.api#http": { + "method": "POST", + "uri": "/agent-status/{InstanceId}/{AgentStatusId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#UpdateAgentStatusDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 250 + } + } + }, + "com.amazonaws.connect#UpdateAgentStatusRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AgentStatusId": { + "target": "com.amazonaws.connect#AgentStatusId", + "traits": { + "smithy.api#documentation": "

The identifier of the agent status.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.connect#AgentStatusName", + "traits": { + "smithy.api#documentation": "

The name of the agent status.

" + } + }, + "Description": { + "target": "com.amazonaws.connect#UpdateAgentStatusDescription", + "traits": { + "smithy.api#documentation": "

The description of the agent status.

" + } + }, + "State": { + "target": "com.amazonaws.connect#AgentStatusState", + "traits": { + "smithy.api#documentation": "

The state of the agent status.

" + } + }, + "DisplayOrder": { + "target": "com.amazonaws.connect#AgentStatusOrderNumber", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

The display order of the agent status.

" + } + }, + "ResetOrderNumber": { + "target": "com.amazonaws.connect#Boolean", + "traits": { + "smithy.api#documentation": "

A number indicating the reset order of the agent status.

" + } + } + } + }, "com.amazonaws.connect#UpdateContactAttributes": { "type": "operation", "input": { @@ -11088,6 +11810,94 @@ } } }, + "com.amazonaws.connect#UpdateHoursOfOperation": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#UpdateHoursOfOperationRequest" + }, + "errors": [ + { + "target": "com.amazonaws.connect#DuplicateResourceException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Updates the hours of operation.

", + "smithy.api#http": { + "method": "POST", + "uri": "/hours-of-operations/{InstanceId}/{HoursOfOperationId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#UpdateHoursOfOperationDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 250 + } + } + }, + "com.amazonaws.connect#UpdateHoursOfOperationRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "HoursOfOperationId": { + "target": "com.amazonaws.connect#HoursOfOperationId", + "traits": { + "smithy.api#documentation": "

The identifier of the hours of operation.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.connect#CommonNameLength127", + "traits": { + "smithy.api#documentation": "

The name of the hours of operation.

" + } + }, + "Description": { + "target": "com.amazonaws.connect#UpdateHoursOfOperationDescription", + "traits": { + "smithy.api#documentation": "

The description of the hours of operation.

" + } + }, + "TimeZone": { + "target": "com.amazonaws.connect#TimeZone", + "traits": { + "smithy.api#documentation": "

The time zone of the hours of operation.

" + } + }, + "Config": { + "target": "com.amazonaws.connect#HoursOfOperationConfigList", + "traits": { + "smithy.api#documentation": "

Configuration information of the hours of operation.

" + } + } + } + }, "com.amazonaws.connect#UpdateInstanceAttribute": { "type": "operation", "input": { diff --git a/codegen/sdk-codegen/aws-models/ebs.2019-11-02.json b/codegen/sdk-codegen/aws-models/ebs.2019-11-02.json index d1c93bbc9f7..83b661268ec 100644 --- a/codegen/sdk-codegen/aws-models/ebs.2019-11-02.json +++ b/codegen/sdk-codegen/aws-models/ebs.2019-11-02.json @@ -382,7 +382,7 @@ "name": "ebs" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

You can use the Amazon Elastic Block Store (Amazon EBS) direct APIs to create EBS snapshots, write data directly to \n \t\tyour snapshots, read data on your snapshots, and identify the differences or changes between \n \t\ttwo snapshots. If you’re an independent software vendor (ISV) who offers backup services for \n \t\tAmazon EBS, the EBS direct APIs make it more efficient and cost-effective to track incremental changes on \n \t\tyour EBS volumes through snapshots. This can be done without having to create new volumes \n \t\tfrom snapshots, and then use Amazon Elastic Compute Cloud (Amazon EC2) instances to compare the differences.

\n \t\t\n \t

You can create incremental snapshots directly from data on-premises into EBS volumes and the \n \t\tcloud to use for quick disaster recovery. With the ability to write and read snapshots, you can \n \t\twrite your on-premises data to an EBS snapshot during a disaster. Then after recovery, you can \n \t\trestore it back to AWS or on-premises from the snapshot. You no longer need to build and \n \t\tmaintain complex mechanisms to copy data to and from Amazon EBS.

\n\n\n

This API reference provides detailed information about the actions, data types,\n parameters, and errors of the EBS direct APIs. For more information about the elements that\n make up the EBS direct APIs, and examples of how to use them effectively, see Accessing the Contents of an EBS Snapshot in the Amazon Elastic Compute Cloud User\n Guide. For more information about the supported AWS Regions, endpoints,\n and service quotas for the EBS direct APIs, see Amazon Elastic Block Store Endpoints and Quotas in\n the AWS General Reference.

", + "smithy.api#documentation": "

You can use the Amazon Elastic Block Store (Amazon EBS) direct APIs to create Amazon EBS snapshots, write data directly to \n \t\tyour snapshots, read data on your snapshots, and identify the differences or changes between \n \t\ttwo snapshots. If you’re an independent software vendor (ISV) who offers backup services for \n \t\tAmazon EBS, the EBS direct APIs make it more efficient and cost-effective to track incremental changes on \n \t\tyour Amazon EBS volumes through snapshots. This can be done without having to create new volumes \n \t\tfrom snapshots, and then use Amazon Elastic Compute Cloud (Amazon EC2) instances to compare the differences.

\n \t\t\n \t

You can create incremental snapshots directly from data on-premises into volumes and the \n \t\tcloud to use for quick disaster recovery. With the ability to write and read snapshots, you can \n \t\twrite your on-premises data to an snapshot during a disaster. Then after recovery, you can \n \t\trestore it back to Amazon Web Services or on-premises from the snapshot. You no longer need to build and \n \t\tmaintain complex mechanisms to copy data to and from Amazon EBS.

\n\n\n

This API reference provides detailed information about the actions, data types,\n parameters, and errors of the EBS direct APIs. For more information about the elements that\n make up the EBS direct APIs, and examples of how to use them effectively, see Accessing the Contents of an Amazon EBS Snapshot in the Amazon Elastic Compute Cloud User\n Guide. For more information about the supported Amazon Web Services Regions, endpoints,\n and service quotas for the EBS direct APIs, see Amazon Elastic Block Store Endpoints and Quotas in\n the Amazon Web Services General Reference.

", "smithy.api#title": "Amazon Elastic Block Store" } }, @@ -524,7 +524,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "arn:aws[a-z\\-]*:kms:.*:[0-9]{12}:key/.*", + "smithy.api#pattern": "^arn:aws[a-z\\-]*:kms:.*:[0-9]{12}:key/", "smithy.api#sensitive": {} } }, @@ -635,7 +635,7 @@ "BlockSize": { "target": "com.amazonaws.ebs#BlockSize", "traits": { - "smithy.api#documentation": "

The size of the block.

" + "smithy.api#documentation": "

The size of the blocks in the snapshot, in bytes.

" } }, "NextToken": { @@ -746,7 +746,7 @@ "BlockSize": { "target": "com.amazonaws.ebs#BlockSize", "traits": { - "smithy.api#documentation": "

The size of the block.

" + "smithy.api#documentation": "

The size of the blocks in the snapshot, in bytes.

" } }, "NextToken": { @@ -774,7 +774,7 @@ "min": 1, "max": 24 }, - "smithy.api#pattern": "\\S+" + "smithy.api#pattern": "^\\S+$" } }, "com.amazonaws.ebs#PageToken": { @@ -830,7 +830,7 @@ "smithy.api#auth": [ "aws.auth#sigv4" ], - "smithy.api#documentation": "

Writes a block of data to a snapshot. If the specified block contains\n data, the existing data is overwritten. The target snapshot must be in the\n pending state.

\t\n \t

Data written to a snapshot must be aligned with 512-byte sectors.

", + "smithy.api#documentation": "

Writes a block of data to a snapshot. If the specified block contains\n data, the existing data is overwritten. The target snapshot must be in the\n pending state.

\t\n \t

Data written to a snapshot must be aligned with 512-KiB sectors.

", "smithy.api#http": { "method": "PUT", "uri": "/snapshots/{SnapshotId}/blocks/{BlockIndex}", @@ -868,7 +868,7 @@ "DataLength": { "target": "com.amazonaws.ebs#DataLength", "traits": { - "smithy.api#documentation": "

The size of the data to write to the block, in bytes. Currently, the only supported\n size is 524288.

\n

Valid values: 524288\n

", + "smithy.api#documentation": "

The size of the data to write to the block, in bytes. Currently, the only supported\n size is 524288 bytes.

\n

Valid values: 524288\n

", "smithy.api#httpHeader": "x-amz-Data-Length", "smithy.api#required": {} } @@ -1099,20 +1099,20 @@ "ClientToken": { "target": "com.amazonaws.ebs#IdempotencyToken", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. Idempotency ensures that an API request completes only once. With an idempotent \n request, if the original request completes successfully. The subsequent retries with the same \n client token return the result from the original successful request and they have no additional \n effect.

\n

If you do not specify a client token, one is automatically generated by the AWS SDK.

\n

For more information, see \n \t\tIdempotency for StartSnapshot API in the Amazon Elastic Compute Cloud User Guide.

", + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. Idempotency ensures that an API request completes only once. With an idempotent \n request, if the original request completes successfully. The subsequent retries with the same \n client token return the result from the original successful request and they have no additional \n effect.

\n

If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.

\n

For more information, see \n \t\tIdempotency for StartSnapshot API in the Amazon Elastic Compute Cloud User Guide.

", "smithy.api#idempotencyToken": {} } }, "Encrypted": { "target": "com.amazonaws.ebs#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether to encrypt the snapshot. To create an encrypted snapshot, specify\n true. To create an unencrypted snapshot, omit this parameter.

\n

If you specify a value for ParentSnapshotId, omit\n this parameter.

\n

If you specify true, the snapshot is encrypted using the CMK specified\n using the KmsKeyArn parameter. If no value is specified\n for KmsKeyArn, the default CMK for your account is \n \tused. If no default CMK has been specified for your account, the AWS managed CMK is used. \n \tTo set a default CMK for your account, use \n \t\tModifyEbsDefaultKmsKeyId.

\n

If your account is enabled for encryption by default, you cannot set this parameter to\n false. In this case, you can omit this parameter.

\n\n

For more information, see \n Using encryption in the Amazon Elastic Compute Cloud User Guide.

" + "smithy.api#documentation": "

Indicates whether to encrypt the snapshot. To create an encrypted snapshot, specify\n true. To create an unencrypted snapshot, omit this parameter.

\n

If you specify a value for ParentSnapshotId, omit\n this parameter.

\n

If you specify true, the snapshot is encrypted using the KMS key specified\n using the KmsKeyArn parameter. If no value is specified\n for KmsKeyArn, the default KMS key for your account is \n used. If no default KMS key has been specified for your account, the Amazon Web Services managed KMS key is used. \n To set a default KMS key for your account, use \n \t\tModifyEbsDefaultKmsKeyId.

\n

If your account is enabled for encryption by default, you cannot set this parameter to\n false. In this case, you can omit this parameter.

\n\n

For more information, see \n Using encryption in the Amazon Elastic Compute Cloud User Guide.

" } }, "KmsKeyArn": { "target": "com.amazonaws.ebs#KmsKeyArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) \n \tcustomer master key (CMK) to be used to encrypt the snapshot. If you do not specify a \n \tCMK, the default AWS managed CMK is used.

\n

If you specify a ParentSnapshotId, omit this\n parameter; the snapshot will be encrypted using the same CMK that was used to encrypt\n the parent snapshot.

\n

If Encrypted is set to true, \n \tyou must specify a CMK ARN.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Key Management Service (KMS) \n \tkey to be used to encrypt the snapshot. If you do not specify a \n KMS key, the default Amazon Web Services managed KMS key is used.

\n

If you specify a ParentSnapshotId, omit this\n parameter; the snapshot will be encrypted using the same KMS key that was used to encrypt\n the parent snapshot.

\n

If Encrypted is set to true, \n you must specify a KMS key ARN.

" } }, "Timeout": { @@ -1141,7 +1141,7 @@ "OwnerId": { "target": "com.amazonaws.ebs#OwnerId", "traits": { - "smithy.api#documentation": "

The AWS account ID of the snapshot owner.

" + "smithy.api#documentation": "

The Amazon Web Services account ID of the snapshot owner.

" } }, "Status": { @@ -1183,7 +1183,7 @@ "KmsKeyArn": { "target": "com.amazonaws.ebs#KmsKeyArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer\n master key (CMK) used to encrypt the snapshot.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Key Management Service (KMS) key used to encrypt the snapshot.

" } } } diff --git a/codegen/sdk-codegen/aws-models/ecs.2014-11-13.json b/codegen/sdk-codegen/aws-models/ecs.2014-11-13.json index 7fd0b1b2a8d..a1a78a12238 100644 --- a/codegen/sdk-codegen/aws-models/ecs.2014-11-13.json +++ b/codegen/sdk-codegen/aws-models/ecs.2014-11-13.json @@ -603,7 +603,7 @@ } }, "traits": { - "smithy.api#documentation": "

The details of a capacity provider strategy. A capacity provider strategy can be set\n\t\t\twhen using the RunTask or CreateCluster APIs or as\n\t\t\tthe default capacity provider strategy for a cluster with the CreateCluster API.

\n\t\t

Only capacity providers that are already associated with a cluster and have an\n\t\t\t\tACTIVE or UPDATING status can be used in a capacity\n\t\t\tprovider strategy. The PutClusterCapacityProviders API is used to\n\t\t\tassociate a capacity provider with a cluster.

\n\t\t

If specifying a capacity provider that uses an Auto Scaling group, the capacity\n\t\t\tprovider must already be created. New Auto Scaling group capacity providers can be\n\t\t\tcreated with the CreateCapacityProvider API operation.

\n\t\t

To use a Fargate capacity provider, specify either the FARGATE or\n\t\t\t\tFARGATE_SPOT capacity providers. The Fargate capacity providers are\n\t\t\tavailable to all accounts and only need to be associated with a cluster to be used in a\n\t\t\tcapacity provider strategy.

" + "smithy.api#documentation": "

The details of a capacity provider strategy. A capacity provider strategy can be set\n\t\t\twhen using the RunTask or CreateCluster APIs or as\n\t\t\tthe default capacity provider strategy for a cluster with the CreateCluster API.

\n\t\t

Only capacity providers that are already associated with a cluster and have an\n\t\t\t\tACTIVE or UPDATING status can be used in a capacity\n\t\t\tprovider strategy. The PutClusterCapacityProviders API is used to\n\t\t\tassociate a capacity provider with a cluster.

\n\t\t

If specifying a capacity provider that uses an Auto Scaling group, the capacity\n\t\t\tprovider must already be created. New Auto Scaling group capacity providers can be\n\t\t\tcreated with the CreateCapacityProvider API operation.

\n\t\t

To use a Fargate capacity provider, specify either the FARGATE or\n\t\t\t\tFARGATE_SPOT capacity providers. The Fargate capacity providers are\n\t\t\tavailable to all accounts and only need to be associated with a cluster to be used in a\n\t\t\tcapacity provider strategy.

\n

A capacity provider strategy may contain a maximum of 6 capacity providers.

" } }, "com.amazonaws.ecs#CapacityProviderStrategyItemBase": { @@ -679,7 +679,7 @@ "clusterArn": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains the arn:aws:ecs namespace, followed by the Region of the cluster, the account ID of the cluster owner, the cluster namespace, and then the cluster name. For example, arn:aws:ecs:region:012345678910:cluster/test.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains the arn:aws:ecs namespace, followed by the Region of the cluster, the Amazon Web Services account ID of the cluster owner, the cluster namespace, and then the cluster name. For example, arn:aws:ecs:region:012345678910:cluster/test.

" } }, "clusterName": { @@ -1364,7 +1364,7 @@ "containerInstanceArn": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the container instance. The ARN contains the arn:aws:ecs namespace, followed by the Region of the container instance, the account ID of the container instance owner, the container-instance namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the container instance. The ARN contains the arn:aws:ecs namespace, followed by the Region of the container instance, the Amazon Web Services account ID of the container instance owner, the container-instance namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.

" } }, "ec2InstanceId": { @@ -1766,7 +1766,7 @@ "defaultCapacityProviderStrategy": { "target": "com.amazonaws.ecs#CapacityProviderStrategy", "traits": { - "smithy.api#documentation": "

The capacity provider strategy to set as the default for the cluster. When a default\n\t\t\tcapacity provider strategy is set for a cluster, when calling the RunTask or CreateService APIs wtih no capacity\n\t\t\tprovider strategy or launch type specified, the default capacity provider strategy for\n\t\t\tthe cluster is used.

\n\t\t

If a default capacity provider strategy is not defined for a cluster during creation,\n\t\t\tit can be defined later with the PutClusterCapacityProviders API\n\t\t\toperation.

" + "smithy.api#documentation": "

The capacity provider strategy to set as the default for the cluster. When a default\n\t\t\tcapacity provider strategy is set for a cluster, when calling the RunTask or CreateService APIs with no capacity\n\t\t\tprovider strategy or launch type specified, the default capacity provider strategy for\n\t\t\tthe cluster is used.

\n\t\t

If a default capacity provider strategy is not defined for a cluster during creation,\n\t\t\tit can be defined later with the PutClusterCapacityProviders API\n\t\t\toperation.

" } } } @@ -1875,7 +1875,7 @@ "capacityProviderStrategy": { "target": "com.amazonaws.ecs#CapacityProviderStrategy", "traits": { - "smithy.api#documentation": "

The capacity provider strategy to use for the service.

\n\t\t

If a capacityProviderStrategy is specified, the launchType\n\t\t\tparameter must be omitted. If no capacityProviderStrategy or\n\t\t\t\tlaunchType is specified, the\n\t\t\t\tdefaultCapacityProviderStrategy for the cluster is used.

" + "smithy.api#documentation": "

The capacity provider strategy to use for the service.

\n\t\t

If a capacityProviderStrategy is specified, the launchType\n\t\t\tparameter must be omitted. If no capacityProviderStrategy or\n\t\t\t\tlaunchType is specified, the\n\t\t\t\tdefaultCapacityProviderStrategy for the cluster is used.

\n\t\t

A capacity provider strategy may contain a maximum of 6 capacity providers.

" } }, "platformVersion": { @@ -1899,13 +1899,13 @@ "placementConstraints": { "target": "com.amazonaws.ecs#PlacementConstraints", "traits": { - "smithy.api#documentation": "

An array of placement constraint objects to use for tasks in your service. You can\n\t\t\tspecify a maximum of 10 constraints per task (this limit includes constraints in the\n\t\t\ttask definition and those specified at runtime).

" + "smithy.api#documentation": "

An array of placement constraint objects to use for tasks in your service. You can\n\t\t\tspecify a maximum of 10 constraints per task (this limit includes constraints in the\n\t\t\ttask definition and those specified at runtime).

" } }, "placementStrategy": { "target": "com.amazonaws.ecs#PlacementStrategies", "traits": { - "smithy.api#documentation": "

The placement strategy objects to use for tasks in your service. You can specify a\n\t\t\tmaximum of five strategy rules per service.

" + "smithy.api#documentation": "

The placement strategy objects to use for tasks in your service. You can specify a\n\t\t\tmaximum of 5 strategy rules per service.

" } }, "networkConfiguration": { @@ -2712,7 +2712,7 @@ "containerInstance": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The container instance ID or full ARN of the container instance to deregister.\n\t\t\tThe ARN contains the arn:aws:ecs namespace, followed by the Region of the container instance, the account ID of the container instance owner, the container-instance namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.

", + "smithy.api#documentation": "

The container instance ID or full ARN of the container instance to deregister.\n\t\t\tThe ARN contains the arn:aws:ecs namespace, followed by the Region of the container instance, the Amazon Web Services account ID of the container instance owner, the container-instance namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.

", "smithy.api#required": {} } }, @@ -2891,7 +2891,7 @@ "include": { "target": "com.amazonaws.ecs#ClusterFieldList", "traits": { - "smithy.api#documentation": "

Whether to include additional information about the clusters in the response. If this\n\t\t\tfield is omitted, this information isn't included.

\n\t\t

If ATTACHMENTS is specified, the attachments for the container instances\n\t\t\tor tasks within the cluster are included.

\n\t\t

If SETTINGS is specified, the settings for the cluster are\n\t\t\tincluded.

\n\t\t

If STATISTICS is specified, the task and service count is included,\n\t\t\tseparated by launch type.

\n\t\t

If TAGS is specified, the metadata tags associated with the cluster are\n\t\t\tincluded.

" + "smithy.api#documentation": "

Whether to include additional information about the clusters in the response. If this\n\t\t\tfield is omitted, this information isn't included.

\n\t\t

If ATTACHMENTS is specified, the attachments for the container instances\n\t\t\tor tasks within the cluster are included.

\n\t\t

If SETTINGS is specified, the settings for the cluster are\n\t\t\tincluded.

\n\t\t

If CONFIGURATIONS is specified, the configuration for the cluster is\n\t\t\tincluded.

\n\t\t

If STATISTICS is specified, the task and service count is included,\n\t\t\tseparated by launch type.

\n\t\t

If TAGS is specified, the metadata tags associated with the cluster are\n\t\t\tincluded.

" } } } @@ -3440,7 +3440,7 @@ "containerInstance": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The container instance ID or full ARN of the container instance.\n\t\t\tThe ARN contains the arn:aws:ecs namespace, followed by the Region of the container instance, the account ID of the container instance owner, the container-instance namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.

" + "smithy.api#documentation": "

The container instance ID or full ARN of the container instance.\n\t\t\tThe ARN contains the arn:aws:ecs namespace, followed by the Region of the container instance, the Amazon Web Services account ID of the container instance owner, the container-instance namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.

" } }, "cluster": { @@ -4001,7 +4001,7 @@ "command": { "target": "com.amazonaws.ecs#StringList", "traits": { - "smithy.api#documentation": "

A string array representing the command that the container runs to determine if it is\n\t\t\thealthy. The string array must start with CMD to execute the command\n\t\t\targuments directly, or CMD-SHELL to run the command with the container's\n\t\t\tdefault shell. For example:

\n\t\t

\n\t\t\t [ \"CMD-SHELL\", \"curl -f http://localhost/ || exit 1\" ]\n\t\t

\n\t\t

An exit code of 0 indicates success, and non-zero exit code indicates failure. For\n\t\t\tmore information, see HealthCheck in the Create a container\n\t\t\tsection of the Docker Remote API.

", + "smithy.api#documentation": "

A string array representing the command that the container runs to determine if it is\n\t\t\thealthy. The string array must start with CMD to execute the command\n\t\t\targuments directly, or CMD-SHELL to run the command with the container's\n\t\t\tdefault shell.

\n\t\t

When you use the Amazon Web Services Management Console JSON panel, the Command Line Interface, or the APIs, you should enclose the list of commands in brackets, as shown below.

\n\t\t

\n\t\t\t [ \"CMD-SHELL\", \"curl -f http://localhost/ || exit 1\" ]\n\t\t

\n\t\t

You do not need to include the brackets when you use the Amazon Web Services Management Consoleas shown below.

\n\t\t

\n\t\t\t \"CMD-SHELL\", \"curl -f http://localhost/ || exit 1\" \n\t\t

\n\t\t

An exit code of 0 indicates success, and non-zero exit code indicates failure. For\n\t\t\tmore information, see HealthCheck in the Create a container\n\t\t\tsection of the Docker Remote API.

", "smithy.api#required": {} } }, @@ -5517,7 +5517,7 @@ "expression": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

A cluster query language expression to apply to the constraint. You cannot specify an\n\t\t\texpression if the constraint type is distinctInstance. For more\n\t\t\tinformation, see Cluster Query Language in the\n\t\t\t\tAmazon Elastic Container Service Developer Guide.

" + "smithy.api#documentation": "

A cluster query language expression to apply to the constraint. The expression can\n\t\t\thave a maximum length of 2000 characters. You can't specify an expression if the\n\t\t\tconstraint type is distinctInstance. For more information, see Cluster query language in the\n\t\t\t\tAmazon Elastic Container Service Developer Guide.

" } } }, @@ -6402,7 +6402,7 @@ "capacityProviderStrategy": { "target": "com.amazonaws.ecs#CapacityProviderStrategy", "traits": { - "smithy.api#documentation": "

The capacity provider strategy to use for the task.

\n\t\t

If a capacityProviderStrategy is specified, the launchType\n\t\t\tparameter must be omitted. If no capacityProviderStrategy or\n\t\t\t\tlaunchType is specified, the\n\t\t\t\tdefaultCapacityProviderStrategy for the cluster is used.

\n\t\t

When you use cluster auto scaling, you must specify capacityProviderStrategy and not launchType.

" + "smithy.api#documentation": "

The capacity provider strategy to use for the task.

\n\t\t

If a capacityProviderStrategy is specified, the launchType\n\t\t\tparameter must be omitted. If no capacityProviderStrategy or\n\t\t\t\tlaunchType is specified, the\n\t\t\t\tdefaultCapacityProviderStrategy for the cluster is used.

\n\t\t

When you use cluster auto scaling, you must specify capacityProviderStrategy and not launchType.

\n\t\t

A capacity provider strategy may contain a maximum of 6 capacity providers.

" } }, "cluster": { @@ -6432,7 +6432,7 @@ "group": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The name of the task group to associate with the task. The default value is the family\n\t\t\tname of the task definition (for example, family:my-family-name).

" + "smithy.api#documentation": "

The name of the task group to associate with the task. The default value is the family\n\t\t\tname of the task definition (for example, family:my-family-name).

" } }, "launchType": { @@ -6444,13 +6444,13 @@ "networkConfiguration": { "target": "com.amazonaws.ecs#NetworkConfiguration", "traits": { - "smithy.api#documentation": "

The network configuration for the task. This parameter is required for task\n\t\t\tdefinitions that use the awsvpc network mode to receive their own elastic\n\t\t\tnetwork interface, and it is not supported for other network modes. For more\n\t\t\tinformation, see Task Networking\n\t\t\tin the Amazon Elastic Container Service Developer Guide.

" + "smithy.api#documentation": "

The network configuration for the task. This parameter is required for task\n\t\t\tdefinitions that use the awsvpc network mode to receive their own elastic\n\t\t\tnetwork interface, and it is not supported for other network modes. For more\n\t\t\tinformation, see Task networking\n\t\t\tin the Amazon Elastic Container Service Developer Guide.

" } }, "overrides": { "target": "com.amazonaws.ecs#TaskOverride", "traits": { - "smithy.api#documentation": "

A list of container overrides in JSON format that specify the name of a container in\n\t\t\tthe specified task definition and the overrides it should receive. You can override the\n\t\t\tdefault command for a container (that is specified in the task definition or Docker\n\t\t\timage) with a command override. You can also override existing environment\n\t\t\tvariables (that are specified in the task definition or Docker image) on a container or\n\t\t\tadd new environment variables to it with an environment override.

\n\t\t \n\t\t\t

A total of 8192 characters are allowed for overrides. This limit includes the JSON\n\t\t\t\tformatting characters of the override structure.

\n\t\t
" + "smithy.api#documentation": "

A list of container overrides in JSON format that specify the name of a container in\n\t\t\tthe specified task definition and the overrides it should receive. You can override the\n\t\t\tdefault command for a container (that is specified in the task definition or Docker\n\t\t\timage) with a command override. You can also override existing environment\n\t\t\tvariables (that are specified in the task definition or Docker image) on a container or\n\t\t\tadd new environment variables to it with an environment override.

\n\t\t

A total of 8192 characters are allowed for overrides. This limit includes the JSON\n\t\t\tformatting characters of the override structure.

" } }, "placementConstraints": { @@ -6462,13 +6462,13 @@ "placementStrategy": { "target": "com.amazonaws.ecs#PlacementStrategies", "traits": { - "smithy.api#documentation": "

The placement strategy objects to use for the task. You can specify a maximum of five\n\t\t\tstrategy rules per task.

" + "smithy.api#documentation": "

The placement strategy objects to use for the task. You can specify a maximum of 5\n\t\t\tstrategy rules per task.

" } }, "platformVersion": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The platform version the task should run. A platform version is only specified for\n\t\t\ttasks using the Fargate launch type. If one is not specified, the\n\t\t\t\tLATEST platform version is used by default. For more information, see\n\t\t\t\tFargate Platform\n\t\t\t\tVersions in the Amazon Elastic Container Service Developer Guide.

" + "smithy.api#documentation": "

The platform version the task should use. A platform version is only specified for\n\t\t\ttasks hosted on Fargate. If one is not specified, the LATEST\n\t\t\tplatform version is used by default. For more information, see Fargate platform versions in the\n\t\t\tAmazon Elastic Container Service Developer Guide.

" } }, "propagateTags": { @@ -6480,7 +6480,7 @@ "referenceId": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The reference ID to use for the task.

" + "smithy.api#documentation": "

The reference ID to use for the task. The reference ID can have a maximum length of\n\t\t\t1024 characters.

" } }, "startedBy": { @@ -6634,7 +6634,7 @@ "serviceArn": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The ARN that identifies the service. The ARN contains the arn:aws:ecs namespace, followed by the Region of the service, the account ID of the service owner, the service namespace, and then the service name. For example, arn:aws:ecs:region:012345678910:service/my-service.

" + "smithy.api#documentation": "

The ARN that identifies the service. The ARN contains the arn:aws:ecs namespace, followed by the Region of the service, the Amazon Web Services account ID of the service owner, the service namespace, and then the service name. For example, arn:aws:ecs:region:012345678910:service/my-service.

" } }, "serviceName": { diff --git a/codegen/sdk-codegen/aws-models/lexmodelsv2.2020-08-07.json b/codegen/sdk-codegen/aws-models/lexmodelsv2.2020-08-07.json index 844226cb12b..06f947c245f 100644 --- a/codegen/sdk-codegen/aws-models/lexmodelsv2.2020-08-07.json +++ b/codegen/sdk-codegen/aws-models/lexmodelsv2.2020-08-07.json @@ -282,7 +282,7 @@ } }, "traits": { - "smithy.api#documentation": "

Provided the identity of a the bot that was exported.

" + "smithy.api#documentation": "

Provides the identity of a the bot that was exported.

" } }, "com.amazonaws.lexmodelsv2#BotFilter": { @@ -2575,7 +2575,7 @@ "multipleValuesSetting": { "target": "com.amazonaws.lexmodelsv2#MultipleValuesSetting", "traits": { - "smithy.api#documentation": "

Indicates whether the slot returns multiple values in one response.\n Multi-value slots are only available in the en-US locale. If you set\n this value to true in any other locale, Amazon Lex throws a\n ValidationException.

\n

If the multipleValuesSetting is not set, the default\n value is false.

" + "smithy.api#documentation": "

Indicates whether the slot returns multiple values in one response.\n Multi-value slots are only available in the en-US locale. If you set\n this value to true in any other locale, Amazon Lex throws a\n ValidationException.

\n

If the multipleValuesSetting is not set, the default\n value is false.

" } } } @@ -5243,7 +5243,7 @@ "multipleValuesSetting": { "target": "com.amazonaws.lexmodelsv2#MultipleValuesSetting", "traits": { - "smithy.api#documentation": "

Indicates whether the slot accepts multiple values in a\n single utterance.

\n

If the multipleValuesSetting is not set, the default\n value is false.

" + "smithy.api#documentation": "

Indicates whether the slot accepts multiple values in a single\n utterance.

\n

If the multipleValuesSetting is not set, the default\n value is false.

" } } } @@ -5990,6 +5990,12 @@ "smithy.api#documentation": "

The response that Amazon Lex sends to the user when the intent is\n complete.

", "smithy.api#required": {} } + }, + "active": { + "target": "com.amazonaws.lexmodelsv2#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

Specifies whether an intent's closing response is used. When this\n field is false, the closing response isn't sent to the user and no\n closing input from the user is used. If the active field\n isn't specified, the default is true.

" + } } }, "traits": { @@ -6012,6 +6018,12 @@ "smithy.api#documentation": "

When the user answers \"no\" to the question defined in\n promptSpecification, Amazon Lex responds with this response\n to acknowledge that the intent was canceled.

", "smithy.api#required": {} } + }, + "active": { + "target": "com.amazonaws.lexmodelsv2#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

Specifies whether the intent's confirmation is sent to the user.\n When this field is false, confirmation and declination responses aren't\n sent and processing continues as if the responses aren't present. If\n the active field isn't specified, the default is\n true.

" + } } }, "traits": { @@ -7778,7 +7790,7 @@ "allowMultipleValues": { "target": "com.amazonaws.lexmodelsv2#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether a slot can return multiple values. When\n true, the slot may return more than one value in a\n response. When false, the slot returns only a single\n value.

\n

Multi-value slots are only available in the en-US locale. If you\n set this value to true in any other locale, Amazon Lex throws a\n ValidationException.

\n

If the allowMutlipleValues is not set, the default\n value is false.

" + "smithy.api#documentation": "

Indicates whether a slot can return multiple values. When\n true, the slot may return more than one value in a\n response. When false, the slot returns only a single\n value.

\n

Multi-value slots are only available in the en-US locale. If you set\n this value to true in any other locale, Amazon Lex throws a\n ValidationException.

\n

If the allowMutlipleValues is not set, the default\n value is false.

" } } }, @@ -7992,7 +8004,7 @@ "smithy.api#box": {}, "smithy.api#range": { "min": 0, - "max": 25 + "max": 100 } } }, @@ -10543,6 +10555,12 @@ "traits": { "smithy.api#documentation": "

A response that Amazon Lex sends periodically to the user to indicate\n that the bot is still waiting for input from the user.

" } + }, + "active": { + "target": "com.amazonaws.lexmodelsv2#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

Specifies whether the bot will wait for a user to respond. When this\n field is false, wait and continue responses for a slot aren't used and\n the bot expects an appropriate response within the configured timeout.\n If the active field isn't specified, the default is\n true.

" + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/lightsail.2016-11-28.json b/codegen/sdk-codegen/aws-models/lightsail.2016-11-28.json index add83b69ff3..fd23927b32b 100644 --- a/codegen/sdk-codegen/aws-models/lightsail.2016-11-28.json +++ b/codegen/sdk-codegen/aws-models/lightsail.2016-11-28.json @@ -92,12 +92,44 @@ "traits": { "smithy.api#documentation": "

The timestamp when the access key was created.

" } + }, + "lastUsed": { + "target": "com.amazonaws.lightsail#AccessKeyLastUsed", + "traits": { + "smithy.api#documentation": "

An object that describes the last time the access key was used.

\n\n \n

This object does not include data in the response of a CreateBucketAccessKey action. If the access key has not been used, the\n region and serviceName values are N/A, and the\n lastUsedDate value is null.

\n
" + } } }, "traits": { "smithy.api#documentation": "

Describes an access key for an Amazon Lightsail bucket.

\n\n

Access keys grant full programmatic access to the specified bucket and its objects. You\n can have a maximum of two access keys per bucket. Use the CreateBucketAccessKey action to create an access key for a specific bucket. For\n more information about access keys, see Creating access keys for a bucket in Amazon Lightsail in the\n Amazon Lightsail Developer Guide.

\n\n \n

The secretAccessKey value is returned only in response to the\n CreateBucketAccessKey action. You can get a secret access key only when you\n first create an access key; you cannot get the secret access key later. If you lose the\n secret access key, you must create a new access key.

\n
" } }, + "com.amazonaws.lightsail#AccessKeyLastUsed": { + "type": "structure", + "members": { + "lastUsedDate": { + "target": "com.amazonaws.lightsail#IsoDate", + "traits": { + "smithy.api#documentation": "

The date and time when the access key was most recently used.

\n

This value is null if the access key has not been used.

" + } + }, + "region": { + "target": "com.amazonaws.lightsail#string", + "traits": { + "smithy.api#documentation": "

The AWS Region where this access key was most recently used.

\n

This value is N/A if the access key has not been used.

" + } + }, + "serviceName": { + "target": "com.amazonaws.lightsail#string", + "traits": { + "smithy.api#documentation": "

The name of the AWS service with which this access key was most recently used.

\n

This value is N/A if the access key has not been used.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the last time an access key was used.

\n\n \n

This object does not include data in the response of a CreateBucketAccessKey action.

\n
" + } + }, "com.amazonaws.lightsail#AccessKeyList": { "type": "list", "member": { @@ -2924,7 +2956,7 @@ "enableObjectVersioning": { "target": "com.amazonaws.lightsail#boolean", "traits": { - "smithy.api#documentation": "

A Boolean value that indicates whether to enable versioning of objects in the\n bucket.

\n\n

For more information about versioning, see Enabling and suspending bucket object versioning in Amazon Lightsail in the\n Amazon Lightsail Developer Guide.

" + "smithy.api#documentation": "

A Boolean value that indicates whether to enable versioning of objects in the\n bucket.

\n\n

For more information about versioning, see Enabling and suspending object versioning in a bucket in Amazon Lightsail in the\n Amazon Lightsail Developer Guide.

" } } } diff --git a/codegen/sdk-codegen/aws-models/nimble.2020-08-01.json b/codegen/sdk-codegen/aws-models/nimble.2020-08-01.json index 1b01c5df1bb..843ff750b5c 100644 --- a/codegen/sdk-codegen/aws-models/nimble.2020-08-01.json +++ b/codegen/sdk-codegen/aws-models/nimble.2020-08-01.json @@ -210,7 +210,7 @@ "directoryId": { "target": "com.amazonaws.nimble#DirectoryId", "traits": { - "smithy.api#documentation": "

The directory ID of the AWS Directory Service for Microsoft AD to access using this studio component.

", + "smithy.api#documentation": "

The directory ID of the Directory Service for Microsoft Active Directory to access using this studio component.

", "smithy.api#jsonName": "directoryId" } }, @@ -611,6 +611,13 @@ "smithy.api#jsonName": "launchProfileId" } }, + "ownedBy": { + "target": "com.amazonaws.nimble#__string", + "traits": { + "smithy.api#documentation": "

The user ID of the user that owns the streaming session.

", + "smithy.api#jsonName": "ownedBy" + } + }, "streamingImageId": { "target": "com.amazonaws.nimble#StreamingImageId", "traits": { @@ -773,7 +780,7 @@ } ], "traits": { - "smithy.api#documentation": "

Create a new Studio.

When creating a Studio, two IAM roles must be provided: the admin role and the user Role. These roles are assumed by your users when they log in to the Nimble Studio portal.

The user role must have the AmazonNimbleStudio-StudioUser managed policy attached for the portal to function properly.

The Admin Role must have the AmazonNimbleStudio-StudioAdmin managed policy attached for the portal to function properly.

You may optionally specify a KMS key in the StudioEncryptionConfiguration.

In Nimble Studio, resource names, descriptions, initialization scripts, and other data you provide are always encrypted at rest using an AWS KMS key. By default, this key is owned by AWS and managed on your behalf. You may provide your own AWS KMS key when calling CreateStudio to encrypt this data using a key you own and manage.

When providing an AWS KMS key during studio creation, Nimble Studio creates KMS grants in your account to provide your studio user and admin roles access to these KMS keys.

If you delete this grant, the studio will no longer be accessible to your portal users.

If you delete the studio KMS key, your studio will no longer be accessible.

", + "smithy.api#documentation": "

Create a new Studio.

When creating a Studio, two IAM roles must be provided: the admin role and the user Role. These roles are assumed by your users when they log in to the Nimble Studio portal.

The user role must have the AmazonNimbleStudio-StudioUser managed policy attached for the portal to function properly.

The Admin Role must have the AmazonNimbleStudio-StudioAdmin managed policy attached for the portal to function properly.

You may optionally specify a KMS key in the StudioEncryptionConfiguration.

In Nimble Studio, resource names, descriptions, initialization scripts, and other data you provide are always encrypted at rest using an KMS key. By default, this key is owned by Amazon Web Services and managed on your behalf. You may provide your own KMS key when calling CreateStudio to encrypt this data using a key you own and manage.

When providing an KMS key during studio creation, Nimble Studio creates KMS grants in your account to provide your studio user and admin roles access to these KMS keys.

If you delete this grant, the studio will no longer be accessible to your portal users.

If you delete the studio KMS key, your studio will no longer be accessible.

", "smithy.api#http": { "method": "POST", "uri": "/2020-08-01/studios", @@ -2803,7 +2810,7 @@ "directoryId": { "target": "com.amazonaws.nimble#DirectoryId", "traits": { - "smithy.api#documentation": "

The directory ID of the AWS Directory Service for Microsoft AD to access using this launch profile.

", + "smithy.api#documentation": "

The directory ID of the Directory Service for Microsoft Active Directory to access using this launch profile.

", "smithy.api#jsonName": "directoryId" } }, @@ -3520,7 +3527,7 @@ } ], "traits": { - "smithy.api#documentation": "

List the streaming image resources available to this studio.

This list will contain both images provided by AWS, as well as streaming images that you have created in your studio.

", + "smithy.api#documentation": "

List the streaming image resources available to this studio.

This list will contain both images provided by Amazon Web Services, as well as streaming images that you have created in your studio.

", "smithy.api#http": { "method": "GET", "uri": "/2020-08-01/studios/{studioId}/streaming-images", @@ -3620,7 +3627,7 @@ "createdBy": { "target": "com.amazonaws.nimble#__string", "traits": { - "smithy.api#documentation": "

The user ID.

", + "smithy.api#documentation": "

The user ID of the user that created the streaming session.

", "smithy.api#httpQuery": "createdBy" } }, @@ -3631,6 +3638,13 @@ "smithy.api#httpQuery": "nextToken" } }, + "ownedBy": { + "target": "com.amazonaws.nimble#__string", + "traits": { + "smithy.api#documentation": "

The user ID of the user that owns the streaming session.

", + "smithy.api#httpQuery": "ownedBy" + } + }, "sessionIds": { "target": "com.amazonaws.nimble#__string", "traits": { @@ -3885,7 +3899,7 @@ } ], "traits": { - "smithy.api#documentation": "

List studios in your AWS account in the requested AWS Region.

", + "smithy.api#documentation": "

List studios in your Amazon Web Services account in the requested Amazon Web Services Region.

", "smithy.api#http": { "method": "GET", "uri": "/2020-08-01/studios", @@ -4026,7 +4040,7 @@ }, "traits": { "smithy.api#length": { - "min": 0, + "min": 1, "max": 20 } } @@ -4059,7 +4073,7 @@ }, "traits": { "smithy.api#length": { - "min": 0, + "min": 1, "max": 20 } } @@ -4247,7 +4261,7 @@ "min": 0, "max": 50 }, - "smithy.api#pattern": "[a-z]{2}-?(iso|gov)?-{1}[a-z]*-{1}[0-9]" + "smithy.api#pattern": "^[a-z]{2}-?(iso|gov)?-{1}[a-z]*-{1}[0-9]$" } }, "com.amazonaws.nimble#ResourceNotFoundException": { @@ -4431,7 +4445,7 @@ } ], "traits": { - "smithy.api#documentation": "

Repairs the SSO configuration for a given studio.

If the studio has a valid AWS SSO configuration currently associated with it, this operation will fail with a validation error.

If the studio does not have a valid AWS SSO configuration currently associated with it, then a new AWS SSO application is created for the studio and the studio is changed to the READY state.

After the AWS SSO application is repaired, you must use the Amazon Nimble Studio console to add administrators and users to your studio.

", + "smithy.api#documentation": "

Repairs the SSO configuration for a given studio.

If the studio has a valid Amazon Web Services SSO configuration currently associated with it, this operation will fail with a validation error.

If the studio does not have a valid Amazon Web Services SSO configuration currently associated with it, then a new Amazon Web Services SSO application is created for the studio and the studio is changed to the READY state.

After the Amazon Web Services SSO application is repaired, you must use the Amazon Nimble Studio console to add administrators and users to your studio.

", "smithy.api#http": { "method": "PUT", "uri": "/2020-08-01/studios/{studioId}/sso-configuration", @@ -4700,7 +4714,7 @@ "smithy.api#length": { "min": 4 }, - "smithy.api#pattern": "^arn:.*" + "smithy.api#pattern": "^arn:" } }, "com.amazonaws.nimble#StreamingImageEncryptionConfigurationKeyType": { @@ -4767,13 +4781,6 @@ "smithy.api#pattern": "^[a-zA-Z]*$" } }, - "com.amazonaws.nimble#StreamingImageSessionId": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The streaming image session ID.

", - "smithy.api#pattern": "^[A-z0-9-_:]*\\.{1}[A-z0-9-_]*$" - } - }, "com.amazonaws.nimble#StreamingImageState": { "type": "string", "traits": { @@ -4927,8 +4934,15 @@ "smithy.api#jsonName": "launchProfileId" } }, + "ownedBy": { + "target": "com.amazonaws.nimble#__string", + "traits": { + "smithy.api#documentation": "

The user ID of the user that owns the streaming session.

", + "smithy.api#jsonName": "ownedBy" + } + }, "sessionId": { - "target": "com.amazonaws.nimble#StreamingImageSessionId", + "target": "com.amazonaws.nimble#StreamingSessionId", "traits": { "smithy.api#documentation": "

The session ID.

", "smithy.api#jsonName": "sessionId" @@ -4992,6 +5006,9 @@ } } }, + "com.amazonaws.nimble#StreamingSessionId": { + "type": "string" + }, "com.amazonaws.nimble#StreamingSessionList": { "type": "list", "member": { @@ -5105,6 +5122,13 @@ "smithy.api#jsonName": "expiresAt" } }, + "ownedBy": { + "target": "com.amazonaws.nimble#__string", + "traits": { + "smithy.api#documentation": "

The user ID of the user that owns the streaming session.

", + "smithy.api#jsonName": "ownedBy" + } + }, "state": { "target": "com.amazonaws.nimble#StreamingSessionStreamState", "traits": { @@ -5240,14 +5264,14 @@ "homeRegion": { "target": "com.amazonaws.nimble#Region", "traits": { - "smithy.api#documentation": "

The AWS region where the studio resource is located.

", + "smithy.api#documentation": "

The Amazon Web Services Region where the studio resource is located.

", "smithy.api#jsonName": "homeRegion" } }, "ssoClientId": { "target": "com.amazonaws.nimble#__string", "traits": { - "smithy.api#documentation": "

The AWS SSO application client ID used to integrate with AWS SSO to enable AWS SSO users to log in to Nimble portal.

", + "smithy.api#documentation": "

The Amazon Web Services SSO application client ID used to integrate with Amazon Web Services SSO to enable Amazon Web Services SSO users to log in to Nimble portal.

", "smithy.api#jsonName": "ssoClientId" } }, @@ -5877,7 +5901,7 @@ "smithy.api#length": { "min": 4 }, - "smithy.api#pattern": "^arn:.*" + "smithy.api#pattern": "^arn:" } }, "com.amazonaws.nimble#StudioEncryptionConfigurationKeyType": { diff --git a/codegen/sdk-codegen/aws-models/rekognition.2016-06-27.json b/codegen/sdk-codegen/aws-models/rekognition.2016-06-27.json index 6a79e617b47..ccdec5fb6f9 100644 --- a/codegen/sdk-codegen/aws-models/rekognition.2016-06-27.json +++ b/codegen/sdk-codegen/aws-models/rekognition.2016-06-27.json @@ -166,6 +166,26 @@ "smithy.api#documentation": "

Indicates whether or not the face has a beard, and the confidence level in the\n determination.

" } }, + "com.amazonaws.rekognition#BlackFrame": { + "type": "structure", + "members": { + "MaxPixelThreshold": { + "target": "com.amazonaws.rekognition#MaxPixelThreshold", + "traits": { + "smithy.api#documentation": "

\n A threshold used to determine the maximum luminance value for a pixel to be considered black. In a full color range video,\n luminance values range from 0-255. A pixel value of 0 is pure black, and the most strict filter. The maximum black pixel\n value is computed as follows: max_black_pixel_value = minimum_luminance + MaxPixelThreshold *luminance_range.\n

\n

For example, for a full range video with BlackPixelThreshold = 0.1, max_black_pixel_value is 0 + 0.1 * (255-0) = 25.5.

\n

The default value of MaxPixelThreshold is 0.2, which maps to a max_black_pixel_value of 51 for a full range video.\n You can lower this threshold to be more strict on black levels.

" + } + }, + "MinCoveragePercentage": { + "target": "com.amazonaws.rekognition#MinCoveragePercentage", + "traits": { + "smithy.api#documentation": "

\n The minimum percentage of pixels in a frame that need to have a luminance below the max_black_pixel_value for a frame to be considered\n a black frame. Luminance is calculated using the BT.709 matrix.\n

\n

The default value is 99, which means at least 99% of all pixels in the frame are black pixels as per the MaxPixelThreshold\n set. You can reduce this value to allow more noise on the black frame.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n A filter that allows you to control the black frame detection by specifying the black levels\n and pixel coverage of black pixels in a frame. As videos can come from multiple sources, formats,\n and time periods, they may contain different standards and varying noise levels for black frames that need to be accounted for.\n For more information, see StartSegmentDetection.\n

" + } + }, "com.amazonaws.rekognition#BodyPart": { "type": "string", "traits": { @@ -396,7 +416,7 @@ "min": 1, "max": 255 }, - "smithy.api#pattern": "[a-zA-Z0-9_.\\-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.\\-]+$" } }, "com.amazonaws.rekognition#CollectionIdList": { @@ -638,18 +658,18 @@ "Timestamp": { "target": "com.amazonaws.rekognition#Timestamp", "traits": { - "smithy.api#documentation": "

Time, in milliseconds from the beginning of the video, that the unsafe content label was detected.

" + "smithy.api#documentation": "

Time, in milliseconds from the beginning of the video, that the content moderation label was detected.

" } }, "ModerationLabel": { "target": "com.amazonaws.rekognition#ModerationLabel", "traits": { - "smithy.api#documentation": "

The unsafe content label detected by in the stored video.

" + "smithy.api#documentation": "

The content moderation label detected by in the stored video.

" } } }, "traits": { - "smithy.api#documentation": "

Information about an unsafe content label detection in a stored video.

" + "smithy.api#documentation": "

Information about an inappropriate, unwanted, or offensive content label detection in a stored video.

" } }, "com.amazonaws.rekognition#ContentModerationDetections": { @@ -888,7 +908,7 @@ "OutputConfig": { "target": "com.amazonaws.rekognition#OutputConfig", "traits": { - "smithy.api#documentation": "

The Amazon S3 location to store the results of training.

", + "smithy.api#documentation": "

The Amazon S3 bucket location to store the results of training.\n The S3 bucket can be in any AWS account as long as the caller has\n s3:PutObject permissions on the S3 bucket.

", "smithy.api#required": {} } }, @@ -915,7 +935,7 @@ "KmsKeyId": { "target": "com.amazonaws.rekognition#KmsKeyId", "traits": { - "smithy.api#documentation": "

The identifier for your AWS Key Management Service (AWS KMS) customer master key (CMK).\n You can supply the Amazon Resource Name (ARN) of your CMK, the ID of your CMK,\n or an alias for your CMK.\n The key is used to encrypt training and test images copied into the service for model training. Your \n source images are unaffected. The key is also used to encrypt training results and manifest files written\n to the output Amazon S3 bucket (OutputConfig).

\n

If you don't specify a value for KmsKeyId, images copied into the service are encrypted\n using a key that AWS owns and manages.

" + "smithy.api#documentation": "

The identifier for your AWS Key Management Service (AWS KMS) customer master key (CMK).\n You can supply the Amazon Resource Name (ARN) of your CMK, the ID of your CMK,\n an alias for your CMK, or an alias ARN.\n The key is used to encrypt training and test images copied into the service for model training.\n Your source images are unaffected. The key is also used to encrypt training results\n and manifest files written to the output Amazon S3 bucket (OutputConfig).

\n

If you choose to use your own CMK, you need the following permissions on the CMK.

\n \n

If you don't specify a value for KmsKeyId, images copied into the service are encrypted\n using a key that AWS owns and manages.

" } } } @@ -2199,7 +2219,7 @@ } ], "traits": { - "smithy.api#documentation": "

Detects text in the input image and converts it into machine-readable text.

\n

Pass the input image as base64-encoded image bytes or as a reference to an image in an\n Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, you must pass it as a\n reference to an image in an Amazon S3 bucket. For the AWS CLI, passing image bytes is not\n supported. The image must be either a .png or .jpeg formatted file.

\n

The DetectText operation returns text in an array of TextDetection elements, TextDetections. Each\n TextDetection element provides information about a single word or line of text\n that was detected in the image.

\n

A word is one or more ISO basic latin script characters that are not separated by spaces.\n DetectText can detect up to 50 words in an image.

\n

A line is a string of equally spaced words. A line isn't necessarily a complete\n sentence. For example, a driver's license number is detected as a line. A line ends when there\n is no aligned text after it. Also, a line ends when there is a large gap between words,\n relative to the length of the words. This means, depending on the gap between words, Amazon Rekognition\n may detect multiple lines in text aligned in the same direction. Periods don't represent the\n end of a line. If a sentence spans multiple lines, the DetectText operation\n returns multiple lines.

\n

To determine whether a TextDetection element is a line of text or a word,\n use the TextDetection object Type field.

\n

To be detected, text must be within +/- 90 degrees orientation of the horizontal axis.

\n \n

For more information, see DetectText in the Amazon Rekognition Developer Guide.

" + "smithy.api#documentation": "

Detects text in the input image and converts it into machine-readable text.

\n

Pass the input image as base64-encoded image bytes or as a reference to an image in an\n Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, you must pass it as a\n reference to an image in an Amazon S3 bucket. For the AWS CLI, passing image bytes is not\n supported. The image must be either a .png or .jpeg formatted file.

\n

The DetectText operation returns text in an array of TextDetection elements, TextDetections. Each\n TextDetection element provides information about a single word or line of text\n that was detected in the image.

\n

A word is one or more ISO basic latin script characters that are not separated by spaces.\n DetectText can detect up to 100 words in an image.

\n

A line is a string of equally spaced words. A line isn't necessarily a complete\n sentence. For example, a driver's license number is detected as a line. A line ends when there\n is no aligned text after it. Also, a line ends when there is a large gap between words,\n relative to the length of the words. This means, depending on the gap between words, Amazon Rekognition\n may detect multiple lines in text aligned in the same direction. Periods don't represent the\n end of a line. If a sentence spans multiple lines, the DetectText operation\n returns multiple lines.

\n

To determine whether a TextDetection element is a line of text or a word,\n use the TextDetection object Type field.

\n

To be detected, text must be within +/- 90 degrees orientation of the horizontal axis.

\n \n

For more information, see DetectText in the Amazon Rekognition Developer Guide.

" } }, "com.amazonaws.rekognition#DetectTextFilters": { @@ -2423,7 +2443,7 @@ "min": 1, "max": 255 }, - "smithy.api#pattern": "[a-zA-Z0-9_.\\-:]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.\\-:]+$" } }, "com.amazonaws.rekognition#EyeOpen": { @@ -2652,7 +2672,7 @@ "com.amazonaws.rekognition#FaceId": { "type": "string", "traits": { - "smithy.api#pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + "smithy.api#pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" } }, "com.amazonaws.rekognition#FaceIdList": { @@ -3034,7 +3054,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the unsafe content analysis results for a Amazon Rekognition Video analysis started by\n StartContentModeration.

\n\n

Unsafe content analysis of a video is an asynchronous operation. You start analysis by calling\n StartContentModeration which returns a job identifier (JobId).\n When analysis finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service\n topic registered in the initial call to StartContentModeration.\n To get the results of the unsafe content analysis, first check that the status value published to the Amazon SNS\n topic is SUCCEEDED. If so, call GetContentModeration and pass the job identifier\n (JobId) from the initial call to StartContentModeration.

\n \n

For more information, see Working with Stored Videos in the\n Amazon Rekognition Devlopers Guide.

\n

\n GetContentModeration returns detected unsafe content labels,\n and the time they are detected, in an array, ModerationLabels, of\n ContentModerationDetection objects.\n

\n

By default, the moderated labels are returned sorted by time, in milliseconds from the start of the\n video. You can also sort them by moderated label by specifying NAME for the SortBy\n input parameter.

\n

Since video analysis can return a large number of results, use the MaxResults parameter to limit\n the number of labels returned in a single call to GetContentModeration. If there are more results than\n specified in MaxResults, the value of NextToken in the operation response contains a\n pagination token for getting the next set of results. To get the next page of results, call GetContentModeration\n and populate the NextToken request parameter with the value of NextToken\n returned from the previous call to GetContentModeration.

\n \n

For more information, see Detecting Unsafe Content in the Amazon Rekognition Developer Guide.

", + "smithy.api#documentation": "

Gets the inappropriate, unwanted, or offensive content analysis results for a Amazon Rekognition Video analysis started by\n StartContentModeration. For a list of moderation labels in Amazon Rekognition, see\n Using the image and video moderation APIs.

\n\n

Amazon Rekognition Video inappropriate or offensive content detection in a stored video is an asynchronous operation. You start analysis by calling\n StartContentModeration which returns a job identifier (JobId).\n When analysis finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service\n topic registered in the initial call to StartContentModeration.\n To get the results of the content analysis, first check that the status value published to the Amazon SNS\n topic is SUCCEEDED. If so, call GetContentModeration and pass the job identifier\n (JobId) from the initial call to StartContentModeration.

\n \n

For more information, see Working with Stored Videos in the\n Amazon Rekognition Devlopers Guide.

\n

\n GetContentModeration returns detected inappropriate, unwanted, or offensive content moderation labels,\n and the time they are detected, in an array, ModerationLabels, of\n ContentModerationDetection objects.\n

\n

By default, the moderated labels are returned sorted by time, in milliseconds from the start of the\n video. You can also sort them by moderated label by specifying NAME for the SortBy\n input parameter.

\n

Since video analysis can return a large number of results, use the MaxResults parameter to limit\n the number of labels returned in a single call to GetContentModeration. If there are more results than\n specified in MaxResults, the value of NextToken in the operation response contains a\n pagination token for getting the next set of results. To get the next page of results, call GetContentModeration\n and populate the NextToken request parameter with the value of NextToken\n returned from the previous call to GetContentModeration.

\n \n

For more information, see Content moderation in the Amazon Rekognition Developer Guide.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -3048,7 +3068,7 @@ "JobId": { "target": "com.amazonaws.rekognition#JobId", "traits": { - "smithy.api#documentation": "

The identifier for the unsafe content job. Use JobId to identify the job in\n a subsequent call to GetContentModeration.

", + "smithy.api#documentation": "

The identifier for the inappropriate, unwanted, or offensive content moderation job. Use JobId to identify the job in\n a subsequent call to GetContentModeration.

", "smithy.api#required": {} } }, @@ -3061,7 +3081,7 @@ "NextToken": { "target": "com.amazonaws.rekognition#PaginationToken", "traits": { - "smithy.api#documentation": "

If the previous response was incomplete (because there is more data to retrieve), Amazon Rekognition\n returns a pagination token in the response. You can use this pagination token\n to retrieve the next set of unsafe content labels.

" + "smithy.api#documentation": "

If the previous response was incomplete (because there is more data to retrieve), Amazon Rekognition\n returns a pagination token in the response. You can use this pagination token\n to retrieve the next set of content moderation labels.

" } }, "SortBy": { @@ -3078,7 +3098,7 @@ "JobStatus": { "target": "com.amazonaws.rekognition#VideoJobStatus", "traits": { - "smithy.api#documentation": "

The current status of the unsafe content analysis job.

" + "smithy.api#documentation": "

The current status of the content moderation analysis job.

" } }, "StatusMessage": { @@ -3096,19 +3116,19 @@ "ModerationLabels": { "target": "com.amazonaws.rekognition#ContentModerationDetections", "traits": { - "smithy.api#documentation": "

The detected unsafe content labels and the time(s) they were detected.

" + "smithy.api#documentation": "

The detected inappropriate, unwanted, or offensive content moderation labels and the time(s) they were detected.

" } }, "NextToken": { "target": "com.amazonaws.rekognition#PaginationToken", "traits": { - "smithy.api#documentation": "

If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent\n request to retrieve the next set of unsafe content labels.

" + "smithy.api#documentation": "

If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent\n request to retrieve the next set of content moderation labels.

" } }, "ModerationModelVersion": { "target": "com.amazonaws.rekognition#String", "traits": { - "smithy.api#documentation": "

Version number of the moderation detection model that was used to detect unsafe content.

" + "smithy.api#documentation": "

Version number of the moderation detection model that was used to detect inappropriate, unwanted, or offensive content.

" } } } @@ -3855,7 +3875,7 @@ "min": 1, "max": 63 }, - "smithy.api#pattern": "^[a-z0-9](-*[a-z0-9])*" + "smithy.api#pattern": "^[a-z0-9](-*[a-z0-9])*$" } }, "com.amazonaws.rekognition#HumanLoopQuotaExceededException": { @@ -3951,7 +3971,7 @@ "com.amazonaws.rekognition#ImageId": { "type": "string", "traits": { - "smithy.api#pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + "smithy.api#pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" } }, "com.amazonaws.rekognition#ImageQuality": { @@ -4268,13 +4288,13 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[a-zA-Z0-9_.\\-:]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.\\-:]+$" } }, "com.amazonaws.rekognition#KinesisDataArn": { "type": "string", "traits": { - "smithy.api#pattern": "(^arn:([a-z\\d-]+):kinesis:([a-z\\d-]+):\\d{12}:.+$)" + "smithy.api#pattern": "^(^arn:([a-z\\d-]+):kinesis:([a-z\\d-]+):\\d{12}:.+$)$" } }, "com.amazonaws.rekognition#KinesisDataStream": { @@ -4294,7 +4314,7 @@ "com.amazonaws.rekognition#KinesisVideoArn": { "type": "string", "traits": { - "smithy.api#pattern": "(^arn:([a-z\\d-]+):kinesisvideo:([a-z\\d-]+):\\d{12}:.+$)" + "smithy.api#pattern": "^(^arn:([a-z\\d-]+):kinesisvideo:([a-z\\d-]+):\\d{12}:.+$)$" } }, "com.amazonaws.rekognition#KinesisVideoStream": { @@ -4894,6 +4914,16 @@ } } }, + "com.amazonaws.rekognition#MaxPixelThreshold": { + "type": "float", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0, + "max": 1 + } + } + }, "com.amazonaws.rekognition#MaxResults": { "type": "integer", "traits": { @@ -4903,6 +4933,16 @@ } } }, + "com.amazonaws.rekognition#MinCoveragePercentage": { + "type": "float", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0, + "max": 100 + } + } + }, "com.amazonaws.rekognition#ModerationLabel": { "type": "structure", "members": { @@ -4926,7 +4966,7 @@ } }, "traits": { - "smithy.api#documentation": "

Provides information about a single type of unsafe content found in an image or video. Each type of\n moderated content has a label within a hierarchical taxonomy. For more information, see\n Detecting Unsafe Content in the Amazon Rekognition Developer Guide.

" + "smithy.api#documentation": "

Provides information about a single type of inappropriate, unwanted, or offensive content found in an image or video. Each type of\n moderated content has a label within a hierarchical taxonomy. For more information, see\n Content moderation in the Amazon Rekognition Developer Guide.

" } }, "com.amazonaws.rekognition#ModerationLabels": { @@ -4994,7 +5034,7 @@ } }, "traits": { - "smithy.api#documentation": "

The Amazon Simple Notification Service topic to which Amazon Rekognition publishes the completion status of a video analysis operation. For more information, see\n api-video.

" + "smithy.api#documentation": "

The Amazon Simple Notification Service topic to which Amazon Rekognition publishes the completion status of a video analysis operation. For more information, see\n api-video. Note that the Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic.\n For more information, see Giving access to multiple Amazon SNS topics.

" } }, "com.amazonaws.rekognition#OrientationCorrection": { @@ -5250,7 +5290,7 @@ "min": 20, "max": 2048 }, - "smithy.api#pattern": "(^arn:[a-z\\d-]+:rekognition:[a-z\\d-]+:\\d{12}:project\\/[a-zA-Z0-9_.\\-]{1,255}\\/[0-9]+$)" + "smithy.api#pattern": "^(^arn:[a-z\\d-]+:rekognition:[a-z\\d-]+:\\d{12}:project\\/[a-zA-Z0-9_.\\-]{1,255}\\/[0-9]+$)$" } }, "com.amazonaws.rekognition#ProjectDescription": { @@ -5292,7 +5332,7 @@ "min": 1, "max": 255 }, - "smithy.api#pattern": "[a-zA-Z0-9_.\\-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.\\-]+$" } }, "com.amazonaws.rekognition#ProjectStatus": { @@ -5321,7 +5361,7 @@ "min": 20, "max": 2048 }, - "smithy.api#pattern": "(^arn:[a-z\\d-]+:rekognition:[a-z\\d-]+:\\d{12}:project\\/[a-zA-Z0-9_.\\-]{1,255}\\/version\\/[a-zA-Z0-9_.\\-]{1,255}\\/[0-9]+$)" + "smithy.api#pattern": "^(^arn:[a-z\\d-]+:rekognition:[a-z\\d-]+:\\d{12}:project\\/[a-zA-Z0-9_.\\-]{1,255}\\/version\\/[a-zA-Z0-9_.\\-]{1,255}\\/[0-9]+$)$" } }, "com.amazonaws.rekognition#ProjectVersionDescription": { @@ -5987,7 +6027,7 @@ "com.amazonaws.rekognition#RekognitionUniqueId": { "type": "string", "traits": { - "smithy.api#pattern": "[0-9A-Za-z]*" + "smithy.api#pattern": "^[0-9A-Za-z]*$" } }, "com.amazonaws.rekognition#ResourceAlreadyExistsException": { @@ -6086,7 +6126,7 @@ "com.amazonaws.rekognition#RoleArn": { "type": "string", "traits": { - "smithy.api#pattern": "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+" + "smithy.api#pattern": "^arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$" } }, "com.amazonaws.rekognition#S3Bucket": { @@ -6096,7 +6136,7 @@ "min": 3, "max": 255 }, - "smithy.api#pattern": "[0-9A-Za-z\\.\\-_]*" + "smithy.api#pattern": "^[0-9A-Za-z\\.\\-_]*$" } }, "com.amazonaws.rekognition#S3KeyPrefix": { @@ -6155,7 +6195,7 @@ "com.amazonaws.rekognition#SNSTopicArn": { "type": "string", "traits": { - "smithy.api#pattern": "(^arn:aws:sns:.*:\\w{12}:.+$)" + "smithy.api#pattern": "^(^arn:aws:sns:.*:\\w{12}:.+$)$" } }, "com.amazonaws.rekognition#SearchFaces": { @@ -6417,6 +6457,24 @@ "traits": { "smithy.api#documentation": "

If the segment is a shot detection, contains information about the shot detection.

" } + }, + "StartFrameNumber": { + "target": "com.amazonaws.rekognition#ULong", + "traits": { + "smithy.api#documentation": "

\n The frame number of the start of a video segment, using a frame index that starts with 0.\n

" + } + }, + "EndFrameNumber": { + "target": "com.amazonaws.rekognition#ULong", + "traits": { + "smithy.api#documentation": "

\n The frame number at the end of a video segment, using a frame index that starts with 0.\n

" + } + }, + "DurationFrames": { + "target": "com.amazonaws.rekognition#ULong", + "traits": { + "smithy.api#documentation": "

\n The duration of a video segment, expressed in frames.\n

" + } } }, "traits": { @@ -6603,7 +6661,7 @@ "NotificationChannel": { "target": "com.amazonaws.rekognition#NotificationChannel", "traits": { - "smithy.api#documentation": "

The Amazon SNS topic ARN that you want Amazon Rekognition Video to publish the completion status of the\n celebrity recognition analysis to.

" + "smithy.api#documentation": "

The Amazon SNS topic ARN that you want Amazon Rekognition Video to publish the completion status of the\n celebrity recognition analysis to. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy.

" } }, "JobTag": { @@ -6663,7 +6721,7 @@ } ], "traits": { - "smithy.api#documentation": "

Starts asynchronous detection of unsafe content in a stored video.

\n

Amazon Rekognition Video can moderate content in a video stored in an Amazon S3 bucket. Use Video to specify the bucket name\n and the filename of the video. StartContentModeration\n returns a job identifier (JobId) which you use to get the results of the analysis.\n When unsafe content analysis is finished, Amazon Rekognition Video publishes a completion status\n to the Amazon Simple Notification Service topic that you specify in NotificationChannel.

\n

To get the results of the unsafe content analysis, first check that the status value published to the Amazon SNS\n topic is SUCCEEDED. If so, call GetContentModeration and pass the job identifier\n (JobId) from the initial call to StartContentModeration.

\n \n

For more information, see Detecting Unsafe Content in the Amazon Rekognition Developer Guide.

", + "smithy.api#documentation": "

Starts asynchronous detection of inappropriate, unwanted, or offensive content in a stored video. For a list of moderation labels in Amazon Rekognition, see\n Using the image and video moderation APIs.

\n

Amazon Rekognition Video can moderate content in a video stored in an Amazon S3 bucket. Use Video to specify the bucket name\n and the filename of the video. StartContentModeration\n returns a job identifier (JobId) which you use to get the results of the analysis.\n When content analysis is finished, Amazon Rekognition Video publishes a completion status\n to the Amazon Simple Notification Service topic that you specify in NotificationChannel.

\n

To get the results of the content analysis, first check that the status value published to the Amazon SNS\n topic is SUCCEEDED. If so, call GetContentModeration and pass the job identifier\n (JobId) from the initial call to StartContentModeration.

\n \n

For more information, see Content moderation in the Amazon Rekognition Developer Guide.

", "smithy.api#idempotent": {} } }, @@ -6673,7 +6731,7 @@ "Video": { "target": "com.amazonaws.rekognition#Video", "traits": { - "smithy.api#documentation": "

The video in which you want to detect unsafe content. The video must be stored\n in an Amazon S3 bucket.

", + "smithy.api#documentation": "

The video in which you want to detect inappropriate, unwanted, or offensive content. The video must be stored\n in an Amazon S3 bucket.

", "smithy.api#required": {} } }, @@ -6692,7 +6750,7 @@ "NotificationChannel": { "target": "com.amazonaws.rekognition#NotificationChannel", "traits": { - "smithy.api#documentation": "

The Amazon SNS topic ARN that you want Amazon Rekognition Video to publish the completion status of the\n unsafe content analysis to.

" + "smithy.api#documentation": "

The Amazon SNS topic ARN that you want Amazon Rekognition Video to publish the completion status of the\n content analysis to. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic.

" } }, "JobTag": { @@ -6709,7 +6767,7 @@ "JobId": { "target": "com.amazonaws.rekognition#JobId", "traits": { - "smithy.api#documentation": "

The identifier for the unsafe content analysis job. Use JobId to identify the job in\n a subsequent call to GetContentModeration.

" + "smithy.api#documentation": "

The identifier for the content analysis job. Use JobId to identify the job in\n a subsequent call to GetContentModeration.

" } } } @@ -6775,7 +6833,7 @@ "NotificationChannel": { "target": "com.amazonaws.rekognition#NotificationChannel", "traits": { - "smithy.api#documentation": "

The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the\n face detection operation.

" + "smithy.api#documentation": "

The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the\n face detection operation. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy.

" } }, "FaceAttributes": { @@ -6880,7 +6938,7 @@ "NotificationChannel": { "target": "com.amazonaws.rekognition#NotificationChannel", "traits": { - "smithy.api#documentation": "

The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the search.

" + "smithy.api#documentation": "

The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the search. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic.

" } }, "JobTag": { @@ -6969,7 +7027,7 @@ "NotificationChannel": { "target": "com.amazonaws.rekognition#NotificationChannel", "traits": { - "smithy.api#documentation": "

The Amazon SNS topic ARN you want Amazon Rekognition Video to publish the completion status of the label detection\n operation to.

" + "smithy.api#documentation": "

The Amazon SNS topic ARN you want Amazon Rekognition Video to publish the completion status of the label detection\n operation to. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy.

" } }, "JobTag": { @@ -7052,7 +7110,7 @@ "NotificationChannel": { "target": "com.amazonaws.rekognition#NotificationChannel", "traits": { - "smithy.api#documentation": "

The Amazon SNS topic ARN you want Amazon Rekognition Video to publish the completion status of the people detection\n operation to.

" + "smithy.api#documentation": "

The Amazon SNS topic ARN you want Amazon Rekognition Video to publish the completion status of the people detection\n operation to. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy.

" } }, "JobTag": { @@ -7222,7 +7280,7 @@ "NotificationChannel": { "target": "com.amazonaws.rekognition#NotificationChannel", "traits": { - "smithy.api#documentation": "

The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the\n segment detection operation.

" + "smithy.api#documentation": "

The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the\n segment detection operation. Note that the Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic.

" } }, "JobTag": { @@ -7330,6 +7388,12 @@ "traits": { "smithy.api#documentation": "

Specifies the minimum confidence that Amazon Rekognition Video must have in order to return a detected segment. Confidence\n represents how certain Amazon Rekognition is that a segment is correctly identified. 0 is the lowest confidence.\n 100 is the highest confidence. Amazon Rekognition Video doesn't return any segments with a confidence level\n lower than this specified value.

\n

If you don't specify MinSegmentConfidence, GetSegmentDetection returns \n segments with confidence values greater than or equal to 50 percent.

" } + }, + "BlackFrame": { + "target": "com.amazonaws.rekognition#BlackFrame", + "traits": { + "smithy.api#documentation": "

\n A filter that allows you to control the black frame detection by specifying the black levels and pixel coverage of black pixels in a frame.\n Videos can come from multiple sources, formats, and time periods, with different standards and varying noise levels for black frames that need to be accounted for.\n

" + } } }, "traits": { @@ -7576,7 +7640,7 @@ "com.amazonaws.rekognition#StreamProcessorArn": { "type": "string", "traits": { - "smithy.api#pattern": "(^arn:[a-z\\d-]+:rekognition:[a-z\\d-]+:\\d{12}:streamprocessor\\/.+$)" + "smithy.api#pattern": "^(^arn:[a-z\\d-]+:rekognition:[a-z\\d-]+:\\d{12}:streamprocessor\\/.+$)$" } }, "com.amazonaws.rekognition#StreamProcessorInput": { @@ -7606,7 +7670,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[a-zA-Z0-9_.\\-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.\\-]+$" } }, "com.amazonaws.rekognition#StreamProcessorOutput": { @@ -7848,6 +7912,22 @@ { "value": "BlackFrames", "name": "BLACK_FRAMES" + }, + { + "value": "OpeningCredits", + "name": "OPENING_CREDITS" + }, + { + "value": "StudioLogo", + "name": "STUDIO_LOGO" + }, + { + "value": "Slate", + "name": "SLATE" + }, + { + "value": "Content", + "name": "CONTENT" } ] } @@ -8185,7 +8265,7 @@ "min": 1, "max": 255 }, - "smithy.api#pattern": "[a-zA-Z0-9_.\\-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.\\-]+$" } }, "com.amazonaws.rekognition#VersionNames": { @@ -8214,6 +8294,21 @@ "smithy.api#documentation": "

Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to\n specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

" } }, + "com.amazonaws.rekognition#VideoColorRange": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "FULL", + "name": "FULL" + }, + { + "value": "LIMITED", + "name": "LIMITED" + } + ] + } + }, "com.amazonaws.rekognition#VideoJobStatus": { "type": "string", "traits": { @@ -8271,6 +8366,12 @@ "traits": { "smithy.api#documentation": "

Horizontal pixel dimension of the video.

" } + }, + "ColorRange": { + "target": "com.amazonaws.rekognition#VideoColorRange", + "traits": { + "smithy.api#documentation": "

\n A description of the range of luminance values in a video, either LIMITED (16 to 235) or FULL (0 to 255).\n

" + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/route53.2013-04-01.json b/codegen/sdk-codegen/aws-models/route53.2013-04-01.json index bb543367718..6a4cc387270 100644 --- a/codegen/sdk-codegen/aws-models/route53.2013-04-01.json +++ b/codegen/sdk-codegen/aws-models/route53.2013-04-01.json @@ -406,14 +406,14 @@ "HostedZoneId": { "target": "com.amazonaws.route53#ResourceId", "traits": { - "smithy.api#documentation": "

\n Alias resource records sets only: The value used depends on where you want to route traffic:

\n\t\t
\n
Amazon API Gateway custom regional APIs and edge-optimized APIs
\n
\n

Specify the hosted zone ID for your API. You can get the applicable value using the CLI command \n\t\t\t\t\tget-domain-names:

\n\t\t\t\t\t
    \n
  • \n

    For regional APIs, specify the value of regionalHostedZoneId.

    \n
  • \n
  • \n

    For edge-optimized APIs, specify the value of distributionHostedZoneId.

    \n
  • \n
\n\t\t\t\t
\n
Amazon Virtual Private Cloud interface VPC endpoint
\n
\n

Specify the hosted zone ID for your interface endpoint. You can get the value of HostedZoneId \n\t\t\t\t\tusing the CLI command \n\t\t\t\t\tdescribe-vpc-endpoints.

\n\t\t\t\t
\n
CloudFront distribution
\n
\n\t\t\t\t\t

Specify Z2FDTNDATAQYW2.

\n\t\t\t\t\t \n\t\t\t\t\t\t

Alias resource record sets for CloudFront can't be created in a private zone.

\n\t\t\t\t\t
\n\t\t\t\t
\n
Elastic Beanstalk environment
\n
\n\t\t\t\t\t

Specify the hosted zone ID for the region that you created the environment in. The environment \n\t\t\t\t\t\tmust have a regionalized subdomain. For a list of regions and the corresponding hosted zone IDs, see \n\t\t\t\t\t Elastic Beanstalk endpoints and quotas in the \n\t\t\t\t\t\t the Amazon Web Services General Reference.

\n\t\t\t\t
\n
ELB load balancer
\n
\n\t\t\t\t\t

Specify the value of the hosted zone ID for the load balancer. Use the following methods to get the \n\t\t\t\t\t\thosted zone ID:

\n\t\t\t\t\t
    \n
  • \n

    \n Elastic Load Balancing endpoints and quotas topic in the Amazon Web Services General Reference: \n\t\t\t\t\t\t\tUse the value that corresponds with the region that you created your load balancer in. Note that there are \n\t\t\t\t\t\t\tseparate columns for Application and Classic Load Balancers and for Network Load Balancers.

    \n
  • \n
  • \n\t\t\t\t\t\t\t

    \n Management Console: Go to the Amazon EC2 page, choose \n\t\t\t\t\t\t\t\tLoad Balancers in the navigation pane, select the load balancer, and get the value of the \n\t\t\t\t\t\t\t\tHosted zone field on the Description tab.

    \n\t\t\t\t\t\t
  • \n
  • \n\t\t\t\t\t\t\t

    \n Elastic Load Balancing API: Use DescribeLoadBalancers to get the \n\t\t\t\t\t\t\t\tapplicable value. For more information, see the applicable guide:

    \n\t\t\t\t\t\t\t
      \n
    • \n

      Classic Load Balancers: Use \n\t\t\t\t\t\t\t\t\tDescribeLoadBalancers \n\t\t\t\t\t\t\t\t\tto get the value of CanonicalHostedZoneNameId.

      \n
    • \n
    • \n

      Application and Network Load Balancers: Use \n\t\t\t\t\t\t\t\t\tDescribeLoadBalancers\n\t\t\t\t\t\t\t\t\tto get the value of CanonicalHostedZoneId.

      \n
    • \n
    \n\t\t\t\t\t\t
  • \n
  • \n\t\t\t\t\t\t\t

    \n CLI: Use describe-load-balancers to get the applicable value. \n\t\t\t\t\t\t\t\tFor more information, see the applicable guide:

    \n\t\t\t\t\t\t\t
      \n
    • \n

      Classic Load Balancers: Use \n\t\t\t\t\t\t\t\t\tdescribe-load-balancers\n\t\t\t\t\t\t\t\t\tto get the value of CanonicalHostedZoneNameId.

      \n
    • \n
    • \n

      Application and Network Load Balancers: Use \n\t\t\t\t\t\t\t\t\tdescribe-load-balancers\n\t\t\t\t\t\t\t\t\tto get the value of CanonicalHostedZoneId.

      \n
    • \n
    \n\t\t\t\t\t\t
  • \n
\n\t\t\t\t
\n
Global Accelerator accelerator
\n
\n

Specify Z2BJ6XQ5FK7U4H.

\n
\n
An Amazon S3 bucket configured as a static website
\n
\n\t\t\t\t\t

Specify the hosted zone ID for the region that you created the bucket in. For more information about \n\t\t\t\t\t\tvalid values, see the table \n\t\t\t\t\t\tAmazon S3 Website Endpoints \n\t\t\t\t\t\tin the Amazon Web Services General Reference.

\n\t\t\t\t
\n
Another Route 53 resource record set in your hosted zone
\n
\n\t\t\t\t\t

Specify the hosted zone ID of your hosted zone. (An alias resource record set\n\t\t\t\t\t\tcan't reference a resource record set in a different hosted zone.)

\n\t\t\t\t
\n
", + "smithy.api#documentation": "

\n Alias resource records sets only: The value used depends on where you want to route traffic:

\n\t\t
\n
Amazon API Gateway custom regional APIs and edge-optimized APIs
\n
\n

Specify the hosted zone ID for your API. You can get the applicable value using the CLI command \n\t\t\t\t\tget-domain-names:

\n\t\t\t\t\t
    \n
  • \n

    For regional APIs, specify the value of regionalHostedZoneId.

    \n
  • \n
  • \n

    For edge-optimized APIs, specify the value of distributionHostedZoneId.

    \n
  • \n
\n\t\t\t\t
\n
Amazon Virtual Private Cloud interface VPC endpoint
\n
\n

Specify the hosted zone ID for your interface endpoint. You can get the value of HostedZoneId \n\t\t\t\t\tusing the CLI command \n\t\t\t\t\tdescribe-vpc-endpoints.

\n\t\t\t\t
\n
CloudFront distribution
\n
\n\t\t\t\t\t

Specify Z2FDTNDATAQYW2.

\n\t\t\t\t\t \n\t\t\t\t\t\t

Alias resource record sets for CloudFront can't be created in a private zone.

\n\t\t\t\t\t
\n\t\t\t\t
\n
Elastic Beanstalk environment
\n
\n\t\t\t\t\t

Specify the hosted zone ID for the region that you created the environment in. The environment \n\t\t\t\t\t\tmust have a regionalized subdomain. For a list of regions and the corresponding hosted zone IDs, see \n\t\t\t\t\t Elastic Beanstalk endpoints and quotas in the \n\t\t\t\t\t\t the Amazon Web Services General Reference.

\n\t\t\t\t
\n
ELB load balancer
\n
\n\t\t\t\t\t

Specify the value of the hosted zone ID for the load balancer. Use the following methods to get the \n\t\t\t\t\t\thosted zone ID:

\n\t\t\t\t\t
    \n
  • \n

    \n Elastic Load Balancing endpoints and quotas topic in the Amazon Web Services General Reference: \n\t\t\t\t\t\t\tUse the value that corresponds with the region that you created your load balancer in. Note that there are \n\t\t\t\t\t\t\tseparate columns for Application and Classic Load Balancers and for Network Load Balancers.

    \n
  • \n
  • \n\t\t\t\t\t\t\t

    \n Amazon Web Services Management Console: Go to the Amazon EC2 page, choose \n\t\t\t\t\t\t\t\tLoad Balancers in the navigation pane, select the load balancer, and get the value of the \n\t\t\t\t\t\t\t\tHosted zone field on the Description tab.

    \n\t\t\t\t\t\t
  • \n
  • \n\t\t\t\t\t\t\t

    \n Elastic Load Balancing API: Use DescribeLoadBalancers to get the \n\t\t\t\t\t\t\t\tapplicable value. For more information, see the applicable guide:

    \n\t\t\t\t\t\t\t
      \n
    • \n

      Classic Load Balancers: Use \n\t\t\t\t\t\t\t\t\tDescribeLoadBalancers \n\t\t\t\t\t\t\t\t\tto get the value of CanonicalHostedZoneNameId.

      \n
    • \n
    • \n

      Application and Network Load Balancers: Use \n\t\t\t\t\t\t\t\t\tDescribeLoadBalancers\n\t\t\t\t\t\t\t\t\tto get the value of CanonicalHostedZoneId.

      \n
    • \n
    \n\t\t\t\t\t\t
  • \n
  • \n\t\t\t\t\t\t\t

    \n CLI: Use describe-load-balancers to get the applicable value. \n\t\t\t\t\t\t\t\tFor more information, see the applicable guide:

    \n\t\t\t\t\t\t\t
      \n
    • \n

      Classic Load Balancers: Use \n\t\t\t\t\t\t\t\t\tdescribe-load-balancers\n\t\t\t\t\t\t\t\t\tto get the value of CanonicalHostedZoneNameId.

      \n
    • \n
    • \n

      Application and Network Load Balancers: Use \n\t\t\t\t\t\t\t\t\tdescribe-load-balancers\n\t\t\t\t\t\t\t\t\tto get the value of CanonicalHostedZoneId.

      \n
    • \n
    \n\t\t\t\t\t\t
  • \n
\n\t\t\t\t
\n
Global Accelerator accelerator
\n
\n

Specify Z2BJ6XQ5FK7U4H.

\n
\n
An Amazon S3 bucket configured as a static website
\n
\n\t\t\t\t\t

Specify the hosted zone ID for the region that you created the bucket in. For more information about \n\t\t\t\t\t\tvalid values, see the table \n\t\t\t\t\t\tAmazon S3 Website Endpoints \n\t\t\t\t\t\tin the Amazon Web Services General Reference.

\n\t\t\t\t
\n
Another Route 53 resource record set in your hosted zone
\n
\n\t\t\t\t\t

Specify the hosted zone ID of your hosted zone. (An alias resource record set\n\t\t\t\t\t\tcan't reference a resource record set in a different hosted zone.)

\n\t\t\t\t
\n
", "smithy.api#required": {} } }, "DNSName": { "target": "com.amazonaws.route53#DNSName", "traits": { - "smithy.api#documentation": "

\n Alias resource record sets only: The value that you specify depends on where you want to route queries:

\n\t\t
\n
Amazon API Gateway custom regional APIs and edge-optimized APIs
\n
\n

Specify the applicable domain name for your API. You can get the applicable value using the CLI command \n\t\t\t\t\tget-domain-names:

\n\t\t\t\t\t
    \n
  • \n

    For regional APIs, specify the value of regionalDomainName.

    \n
  • \n
  • \n

    For edge-optimized APIs, specify the value of distributionDomainName. This is the name of the \n\t\t\t\t\t\t\tassociated CloudFront distribution, such as da1b2c3d4e5.cloudfront.net.

    \n
  • \n
\n\t\t\t\t\t \n\t\t\t\t\t\t

The name of the record that you're creating must match a custom domain name for your API, such as \n\t\t\t\t\t\t\tapi.example.com.

\n\t\t\t\t\t
\n\t\t\t\t
\n
Amazon Virtual Private Cloud interface VPC endpoint
\n
\n

Enter the API endpoint for the interface endpoint, such as \n\t\t\t\t\tvpce-123456789abcdef01-example-us-east-1a.elasticloadbalancing.us-east-1.vpce.amazonaws.com. For edge-optimized APIs, \n\t\t\t\t\tthis is the domain name for the corresponding CloudFront distribution. You can get the value of DnsName using the CLI command \n\t\t\t\t\tdescribe-vpc-endpoints.

\n\t\t\t\t
\n
CloudFront distribution
\n
\n

Specify the domain name that CloudFront assigned when you created your distribution.

\n\t\t\t\t\t

Your CloudFront distribution must include an alternate domain name that matches the name of the resource record set. \n\t\t\t\t\t\tFor example, if the name of the resource record set is acme.example.com, your CloudFront distribution must \n\t\t\t\t\t\tinclude acme.example.com as one of the alternate domain names. For more information, see \n\t\t\t\t\t\tUsing Alternate Domain Names (CNAMEs) in the \n\t\t\t\t\t\tAmazon CloudFront Developer Guide.

\n\t\t\t\t\t

You can't create a resource record set in a private hosted zone to route traffic to a CloudFront distribution.

\n\t\t\t\t\t \n

For failover alias records, you can't specify a CloudFront distribution for both the primary and secondary records. \n\t\t\t\t\t\tA distribution must include an alternate domain name that matches the name of the record. However, the primary and secondary records \n\t\t\t\t\t\thave the same name, and you can't include the same alternate domain name in more than one distribution.

\n
\n\t\t\t\t
\n
Elastic Beanstalk environment
\n
\n\t\t\t\t\t

If the domain name for your Elastic Beanstalk environment includes the region that you deployed the environment in, \n\t\t\t\t\t\tyou can create an alias record that routes traffic to the environment. For example, the domain name \n\t\t\t\t\t\tmy-environment.us-west-2.elasticbeanstalk.com is a regionalized domain name.

\n\t\t\t\t\t \n\t\t\t\t\t\t

For environments that were created before early 2016, the domain name doesn't include the region. To route traffic \n\t\t\t\t\t\t\tto these environments, you must create a CNAME record instead of an alias record. Note that you can't create a \n\t\t\t\t\t\t\tCNAME record for the root domain name. For example, if your domain name is example.com, you can create a record \n\t\t\t\t\t\t\tthat routes traffic for acme.example.com to your Elastic Beanstalk environment, but you can't create a record \n\t\t\t\t\t\t\tthat routes traffic for example.com to your Elastic Beanstalk environment.

\n\t\t\t\t\t
\n\t\t\t\t\t

For Elastic Beanstalk environments that have regionalized subdomains, specify the CNAME attribute for the environment. \n\t\t\t\t\t\tYou can use the following methods to get the value of the CNAME attribute:

\n\t\t\t\t\t
    \n
  • \n\t\t\t\t\t\t\t

    \n Management Console: For information about how to get the value by using the console, \n\t\t\t\t\t\t\t\tsee Using Custom Domains with Elastic Beanstalk in the \n\t\t\t\t\t\t\t\tElastic Beanstalk Developer Guide.

    \n\t\t\t\t\t\t
  • \n
  • \n\t\t\t\t\t\t\t

    \n Elastic Beanstalk API: Use the DescribeEnvironments action to get \n\t\t\t\t\t\t\t\tthe value of the CNAME attribute. For more information, see \n\t\t\t\t\t\t\t\tDescribeEnvironments \n\t\t\t\t\t\t\t\tin the Elastic Beanstalk API Reference.

    \n\t\t\t\t\t\t
  • \n
  • \n\t\t\t\t\t\t\t

    \n CLI: Use the describe-environments command to get the value of the \n\t\t\t\t\t\t\t\tCNAME attribute. For more information, see \n\t\t\t\t\t\t\t\tdescribe-environments in the \n\t\t\t\t\t\t\t\tCLI Command Reference.

    \n\t\t\t\t\t\t
  • \n
\n\t\t\t\t
\n
ELB load balancer
\n
\n

Specify the DNS name that is associated with the load balancer. Get the DNS name by using the Management Console, \n\t\t\t\t\tthe ELB API, or the CLI.

\n\t\t\t\t\t
    \n
  • \n\t\t\t\t\t\t\t

    \n Management Console: Go to the EC2 page, choose Load Balancers \n\t\t\t\t\t\t\t\tin the navigation pane, choose the load balancer, choose the Description tab, and get the value \n\t\t\t\t\t\t\t\tof the DNS name field.

    \n\t\t\t\t\t\t\t

    If you're routing traffic to a Classic Load Balancer, get the value that begins with dualstack. \n\t\t\t\t\t\t\t\tIf you're routing traffic to another type of load balancer, get the value that applies to the record type, A or AAAA.

    \n\t\t\t\t\t\t
  • \n
  • \n\t\t\t\t\t\t\t

    \n Elastic Load Balancing API: Use DescribeLoadBalancers to get the value \n\t\t\t\t\t\t\t\tof DNSName. For more information, see the applicable guide:

    \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t
  • \n
  • \n\t\t\t\t\t\t\t

    \n CLI: Use describe-load-balancers to get the value of DNSName.\n\t\t\t\t\t\t\t\tFor more information, see the applicable guide:

    \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t
  • \n
\n\t\t\t\t
\n
Global Accelerator accelerator
\n
\n

Specify the DNS name for your accelerator:

\n\t\t\t\t\t \n\t\t\t\t
\n
Amazon S3 bucket that is configured as a static website
\n
\n

Specify the domain name of the Amazon S3 website endpoint that you created the bucket in, for example, \n\t\t\t\t\ts3-website.us-east-2.amazonaws.com. For more information about valid values, see the table \n\t\t\t\t\tAmazon S3 Website Endpoints \n\t\t\t\t\tin the Amazon Web Services General Reference. For more information about using S3 buckets for websites, \n\t\t\t\t\tsee Getting Started with Amazon Route 53 \n\t\t\t\t\tin the Amazon Route 53 Developer Guide.\n

\n
\n
Another Route 53 resource record set
\n
\n

Specify the value of the Name element for a resource record set in the current hosted zone.

\n\t\t\t\t\t \n

If you're creating an alias record that has the same name as the hosted zone (known as the zone apex), \n\t\t\t\t\t\tyou can't specify the domain name for a record for which the value of Type is CNAME. This is because \n\t\t\t\t\t\tthe alias record must have the same type as the record that you're routing traffic to, and creating a CNAME record for the \n\t\t\t\t\t\tzone apex isn't supported even for an alias record.

\n
\n\t\t\t\t
\n
", + "smithy.api#documentation": "

\n Alias resource record sets only: The value that you specify depends on where you want to route queries:

\n\t\t
\n
Amazon API Gateway custom regional APIs and edge-optimized APIs
\n
\n

Specify the applicable domain name for your API. You can get the applicable value using the CLI command \n\t\t\t\t\tget-domain-names:

\n\t\t\t\t\t
    \n
  • \n

    For regional APIs, specify the value of regionalDomainName.

    \n
  • \n
  • \n

    For edge-optimized APIs, specify the value of distributionDomainName. This is the name of the \n\t\t\t\t\t\t\tassociated CloudFront distribution, such as da1b2c3d4e5.cloudfront.net.

    \n
  • \n
\n\t\t\t\t\t \n\t\t\t\t\t\t

The name of the record that you're creating must match a custom domain name for your API, such as \n\t\t\t\t\t\t\tapi.example.com.

\n\t\t\t\t\t
\n\t\t\t\t
\n
Amazon Virtual Private Cloud interface VPC endpoint
\n
\n

Enter the API endpoint for the interface endpoint, such as \n\t\t\t\t\tvpce-123456789abcdef01-example-us-east-1a.elasticloadbalancing.us-east-1.vpce.amazonaws.com. For edge-optimized APIs, \n\t\t\t\t\tthis is the domain name for the corresponding CloudFront distribution. You can get the value of DnsName using the CLI command \n\t\t\t\t\tdescribe-vpc-endpoints.

\n\t\t\t\t
\n
CloudFront distribution
\n
\n

Specify the domain name that CloudFront assigned when you created your distribution.

\n\t\t\t\t\t

Your CloudFront distribution must include an alternate domain name that matches the name of the resource record set. \n\t\t\t\t\t\tFor example, if the name of the resource record set is acme.example.com, your CloudFront distribution must \n\t\t\t\t\t\tinclude acme.example.com as one of the alternate domain names. For more information, see \n\t\t\t\t\t\tUsing Alternate Domain Names (CNAMEs) in the \n\t\t\t\t\t\tAmazon CloudFront Developer Guide.

\n\t\t\t\t\t

You can't create a resource record set in a private hosted zone to route traffic to a CloudFront distribution.

\n\t\t\t\t\t \n

For failover alias records, you can't specify a CloudFront distribution for both the primary and secondary records. \n\t\t\t\t\t\tA distribution must include an alternate domain name that matches the name of the record. However, the primary and secondary records \n\t\t\t\t\t\thave the same name, and you can't include the same alternate domain name in more than one distribution.

\n
\n\t\t\t\t
\n
Elastic Beanstalk environment
\n
\n\t\t\t\t\t

If the domain name for your Elastic Beanstalk environment includes the region that you deployed the environment in, \n\t\t\t\t\t\tyou can create an alias record that routes traffic to the environment. For example, the domain name \n\t\t\t\t\t\tmy-environment.us-west-2.elasticbeanstalk.com is a regionalized domain name.

\n\t\t\t\t\t \n\t\t\t\t\t\t

For environments that were created before early 2016, the domain name doesn't include the region. To route traffic \n\t\t\t\t\t\t\tto these environments, you must create a CNAME record instead of an alias record. Note that you can't create a \n\t\t\t\t\t\t\tCNAME record for the root domain name. For example, if your domain name is example.com, you can create a record \n\t\t\t\t\t\t\tthat routes traffic for acme.example.com to your Elastic Beanstalk environment, but you can't create a record \n\t\t\t\t\t\t\tthat routes traffic for example.com to your Elastic Beanstalk environment.

\n\t\t\t\t\t
\n\t\t\t\t\t

For Elastic Beanstalk environments that have regionalized subdomains, specify the CNAME attribute for the environment. \n\t\t\t\t\t\tYou can use the following methods to get the value of the CNAME attribute:

\n\t\t\t\t\t
    \n
  • \n\t\t\t\t\t\t\t

    \n Amazon Web Services Management Console: For information about how to get the value by using the console, \n\t\t\t\t\t\t\t\tsee Using Custom Domains with Elastic Beanstalk in the \n\t\t\t\t\t\t\t\tElastic Beanstalk Developer Guide.

    \n\t\t\t\t\t\t
  • \n
  • \n\t\t\t\t\t\t\t

    \n Elastic Beanstalk API: Use the DescribeEnvironments action to get \n\t\t\t\t\t\t\t\tthe value of the CNAME attribute. For more information, see \n\t\t\t\t\t\t\t\tDescribeEnvironments \n\t\t\t\t\t\t\t\tin the Elastic Beanstalk API Reference.

    \n\t\t\t\t\t\t
  • \n
  • \n\t\t\t\t\t\t\t

    \n CLI: Use the describe-environments command to get the value of the \n\t\t\t\t\t\t\t\tCNAME attribute. For more information, see \n\t\t\t\t\t\t\t\tdescribe-environments in the \n\t\t\t\t\t\t\t\tCLI Command Reference.

    \n\t\t\t\t\t\t
  • \n
\n\t\t\t\t
\n
ELB load balancer
\n
\n

Specify the DNS name that is associated with the load balancer. Get the DNS name by using the Amazon Web Services Management Console, \n\t\t\t\t\tthe ELB API, or the CLI.

\n\t\t\t\t\t
    \n
  • \n\t\t\t\t\t\t\t

    \n Amazon Web Services Management Console: Go to the EC2 page, choose Load Balancers \n\t\t\t\t\t\t\t\tin the navigation pane, choose the load balancer, choose the Description tab, and get the value \n\t\t\t\t\t\t\t\tof the DNS name field.

    \n\t\t\t\t\t\t\t

    If you're routing traffic to a Classic Load Balancer, get the value that begins with dualstack. \n\t\t\t\t\t\t\t\tIf you're routing traffic to another type of load balancer, get the value that applies to the record type, A or AAAA.

    \n\t\t\t\t\t\t
  • \n
  • \n\t\t\t\t\t\t\t

    \n Elastic Load Balancing API: Use DescribeLoadBalancers to get the value \n\t\t\t\t\t\t\t\tof DNSName. For more information, see the applicable guide:

    \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t
  • \n
  • \n\t\t\t\t\t\t\t

    \n CLI: Use describe-load-balancers to get the value of DNSName.\n\t\t\t\t\t\t\t\tFor more information, see the applicable guide:

    \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t
  • \n
\n\t\t\t\t
\n
Global Accelerator accelerator
\n
\n

Specify the DNS name for your accelerator:

\n\t\t\t\t\t \n\t\t\t\t
\n
Amazon S3 bucket that is configured as a static website
\n
\n

Specify the domain name of the Amazon S3 website endpoint that you created the bucket in, for example, \n\t\t\t\t\ts3-website.us-east-2.amazonaws.com. For more information about valid values, see the table \n\t\t\t\t\tAmazon S3 Website Endpoints \n\t\t\t\t\tin the Amazon Web Services General Reference. For more information about using S3 buckets for websites, \n\t\t\t\t\tsee Getting Started with Amazon Route 53 \n\t\t\t\t\tin the Amazon Route 53 Developer Guide.\n

\n
\n
Another Route 53 resource record set
\n
\n

Specify the value of the Name element for a resource record set in the current hosted zone.

\n\t\t\t\t\t \n

If you're creating an alias record that has the same name as the hosted zone (known as the zone apex), \n\t\t\t\t\t\tyou can't specify the domain name for a record for which the value of Type is CNAME. This is because \n\t\t\t\t\t\tthe alias record must have the same type as the record that you're routing traffic to, and creating a CNAME record for the \n\t\t\t\t\t\tzone apex isn't supported even for an alias record.

\n
\n\t\t\t\t
\n
", "smithy.api#required": {} } }, @@ -467,7 +467,7 @@ } ], "traits": { - "smithy.api#documentation": "

Associates an Amazon VPC with a private hosted zone.

\n\t\t \n

To perform the association, the VPC and the private hosted zone must already exist. \n\t\t\tYou can't convert a public hosted zone into a private hosted zone.

\n
\n\t\t \n

If you want to associate a VPC that was created by using one account with a private hosted zone that was created \n\t\t\tby using a different account, the account that created the private hosted zone must first submit a \n\t\t\tCreateVPCAssociationAuthorization request. Then the account that created the VPC must submit an \n\t\t\tAssociateVPCWithHostedZone request.

\n
", + "smithy.api#documentation": "

Associates an Amazon VPC with a private hosted zone.

\n\t\t \n

To perform the association, the VPC and the private hosted zone must already exist. \n\t\t\tYou can't convert a public hosted zone into a private hosted zone.

\n
\n\t\t \n

If you want to associate a VPC that was created by using one Amazon Web Services account with a private hosted zone that was created \n\t\t\tby using a different account, the Amazon Web Services account that created the private hosted zone must first submit a \n\t\t\tCreateVPCAssociationAuthorization request. Then the account that created the VPC must submit an \n\t\t\tAssociateVPCWithHostedZone request.

\n
", "smithy.api#http": { "method": "POST", "uri": "/2013-04-01/hostedzone/{HostedZoneId}/associatevpc", @@ -1413,7 +1413,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a configuration for DNS query logging. After you create a query logging configuration, Amazon Route 53 begins to publish \n\t\t\tlog data to an Amazon CloudWatch Logs log group.

\n\t\t

DNS query logs contain information about the queries that Route 53 receives for a specified public hosted zone, such as the following:

\n\t\t \n\t\t\n\t\t
\n
Log Group and Resource Policy
\n
\n

Before you create a query logging configuration, perform the following operations.

\n\t\t\t\t\t \n

If you create a query logging configuration using the Route 53 console, Route 53 performs these operations automatically.

\n
\n\t\t\t\t\t
    \n
  1. \n

    Create a CloudWatch Logs log group, and make note of the ARN, which you specify when you create a \n\t\t\t\t\t\t\tquery logging configuration. Note the following:

    \n\t\t\t\t\t\t\t
      \n
    • \n

      You must create the log group in the us-east-1 region.

      \n
    • \n
    • \n

      You must use the same account to create the log group and the hosted zone that you want to \n\t\t\t\t\t\t\t\t\tconfigure query logging for.

      \n
    • \n
    • \n

      When you create log groups for query logging, we recommend that you use a consistent prefix, for example:

      \n\t\t\t\t\t\t\t\t\t

      \n /aws/route53/hosted zone name\n \n

      \n\t\t\t\t\t\t\t\t\t

      In the next step, you'll create a resource policy, which controls access to one or more log groups and the associated \n\t\t\t\t\t\t\t\t\t\tAmazon Web Services resources, such as Route 53 hosted zones. There's a limit on the number of resource policies that you can create, so \n\t\t\t\t\t\t\t\t\t\twe recommend that you use a consistent prefix so you can use the same resource policy for all the log groups that you create \n\t\t\t\t\t\t\t\t\t\tfor query logging.

      \n\t\t\t\t\t\t\t\t
    • \n
    \n\t\t\t\t\t\t
  2. \n
  3. \n

    Create a CloudWatch Logs resource policy, and give it the permissions that Route 53 needs to create log streams and to \n\t\t\t\t\t\t\tsend query logs to log streams. For the value of Resource, specify the ARN for the log group that you created \n\t\t\t\t\t\t\tin the previous step. To use the same resource policy for all the CloudWatch Logs log groups that you created for query logging configurations, \n\t\t\t\t\t\t\treplace the hosted zone name with *, for example:

    \n\t\t\t\t\t\t\t

    \n arn:aws:logs:us-east-1:123412341234:log-group:/aws/route53/*\n

    \n\t\t\t\t\t\t\t \n

    You can't use the CloudWatch console to create or edit a resource policy. You must use the CloudWatch API, one of the Amazon Web Services SDKs, \n\t\t\t\t\t\t\t\tor the CLI.

    \n
    \n\t\t\t\t\t\t
  4. \n
\n\t\t\t\t
\n
Log Streams and Edge Locations
\n
\n

When Route 53 finishes creating the configuration for DNS query logging, it does the following:

\n\t\t\t\t\t
    \n
  • \n

    Creates a log stream for an edge location the first time that the edge location responds to DNS queries for the \n\t\t\t\t\t\t\tspecified hosted zone. That log stream is used to log all queries that Route 53 responds to for that edge location.

    \n
  • \n
  • \n

    Begins to send query logs to the applicable log stream.

    \n
  • \n
\n\t\t\t\t\t

The name of each log stream is in the following format:

\n\t\t\t\t\t

\n \n hosted zone ID/edge location code\n \n

\n\t\t\t\t\t

The edge location code is a three-letter code and an arbitrarily assigned number, for example, DFW3. The three-letter code \n\t\t\t\t\t\ttypically corresponds with the International Air Transport Association airport code for an airport near the edge location. \n\t\t\t\t\t\t(These abbreviations might change in the future.) For a list of edge locations, see \"The Route 53 Global Network\" on the \n\t\t\t\t\t\tRoute 53 Product Details page.

\n\t\t\t\t
\n
Queries That Are Logged
\n
\n

Query logs contain only the queries that DNS resolvers forward to Route 53. If a DNS resolver has already cached \n\t\t\t\t\tthe response to a query (such as the IP address for a load balancer for example.com), the resolver will continue to return \n\t\t\t\t\tthe cached response. It doesn't forward another query to Route 53 until the TTL for the corresponding resource record set expires. \n\t\t\t\t\tDepending on how many DNS queries are submitted for a resource record set, and depending on the TTL for that resource record set, \n\t\t\t\t\tquery logs might contain information about only one query out of every several thousand queries that are submitted to DNS. \n\t\t\t\t\tFor more information about how DNS works, see \n\t\t\t\t\tRouting Internet Traffic to Your Website or Web Application\n\t\t\t\t\tin the Amazon Route 53 Developer Guide.

\n\t\t\t\t
\n
Log File Format
\n
\n

For a list of the values in each query log and the format of each value, see \n\t\t\t\t\tLogging DNS Queries in the \n\t\t\t\t\tAmazon Route 53 Developer Guide.

\n\t\t\t\t
\n
Pricing
\n
\n

For information about charges for query logs, see \n\t\t\t\t\tAmazon CloudWatch Pricing.

\n
\n
How to Stop Logging
\n
\n

If you want Route 53 to stop sending query logs to CloudWatch Logs, delete the query logging configuration. For more information, see \n\t\t\t\t\tDeleteQueryLoggingConfig.

\n\t\t\t\t
\n
", + "smithy.api#documentation": "

Creates a configuration for DNS query logging. After you create a query logging configuration, Amazon Route 53 begins to publish \n\t\t\tlog data to an Amazon CloudWatch Logs log group.

\n\t\t

DNS query logs contain information about the queries that Route 53 receives for a specified public hosted zone, such as the following:

\n\t\t \n\t\t\n\t\t
\n
Log Group and Resource Policy
\n
\n

Before you create a query logging configuration, perform the following operations.

\n\t\t\t\t\t \n

If you create a query logging configuration using the Route 53 console, Route 53 performs these operations automatically.

\n
\n\t\t\t\t\t
    \n
  1. \n

    Create a CloudWatch Logs log group, and make note of the ARN, which you specify when you create a \n\t\t\t\t\t\t\tquery logging configuration. Note the following:

    \n\t\t\t\t\t\t\t
      \n
    • \n

      You must create the log group in the us-east-1 region.

      \n
    • \n
    • \n

      You must use the same Amazon Web Services account to create the log group and the hosted zone that you want to \n\t\t\t\t\t\t\t\t\tconfigure query logging for.

      \n
    • \n
    • \n

      When you create log groups for query logging, we recommend that you use a consistent prefix, for example:

      \n\t\t\t\t\t\t\t\t\t

      \n /aws/route53/hosted zone name\n \n

      \n\t\t\t\t\t\t\t\t\t

      In the next step, you'll create a resource policy, which controls access to one or more log groups and the associated \n\t\t\t\t\t\t\t\t\t\tAmazon Web Services resources, such as Route 53 hosted zones. There's a limit on the number of resource policies that you can create, so \n\t\t\t\t\t\t\t\t\t\twe recommend that you use a consistent prefix so you can use the same resource policy for all the log groups that you create \n\t\t\t\t\t\t\t\t\t\tfor query logging.

      \n\t\t\t\t\t\t\t\t
    • \n
    \n\t\t\t\t\t\t
  2. \n
  3. \n

    Create a CloudWatch Logs resource policy, and give it the permissions that Route 53 needs to create log streams and to \n\t\t\t\t\t\t\tsend query logs to log streams. For the value of Resource, specify the ARN for the log group that you created \n\t\t\t\t\t\t\tin the previous step. To use the same resource policy for all the CloudWatch Logs log groups that you created for query logging configurations, \n\t\t\t\t\t\t\treplace the hosted zone name with *, for example:

    \n\t\t\t\t\t\t\t

    \n arn:aws:logs:us-east-1:123412341234:log-group:/aws/route53/*\n

    \n\t\t\t\t\t\t\t \n

    You can't use the CloudWatch console to create or edit a resource policy. You must use the CloudWatch API, one of the Amazon Web Services SDKs, \n\t\t\t\t\t\t\t\tor the CLI.

    \n
    \n\t\t\t\t\t\t
  4. \n
\n\t\t\t\t
\n
Log Streams and Edge Locations
\n
\n

When Route 53 finishes creating the configuration for DNS query logging, it does the following:

\n\t\t\t\t\t
    \n
  • \n

    Creates a log stream for an edge location the first time that the edge location responds to DNS queries for the \n\t\t\t\t\t\t\tspecified hosted zone. That log stream is used to log all queries that Route 53 responds to for that edge location.

    \n
  • \n
  • \n

    Begins to send query logs to the applicable log stream.

    \n
  • \n
\n\t\t\t\t\t

The name of each log stream is in the following format:

\n\t\t\t\t\t

\n \n hosted zone ID/edge location code\n \n

\n\t\t\t\t\t

The edge location code is a three-letter code and an arbitrarily assigned number, for example, DFW3. The three-letter code \n\t\t\t\t\t\ttypically corresponds with the International Air Transport Association airport code for an airport near the edge location. \n\t\t\t\t\t\t(These abbreviations might change in the future.) For a list of edge locations, see \"The Route 53 Global Network\" on the \n\t\t\t\t\t\tRoute 53 Product Details page.

\n\t\t\t\t
\n
Queries That Are Logged
\n
\n

Query logs contain only the queries that DNS resolvers forward to Route 53. If a DNS resolver has already cached \n\t\t\t\t\tthe response to a query (such as the IP address for a load balancer for example.com), the resolver will continue to return \n\t\t\t\t\tthe cached response. It doesn't forward another query to Route 53 until the TTL for the corresponding resource record set expires. \n\t\t\t\t\tDepending on how many DNS queries are submitted for a resource record set, and depending on the TTL for that resource record set, \n\t\t\t\t\tquery logs might contain information about only one query out of every several thousand queries that are submitted to DNS. \n\t\t\t\t\tFor more information about how DNS works, see \n\t\t\t\t\tRouting Internet Traffic to Your Website or Web Application\n\t\t\t\t\tin the Amazon Route 53 Developer Guide.

\n\t\t\t\t
\n
Log File Format
\n
\n

For a list of the values in each query log and the format of each value, see \n\t\t\t\t\tLogging DNS Queries in the \n\t\t\t\t\tAmazon Route 53 Developer Guide.

\n\t\t\t\t
\n
Pricing
\n
\n

For information about charges for query logs, see \n\t\t\t\t\tAmazon CloudWatch Pricing.

\n
\n
How to Stop Logging
\n
\n

If you want Route 53 to stop sending query logs to CloudWatch Logs, delete the query logging configuration. For more information, see \n\t\t\t\t\tDeleteQueryLoggingConfig.

\n\t\t\t\t
\n
", "smithy.api#http": { "method": "POST", "uri": "/2013-04-01/queryloggingconfig", @@ -1492,7 +1492,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a delegation set (a group of four name servers) that can be reused by multiple hosted zones that were created by \n\t\t\tthe same account.

\n\t\t

You can also create a reusable delegation set that uses the four name servers that are associated \n\t\t\twith an existing hosted zone. Specify the hosted zone ID in the CreateReusableDelegationSet request.

\n\t\t \n\t\t\t

You can't associate a reusable delegation set with a private hosted zone.

\n\t\t
\n\t\t

For information about using a reusable delegation set to configure white label name servers, see \n\t\t\tConfiguring White Label Name Servers.

\n\t\t\n\t\t

The process for migrating existing hosted zones to use a reusable delegation set is comparable to the process for \n\t\t\tconfiguring white label name servers. You need to perform the following steps:

\n\t\t
    \n
  1. \n

    Create a reusable delegation set.

    \n
  2. \n
  3. \n

    Recreate hosted zones, and reduce the TTL to 60 seconds or less.

    \n
  4. \n
  5. \n

    Recreate resource record sets in the new hosted zones.

    \n
  6. \n
  7. \n

    Change the registrar's name servers to use the name servers for the new hosted zones.

    \n
  8. \n
  9. \n

    Monitor traffic for the website or application.

    \n
  10. \n
  11. \n

    Change TTLs back to their original values.

    \n
  12. \n
\n\t\t\n\t\t

If you want to migrate existing hosted zones to use a reusable delegation set, the existing hosted zones can't use \n\t\t\tany of the name servers that are assigned to the reusable delegation set. If one or more hosted zones do use one or more \n\t\t\tname servers that are assigned to the reusable delegation set, you can do one of the following:

\n\t\t ", + "smithy.api#documentation": "

Creates a delegation set (a group of four name servers) that can be reused by multiple hosted zones that were created by \n\t\t\tthe same Amazon Web Services account.

\n\t\t

You can also create a reusable delegation set that uses the four name servers that are associated \n\t\t\twith an existing hosted zone. Specify the hosted zone ID in the CreateReusableDelegationSet request.

\n\t\t \n\t\t\t

You can't associate a reusable delegation set with a private hosted zone.

\n\t\t
\n\t\t

For information about using a reusable delegation set to configure white label name servers, see \n\t\t\tConfiguring White Label Name Servers.

\n\t\t\n\t\t

The process for migrating existing hosted zones to use a reusable delegation set is comparable to the process for \n\t\t\tconfiguring white label name servers. You need to perform the following steps:

\n\t\t
    \n
  1. \n

    Create a reusable delegation set.

    \n
  2. \n
  3. \n

    Recreate hosted zones, and reduce the TTL to 60 seconds or less.

    \n
  4. \n
  5. \n

    Recreate resource record sets in the new hosted zones.

    \n
  6. \n
  7. \n

    Change the registrar's name servers to use the name servers for the new hosted zones.

    \n
  8. \n
  9. \n

    Monitor traffic for the website or application.

    \n
  10. \n
  11. \n

    Change TTLs back to their original values.

    \n
  12. \n
\n\t\t\n\t\t

If you want to migrate existing hosted zones to use a reusable delegation set, the existing hosted zones can't use \n\t\t\tany of the name servers that are assigned to the reusable delegation set. If one or more hosted zones do use one or more \n\t\t\tname servers that are assigned to the reusable delegation set, you can do one of the following:

\n\t\t ", "smithy.api#http": { "method": "POST", "uri": "/2013-04-01/delegationset", @@ -1832,7 +1832,7 @@ } ], "traits": { - "smithy.api#documentation": "

Authorizes the account that created a specified VPC to submit an AssociateVPCWithHostedZone \n\t\t\trequest to associate the VPC with a specified hosted zone that was created by a different account. \n\t\t\tTo submit a CreateVPCAssociationAuthorization request, you must use the account that created the \n\t\t\thosted zone. After you authorize the association, use the account that created the VPC to submit an \n\t\t\tAssociateVPCWithHostedZone request.

\n\t\t \n

If you want to associate multiple VPCs that you created by using one account with a hosted zone \n\t\t\tthat you created by using a different account, you must submit one authorization request for each VPC.

\n
", + "smithy.api#documentation": "

Authorizes the Amazon Web Services account that created a specified VPC to submit an AssociateVPCWithHostedZone \n\t\t\trequest to associate the VPC with a specified hosted zone that was created by a different account. \n\t\t\tTo submit a CreateVPCAssociationAuthorization request, you must use the account that created the \n\t\t\thosted zone. After you authorize the association, use the account that created the VPC to submit an \n\t\t\tAssociateVPCWithHostedZone request.

\n\t\t \n

If you want to associate multiple VPCs that you created by using one account with a hosted zone \n\t\t\tthat you created by using a different account, you must submit one authorization request for each VPC.

\n
", "smithy.api#http": { "method": "POST", "uri": "/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation", @@ -2204,7 +2204,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a hosted zone.

\n\t\t\n\t\t

If the hosted zone was created by another service, such as Cloud Map, see \n\t\t\tDeleting \n\t\t\tPublic Hosted Zones That Were Created by Another Service in the Amazon Route 53 Developer Guide for information about how to delete it. \n\t\t\t(The process is the same for public and private hosted zones that were created by another service.)

\n\t\t\n\t\t

If you want to keep your domain registration but you want to stop routing internet traffic to your website or web application, \n\t\t\twe recommend that you delete resource record sets in the hosted zone instead of deleting the hosted zone.

\n\t\t\n\t\t \n\t\t\t

If you delete a hosted zone, you can't undelete it. You must create a new hosted zone and update the name servers for your \n\t\t\t\tdomain registration, which can require up to 48 hours to take effect. (If you delegated responsibility for a subdomain to a hosted zone \n\t\t\t\tand you delete the child hosted zone, you must update the name servers in the parent hosted zone.) In addition, if you delete a hosted zone, \n\t\t\t\tsomeone could hijack the domain and route traffic to their own resources using your domain name.

\n\t\t
\n\t\t\n\t\t

If you want to avoid the monthly charge for the hosted zone, you can transfer DNS service for the domain to a free DNS service. \n\t\t\tWhen you transfer DNS service, you have to update the name servers for the domain registration. If the domain is registered with Route 53, \n\t\t\tsee UpdateDomainNameservers\n\t\t\tfor information about how to replace Route 53 name servers with name servers for the new DNS service. If the domain is registered with \n\t\t\tanother registrar, use the method provided by the registrar to update name servers for the domain registration. For more information, \n\t\t\tperform an internet search on \"free DNS service.\"

\n\n\t\t

You can delete a hosted zone only if it contains only the default SOA record and NS resource record sets. \n\t\t\tIf the hosted zone contains other resource record sets, you must delete them before you can delete the hosted zone. \n\t\t\tIf you try to delete a hosted zone that contains other resource record sets, the request fails, and Route 53 returns a \n\t\t\tHostedZoneNotEmpty error. For information about deleting records from your hosted zone, see \n\t\t\tChangeResourceRecordSets.

\n\t\t

To verify that the hosted zone has been deleted, do one of the following:

\n\t\t ", + "smithy.api#documentation": "

Deletes a hosted zone.

\n\t\t\n\t\t

If the hosted zone was created by another service, such as Cloud Map, see \n\t\t\tDeleting \n\t\t\tPublic Hosted Zones That Were Created by Another Service in the Amazon Route 53 Developer Guide for information about how to delete it. \n\t\t\t(The process is the same for public and private hosted zones that were created by another service.)

\n\t\t\n\t\t

If you want to keep your domain registration but you want to stop routing internet traffic to your website or web application, \n\t\t\twe recommend that you delete resource record sets in the hosted zone instead of deleting the hosted zone.

\n\t\t\n\t\t \n\t\t\t

If you delete a hosted zone, you can't undelete it. You must create a new hosted zone and update the name servers for your \n\t\t\t\tdomain registration, which can require up to 48 hours to take effect. (If you delegated responsibility for a subdomain to a hosted zone \n\t\t\t\tand you delete the child hosted zone, you must update the name servers in the parent hosted zone.) In addition, if you delete a hosted zone, \n\t\t\t\tsomeone could hijack the domain and route traffic to their own resources using your domain name.

\n\t\t
\n\t\t\n\t\t

If you want to avoid the monthly charge for the hosted zone, you can transfer DNS service for the domain to a free DNS service. \n\t\t\tWhen you transfer DNS service, you have to update the name servers for the domain registration. If the domain is registered with Route 53, \n\t\t\tsee UpdateDomainNameservers\n\t\t\tfor information about how to replace Route 53 name servers with name servers for the new DNS service. If the domain is registered with \n\t\t\tanother registrar, use the method provided by the registrar to update name servers for the domain registration. For more information, \n\t\t\tperform an internet search on \"free DNS service.\"

\n\n\t\t

You can delete a hosted zone only if it contains only the default SOA record and NS resource record sets. \n\t\t\tIf the hosted zone contains other resource record sets, you must delete them before you can delete the hosted zone. \n\t\t\tIf you try to delete a hosted zone that contains other resource record sets, the request fails, and Route 53 returns a \n\t\t\tHostedZoneNotEmpty error. For information about deleting records from your hosted zone, see \n\t\t\tChangeResourceRecordSets.

\n\t\t

To verify that the hosted zone has been deleted, do one of the following:

\n\t\t ", "smithy.api#http": { "method": "DELETE", "uri": "/2013-04-01/hostedzone/{Id}", @@ -2550,7 +2550,7 @@ } ], "traits": { - "smithy.api#documentation": "

Removes authorization to submit an AssociateVPCWithHostedZone request to associate a specified VPC \n\t\t\twith a hosted zone that was created by a different account. You must use the account that created the hosted zone \n\t\t\tto submit a DeleteVPCAssociationAuthorization request.

\n\t\t \n\t\t\t

Sending this request only prevents the account that created the VPC from associating the VPC \n\t\t\t\twith the Amazon Route 53 hosted zone in the future. If the VPC is already associated with the hosted zone, \n\t\t\t\tDeleteVPCAssociationAuthorization won't disassociate the VPC from the hosted zone. \n\t\t\t\tIf you want to delete an existing association, use DisassociateVPCFromHostedZone.

\n\t\t
", + "smithy.api#documentation": "

Removes authorization to submit an AssociateVPCWithHostedZone request to associate a specified VPC \n\t\t\twith a hosted zone that was created by a different account. You must use the account that created the hosted zone \n\t\t\tto submit a DeleteVPCAssociationAuthorization request.

\n\t\t \n\t\t\t

Sending this request only prevents the Amazon Web Services account that created the VPC from associating the VPC \n\t\t\t\twith the Amazon Route 53 hosted zone in the future. If the VPC is already associated with the hosted zone, \n\t\t\t\tDeleteVPCAssociationAuthorization won't disassociate the VPC from the hosted zone. \n\t\t\t\tIf you want to delete an existing association, use DisassociateVPCFromHostedZone.

\n\t\t
", "smithy.api#http": { "method": "POST", "uri": "/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation", @@ -2564,7 +2564,7 @@ "HostedZoneId": { "target": "com.amazonaws.route53#ResourceId", "traits": { - "smithy.api#documentation": "

When removing authorization to associate a VPC that was created by one account with a hosted zone \n\t\t\tthat was created with a different account, the ID of the hosted zone.

", + "smithy.api#documentation": "

When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone \n\t\t\tthat was created with a different Amazon Web Services account, the ID of the hosted zone.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2572,13 +2572,13 @@ "VPC": { "target": "com.amazonaws.route53#VPC", "traits": { - "smithy.api#documentation": "

When removing authorization to associate a VPC that was created by one account with a hosted zone \n\t\t\tthat was created with a different account, a complex type that includes the ID and region of the VPC.

", + "smithy.api#documentation": "

When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone \n\t\t\tthat was created with a different Amazon Web Services account, a complex type that includes the ID and region of the VPC.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

A complex type that contains information about the request to remove authorization to associate a VPC \n\t\t\tthat was created by one account with a hosted zone that was created with a different account.

" + "smithy.api#documentation": "

A complex type that contains information about the request to remove authorization to associate a VPC \n\t\t\tthat was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account.

" } }, "com.amazonaws.route53#DeleteVPCAssociationAuthorizationResponse": { @@ -3051,7 +3051,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the specified limit for the current account, for example, the maximum number of health checks that you \n\t\t\tcan create using the account.

\n\t\t

For the default limit, see Limits \n\t\t\tin the Amazon Route 53 Developer Guide. To request a higher limit, \n\t\t\topen a case.

\n\t\t \n

You can also view account limits in Amazon Web Services Trusted Advisor. Sign in to the Management Console and open the Trusted Advisor console at \n\t\t\thttps://console.aws.amazon.com/trustedadvisor/. Then choose \n\t\t\tService limits in the navigation pane.

\n\t\t
", + "smithy.api#documentation": "

Gets the specified limit for the current account, for example, the maximum number of health checks that you \n\t\t\tcan create using the account.

\n\t\t

For the default limit, see Limits \n\t\t\tin the Amazon Route 53 Developer Guide. To request a higher limit, \n\t\t\topen a case.

\n\t\t \n

You can also view account limits in Amazon Web Services Trusted Advisor. Sign in to the Amazon Web Services Management Console and open the Trusted Advisor console at \n\t\t\thttps://console.aws.amazon.com/trustedadvisor/. Then choose \n\t\t\tService limits in the navigation pane.

\n\t\t
", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/accountlimit/{Type}", @@ -3375,7 +3375,7 @@ "target": "com.amazonaws.route53#GetHealthCheckCountResponse" }, "traits": { - "smithy.api#documentation": "

Retrieves the number of health checks that are associated with the current account.

", + "smithy.api#documentation": "

Retrieves the number of health checks that are associated with the current Amazon Web Services account.

", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/healthcheckcount", @@ -3387,7 +3387,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

A request for the number of health checks that are associated with the current account.

" + "smithy.api#documentation": "

A request for the number of health checks that are associated with the current Amazon Web Services account.

" } }, "com.amazonaws.route53#GetHealthCheckCountResponse": { @@ -3396,7 +3396,7 @@ "HealthCheckCount": { "target": "com.amazonaws.route53#HealthCheckCount", "traits": { - "smithy.api#documentation": "

The number of health checks associated with the current account.

", + "smithy.api#documentation": "

The number of health checks associated with the current Amazon Web Services account.

", "smithy.api#required": {} } } @@ -3483,7 +3483,7 @@ "HealthCheck": { "target": "com.amazonaws.route53#HealthCheck", "traits": { - "smithy.api#documentation": "

A complex type that contains information about one health check that is associated with\n\t\t\tthe current account.

", + "smithy.api#documentation": "

A complex type that contains information about one health check that is associated with\n\t\t\tthe current Amazon Web Services account.

", "smithy.api#required": {} } } @@ -3587,7 +3587,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the number of hosted zones that are associated with the current account.

", + "smithy.api#documentation": "

Retrieves the number of hosted zones that are associated with the current Amazon Web Services account.

", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/hostedzonecount", @@ -3599,7 +3599,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

A request to retrieve a count of all the hosted zones that are associated with the current account.

" + "smithy.api#documentation": "

A request to retrieve a count of all the hosted zones that are associated with the current Amazon Web Services account.

" } }, "com.amazonaws.route53#GetHostedZoneCountResponse": { @@ -3608,7 +3608,7 @@ "HostedZoneCount": { "target": "com.amazonaws.route53#HostedZoneCount", "traits": { - "smithy.api#documentation": "

The total number of public and private hosted zones that are associated with the current account.

", + "smithy.api#documentation": "

The total number of public and private hosted zones that are associated with the current Amazon Web Services account.

", "smithy.api#required": {} } } @@ -3973,7 +3973,7 @@ "target": "com.amazonaws.route53#GetTrafficPolicyInstanceCountResponse" }, "traits": { - "smithy.api#documentation": "

Gets the number of traffic policy instances that are associated with the current account.

", + "smithy.api#documentation": "

Gets the number of traffic policy instances that are associated with the current Amazon Web Services account.

", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/trafficpolicyinstancecount", @@ -3985,7 +3985,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Request to get the number of traffic policy instances that are associated with the current account.

" + "smithy.api#documentation": "

Request to get the number of traffic policy instances that are associated with the current Amazon Web Services account.

" } }, "com.amazonaws.route53#GetTrafficPolicyInstanceCountResponse": { @@ -3994,7 +3994,7 @@ "TrafficPolicyInstanceCount": { "target": "com.amazonaws.route53#TrafficPolicyInstanceCount", "traits": { - "smithy.api#documentation": "

The number of traffic policy instances that are associated with the current account.

", + "smithy.api#documentation": "

The number of traffic policy instances that are associated with the current Amazon Web Services account.

", "smithy.api#required": {} } } @@ -4246,7 +4246,7 @@ "RoutingControlArn": { "target": "com.amazonaws.route53#RoutingControlArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) for Route53 Application Recovery Controller routing control.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller routing control.

\n\t\t

For more information about Route 53 Application Recovery Controller, see Route 53 Application Recovery Controller Developer Guide..

" } } }, @@ -4646,7 +4646,7 @@ "OwningAccount": { "target": "com.amazonaws.route53#AWSAccountID", "traits": { - "smithy.api#documentation": "

If the hosted zone was created by an account, or was created by an Amazon Web Services service that creates hosted zones using the current account, \n\t\t\tOwningAccount contains the account ID of that account. For example, when you use Cloud Map to create a hosted zone, Cloud Map \n\t\t\tcreates the hosted zone using the current account.

" + "smithy.api#documentation": "

If the hosted zone was created by an Amazon Web Services account, or was created by an Amazon Web Services service that creates hosted zones using the current account, \n\t\t\tOwningAccount contains the account ID of that account. For example, when you use Cloud Map to create a hosted zone, Cloud Map \n\t\t\tcreates the hosted zone using the current Amazon Web Services account.

" } }, "OwningService": { @@ -4716,7 +4716,7 @@ "Owner": { "target": "com.amazonaws.route53#HostedZoneOwner", "traits": { - "smithy.api#documentation": "

The owner of a private hosted zone that the specified VPC is associated with. The owner can be either an account or \n\t\t\tan Amazon Web Services service.

", + "smithy.api#documentation": "

The owner of a private hosted zone that the specified VPC is associated with. The owner can be either an Amazon Web Services account or \n\t\t\tan Amazon Web Services service.

", "smithy.api#required": {} } } @@ -5302,7 +5302,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieve a list of the health checks that are associated with the current account.

", + "smithy.api#documentation": "

Retrieve a list of the health checks that are associated with the current Amazon Web Services account.

", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/healthcheck", @@ -5335,7 +5335,7 @@ } }, "traits": { - "smithy.api#documentation": "

A request to retrieve a list of the health checks that are associated with the current account.

" + "smithy.api#documentation": "

A request to retrieve a list of the health checks that are associated with the current Amazon Web Services account.

" } }, "com.amazonaws.route53#ListHealthChecksResponse": { @@ -5344,7 +5344,7 @@ "HealthChecks": { "target": "com.amazonaws.route53#HealthChecks", "traits": { - "smithy.api#documentation": "

A complex type that contains one HealthCheck element for each health check that is associated with the current \n\t\t\taccount.

", + "smithy.api#documentation": "

A complex type that contains one HealthCheck element for each health check that is associated with the current \n\t\t\tAmazon Web Services account.

", "smithy.api#required": {} } }, @@ -5400,7 +5400,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves a list of the public and private hosted zones that are associated with the current account. The response \n\t\t\tincludes a HostedZones child element for each hosted zone.

\n\t\t

Amazon Route 53 returns a maximum of 100 items in each response. If you have a lot of hosted zones, you can use the \n\t\t\tmaxitems parameter to list them in groups of up to 100.

", + "smithy.api#documentation": "

Retrieves a list of the public and private hosted zones that are associated with the current Amazon Web Services account. The response \n\t\t\tincludes a HostedZones child element for each hosted zone.

\n\t\t

Amazon Route 53 returns a maximum of 100 items in each response. If you have a lot of hosted zones, you can use the \n\t\t\tmaxitems parameter to list them in groups of up to 100.

", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/hostedzone", @@ -5431,7 +5431,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves a list of your hosted zones in lexicographic order. The response includes a HostedZones child element \n\t\t\tfor each hosted zone created by the current account.

\n\t\t

\n ListHostedZonesByName sorts hosted zones by name with the labels reversed. For example:

\n\n\t\t

\n com.example.www.\n

\n\n\t\t

Note the trailing dot, which can change the sort order in some circumstances.

\n\t\t

If the domain name includes escape characters or Punycode, ListHostedZonesByName alphabetizes the domain name \n\t\t\tusing the escaped or Punycoded value, which is the format that Amazon Route 53 saves in its database. For example, to create a hosted zone \n\t\t\tfor exämple.com, you specify ex\\344mple.com for the domain name. ListHostedZonesByName alphabetizes it as:

\n\n\t\t

\n com.ex\\344mple.\n

\n\t\t\n\t\t

The labels are reversed and alphabetized using the escaped value. For more information about valid domain name formats, \n\t\t\tincluding internationalized domain names, see DNS Domain Name Format in the \n\t\t\tAmazon Route 53 Developer Guide.

\n\t\t

Route 53 returns up to 100 items in each response. If you have a lot of hosted zones, use the MaxItems parameter to list \n\t\t\tthem in groups of up to 100. The response includes values that help navigate from one group of MaxItems hosted zones to the next:

\n\t\t ", + "smithy.api#documentation": "

Retrieves a list of your hosted zones in lexicographic order. The response includes a HostedZones child element \n\t\t\tfor each hosted zone created by the current Amazon Web Services account.

\n\t\t

\n ListHostedZonesByName sorts hosted zones by name with the labels reversed. For example:

\n\n\t\t

\n com.example.www.\n

\n\n\t\t

Note the trailing dot, which can change the sort order in some circumstances.

\n\t\t

If the domain name includes escape characters or Punycode, ListHostedZonesByName alphabetizes the domain name \n\t\t\tusing the escaped or Punycoded value, which is the format that Amazon Route 53 saves in its database. For example, to create a hosted zone \n\t\t\tfor exämple.com, you specify ex\\344mple.com for the domain name. ListHostedZonesByName alphabetizes it as:

\n\n\t\t

\n com.ex\\344mple.\n

\n\t\t\n\t\t

The labels are reversed and alphabetized using the escaped value. For more information about valid domain name formats, \n\t\t\tincluding internationalized domain names, see DNS Domain Name Format in the \n\t\t\tAmazon Route 53 Developer Guide.

\n\t\t

Route 53 returns up to 100 items in each response. If you have a lot of hosted zones, use the MaxItems parameter to list \n\t\t\tthem in groups of up to 100. The response includes values that help navigate from one group of MaxItems hosted zones to the next:

\n\t\t ", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/hostedzonesbyname", @@ -5445,7 +5445,7 @@ "DNSName": { "target": "com.amazonaws.route53#DNSName", "traits": { - "smithy.api#documentation": "

(Optional) For your first request to ListHostedZonesByName, include the dnsname parameter only if you want to \n\t\t\tspecify the name of the first hosted zone in the response. If you don't include the dnsname parameter, Amazon Route 53 returns all of \n\t\t\tthe hosted zones that were created by the current account, in ASCII order. For subsequent requests, include both dnsname and \n\t\t\thostedzoneid parameters. For dnsname, specify the value of NextDNSName from the previous response.

", + "smithy.api#documentation": "

(Optional) For your first request to ListHostedZonesByName, include the dnsname parameter only if you want to \n\t\t\tspecify the name of the first hosted zone in the response. If you don't include the dnsname parameter, Amazon Route 53 returns all of \n\t\t\tthe hosted zones that were created by the current Amazon Web Services account, in ASCII order. For subsequent requests, include both dnsname and \n\t\t\thostedzoneid parameters. For dnsname, specify the value of NextDNSName from the previous response.

", "smithy.api#httpQuery": "dnsname" } }, @@ -5465,7 +5465,7 @@ } }, "traits": { - "smithy.api#documentation": "

Retrieves a list of the public and private hosted zones that are associated with the current account in ASCII order by domain \n\t\t\tname.

" + "smithy.api#documentation": "

Retrieves a list of the public and private hosted zones that are associated with the current Amazon Web Services account in ASCII order by domain \n\t\t\tname.

" } }, "com.amazonaws.route53#ListHostedZonesByNameResponse": { @@ -5538,7 +5538,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists all the private hosted zones that a specified VPC is associated with, regardless of which account or Amazon Web Services service owns the \n\t\t\thosted zones. The HostedZoneOwner structure in the response contains one of the following values:

\n\t\t ", + "smithy.api#documentation": "

Lists all the private hosted zones that a specified VPC is associated with, regardless of which Amazon Web Services account or Amazon Web Services service owns the \n\t\t\thosted zones. The HostedZoneOwner structure in the response contains one of the following values:

\n\t\t ", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/hostedzonesbyvpc", @@ -5581,7 +5581,7 @@ } }, "traits": { - "smithy.api#documentation": "

Lists all the private hosted zones that a specified VPC is associated with, regardless of which account created the hosted zones.

" + "smithy.api#documentation": "

Lists all the private hosted zones that a specified VPC is associated with, regardless of which Amazon Web Services account created the hosted zones.

" } }, "com.amazonaws.route53#ListHostedZonesByVPCResponse": { @@ -5635,7 +5635,7 @@ } }, "traits": { - "smithy.api#documentation": "

A request to retrieve a list of the public and private hosted zones that are associated with the current account.

" + "smithy.api#documentation": "

A request to retrieve a list of the public and private hosted zones that are associated with the current Amazon Web Services account.

" } }, "com.amazonaws.route53#ListHostedZonesResponse": { @@ -5697,7 +5697,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the configurations for DNS query logging that are associated with the current account or the configuration \n\t\t\tthat is associated with a specified hosted zone.

\n\n\t\t

For more information about DNS query logs, see \n\t\t\tCreateQueryLoggingConfig. \n\t\t\tAdditional information, including the format of DNS query logs, appears in \n\t\t\tLogging DNS Queries \n\t\t\tin the Amazon Route 53 Developer Guide.

", + "smithy.api#documentation": "

Lists the configurations for DNS query logging that are associated with the current Amazon Web Services account or the configuration \n\t\t\tthat is associated with a specified hosted zone.

\n\n\t\t

For more information about DNS query logs, see \n\t\t\tCreateQueryLoggingConfig. \n\t\t\tAdditional information, including the format of DNS query logs, appears in \n\t\t\tLogging DNS Queries \n\t\t\tin the Amazon Route 53 Developer Guide.

", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/queryloggingconfig", @@ -5717,21 +5717,21 @@ "HostedZoneId": { "target": "com.amazonaws.route53#ResourceId", "traits": { - "smithy.api#documentation": "

(Optional) If you want to list the query logging configuration that is associated with a hosted zone, specify the ID in \n\t\t\tHostedZoneId.

\n\t\t

If you don't specify a hosted zone ID, ListQueryLoggingConfigs returns all of the configurations \n\t\t\tthat are associated with the current account.

", + "smithy.api#documentation": "

(Optional) If you want to list the query logging configuration that is associated with a hosted zone, specify the ID in \n\t\t\tHostedZoneId.

\n\t\t

If you don't specify a hosted zone ID, ListQueryLoggingConfigs returns all of the configurations \n\t\t\tthat are associated with the current Amazon Web Services account.

", "smithy.api#httpQuery": "hostedzoneid" } }, "NextToken": { "target": "com.amazonaws.route53#PaginationToken", "traits": { - "smithy.api#documentation": "

(Optional) If the current account has more than MaxResults query logging configurations, use NextToken \n\t\t\tto get the second and subsequent pages of results.

\n\t\t

For the first ListQueryLoggingConfigs request, omit this value.

\n\t\t

For the second and subsequent requests, get the value of NextToken from the previous response and specify that value \n\t\t\tfor NextToken in the request.

", + "smithy.api#documentation": "

(Optional) If the current Amazon Web Services account has more than MaxResults query logging configurations, use NextToken \n\t\t\tto get the second and subsequent pages of results.

\n\t\t

For the first ListQueryLoggingConfigs request, omit this value.

\n\t\t

For the second and subsequent requests, get the value of NextToken from the previous response and specify that value \n\t\t\tfor NextToken in the request.

", "smithy.api#httpQuery": "nexttoken" } }, "MaxResults": { "target": "smithy.api#Integer", "traits": { - "smithy.api#documentation": "

(Optional) The maximum number of query logging configurations that you want Amazon Route 53 to return in response to the current request. \n\t\t\tIf the current account has more than MaxResults configurations, use the value of \n\t\t\tNextToken \n\t\t\tin the response to get the next page of results.

\n\t\t

If you don't specify a value for MaxResults, Route 53 returns up to 100 configurations.

", + "smithy.api#documentation": "

(Optional) The maximum number of query logging configurations that you want Amazon Route 53 to return in response to the current request. \n\t\t\tIf the current Amazon Web Services account has more than MaxResults configurations, use the value of \n\t\t\tNextToken \n\t\t\tin the response to get the next page of results.

\n\t\t

If you don't specify a value for MaxResults, Route 53 returns up to 100 configurations.

", "smithy.api#httpQuery": "maxresults" } } @@ -5743,14 +5743,14 @@ "QueryLoggingConfigs": { "target": "com.amazonaws.route53#QueryLoggingConfigs", "traits": { - "smithy.api#documentation": "

An array that contains one \n\t\t\tQueryLoggingConfig element \n\t\t\tfor each configuration for DNS query logging that is associated with the current account.

", + "smithy.api#documentation": "

An array that contains one \n\t\t\tQueryLoggingConfig element \n\t\t\tfor each configuration for DNS query logging that is associated with the current Amazon Web Services account.

", "smithy.api#required": {} } }, "NextToken": { "target": "com.amazonaws.route53#PaginationToken", "traits": { - "smithy.api#documentation": "

If a response includes the last of the query logging configurations that are associated with the current account, \n\t\t\tNextToken doesn't appear in the response.

\n\t\t

If a response doesn't include the last of the configurations, you can get more configurations by submitting another \n\t\t\tListQueryLoggingConfigs \n\t\t\trequest. Get the value of NextToken that Amazon Route 53 returned in the previous response and include it in \n\t\t\tNextToken in the next request.

" + "smithy.api#documentation": "

If a response includes the last of the query logging configurations that are associated with the current Amazon Web Services account, \n\t\t\tNextToken doesn't appear in the response.

\n\t\t

If a response doesn't include the last of the configurations, you can get more configurations by submitting another \n\t\t\tListQueryLoggingConfigs \n\t\t\trequest. Get the value of NextToken that Amazon Route 53 returned in the previous response and include it in \n\t\t\tNextToken in the next request.

" } } } @@ -5885,7 +5885,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves a list of the reusable delegation sets that are associated with the current account.

", + "smithy.api#documentation": "

Retrieves a list of the reusable delegation sets that are associated with the current Amazon Web Services account.

", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/delegationset", @@ -5912,7 +5912,7 @@ } }, "traits": { - "smithy.api#documentation": "

A request to get a list of the reusable delegation sets that are associated with the current account.

" + "smithy.api#documentation": "

A request to get a list of the reusable delegation sets that are associated with the current Amazon Web Services account.

" } }, "com.amazonaws.route53#ListReusableDelegationSetsResponse": { @@ -5921,7 +5921,7 @@ "DelegationSets": { "target": "com.amazonaws.route53#DelegationSets", "traits": { - "smithy.api#documentation": "

A complex type that contains one DelegationSet element for each reusable delegation set that was created \n\t\t\tby the current account.

", + "smithy.api#documentation": "

A complex type that contains one DelegationSet element for each reusable delegation set that was created \n\t\t\tby the current Amazon Web Services account.

", "smithy.api#required": {} } }, @@ -5954,7 +5954,7 @@ } }, "traits": { - "smithy.api#documentation": "

A complex type that contains information about the reusable delegation sets that are associated with the current account.

" + "smithy.api#documentation": "

A complex type that contains information about the reusable delegation sets that are associated with the current Amazon Web Services account.

" } }, "com.amazonaws.route53#ListTagsForResource": { @@ -6116,7 +6116,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about the latest version for every traffic policy that is associated with the current account. \n\t\t\tPolicies are listed in the order that they were created in.

\n\t\t\n\t\t

For information about how of deleting a traffic policy affects the response from ListTrafficPolicies, see \n\t\t\tDeleteTrafficPolicy.\n\n\t\t

", + "smithy.api#documentation": "

Gets information about the latest version for every traffic policy that is associated with the current Amazon Web Services account. \n\t\t\tPolicies are listed in the order that they were created in.

\n\t\t\n\t\t

For information about how of deleting a traffic policy affects the response from ListTrafficPolicies, see \n\t\t\tDeleteTrafficPolicy.\n\n\t\t

", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/trafficpolicies", @@ -6143,7 +6143,7 @@ } }, "traits": { - "smithy.api#documentation": "

A complex type that contains the information about the request to list the traffic policies that are associated \n\t\t\twith the current account.

" + "smithy.api#documentation": "

A complex type that contains the information about the request to list the traffic policies that are associated \n\t\t\twith the current Amazon Web Services account.

" } }, "com.amazonaws.route53#ListTrafficPoliciesResponse": { @@ -6152,7 +6152,7 @@ "TrafficPolicySummaries": { "target": "com.amazonaws.route53#TrafficPolicySummaries", "traits": { - "smithy.api#documentation": "

A list that contains one TrafficPolicySummary element for each traffic policy that was created by the current account.

", + "smithy.api#documentation": "

A list that contains one TrafficPolicySummary element for each traffic policy that was created by the current Amazon Web Services account.

", "smithy.api#required": {} } }, @@ -6199,7 +6199,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about the traffic policy instances that you created by using the current account.

\n\t\t \n\t\t\t

After you submit an UpdateTrafficPolicyInstance request, there's a brief delay while Amazon Route 53 creates the \n\t\t\t\tresource record sets that are specified in the traffic policy definition. For more information, see the State response element.

\n\t\t
\n\t\t

Route 53 returns a maximum of 100 items in each response. If you have a lot of traffic policy instances, you can use the \n\t\t\tMaxItems parameter to list them in groups of up to 100.

", + "smithy.api#documentation": "

Gets information about the traffic policy instances that you created by using the current Amazon Web Services account.

\n\t\t \n\t\t\t

After you submit an UpdateTrafficPolicyInstance request, there's a brief delay while Amazon Route 53 creates the \n\t\t\t\tresource record sets that are specified in the traffic policy definition. For more information, see the State response element.

\n\t\t
\n\t\t

Route 53 returns a maximum of 100 items in each response. If you have a lot of traffic policy instances, you can use the \n\t\t\tMaxItems parameter to list them in groups of up to 100.

", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/trafficpolicyinstances", @@ -6473,7 +6473,7 @@ } }, "traits": { - "smithy.api#documentation": "

A request to get information about the traffic policy instances that you created by using the current account.

" + "smithy.api#documentation": "

A request to get information about the traffic policy instances that you created by using the current Amazon Web Services account.

" } }, "com.amazonaws.route53#ListTrafficPolicyInstancesResponse": { @@ -7967,7 +7967,7 @@ } }, "traits": { - "smithy.api#documentation": "

This health check can't be created because the current account has reached the limit on the number of active health checks.

\n\t\t

For information about default limits, see Limits \n\t\t\tin the Amazon Route 53 Developer Guide.

\n\t\t

For information about how to get the current limit for an account, see \n\t\t\tGetAccountLimit. To request a \n\t\t\thigher limit, create a case with the Amazon Web Services Support Center.

\n\n\t\t

You have reached the maximum number of active health checks for an account. To request a higher limit, \n\t\t\tcreate a case with the Amazon Web Services Support Center.

", + "smithy.api#documentation": "

This health check can't be created because the current account has reached the limit on the number of active health checks.

\n\t\t

For information about default limits, see Limits \n\t\t\tin the Amazon Route 53 Developer Guide.

\n\t\t

For information about how to get the current limit for an account, see \n\t\t\tGetAccountLimit. To request a \n\t\t\thigher limit, create a case with the Amazon Web Services Support Center.

\n\n\t\t

You have reached the maximum number of active health checks for an Amazon Web Services account. To request a higher limit, \n\t\t\tcreate a case with the Amazon Web Services Support Center.

", "smithy.api#error": "client" } }, @@ -8346,13 +8346,13 @@ "TrafficPolicyCount": { "target": "com.amazonaws.route53#TrafficPolicyVersion", "traits": { - "smithy.api#documentation": "

The number of traffic policies that are associated with the current account.

", + "smithy.api#documentation": "

The number of traffic policies that are associated with the current Amazon Web Services account.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

A complex type that contains information about the latest version of one traffic policy \n\t\t\tthat is associated with the current account.

" + "smithy.api#documentation": "

A complex type that contains information about the latest version of one traffic policy \n\t\t\tthat is associated with the current Amazon Web Services account.

" } }, "com.amazonaws.route53#TrafficPolicyVersion": { diff --git a/codegen/sdk-codegen/aws-models/snowdevicemanagement.2021-08-04.json b/codegen/sdk-codegen/aws-models/snowdevicemanagement.2021-08-04.json new file mode 100644 index 00000000000..c1b1870bcbf --- /dev/null +++ b/codegen/sdk-codegen/aws-models/snowdevicemanagement.2021-08-04.json @@ -0,0 +1,2093 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.snowdevicemanagement#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

You don't have sufficient access to perform this action.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.snowdevicemanagement#AttachmentStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ATTACHING", + "name": "ATTACHING" + }, + { + "value": "ATTACHED", + "name": "ATTACHED" + }, + { + "value": "DETACHING", + "name": "DETACHING" + }, + { + "value": "DETACHED", + "name": "DETACHED" + } + ] + } + }, + "com.amazonaws.snowdevicemanagement#CancelTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.snowdevicemanagement#CancelTaskInput" + }, + "output": { + "target": "com.amazonaws.snowdevicemanagement#CancelTaskOutput" + }, + "errors": [ + { + "target": "com.amazonaws.snowdevicemanagement#AccessDeniedException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#InternalServerException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ThrottlingException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Sends a cancel request for a specified task. You can cancel a task only if it's still in a\n QUEUED state. Tasks that are already running can't be cancelled.

\n \n

A task might still run if it's processed from the queue before the\n CancelTask operation changes the task's state.

\n
", + "smithy.api#http": { + "method": "POST", + "uri": "/task/{taskId}/cancel", + "code": 200 + } + } + }, + "com.amazonaws.snowdevicemanagement#CancelTaskInput": { + "type": "structure", + "members": { + "taskId": { + "target": "com.amazonaws.snowdevicemanagement#TaskId", + "traits": { + "smithy.api#documentation": "

The ID of the task that you are attempting to cancel. You can retrieve a task ID by using\n the ListTasks operation.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.snowdevicemanagement#CancelTaskOutput": { + "type": "structure", + "members": { + "taskId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the task that you are attempting to cancel.

" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#Capacity": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the type of capacity, such as memory.

", + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "unit": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unit of measure for the type of capacity.

", + "smithy.api#length": { + "min": 0, + "max": 20 + } + } + }, + "total": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "

The total capacity on the device.

" + } + }, + "used": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "

The amount of capacity used on the device.

" + } + }, + "available": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "

The amount of capacity available for use on the device.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The physical capacity of the Amazon Web Services Snow Family device.

" + } + }, + "com.amazonaws.snowdevicemanagement#CapacityList": { + "type": "list", + "member": { + "target": "com.amazonaws.snowdevicemanagement#Capacity" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.snowdevicemanagement#Command": { + "type": "union", + "members": { + "unlock": { + "target": "com.amazonaws.snowdevicemanagement#Unlock", + "traits": { + "smithy.api#documentation": "

Unlocks the device.

" + } + }, + "reboot": { + "target": "com.amazonaws.snowdevicemanagement#Reboot", + "traits": { + "smithy.api#documentation": "

Reboots the device.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The command given to the device to execute.

" + } + }, + "com.amazonaws.snowdevicemanagement#CpuOptions": { + "type": "structure", + "members": { + "coreCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The number of cores that the CPU can use.

" + } + }, + "threadsPerCore": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The number of threads per core in the CPU.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The options for how a device's CPU is configured.

" + } + }, + "com.amazonaws.snowdevicemanagement#CreateTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.snowdevicemanagement#CreateTaskInput" + }, + "output": { + "target": "com.amazonaws.snowdevicemanagement#CreateTaskOutput" + }, + "errors": [ + { + "target": "com.amazonaws.snowdevicemanagement#AccessDeniedException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#InternalServerException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ThrottlingException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Instructs one or more devices to start a task, such as unlocking or rebooting.

", + "smithy.api#http": { + "method": "POST", + "uri": "/task", + "code": 200 + } + } + }, + "com.amazonaws.snowdevicemanagement#CreateTaskInput": { + "type": "structure", + "members": { + "targets": { + "target": "com.amazonaws.snowdevicemanagement#TargetList", + "traits": { + "smithy.api#documentation": "

A list of managed device IDs.

", + "smithy.api#required": {} + } + }, + "command": { + "target": "com.amazonaws.snowdevicemanagement#Command", + "traits": { + "smithy.api#documentation": "

The task to be performed. Only one task is executed on a device at a time.

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.snowdevicemanagement#TaskDescriptionString", + "traits": { + "smithy.api#documentation": "

A description of the task and its targets.

" + } + }, + "tags": { + "target": "com.amazonaws.snowdevicemanagement#TagMap", + "traits": { + "smithy.api#documentation": "

Optional metadata that you assign to a resource. You can use tags to categorize a resource\n in different ways, such as by purpose, owner, or environment.

" + } + }, + "clientToken": { + "target": "com.amazonaws.snowdevicemanagement#IdempotencyToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.snowdevicemanagement#CreateTaskOutput": { + "type": "structure", + "members": { + "taskId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the task that you created.

" + } + }, + "taskArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the task that you created.

" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#DescribeDevice": { + "type": "operation", + "input": { + "target": "com.amazonaws.snowdevicemanagement#DescribeDeviceInput" + }, + "output": { + "target": "com.amazonaws.snowdevicemanagement#DescribeDeviceOutput" + }, + "errors": [ + { + "target": "com.amazonaws.snowdevicemanagement#AccessDeniedException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#InternalServerException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ThrottlingException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Checks device-specific information, such as the device type, software version, IP\n addresses, and lock status.

", + "smithy.api#http": { + "method": "POST", + "uri": "/managed-device/{managedDeviceId}/describe", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.snowdevicemanagement#DescribeDeviceEc2Input": { + "type": "structure", + "members": { + "managedDeviceId": { + "target": "com.amazonaws.snowdevicemanagement#ManagedDeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the managed device.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "instanceIds": { + "target": "com.amazonaws.snowdevicemanagement#InstanceIdsList", + "traits": { + "smithy.api#documentation": "

A list of instance IDs associated with the managed device.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.snowdevicemanagement#DescribeDeviceEc2Instances": { + "type": "operation", + "input": { + "target": "com.amazonaws.snowdevicemanagement#DescribeDeviceEc2Input" + }, + "output": { + "target": "com.amazonaws.snowdevicemanagement#DescribeDeviceEc2Output" + }, + "errors": [ + { + "target": "com.amazonaws.snowdevicemanagement#AccessDeniedException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#InternalServerException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ThrottlingException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Checks the current state of the Amazon EC2 instances. The output is similar to\n describeDevice, but the results are sourced from the device cache in the\n Amazon Web Services Cloud and include a subset of the available fields.

", + "smithy.api#http": { + "method": "POST", + "uri": "/managed-device/{managedDeviceId}/resources/ec2/describe", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.snowdevicemanagement#DescribeDeviceEc2Output": { + "type": "structure", + "members": { + "instances": { + "target": "com.amazonaws.snowdevicemanagement#InstanceSummaryList", + "traits": { + "smithy.api#documentation": "

A list of structures containing information about each instance.

" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#DescribeDeviceInput": { + "type": "structure", + "members": { + "managedDeviceId": { + "target": "com.amazonaws.snowdevicemanagement#ManagedDeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the device that you are checking the information of.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.snowdevicemanagement#DescribeDeviceOutput": { + "type": "structure", + "members": { + "lastReachedOutAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

When the device last contacted the Amazon Web Services Cloud. Indicates that the device is\n online.

" + } + }, + "lastUpdatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

When the device last pushed an update to the Amazon Web Services Cloud. Indicates when the device cache\n was refreshed.

" + } + }, + "tags": { + "target": "com.amazonaws.snowdevicemanagement#TagMap", + "traits": { + "smithy.api#documentation": "

Optional metadata that you assign to a resource. You can use tags to categorize a resource\n in different ways, such as by purpose, owner, or environment.

" + } + }, + "managedDeviceId": { + "target": "com.amazonaws.snowdevicemanagement#ManagedDeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the device that you checked the information for.

" + } + }, + "managedDeviceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the device.

" + } + }, + "deviceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The type of Amazon Web Services Snow Family device.

" + } + }, + "associatedWithJob": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the job used when ordering the device.

" + } + }, + "deviceState": { + "target": "com.amazonaws.snowdevicemanagement#UnlockState", + "traits": { + "smithy.api#documentation": "

The current state of the device.

" + } + }, + "physicalNetworkInterfaces": { + "target": "com.amazonaws.snowdevicemanagement#PhysicalNetworkInterfaceList", + "traits": { + "smithy.api#documentation": "

The network interfaces available on the device.

" + } + }, + "deviceCapacities": { + "target": "com.amazonaws.snowdevicemanagement#CapacityList", + "traits": { + "smithy.api#documentation": "

The hardware specifications of the device.

" + } + }, + "software": { + "target": "com.amazonaws.snowdevicemanagement#SoftwareInformation", + "traits": { + "smithy.api#documentation": "

The software installed on the device.

" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#DescribeExecution": { + "type": "operation", + "input": { + "target": "com.amazonaws.snowdevicemanagement#DescribeExecutionInput" + }, + "output": { + "target": "com.amazonaws.snowdevicemanagement#DescribeExecutionOutput" + }, + "errors": [ + { + "target": "com.amazonaws.snowdevicemanagement#AccessDeniedException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#InternalServerException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ThrottlingException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Checks the status of a remote task running on one or more target devices.

", + "smithy.api#http": { + "method": "POST", + "uri": "/task/{taskId}/execution/{managedDeviceId}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.snowdevicemanagement#DescribeExecutionInput": { + "type": "structure", + "members": { + "taskId": { + "target": "com.amazonaws.snowdevicemanagement#TaskId", + "traits": { + "smithy.api#documentation": "

The ID of the task that the action is describing.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "managedDeviceId": { + "target": "com.amazonaws.snowdevicemanagement#ManagedDeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the managed device.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.snowdevicemanagement#DescribeExecutionOutput": { + "type": "structure", + "members": { + "taskId": { + "target": "com.amazonaws.snowdevicemanagement#TaskId", + "traits": { + "smithy.api#documentation": "

The ID of the task being executed on the device.

" + } + }, + "executionId": { + "target": "com.amazonaws.snowdevicemanagement#ExecutionId", + "traits": { + "smithy.api#documentation": "

The ID of the execution.

" + } + }, + "managedDeviceId": { + "target": "com.amazonaws.snowdevicemanagement#ManagedDeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the managed device that the task is being executed on.

" + } + }, + "state": { + "target": "com.amazonaws.snowdevicemanagement#ExecutionState", + "traits": { + "smithy.api#documentation": "

The current state of the execution.

" + } + }, + "startedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

When the execution began.

" + } + }, + "lastUpdatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

When the status of the execution was last updated.

" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#DescribeTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.snowdevicemanagement#DescribeTaskInput" + }, + "output": { + "target": "com.amazonaws.snowdevicemanagement#DescribeTaskOutput" + }, + "errors": [ + { + "target": "com.amazonaws.snowdevicemanagement#AccessDeniedException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#InternalServerException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ThrottlingException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Checks the metadata for a given task on a device.

", + "smithy.api#http": { + "method": "POST", + "uri": "/task/{taskId}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.snowdevicemanagement#DescribeTaskInput": { + "type": "structure", + "members": { + "taskId": { + "target": "com.amazonaws.snowdevicemanagement#TaskId", + "traits": { + "smithy.api#documentation": "

The ID of the task to be described.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.snowdevicemanagement#DescribeTaskOutput": { + "type": "structure", + "members": { + "taskId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the task.

" + } + }, + "taskArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the task.

" + } + }, + "targets": { + "target": "com.amazonaws.snowdevicemanagement#TargetList", + "traits": { + "smithy.api#documentation": "

The managed devices that the task was sent to.

" + } + }, + "state": { + "target": "com.amazonaws.snowdevicemanagement#TaskState", + "traits": { + "smithy.api#documentation": "

The current state of the task.

" + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

When the CreateTask operation was called.

" + } + }, + "lastUpdatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

When the state of the task was last updated.

" + } + }, + "completedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

When the task was completed.

" + } + }, + "description": { + "target": "com.amazonaws.snowdevicemanagement#TaskDescriptionString", + "traits": { + "smithy.api#documentation": "

The description provided of the task and managed devices.

" + } + }, + "tags": { + "target": "com.amazonaws.snowdevicemanagement#TagMap", + "traits": { + "smithy.api#documentation": "

Optional metadata that you assign to a resource. You can use tags to categorize a resource\n in different ways, such as by purpose, owner, or environment.

" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#DeviceSummary": { + "type": "structure", + "members": { + "managedDeviceId": { + "target": "com.amazonaws.snowdevicemanagement#ManagedDeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the device.

" + } + }, + "managedDeviceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the device.

" + } + }, + "associatedWithJob": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the job used to order the device.

" + } + }, + "tags": { + "target": "com.amazonaws.snowdevicemanagement#TagMap", + "traits": { + "smithy.api#documentation": "

Optional metadata that you assign to a resource. You can use tags to categorize a resource\n in different ways, such as by purpose, owner, or environment.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Identifying information about the device.

" + } + }, + "com.amazonaws.snowdevicemanagement#DeviceSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.snowdevicemanagement#DeviceSummary" + } + }, + "com.amazonaws.snowdevicemanagement#EbsInstanceBlockDevice": { + "type": "structure", + "members": { + "attachTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

When the attachment was initiated.

" + } + }, + "deleteOnTermination": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

A value that indicates whether the volume is deleted on instance termination.

" + } + }, + "status": { + "target": "com.amazonaws.snowdevicemanagement#AttachmentStatus", + "traits": { + "smithy.api#documentation": "

The attachment state.

" + } + }, + "volumeId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the Amazon EBS volume.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a parameter used to set up an Amazon Elastic Block Store (Amazon EBS) volume\n in a block device mapping.

" + } + }, + "com.amazonaws.snowdevicemanagement#Execution": { + "type": "resource", + "identifiers": { + "taskId": { + "target": "com.amazonaws.snowdevicemanagement#TaskId" + }, + "managedDeviceId": { + "target": "com.amazonaws.snowdevicemanagement#ManagedDeviceId" + } + }, + "read": { + "target": "com.amazonaws.snowdevicemanagement#DescribeExecution" + }, + "list": { + "target": "com.amazonaws.snowdevicemanagement#ListExecutions" + } + }, + "com.amazonaws.snowdevicemanagement#ExecutionId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, + "com.amazonaws.snowdevicemanagement#ExecutionState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "QUEUED", + "name": "QUEUED" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "CANCELED", + "name": "CANCELED" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "SUCCEEDED", + "name": "SUCCEEDED" + }, + { + "value": "REJECTED", + "name": "REJECTED" + }, + { + "value": "TIMED_OUT", + "name": "TIMED_OUT" + } + ] + } + }, + "com.amazonaws.snowdevicemanagement#ExecutionSummary": { + "type": "structure", + "members": { + "taskId": { + "target": "com.amazonaws.snowdevicemanagement#TaskId", + "traits": { + "smithy.api#documentation": "

The ID of the task.

" + } + }, + "executionId": { + "target": "com.amazonaws.snowdevicemanagement#ExecutionId", + "traits": { + "smithy.api#documentation": "

The ID of the execution.

" + } + }, + "managedDeviceId": { + "target": "com.amazonaws.snowdevicemanagement#ManagedDeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the managed device that the task is being executed on.

" + } + }, + "state": { + "target": "com.amazonaws.snowdevicemanagement#ExecutionState", + "traits": { + "smithy.api#documentation": "

The state of the execution.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The summary of a task execution on a specified device.

" + } + }, + "com.amazonaws.snowdevicemanagement#ExecutionSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.snowdevicemanagement#ExecutionSummary" + } + }, + "com.amazonaws.snowdevicemanagement#IdempotencyToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "[!-~]+" + } + }, + "com.amazonaws.snowdevicemanagement#Instance": { + "type": "structure", + "members": { + "imageId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the AMI used to launch the instance.

" + } + }, + "amiLaunchIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The Amazon Machine Image (AMI) launch index, which you can use to find this instance in\n the launch group.

" + } + }, + "instanceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the instance.

" + } + }, + "state": { + "target": "com.amazonaws.snowdevicemanagement#InstanceState" + }, + "instanceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The instance type.

" + } + }, + "privateIpAddress": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The private IPv4 address assigned to the instance.

" + } + }, + "publicIpAddress": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The public IPv4 address assigned to the instance.

" + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

When the instance was created.

" + } + }, + "updatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

When the instance was last updated.

" + } + }, + "blockDeviceMappings": { + "target": "com.amazonaws.snowdevicemanagement#InstanceBlockDeviceMappingList", + "traits": { + "smithy.api#documentation": "

Any block device mapping entries for the instance.

" + } + }, + "securityGroups": { + "target": "com.amazonaws.snowdevicemanagement#SecurityGroupIdentifierList", + "traits": { + "smithy.api#documentation": "

The security groups for the instance.

" + } + }, + "cpuOptions": { + "target": "com.amazonaws.snowdevicemanagement#CpuOptions", + "traits": { + "smithy.api#documentation": "

The CPU options for the instance.

" + } + }, + "rootDeviceName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The device name of the root device volume (for example, /dev/sda1).

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The description of an\n instance.\n Currently, Amazon EC2 instances are the only supported instance type.

" + } + }, + "com.amazonaws.snowdevicemanagement#InstanceBlockDeviceMapping": { + "type": "structure", + "members": { + "deviceName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The block device name.

" + } + }, + "ebs": { + "target": "com.amazonaws.snowdevicemanagement#EbsInstanceBlockDevice", + "traits": { + "smithy.api#documentation": "

The parameters used to automatically set up Amazon Elastic Block Store (Amazon EBS)\n volumes when the instance is launched.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The description of a block device mapping.

" + } + }, + "com.amazonaws.snowdevicemanagement#InstanceBlockDeviceMappingList": { + "type": "list", + "member": { + "target": "com.amazonaws.snowdevicemanagement#InstanceBlockDeviceMapping" + } + }, + "com.amazonaws.snowdevicemanagement#InstanceIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "com.amazonaws.snowdevicemanagement#InstanceState": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The state of the instance as a 16-bit unsigned integer.

\n

The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values\n between 256 and 65,535. These numerical values are used for internal purposes and should be\n ignored.

\n

The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values\n between 0 and 255.

\n

The valid values for the instance state code are all in the range of the low byte. These\n values are:

\n \n

You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in\n decimal.

" + } + }, + "name": { + "target": "com.amazonaws.snowdevicemanagement#InstanceStateName", + "traits": { + "smithy.api#documentation": "

The current\n state\n of the instance.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The description of the current state of an instance.

" + } + }, + "com.amazonaws.snowdevicemanagement#InstanceStateName": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "RUNNING", + "name": "RUNNING" + }, + { + "value": "SHUTTING_DOWN", + "name": "SHUTTING_DOWN" + }, + { + "value": "TERMINATED", + "name": "TERMINATED" + }, + { + "value": "STOPPING", + "name": "STOPPING" + }, + { + "value": "STOPPED", + "name": "STOPPED" + } + ] + } + }, + "com.amazonaws.snowdevicemanagement#InstanceSummary": { + "type": "structure", + "members": { + "instance": { + "target": "com.amazonaws.snowdevicemanagement#Instance", + "traits": { + "smithy.api#documentation": "

A structure containing details about the instance.

" + } + }, + "lastUpdatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

When the instance summary was last updated.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details about the instance.

" + } + }, + "com.amazonaws.snowdevicemanagement#InstanceSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.snowdevicemanagement#InstanceSummary" + } + }, + "com.amazonaws.snowdevicemanagement#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

An unexpected error occurred while processing the request.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.snowdevicemanagement#IpAddressAssignment": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DHCP", + "name": "DHCP" + }, + { + "value": "STATIC", + "name": "STATIC" + } + ] + } + }, + "com.amazonaws.snowdevicemanagement#JobId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, + "com.amazonaws.snowdevicemanagement#ListDeviceResources": { + "type": "operation", + "input": { + "target": "com.amazonaws.snowdevicemanagement#ListDeviceResourcesInput" + }, + "output": { + "target": "com.amazonaws.snowdevicemanagement#ListDeviceResourcesOutput" + }, + "errors": [ + { + "target": "com.amazonaws.snowdevicemanagement#AccessDeniedException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#InternalServerException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ThrottlingException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of the Amazon Web Services resources available for a device. Currently, Amazon EC2 instances are the only supported resource type.

", + "smithy.api#http": { + "method": "GET", + "uri": "/managed-device/{managedDeviceId}/resources", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "resources", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.snowdevicemanagement#ListDeviceResourcesInput": { + "type": "structure", + "members": { + "managedDeviceId": { + "target": "com.amazonaws.snowdevicemanagement#ManagedDeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the managed device that you are listing the resources of.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

A structure used to filter the results by type of resource.

", + "smithy.api#httpQuery": "type", + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "maxResults": { + "target": "com.amazonaws.snowdevicemanagement#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of resources per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.snowdevicemanagement#NextToken", + "traits": { + "smithy.api#documentation": "

A pagination token to continue to the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#ListDeviceResourcesOutput": { + "type": "structure", + "members": { + "resources": { + "target": "com.amazonaws.snowdevicemanagement#ResourceSummaryList", + "traits": { + "smithy.api#documentation": "

A structure defining the resource's type, Amazon Resource Name (ARN), and ID.

" + } + }, + "nextToken": { + "target": "com.amazonaws.snowdevicemanagement#NextToken", + "traits": { + "smithy.api#documentation": "

A pagination token to continue to the next page of results.

" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#ListDevices": { + "type": "operation", + "input": { + "target": "com.amazonaws.snowdevicemanagement#ListDevicesInput" + }, + "output": { + "target": "com.amazonaws.snowdevicemanagement#ListDevicesOutput" + }, + "errors": [ + { + "target": "com.amazonaws.snowdevicemanagement#AccessDeniedException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#InternalServerException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ThrottlingException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of all devices on your Amazon Web Services account that have Amazon Web Services Snow Device Management\n enabled in the Amazon Web Services Region where the command is run.

", + "smithy.api#http": { + "method": "GET", + "uri": "/managed-devices", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "devices", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.snowdevicemanagement#ListDevicesInput": { + "type": "structure", + "members": { + "jobId": { + "target": "com.amazonaws.snowdevicemanagement#JobId", + "traits": { + "smithy.api#documentation": "

The ID of the job used to order the device.

", + "smithy.api#httpQuery": "jobId" + } + }, + "maxResults": { + "target": "com.amazonaws.snowdevicemanagement#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of devices to list per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.snowdevicemanagement#NextToken", + "traits": { + "smithy.api#documentation": "

A pagination token to continue to the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#ListDevicesOutput": { + "type": "structure", + "members": { + "devices": { + "target": "com.amazonaws.snowdevicemanagement#DeviceSummaryList", + "traits": { + "smithy.api#documentation": "

A list of device structures that contain information about the device.

" + } + }, + "nextToken": { + "target": "com.amazonaws.snowdevicemanagement#NextToken", + "traits": { + "smithy.api#documentation": "

A pagination token to continue to the next page of devices.

" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#ListExecutions": { + "type": "operation", + "input": { + "target": "com.amazonaws.snowdevicemanagement#ListExecutionsInput" + }, + "output": { + "target": "com.amazonaws.snowdevicemanagement#ListExecutionsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.snowdevicemanagement#AccessDeniedException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#InternalServerException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ThrottlingException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the status of tasks for one or more target devices.

", + "smithy.api#http": { + "method": "GET", + "uri": "/executions", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "executions", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.snowdevicemanagement#ListExecutionsInput": { + "type": "structure", + "members": { + "taskId": { + "target": "com.amazonaws.snowdevicemanagement#TaskId", + "traits": { + "smithy.api#documentation": "

The ID of the task.

", + "smithy.api#httpQuery": "taskId", + "smithy.api#required": {} + } + }, + "state": { + "target": "com.amazonaws.snowdevicemanagement#ExecutionState", + "traits": { + "smithy.api#documentation": "

A structure used to filter the tasks by their current state.

", + "smithy.api#httpQuery": "state" + } + }, + "maxResults": { + "target": "com.amazonaws.snowdevicemanagement#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of tasks to list per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.snowdevicemanagement#NextToken", + "traits": { + "smithy.api#documentation": "

A pagination token to continue to the next page of tasks.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#ListExecutionsOutput": { + "type": "structure", + "members": { + "executions": { + "target": "com.amazonaws.snowdevicemanagement#ExecutionSummaryList", + "traits": { + "smithy.api#documentation": "

A list of executions. Each execution contains the task ID, the device that the task is\n executing on, the execution ID, and the status of the execution.

" + } + }, + "nextToken": { + "target": "com.amazonaws.snowdevicemanagement#NextToken", + "traits": { + "smithy.api#documentation": "

A pagination token to continue to the next page of executions.

" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.snowdevicemanagement#ListTagsForResourceInput" + }, + "output": { + "target": "com.amazonaws.snowdevicemanagement#ListTagsForResourceOutput" + }, + "errors": [ + { + "target": "com.amazonaws.snowdevicemanagement#InternalServerException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of tags for a managed device or task.

", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.snowdevicemanagement#ListTagsForResourceInput": { + "type": "structure", + "members": { + "resourceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the device or task.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.snowdevicemanagement#ListTagsForResourceOutput": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.snowdevicemanagement#TagMap", + "traits": { + "smithy.api#documentation": "

The list of tags for the device or task.

" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#ListTasks": { + "type": "operation", + "input": { + "target": "com.amazonaws.snowdevicemanagement#ListTasksInput" + }, + "output": { + "target": "com.amazonaws.snowdevicemanagement#ListTasksOutput" + }, + "errors": [ + { + "target": "com.amazonaws.snowdevicemanagement#AccessDeniedException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#InternalServerException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ThrottlingException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of tasks that can be filtered by state.

", + "smithy.api#http": { + "method": "GET", + "uri": "/tasks", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "tasks", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.snowdevicemanagement#ListTasksInput": { + "type": "structure", + "members": { + "state": { + "target": "com.amazonaws.snowdevicemanagement#TaskState", + "traits": { + "smithy.api#documentation": "

A structure used to filter the list of tasks.

", + "smithy.api#httpQuery": "state" + } + }, + "maxResults": { + "target": "com.amazonaws.snowdevicemanagement#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of tasks per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.snowdevicemanagement#NextToken", + "traits": { + "smithy.api#documentation": "

A pagination token to continue to the next page of tasks.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#ListTasksOutput": { + "type": "structure", + "members": { + "tasks": { + "target": "com.amazonaws.snowdevicemanagement#TaskSummaryList", + "traits": { + "smithy.api#documentation": "

A list of task structures containing details about each task.

" + } + }, + "nextToken": { + "target": "com.amazonaws.snowdevicemanagement#NextToken", + "traits": { + "smithy.api#documentation": "

A pagination token to continue to the next page of tasks.

" + } + } + } + }, + "com.amazonaws.snowdevicemanagement#ManagedDevice": { + "type": "resource", + "identifiers": { + "managedDeviceId": { + "target": "com.amazonaws.snowdevicemanagement#ManagedDeviceId" + } + }, + "read": { + "target": "com.amazonaws.snowdevicemanagement#DescribeDevice" + }, + "list": { + "target": "com.amazonaws.snowdevicemanagement#ListDevices" + }, + "operations": [ + { + "target": "com.amazonaws.snowdevicemanagement#DescribeDeviceEc2Instances" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ListDeviceResources" + } + ], + "traits": { + "aws.api#arn": { + "template": "managed-device/{managedDeviceId}", + "absolute": false, + "noAccount": false, + "noRegion": false + } + } + }, + "com.amazonaws.snowdevicemanagement#ManagedDeviceId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, + "com.amazonaws.snowdevicemanagement#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.snowdevicemanagement#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "[a-zA-Z0-9+/=]*" + } + }, + "com.amazonaws.snowdevicemanagement#PhysicalConnectorType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "RJ45", + "name": "RJ45" + }, + { + "value": "SFP_PLUS", + "name": "SFP_PLUS" + }, + { + "value": "QSFP", + "name": "QSFP" + }, + { + "value": "RJ45_2", + "name": "RJ45_2" + }, + { + "value": "WIFI", + "name": "WIFI" + } + ] + } + }, + "com.amazonaws.snowdevicemanagement#PhysicalNetworkInterface": { + "type": "structure", + "members": { + "physicalNetworkInterfaceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The physical network interface ID.

" + } + }, + "physicalConnectorType": { + "target": "com.amazonaws.snowdevicemanagement#PhysicalConnectorType", + "traits": { + "smithy.api#documentation": "

The\n physical\n connector type.

" + } + }, + "ipAddressAssignment": { + "target": "com.amazonaws.snowdevicemanagement#IpAddressAssignment", + "traits": { + "smithy.api#documentation": "

A value that describes whether the IP address is dynamic or persistent.

" + } + }, + "ipAddress": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The IP address of the device.

" + } + }, + "netmask": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The netmask used to divide the IP address into subnets.

" + } + }, + "defaultGateway": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The default gateway of the device.

" + } + }, + "macAddress": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The MAC address of the device.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details about the physical network interface for the device.

" + } + }, + "com.amazonaws.snowdevicemanagement#PhysicalNetworkInterfaceList": { + "type": "list", + "member": { + "target": "com.amazonaws.snowdevicemanagement#PhysicalNetworkInterface" + } + }, + "com.amazonaws.snowdevicemanagement#Reboot": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

A structure used to reboot the device.

" + } + }, + "com.amazonaws.snowdevicemanagement#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request references a resource that doesn't exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.snowdevicemanagement#ResourceSummary": { + "type": "structure", + "members": { + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The resource type.

", + "smithy.api#required": {} + } + }, + "arn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

" + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A summary of a resource available on the device.

" + } + }, + "com.amazonaws.snowdevicemanagement#ResourceSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.snowdevicemanagement#ResourceSummary" + } + }, + "com.amazonaws.snowdevicemanagement#SecurityGroupIdentifier": { + "type": "structure", + "members": { + "groupId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The security group ID.

" + } + }, + "groupName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The security group name.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the device's security group.

" + } + }, + "com.amazonaws.snowdevicemanagement#SecurityGroupIdentifierList": { + "type": "list", + "member": { + "target": "com.amazonaws.snowdevicemanagement#SecurityGroupIdentifier" + } + }, + "com.amazonaws.snowdevicemanagement#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request would cause a service quota to be exceeded.

", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.snowdevicemanagement#SnowDeviceManagement": { + "type": "service", + "version": "2021-08-04", + "operations": [ + { + "target": "com.amazonaws.snowdevicemanagement#ListTagsForResource" + }, + { + "target": "com.amazonaws.snowdevicemanagement#TagResource" + }, + { + "target": "com.amazonaws.snowdevicemanagement#UntagResource" + } + ], + "resources": [ + { + "target": "com.amazonaws.snowdevicemanagement#ManagedDevice" + }, + { + "target": "com.amazonaws.snowdevicemanagement#Task" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Snow Device Management", + "arnNamespace": "snow-device-management", + "cloudFormationName": "SnowDeviceManagement", + "cloudTrailEventSource": "snow-device-management.amazonaws.com", + "endpointPrefix": "snow-device-management" + }, + "aws.auth#sigv4": { + "name": "snow-device-management" + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": {}, + "smithy.api#documentation": "

Amazon Web Services Snow Device Management documentation.

", + "smithy.api#title": "AWS Snow Device Management" + } + }, + "com.amazonaws.snowdevicemanagement#SoftwareInformation": { + "type": "structure", + "members": { + "installedVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The version of the software currently installed on the device.

" + } + }, + "installingVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The version of the software being installed on the device.

" + } + }, + "installState": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The state of the software that is installed or that is being installed on the\n device.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the software on the device.

" + } + }, + "com.amazonaws.snowdevicemanagement#TagKeys": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "com.amazonaws.snowdevicemanagement#TagMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "com.amazonaws.snowdevicemanagement#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.snowdevicemanagement#TagResourceInput" + }, + "errors": [ + { + "target": "com.amazonaws.snowdevicemanagement#InternalServerException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Adds or replaces tags on a device or task.

", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{resourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.snowdevicemanagement#TagResourceInput": { + "type": "structure", + "members": { + "resourceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the device or task.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.snowdevicemanagement#TagMap", + "traits": { + "smithy.api#documentation": "

Optional metadata that you assign to a resource. You can use tags to categorize a resource\n in different ways, such as by purpose, owner, or environment.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.snowdevicemanagement#TargetList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.snowdevicemanagement#Task": { + "type": "resource", + "identifiers": { + "taskId": { + "target": "com.amazonaws.snowdevicemanagement#TaskId" + } + }, + "create": { + "target": "com.amazonaws.snowdevicemanagement#CreateTask" + }, + "read": { + "target": "com.amazonaws.snowdevicemanagement#DescribeTask" + }, + "list": { + "target": "com.amazonaws.snowdevicemanagement#ListTasks" + }, + "operations": [ + { + "target": "com.amazonaws.snowdevicemanagement#CancelTask" + } + ], + "resources": [ + { + "target": "com.amazonaws.snowdevicemanagement#Execution" + } + ], + "traits": { + "aws.api#arn": { + "template": "task/{taskId}", + "absolute": false, + "noAccount": false, + "noRegion": false + } + } + }, + "com.amazonaws.snowdevicemanagement#TaskDescriptionString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "[A-Za-z0-9 _.,!#]*" + } + }, + "com.amazonaws.snowdevicemanagement#TaskId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, + "com.amazonaws.snowdevicemanagement#TaskState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "CANCELED", + "name": "CANCELED" + }, + { + "value": "COMPLETED", + "name": "COMPLETED" + } + ] + } + }, + "com.amazonaws.snowdevicemanagement#TaskSummary": { + "type": "structure", + "members": { + "taskId": { + "target": "com.amazonaws.snowdevicemanagement#TaskId", + "traits": { + "smithy.api#documentation": "

The task ID.

", + "smithy.api#required": {} + } + }, + "taskArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the task.

" + } + }, + "state": { + "target": "com.amazonaws.snowdevicemanagement#TaskState", + "traits": { + "smithy.api#documentation": "

The state of the task assigned to one or many devices.

" + } + }, + "tags": { + "target": "com.amazonaws.snowdevicemanagement#TagMap", + "traits": { + "smithy.api#documentation": "

Optional metadata that you assign to a resource. You can use tags to categorize a resource\n in different ways, such as by purpose, owner, or environment.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the task assigned to one or many devices.

" + } + }, + "com.amazonaws.snowdevicemanagement#TaskSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.snowdevicemanagement#TaskSummary" + } + }, + "com.amazonaws.snowdevicemanagement#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request was denied due to request throttling.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429, + "smithy.api#retryable": { + "throttling": true + } + } + }, + "com.amazonaws.snowdevicemanagement#Unlock": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

A structure used to unlock a device.

" + } + }, + "com.amazonaws.snowdevicemanagement#UnlockState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "UNLOCKED", + "name": "UNLOCKED" + }, + { + "value": "LOCKED", + "name": "LOCKED" + }, + { + "value": "UNLOCKING", + "name": "UNLOCKING" + } + ] + } + }, + "com.amazonaws.snowdevicemanagement#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.snowdevicemanagement#UntagResourceInput" + }, + "errors": [ + { + "target": "com.amazonaws.snowdevicemanagement#InternalServerException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.snowdevicemanagement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes a tag from a device or task.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.snowdevicemanagement#UntagResourceInput": { + "type": "structure", + "members": { + "resourceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the device or task.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.snowdevicemanagement#TagKeys", + "traits": { + "smithy.api#documentation": "

Optional metadata that you assign to a resource. You can use tags to categorize a resource\n in different ways, such as by purpose, owner, or environment.

", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.snowdevicemanagement#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by an Amazon Web Services service.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + } + } +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json b/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json index da6e88dda4c..3d391396bc0 100644 --- a/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json +++ b/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json @@ -59,7 +59,7 @@ "AccountId": { "target": "com.amazonaws.ssm#AccountId", "traits": { - "smithy.api#documentation": "

The account ID where the current document is shared.

" + "smithy.api#documentation": "

The Amazon Web Services account ID where the current document is shared.

" } }, "SharedDocumentVersion": { @@ -70,7 +70,7 @@ } }, "traits": { - "smithy.api#documentation": "

Information includes the account ID where the current document is shared and the\n version shared with that account.

" + "smithy.api#documentation": "

Information includes the Amazon Web Services account ID where the current document is shared and the\n version shared with that account.

" } }, "com.amazonaws.ssm#AccountSharingInfoList": { @@ -82,7 +82,7 @@ } }, "traits": { - "smithy.api#documentation": "

A list of of accounts where the current document is shared and the version shared with\n each account.

" + "smithy.api#documentation": "

A list of of Amazon Web Services accounts where the current document is shared and the version shared with\n each account.

" } }, "com.amazonaws.ssm#Accounts": { @@ -829,7 +829,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "

The ID of the instance.

" + "smithy.api#documentation": "

The instance ID.

" } }, "AssociationId": { @@ -936,7 +936,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "

The ID of the instance.

" + "smithy.api#documentation": "

The instance ID.

" } }, "AssociationVersion": { @@ -1068,7 +1068,7 @@ "TargetLocations": { "target": "com.amazonaws.ssm#TargetLocations", "traits": { - "smithy.api#documentation": "

The combination of Regions and accounts where you want to run the\n association.

" + "smithy.api#documentation": "

The combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the\n association.

" } } }, @@ -1769,7 +1769,7 @@ "TargetLocations": { "target": "com.amazonaws.ssm#TargetLocations", "traits": { - "smithy.api#documentation": "

The combination of Regions and accounts where you wanted to run the association\n when this association version was created.

" + "smithy.api#documentation": "

The combination of Amazon Web Services Regions and Amazon Web Services accounts where you wanted to run the association\n when this association version was created.

" } } }, @@ -2203,7 +2203,7 @@ "TargetLocations": { "target": "com.amazonaws.ssm#TargetLocations", "traits": { - "smithy.api#documentation": "

The combination of Regions and/or accounts where you want to run the\n Automation.

" + "smithy.api#documentation": "

The combination of Amazon Web Services Regions and/or Amazon Web Services accounts where you want to run the\n Automation.

" } }, "ProgressCounters": { @@ -2520,7 +2520,7 @@ "AutomationType": { "target": "com.amazonaws.ssm#AutomationType", "traits": { - "smithy.api#documentation": "

Use this filter with DescribeAutomationExecutions. Specify either Local or\n CrossAccount. CrossAccount is an Automation that runs in multiple Regions and\n accounts. For more information, see Running Automation workflows in multiple Regions and accounts in the\n Amazon Web Services Systems Manager User Guide.

" + "smithy.api#documentation": "

Use this filter with DescribeAutomationExecutions. Specify either Local or\n CrossAccount. CrossAccount is an Automation that runs in multiple Amazon Web Services Regions and\n Amazon Web Services accounts. For more information, see Running Automation workflows in multiple Amazon Web Services Regions and accounts in the\n Amazon Web Services Systems Manager User Guide.

" } }, "AutomationSubtype": { @@ -3104,7 +3104,7 @@ "OutputS3Region": { "target": "com.amazonaws.ssm#S3Region", "traits": { - "smithy.api#documentation": "

(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager\n automatically determines the Region of the S3 bucket.

" + "smithy.api#documentation": "

(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager\n automatically determines the Amazon Web Services Region of the S3 bucket.

" } }, "OutputS3BucketName": { @@ -4142,7 +4142,7 @@ "IamRole": { "target": "com.amazonaws.ssm#IamRole", "traits": { - "smithy.api#documentation": "

The Identity and Access Management (IAM) role that you want to assign to the managed\n instance. This IAMrole must provide AssumeRole permissions for the Amazon Web Services Systems Manager\n service principal ssm.amazonaws.com. For more information, see Create an\n IAM service role for a hybrid environment in the\n Amazon Web Services Systems Manager User Guide.

", + "smithy.api#documentation": "

The name of the Identity and Access Management (IAM) role that you want to assign to\n the managed instance. This IAM role must provide AssumeRole permissions for the\n Amazon Web Services Systems Manager service principal ssm.amazonaws.com. For more information, see Create an\n IAM service role for a hybrid environment in the\n Amazon Web Services Systems Manager User Guide.

", "smithy.api#required": {} } }, @@ -4310,14 +4310,14 @@ "Name": { "target": "com.amazonaws.ssm#DocumentARN", "traits": { - "smithy.api#documentation": "

The name of the SSM document that contains the configuration information for the instance.\n You can specify Command or Automation runbooks.

\n

You can specify Amazon Web Services-predefined documents, documents you created, or a document that is\n shared with you from another account.

\n

For SSM documents that are shared with you from other accounts, you must specify the\n complete SSM document ARN, in the following format:

\n

\n arn:aws:ssm:region:account-id:document/document-name\n \n

\n

For example:

\n

\n arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document\n

\n

For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need\n to specify the document name. For example, AWS-ApplyPatchBaseline or\n My-Document.

", + "smithy.api#documentation": "

The name of the SSM document that contains the configuration information for the instance.\n You can specify Command or Automation runbooks.

\n

You can specify Amazon Web Services-predefined documents, documents you created, or a document that is\n shared with you from another account.

\n

For SSM documents that are shared with you from other Amazon Web Services accounts, you must specify the\n complete SSM document ARN, in the following format:

\n

\n arn:aws:ssm:region:account-id:document/document-name\n \n

\n

For example:

\n

\n arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document\n

\n

For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need\n to specify the document name. For example, AWS-ApplyPatchBaseline or\n My-Document.

", "smithy.api#required": {} } }, "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "

The ID of the instance.

" + "smithy.api#documentation": "

The instance ID.

\n \n

\n InstanceId has been deprecated. To specify an instance ID for an association,\n use the Targets parameter. Requests that include the\n parameter InstanceID with Systems Manager documents (SSM documents) that use schema version\n 2.0 or later will fail. In addition, if you use the parameter\n InstanceId, you can't use the parameters AssociationName,\n DocumentVersion, MaxErrors, MaxConcurrency,\n OutputLocation, or ScheduleExpression. To use these parameters, you\n must use the Targets parameter.

\n
" } }, "Parameters": { @@ -4432,7 +4432,7 @@ "Name": { "target": "com.amazonaws.ssm#DocumentARN", "traits": { - "smithy.api#documentation": "

The name of the SSM Command document or Automation runbook that contains the configuration\n information for the instance.

\n

You can specify Amazon Web Services-predefined documents, documents you created, or a document that is\n shared with you from another account.

\n

For Systems Manager documents (SSM documents) that are shared with you from other accounts, you\n must specify the complete SSM document ARN, in the following format:

\n

\n arn:partition:ssm:region:account-id:document/document-name\n \n

\n

For example:

\n

\n arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document\n

\n

For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need\n to specify the document name. For example, AWS-ApplyPatchBaseline or\n My-Document.

", + "smithy.api#documentation": "

The name of the SSM Command document or Automation runbook that contains the configuration\n information for the instance.

\n

You can specify Amazon Web Services-predefined documents, documents you created, or a document that is\n shared with you from another account.

\n

For Systems Manager documents (SSM documents) that are shared with you from other Amazon Web Services accounts, you\n must specify the complete SSM document ARN, in the following format:

\n

\n arn:partition:ssm:region:account-id:document/document-name\n \n

\n

For example:

\n

\n arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document\n

\n

For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need\n to specify the document name. For example, AWS-ApplyPatchBaseline or\n My-Document.

", "smithy.api#required": {} } }, @@ -4457,7 +4457,7 @@ "Targets": { "target": "com.amazonaws.ssm#Targets", "traits": { - "smithy.api#documentation": "

The targets for the association. You can target instances by using tags, Amazon Web Services resource\n groups, all instances in an account, or individual instance IDs. For more information about\n choosing targets for an association, see Using targets and rate controls with State Manager associations in the\n Amazon Web Services Systems Manager User Guide.

" + "smithy.api#documentation": "

The targets for the association. You can target instances by using tags, Amazon Web Services resource\n groups, all instances in an Amazon Web Services account, or individual instance IDs. For more information about\n choosing targets for an association, see Using targets and rate controls with State Manager associations in the\n Amazon Web Services Systems Manager User Guide.

" } }, "ScheduleExpression": { @@ -4523,7 +4523,7 @@ "TargetLocations": { "target": "com.amazonaws.ssm#TargetLocations", "traits": { - "smithy.api#documentation": "

A location is a combination of Regions and accounts where you want to run the\n association. Use this action to create an association in multiple Regions and multiple\n accounts.

" + "smithy.api#documentation": "

A location is a combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the\n association. Use this action to create an association in multiple Regions and multiple\n accounts.

" } } } @@ -4950,7 +4950,7 @@ "Tags": { "target": "com.amazonaws.ssm#TagList", "traits": { - "smithy.api#documentation": "

Optional metadata that you assign to a resource. You can specify a maximum of five tags for\n an OpsMetadata object. Tags enable you to categorize a resource in different ways, such as by\n purpose, owner, or environment. For example, you might want to tag an OpsMetadata object to\n identify an environment or target Region. In this case, you could specify the following\n key-value pairs:

\n " + "smithy.api#documentation": "

Optional metadata that you assign to a resource. You can specify a maximum of five tags for\n an OpsMetadata object. Tags enable you to categorize a resource in different ways, such as by\n purpose, owner, or environment. For example, you might want to tag an OpsMetadata object to\n identify an environment or target Amazon Web Services Region. In this case, you could specify the following\n key-value pairs:

\n " } } } @@ -5109,7 +5109,7 @@ } ], "traits": { - "smithy.api#documentation": "

A resource data sync helps you view data from multiple sources in a single location.\n Amazon Web Services Systems Manager offers two types of resource data sync: SyncToDestination and\n SyncFromSource.

\n

You can configure Systems Manager Inventory to use the SyncToDestination type to\n synchronize Inventory data from multiple Regions to a single Amazon Simple Storage Service (Amazon S3) bucket. For more information, see Configuring resource data\n sync for Inventory in the Amazon Web Services Systems Manager User Guide.

\n

You can configure Systems Manager Explorer to use the SyncFromSource type to synchronize\n operational work items (OpsItems) and operational data (OpsData) from multiple Regions to a\n single Amazon S3 bucket. This type can synchronize OpsItems and OpsData from multiple\n accounts and Regions or EntireOrganization by using Organizations. For more\n information, see Setting up Systems Manager\n Explorer to display data from multiple accounts and Regions in the\n Amazon Web Services Systems Manager User Guide.

\n

A resource data sync is an asynchronous operation that returns immediately. After a\n successful initial sync is completed, the system continuously syncs data. To check the status of\n a sync, use the ListResourceDataSync.

\n \n

By default, data isn't encrypted in Amazon S3. We strongly recommend that you\n enable encryption in Amazon S3 to ensure secure data storage. We also recommend that you\n secure access to the Amazon S3 bucket by creating a restrictive bucket policy.

\n
" + "smithy.api#documentation": "

A resource data sync helps you view data from multiple sources in a single location.\n Amazon Web Services Systems Manager offers two types of resource data sync: SyncToDestination and\n SyncFromSource.

\n

You can configure Systems Manager Inventory to use the SyncToDestination type to\n synchronize Inventory data from multiple Amazon Web Services Regions to a single Amazon Simple Storage Service (Amazon S3) bucket. For more information, see Configuring resource data\n sync for Inventory in the Amazon Web Services Systems Manager User Guide.

\n

You can configure Systems Manager Explorer to use the SyncFromSource type to synchronize\n operational work items (OpsItems) and operational data (OpsData) from multiple Amazon Web Services Regions to a\n single Amazon S3 bucket. This type can synchronize OpsItems and OpsData from multiple\n Amazon Web Services accounts and Amazon Web Services Regions or EntireOrganization by using Organizations. For more\n information, see Setting up Systems Manager\n Explorer to display data from multiple accounts and Regions in the\n Amazon Web Services Systems Manager User Guide.

\n

A resource data sync is an asynchronous operation that returns immediately. After a\n successful initial sync is completed, the system continuously syncs data. To check the status of\n a sync, use the ListResourceDataSync.

\n \n

By default, data isn't encrypted in Amazon S3. We strongly recommend that you\n enable encryption in Amazon S3 to ensure secure data storage. We also recommend that you\n secure access to the Amazon S3 bucket by creating a restrictive bucket policy.

\n
" } }, "com.amazonaws.ssm#CreateResourceDataSyncRequest": { @@ -5131,7 +5131,7 @@ "SyncType": { "target": "com.amazonaws.ssm#ResourceDataSyncType", "traits": { - "smithy.api#documentation": "

Specify SyncToDestination to create a resource data sync that synchronizes data\n to an S3 bucket for Inventory. If you specify SyncToDestination, you must provide a\n value for S3Destination. Specify SyncFromSource to synchronize data\n from a single account and multiple Regions, or multiple accounts and Regions, as\n listed in Organizations for Explorer. If you specify SyncFromSource, you must provide a\n value for SyncSource. The default value is SyncToDestination.

" + "smithy.api#documentation": "

Specify SyncToDestination to create a resource data sync that synchronizes data\n to an S3 bucket for Inventory. If you specify SyncToDestination, you must provide a\n value for S3Destination. Specify SyncFromSource to synchronize data\n from a single account and multiple Regions, or multiple Amazon Web Services accounts and Amazon Web Services Regions, as\n listed in Organizations for Explorer. If you specify SyncFromSource, you must provide a\n value for SyncSource. The default value is SyncToDestination.

" } }, "SyncSource": { @@ -5249,7 +5249,7 @@ } ], "traits": { - "smithy.api#documentation": "

Disassociates the specified Amazon Web Services Systems Manager document (SSM document) from the specified\n instance.

\n

When you disassociate a document from an instance, it doesn't change the configuration of\n the instance. To change the configuration state of an instance after you disassociate a document,\n you must create a new document with the desired configuration and associate it with the\n instance.

" + "smithy.api#documentation": "

Disassociates the specified Amazon Web Services Systems Manager document (SSM document) from the specified instance.\n If you created the association by using the Targets parameter, then you must delete\n the association by using the association ID.

\n

When you disassociate a document from an instance, it doesn't change the configuration of\n the instance. To change the configuration state of an instance after you disassociate a document,\n you must create a new document with the desired configuration and associate it with the\n instance.

" } }, "com.amazonaws.ssm#DeleteAssociationRequest": { @@ -5264,7 +5264,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "

The ID of the instance.

" + "smithy.api#documentation": "

The instance ID.

\n \n

\n InstanceId has been deprecated. To specify an instance ID for an association,\n use the Targets parameter. Requests that include the\n parameter InstanceID with Systems Manager documents (SSM documents) that use schema version\n 2.0 or later will fail. In addition, if you use the parameter\n InstanceId, you can't use the parameters AssociationName,\n DocumentVersion, MaxErrors, MaxConcurrency,\n OutputLocation, or ScheduleExpression. To use these parameters, you\n must use the Targets parameter.

\n
" } }, "AssociationId": { @@ -5518,7 +5518,7 @@ } ], "traits": { - "smithy.api#documentation": "

Delete a parameter from the system.

" + "smithy.api#documentation": "

Delete a parameter from the system. After deleting a parameter, wait for at least 30 seconds\n to create a parameter with the same name.

" } }, "com.amazonaws.ssm#DeleteParameterRequest": { @@ -5551,7 +5551,7 @@ } ], "traits": { - "smithy.api#documentation": "

Delete a list of parameters.

" + "smithy.api#documentation": "

Delete a list of parameters. After deleting a parameter, wait for at least 30 seconds to\n create a parameter with the same name.

" } }, "com.amazonaws.ssm#DeleteParametersRequest": { @@ -5560,7 +5560,7 @@ "Names": { "target": "com.amazonaws.ssm#ParameterNameList", "traits": { - "smithy.api#documentation": "

The names of the parameters to delete.

", + "smithy.api#documentation": "

The names of the parameters to delete. After deleting a parameter, wait for at least 30\n seconds to create a parameter with the same name.

", "smithy.api#required": {} } } @@ -5992,7 +5992,7 @@ "ActivationList": { "target": "com.amazonaws.ssm#ActivationList", "traits": { - "smithy.api#documentation": "

A list of activations for your account.

" + "smithy.api#documentation": "

A list of activations for your Amazon Web Services account.

" } }, "NextToken": { @@ -6029,7 +6029,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes the association for the specified target or instance. If you created the\n association by using the Targets parameter, then you must retrieve the association\n by using the association ID. If you created the association by specifying an instance ID and an\n Amazon Web Services Systems Manager document (SSM document), then you retrieve the association by specifying the document\n name and the instance ID.

" + "smithy.api#documentation": "

Describes the association for the specified target or instance. If you created the\n association by using the Targets parameter, then you must retrieve the association\n by using the association ID.

" } }, "com.amazonaws.ssm#DescribeAssociationExecutionTargets": { @@ -6512,7 +6512,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes the permissions for a Amazon Web Services Systems Manager document (SSM document). If you created the\n document, you are the owner. If a document is shared, it can either be shared privately (by\n specifying a user's account ID) or publicly (All).

" + "smithy.api#documentation": "

Describes the permissions for a Amazon Web Services Systems Manager document (SSM document). If you created the\n document, you are the owner. If a document is shared, it can either be shared privately (by\n specifying a user's Amazon Web Services account ID) or publicly (All).

" } }, "com.amazonaws.ssm#DescribeDocumentPermissionRequest": { @@ -6553,13 +6553,13 @@ "AccountIds": { "target": "com.amazonaws.ssm#AccountIdList", "traits": { - "smithy.api#documentation": "

The account IDs that have permission to use this document. The ID can be either an\n account or All.

" + "smithy.api#documentation": "

The account IDs that have permission to use this document. The ID can be either an\n Amazon Web Services account or All.

" } }, "AccountSharingInfoList": { "target": "com.amazonaws.ssm#AccountSharingInfoList", "traits": { - "smithy.api#documentation": "

A list of accounts where the current document is shared and the version shared with\n each account.

" + "smithy.api#documentation": "

A list of Amazon Web Services accounts where the current document is shared and the version shared with\n each account.

" } }, "NextToken": { @@ -7671,7 +7671,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the maintenance windows in an account.

", + "smithy.api#documentation": "

Retrieves the maintenance windows in an Amazon Web Services account.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -7951,7 +7951,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the patch baselines in your account.

", + "smithy.api#documentation": "

Lists the patch baselines in your Amazon Web Services account.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -10043,7 +10043,7 @@ "Target": { "target": "com.amazonaws.ssm#SessionTarget", "traits": { - "smithy.api#documentation": "

The ID of the instance.

", + "smithy.api#documentation": "

The instance ID.

", "smithy.api#required": {} } } @@ -10131,7 +10131,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the current snapshot for the patch baseline the instance uses. This API is\n primarily used by the AWS-RunPatchBaseline Systems Manager document (SSM document).

\n \n

If you run the command locally, such as with the Command Line Interface (CLI), the system attempts to use your local AWS credentials and the operation fails. To avoid\n this, you can run the command in the Amazon Web Services Systems Manager console. Use Run Command, a capability of\n Amazon Web Services Systems Manager, with an SSM document that enables you to target an instance with a script or command.\n For example, run the command using the AWS-RunShellScript document or the\n AWS-RunPowerShellScript document.

\n
" + "smithy.api#documentation": "

Retrieves the current snapshot for the patch baseline the instance uses. This API is\n primarily used by the AWS-RunPatchBaseline Systems Manager document (SSM document).

\n \n

If you run the command locally, such as with the Command Line Interface (CLI), the system attempts to use your local Amazon Web Services credentials and the operation fails. To avoid\n this, you can run the command in the Amazon Web Services Systems Manager console. Use Run Command, a capability of\n Amazon Web Services Systems Manager, with an SSM document that enables you to target an instance with a script or command.\n For example, run the command using the AWS-RunShellScript document or the\n AWS-RunPowerShellScript document.

\n
" } }, "com.amazonaws.ssm#GetDeployablePatchSnapshotForInstanceRequest": { @@ -10165,7 +10165,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "

The ID of the instance.

" + "smithy.api#documentation": "

The instance ID.

" } }, "SnapshotId": { @@ -10356,7 +10356,7 @@ } ], "traits": { - "smithy.api#documentation": "

Query inventory information.

", + "smithy.api#documentation": "

Query inventory information. This includes instance status, such as Stopped or\n Terminated.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -11293,7 +11293,7 @@ "Entities": { "target": "com.amazonaws.ssm#OpsEntityList", "traits": { - "smithy.api#documentation": "

The list of aggregated and filtered OpsData.

" + "smithy.api#documentation": "

The list of aggregated details and filtered OpsData.

" } }, "NextToken": { @@ -11327,7 +11327,7 @@ } ], "traits": { - "smithy.api#documentation": "

Get information about a parameter by using the parameter name. Don't confuse this API\n operation with the GetParameters API operation.

" + "smithy.api#documentation": "

Get information about a single parameter by specifying the parameter name.

\n \n

To get information about more than one parameter at a time, use the GetParameters operation.

\n
" } }, "com.amazonaws.ssm#GetParameterHistory": { @@ -11416,7 +11416,7 @@ "Name": { "target": "com.amazonaws.ssm#PSParameterName", "traits": { - "smithy.api#documentation": "

The name of the parameter you want to query.

", + "smithy.api#documentation": "

The name of the parameter you want to query.

\n

To query by parameter label, use \"Name\": \"name:label\". To query by parameter\n version, use \"Name\": \"name:version\".

", "smithy.api#required": {} } }, @@ -11457,7 +11457,7 @@ } ], "traits": { - "smithy.api#documentation": "

Get details of a parameter. Don't confuse this API operation with the GetParameter API operation.

" + "smithy.api#documentation": "

Get information about one or more parameters by specifying multiple parameter names.

\n \n

To get information about a single parameter, you can use the GetParameter\n operation instead.

\n
" } }, "com.amazonaws.ssm#GetParametersByPath": { @@ -11574,7 +11574,7 @@ "Names": { "target": "com.amazonaws.ssm#ParameterNameList", "traits": { - "smithy.api#documentation": "

Names of the parameters for which you want to query information.

", + "smithy.api#documentation": "

Names of the parameters for which you want to query information.

\n

To query by parameter label, use \"Name\": \"name:label\". To query by parameter\n version, use \"Name\": \"name:version\".

", "smithy.api#required": {} } }, @@ -11691,7 +11691,7 @@ "BaselineId": { "target": "com.amazonaws.ssm#BaselineId", "traits": { - "smithy.api#documentation": "

The ID of the patch baseline to retrieve.

", + "smithy.api#documentation": "

The ID of the patch baseline to retrieve.

\n \n

To retrieve information about an Amazon Web Services managed patch baseline, specify the full Amazon\n Resource Name (ARN) of the baseline. For example, for the baseline\n AWS-AmazonLinuxDefaultPatchBaseline, specify\n arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0e392de35e7c563b7 instead of\n pb-0e392de35e7c563b7.

\n
", "smithy.api#required": {} } } @@ -11810,7 +11810,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n ServiceSetting is an account-level setting for an Amazon Web Services service. This setting\n defines how a user interacts with or uses a service or a feature of a service. For example, if an\n Amazon Web Services service charges money to the account based on feature or service usage, then the Amazon Web Services\n service team might create a default setting of false. This means the user can't use\n this feature unless they change the setting to true and intentionally opt in for a\n paid feature.

\n

Services map a SettingId object to a setting value. Amazon Web Services services teams define\n the default value for a SettingId. You can't create a new SettingId,\n but you can overwrite the default value if you have the ssm:UpdateServiceSetting\n permission for the setting. Use the UpdateServiceSetting API operation to\n change the default setting. Or use the ResetServiceSetting to change the value\n back to the original value defined by the Amazon Web Services service team.

\n

Query the current service setting for the account.

" + "smithy.api#documentation": "

\n ServiceSetting is an account-level setting for an Amazon Web Services service. This setting\n defines how a user interacts with or uses a service or a feature of a service. For example, if an\n Amazon Web Services service charges money to the account based on feature or service usage, then the Amazon Web Services\n service team might create a default setting of false. This means the user can't use\n this feature unless they change the setting to true and intentionally opt in for a\n paid feature.

\n

Services map a SettingId object to a setting value. Amazon Web Services services teams define\n the default value for a SettingId. You can't create a new SettingId,\n but you can overwrite the default value if you have the ssm:UpdateServiceSetting\n permission for the setting. Use the UpdateServiceSetting API operation to\n change the default setting. Or use the ResetServiceSetting to change the value\n back to the original value defined by the Amazon Web Services service team.

\n

Query the current service setting for the Amazon Web Services account.

" } }, "com.amazonaws.ssm#GetServiceSettingRequest": { @@ -14399,7 +14399,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns all State Manager associations in the current account and Region. You\n can limit the results to a specific State Manager association document or instance by specifying\n a filter. State Manager is a capability of Amazon Web Services Systems Manager.

", + "smithy.api#documentation": "

Returns all State Manager associations in the current Amazon Web Services account and Amazon Web Services Region. You\n can limit the results to a specific State Manager association document or instance by specifying\n a filter. State Manager is a capability of Amazon Web Services Systems Manager.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -14569,7 +14569,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the commands requested by users of the account.

", + "smithy.api#documentation": "

Lists the commands requested by users of the Amazon Web Services account.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -14812,7 +14812,7 @@ } ], "traits": { - "smithy.api#documentation": "

Information about approval reviews for a version of an SSM document.

" + "smithy.api#documentation": "

Information about approval reviews for a version of a change template in Change Manager.

" } }, "com.amazonaws.ssm#ListDocumentMetadataHistoryRequest": { @@ -14821,14 +14821,14 @@ "Name": { "target": "com.amazonaws.ssm#DocumentName", "traits": { - "smithy.api#documentation": "

The name of the document.

", + "smithy.api#documentation": "

The name of the change template.

", "smithy.api#required": {} } }, "DocumentVersion": { "target": "com.amazonaws.ssm#DocumentVersion", "traits": { - "smithy.api#documentation": "

The version of the document.

" + "smithy.api#documentation": "

The version of the change template.

" } }, "Metadata": { @@ -14859,25 +14859,25 @@ "Name": { "target": "com.amazonaws.ssm#DocumentName", "traits": { - "smithy.api#documentation": "

The name of the document.

" + "smithy.api#documentation": "

The name of the change template.

" } }, "DocumentVersion": { "target": "com.amazonaws.ssm#DocumentVersion", "traits": { - "smithy.api#documentation": "

The version of the document.

" + "smithy.api#documentation": "

The version of the change template.

" } }, "Author": { "target": "com.amazonaws.ssm#DocumentAuthor", "traits": { - "smithy.api#documentation": "

The user ID of the person in the organization who requested the document review.

" + "smithy.api#documentation": "

The user ID of the person in the organization who requested the review of the\n change template.

" } }, "Metadata": { "target": "com.amazonaws.ssm#DocumentMetadataResponseInfo", "traits": { - "smithy.api#documentation": "

Information about the response to the document approval request.

" + "smithy.api#documentation": "

Information about the response to the change template approval request.

" } }, "NextToken": { @@ -14979,7 +14979,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns all Systems Manager (SSM) documents in the current account and Region. You can\n limit the results of this request by using a filter.

", + "smithy.api#documentation": "

Returns all Systems Manager (SSM) documents in the current Amazon Web Services account and Amazon Web Services Region. You can\n limit the results of this request by using a filter.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -15166,7 +15166,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of all OpsItem events in the current Region and account. You can\n limit the results to events associated with specific OpsItems by specifying a filter.

", + "smithy.api#documentation": "

Returns a list of all OpsItem events in the current Amazon Web Services Region and Amazon Web Services account. You can\n limit the results to events associated with specific OpsItems by specifying a filter.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -15468,7 +15468,7 @@ "SyncType": { "target": "com.amazonaws.ssm#ResourceDataSyncType", "traits": { - "smithy.api#documentation": "

View a list of resource data syncs according to the sync type. Specify\n SyncToDestination to view resource data syncs that synchronize data to an Amazon S3 bucket. Specify SyncFromSource to view resource data syncs from Organizations\n or from multiple Regions.

" + "smithy.api#documentation": "

View a list of resource data syncs according to the sync type. Specify\n SyncToDestination to view resource data syncs that synchronize data to an Amazon S3 bucket. Specify SyncFromSource to view resource data syncs from Organizations\n or from multiple Amazon Web Services Regions.

" } }, "NextToken": { @@ -15575,7 +15575,7 @@ "S3Region": { "target": "com.amazonaws.ssm#S3Region", "traits": { - "smithy.api#documentation": "

The Region where the S3 bucket is located.

", + "smithy.api#documentation": "

The Amazon Web Services Region where the S3 bucket is located.

", "smithy.api#required": {} } } @@ -17336,7 +17336,7 @@ "CreatedBy": { "target": "com.amazonaws.ssm#String", "traits": { - "smithy.api#documentation": "

The ARN of the account that created the OpsItem.

" + "smithy.api#documentation": "

The ARN of the Amazon Web Services account that created the OpsItem.

" } }, "OpsItemType": { @@ -17360,7 +17360,7 @@ "LastModifiedBy": { "target": "com.amazonaws.ssm#String", "traits": { - "smithy.api#documentation": "

The ARN of the account that last updated the OpsItem.

" + "smithy.api#documentation": "

The ARN of the Amazon Web Services account that last updated the OpsItem.

" } }, "LastModifiedTime": { @@ -17461,7 +17461,7 @@ } }, "traits": { - "smithy.api#documentation": "

Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and\n remediate operational issues impacting the performance and health of their Amazon Web Services resources. For\n more information, see OpsCenter in the\n Amazon Web Services Systems Manager User Guide.

" + "smithy.api#documentation": "

Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and\n remediate operational work items (OpsItems) impacting the performance and health of their Amazon Web Services\n resources. OpsCenter is integrated with Amazon EventBridge and Amazon CloudWatch. This\n means you can configure these services to automatically create an OpsItem in OpsCenter when a\n CloudWatch alarm enters the ALARM state or when EventBridge processes an event from\n any Amazon Web Services service that publishes events. Configuring Amazon CloudWatch alarms and EventBridge events to automatically create OpsItems allows you to quickly diagnose and remediate\n issues with Amazon Web Services resources from a single console.

\n

To help you diagnose issues, each OpsItem includes contextually relevant information such as\n the name and ID of the Amazon Web Services resource that generated the OpsItem, alarm or event details, alarm\n history, and an alarm timeline graph. For the Amazon Web Services resource, OpsCenter aggregates information\n from Config, CloudTrail logs, and EventBridge, so you don't have\n to navigate across multiple console pages during your investigation. For more information, see\n OpsCenter in the Amazon Web Services Systems Manager User Guide.

" } }, "com.amazonaws.ssm#OpsItemAlreadyExistsException": { @@ -19027,7 +19027,7 @@ "code": "ParameterLimitExceeded", "httpResponseCode": 429 }, - "smithy.api#documentation": "

You have exceeded the number of parameters for this account. Delete one or more\n parameters and try again.

", + "smithy.api#documentation": "

You have exceeded the number of parameters for this Amazon Web Services account. Delete one or more\n parameters and try again.

", "smithy.api#error": "client" } }, @@ -20521,31 +20521,31 @@ "TotalSteps": { "target": "com.amazonaws.ssm#Integer", "traits": { - "smithy.api#documentation": "

The total number of steps run in all specified Regions and accounts for the\n current Automation execution.

" + "smithy.api#documentation": "

The total number of steps run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the\n current Automation execution.

" } }, "SuccessSteps": { "target": "com.amazonaws.ssm#Integer", "traits": { - "smithy.api#documentation": "

The total number of steps that successfully completed in all specified Regions and\n accounts for the current Automation execution.

" + "smithy.api#documentation": "

The total number of steps that successfully completed in all specified Amazon Web Services Regions and\n Amazon Web Services accounts for the current Automation execution.

" } }, "FailedSteps": { "target": "com.amazonaws.ssm#Integer", "traits": { - "smithy.api#documentation": "

The total number of steps that failed to run in all specified Regions and\n accounts for the current Automation execution.

" + "smithy.api#documentation": "

The total number of steps that failed to run in all specified Amazon Web Services Regions and\n Amazon Web Services accounts for the current Automation execution.

" } }, "CancelledSteps": { "target": "com.amazonaws.ssm#Integer", "traits": { - "smithy.api#documentation": "

The total number of steps that the system cancelled in all specified Regions and\n accounts for the current Automation execution.

" + "smithy.api#documentation": "

The total number of steps that the system cancelled in all specified Amazon Web Services Regions and\n Amazon Web Services accounts for the current Automation execution.

" } }, "TimedOutSteps": { "target": "com.amazonaws.ssm#Integer", "traits": { - "smithy.api#documentation": "

The total number of steps that timed out in all specified Regions and accounts\n for the current Automation execution.

" + "smithy.api#documentation": "

The total number of steps that timed out in all specified Amazon Web Services Regions and Amazon Web Services accounts\n for the current Automation execution.

" } } }, @@ -20792,7 +20792,7 @@ "Name": { "target": "com.amazonaws.ssm#PSParameterName", "traits": { - "smithy.api#documentation": "

The fully qualified name of the parameter that you want to add to the system. The fully\n qualified name includes the complete hierarchy of the parameter path and name. For parameters in\n a hierarchy, you must include a leading forward slash character (/) when you create or reference\n a parameter. For example: /Dev/DBServer/MySQL/db-string13\n

\n

Naming Constraints:

\n \n

For additional information about valid values for parameter names, see Creating Systems Manager parameters in the Amazon Web Services Systems Manager User Guide.

\n \n

The maximum length constraint listed below includes capacity for additional system\n attributes that aren't part of the name. The maximum length for a parameter name, including the\n full length of the parameter ARN, is 1011 characters. For example, the length of the following\n parameter name is 65 characters, not 20 characters:

\n

\n arn:aws:ssm:us-east-2:111122223333:parameter/ExampleParameterName\n

\n
", + "smithy.api#documentation": "

The fully qualified name of the parameter that you want to add to the system. The fully\n qualified name includes the complete hierarchy of the parameter path and name. For parameters in\n a hierarchy, you must include a leading forward slash character (/) when you create or reference\n a parameter. For example: /Dev/DBServer/MySQL/db-string13\n

\n

Naming Constraints:

\n \n

For additional information about valid values for parameter names, see Creating Systems Manager parameters in the Amazon Web Services Systems Manager User Guide.

\n \n

The maximum length constraint listed below includes capacity for additional system\n attributes that aren't part of the name. The maximum length for a parameter name, including the\n full length of the parameter ARN, is 1011 characters. For example, the length of the following\n parameter name is 65 characters, not 20 characters:

\n

\n arn:aws:ssm:us-east-2:111122223333:parameter/ExampleParameterName\n

\n
", "smithy.api#required": {} } }, @@ -20818,7 +20818,7 @@ "KeyId": { "target": "com.amazonaws.ssm#ParameterKeyId", "traits": { - "smithy.api#documentation": "

The Key Management Service (KMS) ID that you want to use to encrypt a\n parameter. Either the default KMS key automatically assigned to your account\n or a custom key. Required for parameters that use the SecureString\n data type.

\n

If you don't specify a key ID, the system uses the default key associated with your\n account.

\n " + "smithy.api#documentation": "

The Key Management Service (KMS) ID that you want to use to encrypt a\n parameter. Either the default KMS key automatically assigned to your Amazon Web Services account\n or a custom key. Required for parameters that use the SecureString\n data type.

\n

If you don't specify a key ID, the system uses the default key associated with your\n Amazon Web Services account.

\n " } }, "Overwrite": { @@ -20843,7 +20843,7 @@ "Tier": { "target": "com.amazonaws.ssm#ParameterTier", "traits": { - "smithy.api#documentation": "

The parameter tier to assign to a parameter.

\n

Parameter Store offers a standard tier and an advanced tier for parameters. Standard\n parameters have a content size limit of 4 KB and can't be configured to use parameter policies.\n You can create a maximum of 10,000 standard parameters for each Region in an account.\n Standard parameters are offered at no additional cost.

\n

Advanced parameters have a content size limit of 8 KB and can be configured to use parameter\n policies. You can create a maximum of 100,000 advanced parameters for each Region in an\n account. Advanced parameters incur a charge. For more information, see Standard and\n advanced parameter tiers in the Amazon Web Services Systems Manager User Guide.

\n

You can change a standard parameter to an advanced parameter any time. But you can't revert\n an advanced parameter to a standard parameter. Reverting an advanced parameter to a standard\n parameter would result in data loss because the system would truncate the size of the parameter\n from 8 KB to 4 KB. Reverting would also remove any policies attached to the parameter. Lastly,\n advanced parameters use a different form of encryption than standard parameters.

\n

If you no longer need an advanced parameter, or if you no longer want to incur charges for\n an advanced parameter, you must delete it and recreate it as a new standard parameter.

\n

\n Using the Default Tier Configuration\n

\n

In PutParameter requests, you can specify the tier to create the parameter in.\n Whenever you specify a tier in the request, Parameter Store creates or updates the parameter\n according to that request. However, if you don't specify a tier in a request, Parameter Store\n assigns the tier based on the current Parameter Store default tier configuration.

\n

The default tier when you begin using Parameter Store is the standard-parameter tier. If you\n use the advanced-parameter tier, you can specify one of the following as the default:

\n \n

Options that require an advanced parameter include the following:

\n \n

For more information about configuring the default tier option, see Specifying a\n default parameter tier in the Amazon Web Services Systems Manager User Guide.

" + "smithy.api#documentation": "

The parameter tier to assign to a parameter.

\n

Parameter Store offers a standard tier and an advanced tier for parameters. Standard\n parameters have a content size limit of 4 KB and can't be configured to use parameter policies.\n You can create a maximum of 10,000 standard parameters for each Region in an Amazon Web Services account.\n Standard parameters are offered at no additional cost.

\n

Advanced parameters have a content size limit of 8 KB and can be configured to use parameter\n policies. You can create a maximum of 100,000 advanced parameters for each Region in an\n Amazon Web Services account. Advanced parameters incur a charge. For more information, see Standard and\n advanced parameter tiers in the Amazon Web Services Systems Manager User Guide.

\n

You can change a standard parameter to an advanced parameter any time. But you can't revert\n an advanced parameter to a standard parameter. Reverting an advanced parameter to a standard\n parameter would result in data loss because the system would truncate the size of the parameter\n from 8 KB to 4 KB. Reverting would also remove any policies attached to the parameter. Lastly,\n advanced parameters use a different form of encryption than standard parameters.

\n

If you no longer need an advanced parameter, or if you no longer want to incur charges for\n an advanced parameter, you must delete it and recreate it as a new standard parameter.

\n

\n Using the Default Tier Configuration\n

\n

In PutParameter requests, you can specify the tier to create the parameter in.\n Whenever you specify a tier in the request, Parameter Store creates or updates the parameter\n according to that request. However, if you don't specify a tier in a request, Parameter Store\n assigns the tier based on the current Parameter Store default tier configuration.

\n

The default tier when you begin using Parameter Store is the standard-parameter tier. If you\n use the advanced-parameter tier, you can specify one of the following as the default:

\n \n

Options that require an advanced parameter include the following:

\n \n

For more information about configuring the default tier option, see Specifying a\n default parameter tier in the Amazon Web Services Systems Manager User Guide.

" } }, "Policies": { @@ -20855,7 +20855,7 @@ "DataType": { "target": "com.amazonaws.ssm#ParameterDataType", "traits": { - "smithy.api#documentation": "

The data type for a String parameter. Supported data types include plain text\n and Amazon Machine Image (AMI) IDs.

\n

\n The following data type values are supported.\n

\n \n

When you create a String parameter and specify aws:ec2:image,\n Amazon Web Services Systems Manager validates the parameter value is in the required format, such as\n ami-12345abcdeEXAMPLE, and that the specified AMI is available in your\n account. For more information, see Native parameter support\n for Amazon Machine Image (AMI) IDs in the Amazon Web Services Systems Manager User Guide.

" + "smithy.api#documentation": "

The data type for a String parameter. Supported data types include plain text\n and Amazon Machine Image (AMI) IDs.

\n

\n The following data type values are supported.\n

\n \n

When you create a String parameter and specify aws:ec2:image,\n Amazon Web Services Systems Manager validates the parameter value is in the required format, such as\n ami-12345abcdeEXAMPLE, and that the specified AMI is available in your\n Amazon Web Services account. For more information, see Native parameter support\n for Amazon Machine Image (AMI) IDs in the Amazon Web Services Systems Manager User Guide.

" } } } @@ -21525,7 +21525,7 @@ } }, "traits": { - "smithy.api#documentation": "

Information about the AwsOrganizationsSource resource data sync source. A sync\n source of this type can synchronize data from Organizations or, if an Amazon Web Services organization isn't\n present, from multiple Regions.

" + "smithy.api#documentation": "

Information about the AwsOrganizationsSource resource data sync source. A sync\n source of this type can synchronize data from Organizations or, if an Amazon Web Services organization isn't\n present, from multiple Amazon Web Services Regions.

" } }, "com.amazonaws.ssm#ResourceDataSyncConflictException": { @@ -21574,7 +21574,7 @@ } }, "traits": { - "smithy.api#documentation": "

Synchronize Amazon Web Services Systems Manager Inventory data from multiple accounts defined in Organizations to a\n centralized Amazon S3 bucket. Data is synchronized to individual key prefixes in the\n central bucket. Each key prefix represents a different account ID.

" + "smithy.api#documentation": "

Synchronize Amazon Web Services Systems Manager Inventory data from multiple Amazon Web Services accounts defined in Organizations to a\n centralized Amazon S3 bucket. Data is synchronized to individual key prefixes in the\n central bucket. Each key prefix represents a different Amazon Web Services account ID.

" } }, "com.amazonaws.ssm#ResourceDataSyncDestinationDataSharingType": { @@ -21620,7 +21620,7 @@ "SyncType": { "target": "com.amazonaws.ssm#ResourceDataSyncType", "traits": { - "smithy.api#documentation": "

The type of resource data sync. If SyncType is SyncToDestination,\n then the resource data sync synchronizes data to an S3 bucket. If the SyncType is\n SyncFromSource then the resource data sync synchronizes data from Organizations or from\n multiple Regions.

" + "smithy.api#documentation": "

The type of resource data sync. If SyncType is SyncToDestination,\n then the resource data sync synchronizes data to an S3 bucket. If the SyncType is\n SyncFromSource then the resource data sync synchronizes data from Organizations or from\n multiple Amazon Web Services Regions.

" } }, "SyncSource": { @@ -21796,7 +21796,7 @@ "Region": { "target": "com.amazonaws.ssm#ResourceDataSyncS3Region", "traits": { - "smithy.api#documentation": "

The Region with the S3 bucket targeted by the resource data sync.

", + "smithy.api#documentation": "

The Amazon Web Services Region with the S3 bucket targeted by the resource data sync.

", "smithy.api#required": {} } }, @@ -21865,20 +21865,20 @@ "SourceRegions": { "target": "com.amazonaws.ssm#ResourceDataSyncSourceRegionList", "traits": { - "smithy.api#documentation": "

The SyncSource Regions included in the resource data sync.

", + "smithy.api#documentation": "

The SyncSource Amazon Web Services Regions included in the resource data sync.

", "smithy.api#required": {} } }, "IncludeFutureRegions": { "target": "com.amazonaws.ssm#ResourceDataSyncIncludeFutureRegions", "traits": { - "smithy.api#documentation": "

Whether to automatically synchronize and aggregate data from new Regions when those\n Regions come online.

" + "smithy.api#documentation": "

Whether to automatically synchronize and aggregate data from new Amazon Web Services Regions when those\n Regions come online.

" } }, "EnableAllOpsDataSources": { "target": "com.amazonaws.ssm#ResourceDataSyncEnableAllOpsDataSources", "traits": { - "smithy.api#documentation": "

When you create a resource data sync, if you choose one of the Organizations options, then Systems Manager\n automatically enables all OpsData sources in the selected Regions for all accounts in\n your organization (or in the selected organization units). For more information, see About multiple account and Region resource data syncs in the\n Amazon Web Services Systems Manager User Guide.

" + "smithy.api#documentation": "

When you create a resource data sync, if you choose one of the Organizations options, then Systems Manager\n automatically enables all OpsData sources in the selected Amazon Web Services Regions for all Amazon Web Services accounts in\n your organization (or in the selected organization units). For more information, see About multiple account and Region resource data syncs in the\n Amazon Web Services Systems Manager User Guide.

" } } }, @@ -21928,13 +21928,13 @@ "SourceRegions": { "target": "com.amazonaws.ssm#ResourceDataSyncSourceRegionList", "traits": { - "smithy.api#documentation": "

The SyncSource Regions included in the resource data sync.

" + "smithy.api#documentation": "

The SyncSource Amazon Web Services Regions included in the resource data sync.

" } }, "IncludeFutureRegions": { "target": "com.amazonaws.ssm#ResourceDataSyncIncludeFutureRegions", "traits": { - "smithy.api#documentation": "

Whether to automatically synchronize and aggregate data from new Regions when those\n Regions come online.

" + "smithy.api#documentation": "

Whether to automatically synchronize and aggregate data from new Amazon Web Services Regions when those\n Regions come online.

" } }, "State": { @@ -21946,7 +21946,7 @@ "EnableAllOpsDataSources": { "target": "com.amazonaws.ssm#ResourceDataSyncEnableAllOpsDataSources", "traits": { - "smithy.api#documentation": "

When you create a resource data sync, if you choose one of the Organizations options, then Systems Manager\n automatically enables all OpsData sources in the selected Regions for all accounts in\n your organization (or in the selected organization units). For more information, see About multiple account and Region resource data syncs in the\n Amazon Web Services Systems Manager User Guide.

" + "smithy.api#documentation": "

When you create a resource data sync, if you choose one of the Organizations options, then Systems Manager\n automatically enables all OpsData sources in the selected Amazon Web Services Regions for all Amazon Web Services accounts in\n your organization (or in the selected organization units). For more information, see About multiple account and Region resource data syncs in the\n Amazon Web Services Systems Manager User Guide.

" } } }, @@ -22144,7 +22144,7 @@ "StreamUrl": { "target": "com.amazonaws.ssm#StreamUrl", "traits": { - "smithy.api#documentation": "

A URL back to SSM Agent on the instance that the Session Manager client uses to send commands and\n receive output from the instance. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output).

\n

\n region represents the Region identifier for an\n\t\t\t\t\t\tRegion supported by Amazon Web Services Systems Manager, such as us-east-2 for the US East (Ohio) Region.\n\t\t\t\t\t\tFor a list of supported region values, see the Region column in Systems Manager service endpoints in the\n Amazon Web Services General Reference.

\n

\n session-id represents the ID of a Session Manager session, such as\n 1a2b3c4dEXAMPLE.

" + "smithy.api#documentation": "

A URL back to SSM Agent on the instance that the Session Manager client uses to send commands and\n receive output from the instance. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output).

\n

\n region represents the Region identifier for an\n\t\t\t\t\t\tAmazon Web Services Region supported by Amazon Web Services Systems Manager, such as us-east-2 for the US East (Ohio) Region.\n\t\t\t\t\t\tFor a list of supported region values, see the Region column in Systems Manager service endpoints in the\n Amazon Web Services General Reference.

\n

\n session-id represents the ID of a Session Manager session, such as\n 1a2b3c4dEXAMPLE.

" } } } @@ -22271,7 +22271,7 @@ "TargetLocations": { "target": "com.amazonaws.ssm#TargetLocations", "traits": { - "smithy.api#documentation": "

Information about the Regions and accounts targeted by the current Runbook\n operation.

" + "smithy.api#documentation": "

Information about the Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Runbook\n operation.

" } } }, @@ -22563,7 +22563,7 @@ "OutputS3Region": { "target": "com.amazonaws.ssm#S3Region", "traits": { - "smithy.api#documentation": "

(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager\n automatically determines the Region of the S3 bucket.

" + "smithy.api#documentation": "

(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager\n automatically determines the Amazon Web Services Region of the S3 bucket.

" } }, "OutputS3BucketName": { @@ -23257,7 +23257,7 @@ "TargetLocations": { "target": "com.amazonaws.ssm#TargetLocations", "traits": { - "smithy.api#documentation": "

A location is a combination of Regions and/or accounts where you want to run the\n automation. Use this operation to start an automation in multiple Regions and multiple\n accounts. For more information, see Running Automation workflows in multiple Regions and accounts in the\n Amazon Web Services Systems Manager User Guide.

" + "smithy.api#documentation": "

A location is a combination of Amazon Web Services Regions and/or Amazon Web Services accounts where you want to run the\n automation. Use this operation to start an automation in multiple Amazon Web Services Regions and multiple\n Amazon Web Services accounts. For more information, see Running Automation workflows in multiple Amazon Web Services Regions and Amazon Web Services accounts in the\n Amazon Web Services Systems Manager User Guide.

" } }, "Tags": { @@ -23364,7 +23364,7 @@ "Tags": { "target": "com.amazonaws.ssm#TagList", "traits": { - "smithy.api#documentation": "

Optional metadata that you assign to a resource. You can specify a maximum of five tags for\n a change request. Tags enable you to categorize a resource in different ways, such as by\n purpose, owner, or environment. For example, you might want to tag a change request to identify\n an environment or target Region. In this case, you could specify the following key-value\n pairs:

\n " + "smithy.api#documentation": "

Optional metadata that you assign to a resource. You can specify a maximum of five tags for\n a change request. Tags enable you to categorize a resource in different ways, such as by\n purpose, owner, or environment. For example, you might want to tag a change request to identify\n an environment or target Amazon Web Services Region. In this case, you could specify the following key-value\n pairs:

\n " } }, "ScheduledEndTime": { @@ -23457,7 +23457,7 @@ "StreamUrl": { "target": "com.amazonaws.ssm#StreamUrl", "traits": { - "smithy.api#documentation": "

A URL back to SSM Agent on the instance that the Session Manager client uses to send commands and\n receive output from the instance. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output)\n

\n

\n region represents the Region identifier for an\n\t\t\t\t\t\tRegion supported by Amazon Web Services Systems Manager, such as us-east-2 for the US East (Ohio) Region.\n\t\t\t\t\t\tFor a list of supported region values, see the Region column in Systems Manager service endpoints in the\n Amazon Web Services General Reference.

\n

\n session-id represents the ID of a Session Manager session, such as\n 1a2b3c4dEXAMPLE.

" + "smithy.api#documentation": "

A URL back to SSM Agent on the instance that the Session Manager client uses to send commands and\n receive output from the instance. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output)\n

\n

\n region represents the Region identifier for an\n\t\t\t\t\t\tAmazon Web Services Region supported by Amazon Web Services Systems Manager, such as us-east-2 for the US East (Ohio) Region.\n\t\t\t\t\t\tFor a list of supported region values, see the Region column in Systems Manager service endpoints in the\n Amazon Web Services General Reference.

\n

\n session-id represents the ID of a Session Manager session, such as\n 1a2b3c4dEXAMPLE.

" } } } @@ -23640,7 +23640,7 @@ "TargetLocation": { "target": "com.amazonaws.ssm#TargetLocation", "traits": { - "smithy.api#documentation": "

The combination of Regions and accounts targeted by the current Automation\n execution.

" + "smithy.api#documentation": "

The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation\n execution.

" } } }, @@ -23905,7 +23905,7 @@ } }, "traits": { - "smithy.api#documentation": "

An array of search criteria that targets instances using a key-value pair that you\n specify.

\n \n

One or more targets must be specified for maintenance window Run Command-type tasks.\n Depending on the task, targets are optional for other maintenance window task types (Automation,\n Lambda, and Step Functions). For more information about running tasks\n that don't specify targets, see Registering\n maintenance window tasks without targets in the\n Amazon Web Services Systems Manager User Guide.

\n
\n

Supported formats include the following.

\n \n

For example:

\n \n

For more information about how to send commands that target instances using\n Key,Value parameters, see Targeting multiple instances in the Amazon Web Services Systems Manager User Guide.

" + "smithy.api#documentation": "

An array of search criteria that targets instances using a key-value pair that you\n specify.

\n \n

One or more targets must be specified for maintenance window Run Command-type tasks.\n Depending on the task, targets are optional for other maintenance window task types (Automation,\n Lambda, and Step Functions). For more information about running tasks\n that don't specify targets, see Registering\n maintenance window tasks without targets in the\n Amazon Web Services Systems Manager User Guide.

\n
\n

Supported formats include the following.

\n \n

For example:

\n \n

For more information about how to send commands that target instances using\n Key,Value parameters, see Targeting multiple instances in the Amazon Web Services Systems Manager User Guide.

" } }, "com.amazonaws.ssm#TargetCount": { @@ -23943,19 +23943,19 @@ "Accounts": { "target": "com.amazonaws.ssm#Accounts", "traits": { - "smithy.api#documentation": "

The accounts targeted by the current Automation execution.

" + "smithy.api#documentation": "

The Amazon Web Services accounts targeted by the current Automation execution.

" } }, "Regions": { "target": "com.amazonaws.ssm#Regions", "traits": { - "smithy.api#documentation": "

The Regions targeted by the current Automation execution.

" + "smithy.api#documentation": "

The Amazon Web Services Regions targeted by the current Automation execution.

" } }, "TargetLocationMaxConcurrency": { "target": "com.amazonaws.ssm#MaxConcurrency", "traits": { - "smithy.api#documentation": "

The maximum number of Regions and accounts allowed to run the Automation\n concurrently.

" + "smithy.api#documentation": "

The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation\n concurrently.

" } }, "TargetLocationMaxErrors": { @@ -23972,7 +23972,7 @@ } }, "traits": { - "smithy.api#documentation": "

The combination of Regions and accounts targeted by the current Automation\n execution.

" + "smithy.api#documentation": "

The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation\n execution.

" } }, "com.amazonaws.ssm#TargetLocations": { @@ -24489,7 +24489,7 @@ "Name": { "target": "com.amazonaws.ssm#DocumentARN", "traits": { - "smithy.api#documentation": "

The name of the SSM Command document or Automation runbook that contains the configuration\n information for the instance.

\n

You can specify Amazon Web Services-predefined documents, documents you created, or a document that is\n shared with you from another account.

\n

For Systems Manager document (SSM document) that are shared with you from other accounts, you\n must specify the complete SSM document ARN, in the following format:

\n

\n arn:aws:ssm:region:account-id:document/document-name\n \n

\n

For example:

\n

\n arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document\n

\n

For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need\n to specify the document name. For example, AWS-ApplyPatchBaseline or\n My-Document.

" + "smithy.api#documentation": "

The name of the SSM Command document or Automation runbook that contains the configuration\n information for the instance.

\n

You can specify Amazon Web Services-predefined documents, documents you created, or a document that is\n shared with you from another account.

\n

For Systems Manager document (SSM document) that are shared with you from other Amazon Web Services accounts, you\n must specify the complete SSM document ARN, in the following format:

\n

\n arn:aws:ssm:region:account-id:document/document-name\n \n

\n

For example:

\n

\n arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document\n

\n

For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need\n to specify the document name. For example, AWS-ApplyPatchBaseline or\n My-Document.

" } }, "Targets": { @@ -24555,7 +24555,7 @@ "TargetLocations": { "target": "com.amazonaws.ssm#TargetLocations", "traits": { - "smithy.api#documentation": "

A location is a combination of Regions and accounts where you want to run the\n association. Use this action to update an association in multiple Regions and multiple\n accounts.

" + "smithy.api#documentation": "

A location is a combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the\n association. Use this action to update an association in multiple Regions and multiple\n accounts.

" } } } @@ -24600,7 +24600,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the status of the Amazon Web Services Systems Manager document (SSM document) associated with the specified\n instance.

" + "smithy.api#documentation": "

Updates the status of the Amazon Web Services Systems Manager document (SSM document) associated with the specified\n instance.

\n

\n UpdateAssociationStatus is primarily used by the Amazon Web Services Systems Manager Agent (SSM Agent) to\n report status updates about your associations and is only used for associations created with the\n InstanceId legacy parameter.

" } }, "com.amazonaws.ssm#UpdateAssociationStatusRequest": { @@ -24616,7 +24616,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "

The ID of the instance.

", + "smithy.api#documentation": "

The instance ID.

", "smithy.api#required": {} } }, @@ -24763,7 +24763,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates information related to approval reviews for a specific version of a document.

" + "smithy.api#documentation": "

Updates information related to approval reviews for a specific version of a change template\n in Change Manager.

" } }, "com.amazonaws.ssm#UpdateDocumentMetadataRequest": { @@ -24772,20 +24772,20 @@ "Name": { "target": "com.amazonaws.ssm#DocumentName", "traits": { - "smithy.api#documentation": "

The name of the document for which a version is to be updated.

", + "smithy.api#documentation": "

The name of the change template for which a version's metadata is to be updated.

", "smithy.api#required": {} } }, "DocumentVersion": { "target": "com.amazonaws.ssm#DocumentVersion", "traits": { - "smithy.api#documentation": "

The version of a document to update.

" + "smithy.api#documentation": "

The version of a change template in which to update approval metadata.

" } }, "DocumentReviews": { "target": "com.amazonaws.ssm#DocumentReviews", "traits": { - "smithy.api#documentation": "

The document review details to update.

", + "smithy.api#documentation": "

The change template review details to update.

", "smithy.api#required": {} } } diff --git a/codegen/sdk-codegen/aws-models/synthetics.2017-10-11.json b/codegen/sdk-codegen/aws-models/synthetics.2017-10-11.json index 71b2a2d8f10..032966ac4c0 100644 --- a/codegen/sdk-codegen/aws-models/synthetics.2017-10-11.json +++ b/codegen/sdk-codegen/aws-models/synthetics.2017-10-11.json @@ -35,12 +35,19 @@ "ScreenshotName": { "target": "com.amazonaws.synthetics#String", "traits": { + "smithy.api#documentation": "

The name of the screenshot. This is generated the first time the canary is run after the UpdateCanary operation that\n specified for this canary to perform visual monitoring.

", "smithy.api#required": {} } }, "IgnoreCoordinates": { - "target": "com.amazonaws.synthetics#BaseScreenshotIgnoreCoordinates" + "target": "com.amazonaws.synthetics#BaseScreenshotIgnoreCoordinates", + "traits": { + "smithy.api#documentation": "

Coordinates that define the part of a screen to ignore during screenshot comparisons. To obtain the coordinates to use here, use the \n CloudWatch Logs console to draw the boundaries on the screen. For more information, see {LINK}

" + } } + }, + "traits": { + "smithy.api#documentation": "

A structure representing a screenshot that is used as a baseline during visual monitoring comparisons made by the canary.

" } }, "com.amazonaws.synthetics#BaseScreenshotConfigIgnoreCoordinate": { @@ -167,7 +174,10 @@ "target": "com.amazonaws.synthetics#VpcConfigOutput" }, "VisualReference": { - "target": "com.amazonaws.synthetics#VisualReferenceOutput" + "target": "com.amazonaws.synthetics#VisualReferenceOutput", + "traits": { + "smithy.api#documentation": "

If this canary performs visual monitoring by comparing screenshots, this structure contains the ID of the canary run to use as the baseline for screenshots, and the coordinates\n of any parts of the screen to ignore during the visual monitoring comparison.

" + } }, "Tags": { "target": "com.amazonaws.synthetics#TagMap", @@ -214,7 +224,7 @@ "ZipFile": { "target": "com.amazonaws.synthetics#Blob", "traits": { - "smithy.api#documentation": "

If you input your canary script directly into the canary instead of referring to an S3\n location, the value of this parameter is the base64-encoded contents of the .zip file that \n contains the script. It can be\n up to 5 MB.

" + "smithy.api#documentation": "

If you input your canary script directly into the canary instead of referring to an S3\n location, the value of this parameter is the base64-encoded contents of the .zip file that \n contains the script. It must be smaller than 256 Kb.

" } }, "Handler": { @@ -1782,7 +1792,10 @@ } }, "VisualReference": { - "target": "com.amazonaws.synthetics#VisualReferenceInput" + "target": "com.amazonaws.synthetics#VisualReferenceInput", + "traits": { + "smithy.api#documentation": "

Defines the screenshots to use as the baseline for comparisons during visual monitoring comparisons during future runs of this canary. If you omit this \n parameter, no changes are made to any baseline screenshots that the canary might be using already.

\n

Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2\n runtime or later. For more information, see \n Visual monitoring and \n Visual monitoring blueprint\n

" + } } } }, @@ -1807,25 +1820,41 @@ "type": "structure", "members": { "BaseScreenshots": { - "target": "com.amazonaws.synthetics#BaseScreenshots" + "target": "com.amazonaws.synthetics#BaseScreenshots", + "traits": { + "smithy.api#documentation": "

An array of screenshots that will be used as the baseline for visual monitoring in future runs of this canary. If there is a screenshot that you don't want to be used for\n visual monitoring, remove it from this array.

" + } }, "BaseCanaryRunId": { "target": "com.amazonaws.synthetics#String", "traits": { + "smithy.api#documentation": "

Specifies which canary run to use the screenshots from as the baseline for future visual monitoring with this canary. Valid values are \n nextrun to use the screenshots from the next run after this update is made, lastrun to use the screenshots from the most recent run \n before this update was made, or the value of Id in the \n CanaryRun from any past run of this canary.

", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#documentation": "

An object that specifies what screenshots to use as a baseline for visual monitoring by this canary, and optionally the parts of the screenshots to ignore during the visual monitoring comparison.

\n \n

Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2\n runtime or later. For more information, see \n Visual monitoring and \n Visual monitoring blueprint\n

" } }, "com.amazonaws.synthetics#VisualReferenceOutput": { "type": "structure", "members": { "BaseScreenshots": { - "target": "com.amazonaws.synthetics#BaseScreenshots" + "target": "com.amazonaws.synthetics#BaseScreenshots", + "traits": { + "smithy.api#documentation": "

An array of screenshots that are used as the baseline for comparisons during visual monitoring.

" + } }, "BaseCanaryRunId": { - "target": "com.amazonaws.synthetics#String" + "target": "com.amazonaws.synthetics#String", + "traits": { + "smithy.api#documentation": "

The ID of the canary run that produced the screenshots that are used as the baseline for visual monitoring comparisons during future runs of this canary.

" + } } + }, + "traits": { + "smithy.api#documentation": "

If this canary performs visual monitoring by comparing screenshots, this structure contains the ID of the canary run that is used as the baseline for screenshots, and the coordinates\n of any parts of those screenshots that are ignored during visual monitoring comparison.

\n

Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2 runtime or later.

" } }, "com.amazonaws.synthetics#VpcConfigInput": { diff --git a/codegen/sdk-codegen/aws-models/wafv2.2019-07-29.json b/codegen/sdk-codegen/aws-models/wafv2.2019-07-29.json index 698407b28a8..e0e1e569647 100644 --- a/codegen/sdk-codegen/aws-models/wafv2.2019-07-29.json +++ b/codegen/sdk-codegen/aws-models/wafv2.2019-07-29.json @@ -84,6 +84,9 @@ { "target": "com.amazonaws.wafv2#GetLoggingConfiguration" }, + { + "target": "com.amazonaws.wafv2#GetManagedRuleSet" + }, { "target": "com.amazonaws.wafv2#GetPermissionPolicy" }, @@ -108,12 +111,18 @@ { "target": "com.amazonaws.wafv2#ListAvailableManagedRuleGroups" }, + { + "target": "com.amazonaws.wafv2#ListAvailableManagedRuleGroupVersions" + }, { "target": "com.amazonaws.wafv2#ListIPSets" }, { "target": "com.amazonaws.wafv2#ListLoggingConfigurations" }, + { + "target": "com.amazonaws.wafv2#ListManagedRuleSets" + }, { "target": "com.amazonaws.wafv2#ListRegexPatternSets" }, @@ -132,6 +141,9 @@ { "target": "com.amazonaws.wafv2#PutLoggingConfiguration" }, + { + "target": "com.amazonaws.wafv2#PutManagedRuleSetVersions" + }, { "target": "com.amazonaws.wafv2#PutPermissionPolicy" }, @@ -144,6 +156,9 @@ { "target": "com.amazonaws.wafv2#UpdateIPSet" }, + { + "target": "com.amazonaws.wafv2#UpdateManagedRuleSetVersionExpiryDate" + }, { "target": "com.amazonaws.wafv2#UpdateRegexPatternSet" }, @@ -166,7 +181,7 @@ "name": "wafv2" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "WAF\n \n

This is the latest version of the WAF API, released in\n November, 2019. The names of the entities that you use to access this API, like\n endpoints and namespaces, all have the versioning information added, like \"V2\" or \"v2\",\n to distinguish from the prior version. We recommend migrating your resources to this\n version, because it has a number of significant improvements.

\n

If you used WAF prior to this release, you can't use this WAFV2 API to access\n any WAF resources that you created before. You can access your old rules, web ACLs,\n and other WAF resources only through the WAF Classic APIs. The WAF Classic\n APIs have retained the prior names, endpoints, and namespaces.

\n

For information, including how to migrate your WAF resources to this version, see the WAF\n Developer Guide.

\n
\n

WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests\n that are forwarded to Amazon CloudFront, an Amazon API Gateway REST API, an Application Load Balancer, or an AppSync GraphQL API. WAF also lets you control access to your content. Based on conditions that\n you specify, such as the IP addresses that requests originate from or the values of query\n strings, the Amazon API Gateway REST API, CloudFront distribution, the Application Load Balancer, \n or the AppSync GraphQL API responds to requests\n either with the requested content or with an HTTP 403 status code (Forbidden). You also can\n configure CloudFront to return a custom error page when a request is blocked.

\n

This API guide is for developers who need detailed information about WAF API\n actions, data types, and errors. For detailed information about WAF features and an\n overview of how to use WAF, see the WAF Developer Guide.

\n

You can make calls using the endpoints listed in Amazon Web Services Service Endpoints for WAF.

\n \n

Alternatively, you can use one of the Amazon Web Services SDKs to access an API that's tailored to the\n programming language or platform that you're using. For more information, see Amazon Web Services SDKs.

\n

We currently provide two versions of the WAF API: this API and the prior versions,\n the classic WAF APIs. This new API provides the same functionality as the older\n versions, with the following major improvements:

\n ", + "smithy.api#documentation": "WAF\n \n

This is the latest version of the WAF API,\n released in November, 2019. The names of the entities that you use to access this API,\n like endpoints and namespaces, all have the versioning information added, like \"V2\" or\n \"v2\", to distinguish from the prior version. We recommend migrating your resources to\n this version, because it has a number of significant improvements.

\n

If you used WAF prior to this release, you can't use this WAFV2 API to access any\n WAF resources that you created before. You can access your old rules, web ACLs, and\n other WAF resources only through the WAF Classic APIs. The WAF Classic APIs\n have retained the prior names, endpoints, and namespaces.

\n

For information, including how to migrate your WAF resources to this version,\n see the WAF Developer Guide.

\n
\n

WAF is a web application firewall that lets you monitor the HTTP and HTTPS\n requests that are forwarded to Amazon CloudFront, an Amazon API Gateway REST API, an Application Load Balancer, or an AppSync\n GraphQL API. WAF also lets you control access to your content. Based on conditions that\n you specify, such as the IP addresses that requests originate from or the values of query\n strings, the Amazon API Gateway REST API, CloudFront distribution, the Application Load Balancer, or the AppSync GraphQL\n API responds to requests either with the requested content or with an HTTP 403 status code\n (Forbidden). You also can configure CloudFront to return a custom error page when a request is\n blocked.

\n

This API guide is for developers who need detailed information about WAF API actions,\n data types, and errors. For detailed information about WAF features and an overview of\n how to use WAF, see the WAF Developer\n Guide.

\n

You can make calls using the endpoints listed in WAF endpoints and quotas.

\n \n

Alternatively, you can use one of the Amazon Web Services SDKs to access an API that's tailored to the\n programming language or platform that you're using. For more information, see Amazon Web Services SDKs.

\n

We currently provide two versions of the WAF API: this API and the prior versions,\n the classic WAF APIs. This new API provides the same functionality as the older versions,\n with the following major improvements:

\n ", "smithy.api#title": "AWS WAFV2", "smithy.api#xmlNamespace": { "uri": "http://waf.amazonaws.com/doc/2019-07-29/" @@ -182,7 +197,7 @@ "Action": { "target": "com.amazonaws.wafv2#ActionValue", "traits": { - "smithy.api#documentation": "

The action setting that a log record must contain in order to meet the condition.

", + "smithy.api#documentation": "

The action setting that a log record must contain in order to meet the condition.\n

", "smithy.api#required": {} } } @@ -214,14 +229,14 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Inspect all of the elements that WAF has parsed and extracted from the web request JSON body that are within the JsonBody \n MatchScope. This is used with the FieldToMatch option JsonBody.

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

" + "smithy.api#documentation": "

Inspect all of the elements that WAF has parsed and extracted from the web request\n JSON body that are within the JsonBody\n MatchScope. This is used with the FieldToMatch option\n JsonBody.\n \n

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

" } }, "com.amazonaws.wafv2#AllQueryArguments": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

All query arguments of a web request.

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

" + "smithy.api#documentation": "

All query arguments of a web request.

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

" } }, "com.amazonaws.wafv2#AllowAction": { @@ -235,7 +250,7 @@ } }, "traits": { - "smithy.api#documentation": "

Specifies that WAF should allow the request and optionally defines additional custom handling for the request.

\n

This is used in the context of other settings, for example to specify values for RuleAction and web ACL DefaultAction.

" + "smithy.api#documentation": "

Specifies that WAF should allow the request and optionally defines additional\n custom handling for the request.

\n

This is used in the context of other settings, for example to specify values for RuleAction and web ACL DefaultAction.

" } }, "com.amazonaws.wafv2#AndStatement": { @@ -244,7 +259,7 @@ "Statements": { "target": "com.amazonaws.wafv2#Statements", "traits": { - "smithy.api#documentation": "

The statements to combine with AND logic. You can use any statements that can be nested.

", + "smithy.api#documentation": "

The statements to combine with AND logic. You can use any statements that can be nested.\n

", "smithy.api#required": {} } } @@ -279,7 +294,7 @@ } ], "traits": { - "smithy.api#documentation": "

Associates a web ACL with a regional application resource, to protect the resource. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

\n

For Amazon CloudFront, don't use this call. Instead, use your CloudFront distribution configuration. To associate a web ACL, in the CloudFront call UpdateDistribution, set the web ACL ID to the Amazon Resource Name (ARN) of the web ACL. For information, see UpdateDistribution.

" + "smithy.api#documentation": "

Associates a web ACL with a regional application resource, to protect the resource.\n A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

\n

For Amazon CloudFront, don't use this call. Instead, use your CloudFront distribution configuration. To\n associate a web ACL, in the CloudFront call UpdateDistribution, set the web ACL ID\n to the Amazon Resource Name (ARN) of the web ACL. For information, see UpdateDistribution.

" } }, "com.amazonaws.wafv2#AssociateWebACLRequest": { @@ -288,7 +303,7 @@ "WebACLArn": { "target": "com.amazonaws.wafv2#ResourceArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the web ACL that you want to associate with the\n resource.

", "smithy.api#required": {} } }, @@ -316,14 +331,14 @@ } }, "traits": { - "smithy.api#documentation": "

Specifies that WAF should block the request and optionally defines additional custom handling for the response to the web request.

\n

This is used in the context of other settings, for example to specify values for RuleAction and web ACL DefaultAction.

" + "smithy.api#documentation": "

Specifies that WAF should block the request and optionally defines additional\n custom handling for the response to the web request.

\n

This is used in the context of other settings, for example to specify values for RuleAction and web ACL DefaultAction.

" } }, "com.amazonaws.wafv2#Body": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The body of a web request. This immediately follows the request headers.

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

" + "smithy.api#documentation": "

The body of a web request. This immediately follows the request headers.

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

" } }, "com.amazonaws.wafv2#BodyParsingFallbackBehavior": { @@ -354,7 +369,7 @@ "SearchString": { "target": "com.amazonaws.wafv2#SearchString", "traits": { - "smithy.api#documentation": "

A string value that you want WAF to search for. WAF searches only in the part of web requests that you designate for inspection in FieldToMatch. The maximum length of the value is 50 bytes.

\n

Valid values depend on the component that you specify for inspection in FieldToMatch:

\t\t\n \n \n

If SearchString includes alphabetic characters A-Z and a-z, note that the value is case sensitive.

\n

\n If you're using the WAF API\n

\n

Specify a base64-encoded version of the value. The maximum length of the value before you base64-encode it is 50 bytes.

\n

For example, suppose the value of Type is HEADER and the\n value of Data is User-Agent. If you want to search the\n User-Agent header for the value BadBot, you base64-encode\n BadBot using MIME\n base64-encoding\n and include the resulting value, QmFkQm90, in the value of\n SearchString.

\n

\n If you're using the CLI or one of the Amazon Web Services SDKs\n

\n

The value that you want WAF to search for. The SDK automatically base64 encodes the value.

", + "smithy.api#documentation": "

A string value that you want WAF to search for. WAF searches only in the part of\n web requests that you designate for inspection in FieldToMatch. The\n maximum length of the value is 50 bytes.

\n

Valid values depend on the component that you specify for inspection in\n FieldToMatch:

\n \n

If SearchString includes alphabetic characters A-Z and a-z, note that the\n value is case sensitive.

\n

\n If you're using the WAF API\n

\n

Specify a base64-encoded version of the value. The maximum length of the value before\n you base64-encode it is 50 bytes.

\n

For example, suppose the value of Type is HEADER and the value\n of Data is User-Agent. If you want to search the\n User-Agent header for the value BadBot, you base64-encode\n BadBot using MIME base64-encoding and include the resulting value,\n QmFkQm90, in the value of SearchString.

\n

\n If you're using the CLI or one of the Amazon Web Services SDKs\n

\n

The value that you want WAF to search for. The SDK automatically base64 encodes the\n value.

", "smithy.api#required": {} } }, @@ -375,7 +390,7 @@ "PositionalConstraint": { "target": "com.amazonaws.wafv2#PositionalConstraint", "traits": { - "smithy.api#documentation": "

The area within the portion of a web request that you want WAF to search for SearchString. Valid values include the following:

\n

\n CONTAINS\n

\n

The specified part of the web request must include the value of SearchString, but the location doesn't matter.

\t\t\n

\n CONTAINS_WORD\n

\n

The specified part of the web request must include the value of SearchString, and \n SearchString must contain only alphanumeric characters or underscore (A-Z, a-z, 0-9, or _). In addition, \n SearchString must be a word, which means that both of the following are true:

\n \n

\n EXACTLY\n

\n

The value of the specified part of the web request must exactly match the value of SearchString.

\n

\n STARTS_WITH\n

\n

The value of SearchString must appear at the beginning of the specified part of the web request.

\t\t\n

\n ENDS_WITH\n

\n

The value of SearchString must appear at the end of the specified part of the web request.

", + "smithy.api#documentation": "

The area within the portion of a web request that you want WAF to search for\n SearchString. Valid values include the following:

\n

\n CONTAINS\n

\n

The specified part of the web request must include the value of\n SearchString, but the location doesn't matter.

\n

\n CONTAINS_WORD\n

\n

The specified part of the web request must include the value of\n SearchString, and SearchString must contain only alphanumeric\n characters or underscore (A-Z, a-z, 0-9, or _). In addition, SearchString must\n be a word, which means that both of the following are true:

\n \n

\n EXACTLY\n

\n

The value of the specified part of the web request must exactly match the value of\n SearchString.

\n

\n STARTS_WITH\n

\n

The value of SearchString must appear at the beginning of the specified\n part of the web request.

\n

\n ENDS_WITH\n

\n

The value of SearchString must appear at the end of the specified part of\n the web request.

", "smithy.api#required": {} } } @@ -401,6 +416,9 @@ "target": "com.amazonaws.wafv2#CheckCapacityResponse" }, "errors": [ + { + "target": "com.amazonaws.wafv2#WAFExpiredManagedRuleGroupVersionException" + }, { "target": "com.amazonaws.wafv2#WAFInternalErrorException" }, @@ -440,7 +458,7 @@ "Rules": { "target": "com.amazonaws.wafv2#Rules", "traits": { - "smithy.api#documentation": "

An array of Rule that you're configuring to use in a rule group or web ACL.

", + "smithy.api#documentation": "

An array of Rule that you're configuring to use in a rule group or web\n ACL.

", "smithy.api#required": {} } } @@ -538,7 +556,7 @@ } }, "traits": { - "smithy.api#documentation": "

Specifies that WAF should count the request. Optionally defines additional custom handling for the request.

\n

This is used in the context of other settings, for example to specify values for RuleAction and web ACL DefaultAction.

" + "smithy.api#documentation": "

Specifies that WAF should count the request. Optionally defines additional custom\n handling for the request.

\n

This is used in the context of other settings, for example to specify values for RuleAction and web ACL DefaultAction.

" } }, "com.amazonaws.wafv2#Country": { @@ -1593,7 +1611,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an IPSet, which you use to identify web requests that originate from specific IP addresses or ranges of IP addresses. For example, if you're receiving a lot of requests from a ranges of IP addresses, you can configure WAF to block them using an IPSet that lists those IP addresses.

" + "smithy.api#documentation": "

Creates an IPSet, which you use to identify web requests that\n originate from specific IP addresses or ranges of IP addresses. For example, if you're\n receiving a lot of requests from a ranges of IP addresses, you can configure WAF to\n block them using an IPSet that lists those IP addresses.

" } }, "com.amazonaws.wafv2#CreateIPSetRequest": { @@ -1622,14 +1640,14 @@ "IPAddressVersion": { "target": "com.amazonaws.wafv2#IPAddressVersion", "traits": { - "smithy.api#documentation": "

Specify IPV4 or IPV6.

", + "smithy.api#documentation": "

The version of the IP addresses, either IPV4 or IPV6.

", "smithy.api#required": {} } }, "Addresses": { "target": "com.amazonaws.wafv2#IPAddresses", "traits": { - "smithy.api#documentation": "

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except for /0.

\n

Examples:

\n \n

For more information about CIDR notation, see the Wikipedia entry Classless\n Inter-Domain Routing.

", + "smithy.api#documentation": "

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except for /0.

\n

Examples:

\n \n

For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing.

", "smithy.api#required": {} } }, @@ -1687,7 +1705,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a RegexPatternSet, which you reference in a RegexPatternSetReferenceStatement, to have WAF inspect a web request component for the specified patterns.

" + "smithy.api#documentation": "

Creates a RegexPatternSet, which you reference in a RegexPatternSetReferenceStatement, to have WAF inspect a web request\n component for the specified patterns.

" } }, "com.amazonaws.wafv2#CreateRegexPatternSetRequest": { @@ -1978,7 +1996,7 @@ "Name": { "target": "com.amazonaws.wafv2#CustomHTTPHeaderName", "traits": { - "smithy.api#documentation": "

The name of the custom header.

\n

For custom request header insertion, when WAF inserts the header into the request, it prefixes this name x-amzn-waf-, to avoid confusion with the headers that are already in the request. For example, for the header name sample, WAF inserts the header x-amzn-waf-sample.

", + "smithy.api#documentation": "

The name of the custom header.

\n

For custom request header insertion, when WAF inserts the header into the request,\n it prefixes this name x-amzn-waf-, to avoid confusion with the headers that\n are already in the request. For example, for the header name sample, WAF\n inserts the header x-amzn-waf-sample.

", "smithy.api#required": {} } }, @@ -2037,7 +2055,7 @@ } }, "traits": { - "smithy.api#documentation": "

Custom request handling behavior that inserts custom headers into a web request. You can add custom request handling for the rule actions allow and count.

\n

For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the \n WAF Developer Guide.

" + "smithy.api#documentation": "

Custom request handling behavior that inserts custom headers into a web request. You can\n add custom request handling for the rule actions allow and count.

\n

For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the \n WAF Developer Guide.

" } }, "com.amazonaws.wafv2#CustomResponse": { @@ -2053,7 +2071,7 @@ "CustomResponseBodyKey": { "target": "com.amazonaws.wafv2#EntityName", "traits": { - "smithy.api#documentation": "

References the response body that you want WAF to return to the web request client. You can define a custom response for a rule action or a default web ACL action that is set to block. To do this, you first \n define the response body key and value in the CustomResponseBodies setting for the WebACL or RuleGroup where you want to use it. Then, in the rule action or web ACL default action BlockAction setting, you reference\n the response body using this key.

" + "smithy.api#documentation": "

References the response body that you want WAF to return to the web request\n client. You can define a custom response for a rule action or a default web ACL action that\n is set to block. To do this, you first define the response body key and value in the\n CustomResponseBodies setting for the WebACL or RuleGroup where you want to use it. Then, in the rule action or web ACL\n default action BlockAction setting, you reference the response body using this\n key.

" } }, "ResponseHeaders": { @@ -2064,7 +2082,7 @@ } }, "traits": { - "smithy.api#documentation": "

A custom response to send to the client. You can define a custom response for rule actions and default web ACL actions that are set to BlockAction.

\n

For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the \n WAF Developer Guide.

" + "smithy.api#documentation": "

A custom response to send to the client. You can define a custom response for rule\n actions and default web ACL actions that are set to BlockAction.

\n

For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the \n WAF Developer Guide.

" } }, "com.amazonaws.wafv2#CustomResponseBodies": { @@ -2087,20 +2105,20 @@ "ContentType": { "target": "com.amazonaws.wafv2#ResponseContentType", "traits": { - "smithy.api#documentation": "

The type of content in the payload that you are defining in the Content string.

", + "smithy.api#documentation": "

The type of content in the payload that you are defining in the Content\n string.

", "smithy.api#required": {} } }, "Content": { "target": "com.amazonaws.wafv2#ResponseContent", "traits": { - "smithy.api#documentation": "

The payload of the custom response.

\n

You can use JSON escape strings in JSON content. To do this, you must specify JSON content in the ContentType setting.

\n

For information about the limits on count and size for custom request and response settings, see WAF quotas in the \n WAF Developer Guide.

", + "smithy.api#documentation": "

The payload of the custom response.

\n

You can use JSON escape strings in JSON content. To do this, you must specify JSON\n content in the ContentType setting.

\n

For information about the limits on count and size for custom request and response settings, see WAF quotas in the \n WAF Developer Guide.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

The response body to use in a custom response to a web request. This is referenced by key from CustomResponse \n CustomResponseBodyKey.

" + "smithy.api#documentation": "

The response body to use in a custom response to a web request. This is referenced by\n key from CustomResponse\n CustomResponseBodyKey.

" } }, "com.amazonaws.wafv2#DefaultAction": { @@ -2120,7 +2138,7 @@ } }, "traits": { - "smithy.api#documentation": "

In a WebACL, this is the action that you want WAF \n to perform when a web request doesn't match any of the rules in the WebACL. The default action must be a terminating action, so you can't use count.

" + "smithy.api#documentation": "

In a WebACL, this is the action that you want WAF to perform\n when a web request doesn't match any of the rules in the WebACL. The default\n action must be a terminating action, so you can't use count.

" } }, "com.amazonaws.wafv2#DeleteFirewallManagerRuleGroups": { @@ -2149,7 +2167,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes all rule groups that are managed by Firewall Manager for the specified web ACL.

\n

You can only use this if ManagedByFirewallManager is false in the specified WebACL.

" + "smithy.api#documentation": "

Deletes all rule groups that are managed by Firewall Manager for the specified web ACL.

\n

You can only use this if ManagedByFirewallManager is false in the specified\n WebACL.

" } }, "com.amazonaws.wafv2#DeleteFirewallManagerRuleGroupsRequest": { @@ -2165,7 +2183,7 @@ "WebACLLockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", "smithy.api#required": {} } } @@ -2177,7 +2195,7 @@ "NextWebACLLockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" } } } @@ -2247,7 +2265,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", "smithy.api#required": {} } } @@ -2283,7 +2301,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the LoggingConfiguration from the specified web\n ACL.

" + "smithy.api#documentation": "

Deletes the LoggingConfiguration from the specified web ACL.

" } }, "com.amazonaws.wafv2#DeleteLoggingConfigurationRequest": { @@ -2322,7 +2340,7 @@ } ], "traits": { - "smithy.api#documentation": "

Permanently deletes an IAM policy from the specified rule group.

\n

You must be the owner of the rule group to perform this operation.

" + "smithy.api#documentation": "

Permanently deletes an IAM policy from the specified rule group.

\n

You must be the owner of the rule group to perform this operation.

" } }, "com.amazonaws.wafv2#DeletePermissionPolicyRequest": { @@ -2331,7 +2349,7 @@ "ResourceArn": { "target": "com.amazonaws.wafv2#ResourceArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the rule group from which you want to delete the policy.

\n

You must be the owner of the rule group to perform this operation.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the rule group from which you want to delete the\n policy.

\n

You must be the owner of the rule group to perform this operation.

", "smithy.api#required": {} } } @@ -2406,7 +2424,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", "smithy.api#required": {} } } @@ -2481,7 +2499,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", "smithy.api#required": {} } } @@ -2526,7 +2544,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified WebACL.

\n

You can only use this if ManagedByFirewallManager is false in the specified WebACL.

" + "smithy.api#documentation": "

Deletes the specified WebACL.

\n

You can only use this if ManagedByFirewallManager is false in the specified\n WebACL.

" } }, "com.amazonaws.wafv2#DeleteWebACLRequest": { @@ -2556,7 +2574,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", "smithy.api#required": {} } } @@ -2575,6 +2593,9 @@ "target": "com.amazonaws.wafv2#DescribeManagedRuleGroupResponse" }, "errors": [ + { + "target": "com.amazonaws.wafv2#WAFExpiredManagedRuleGroupVersionException" + }, { "target": "com.amazonaws.wafv2#WAFInternalErrorException" }, @@ -2592,7 +2613,7 @@ } ], "traits": { - "smithy.api#documentation": "

Provides high-level information for a managed rule group, including descriptions of the rules.

" + "smithy.api#documentation": "

Provides high-level information for a managed rule group, including descriptions of the\n rules.

" } }, "com.amazonaws.wafv2#DescribeManagedRuleGroupRequest": { @@ -2618,16 +2639,34 @@ "smithy.api#documentation": "

Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

\n

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

\n ", "smithy.api#required": {} } + }, + "VersionName": { + "target": "com.amazonaws.wafv2#VersionKeyString", + "traits": { + "smithy.api#documentation": "

The version of the rule group. You can only use a version that is not \n scheduled for expiration. If you don't provide this, WAF uses the vendor's default version.\n

" + } } } }, "com.amazonaws.wafv2#DescribeManagedRuleGroupResponse": { "type": "structure", "members": { + "VersionName": { + "target": "com.amazonaws.wafv2#VersionKeyString", + "traits": { + "smithy.api#documentation": "

The managed rule group's version.

" + } + }, + "SnsTopicArn": { + "target": "com.amazonaws.wafv2#ResourceArn", + "traits": { + "smithy.api#documentation": "

The Amazon resource name (ARN) of the Amazon Simple Notification Service SNS topic that's used to record changes\n to the managed rule group. You can subscribe to the SNS topic to receive notifications when\n the managed rule group is modified, such as for new versions and for version expiration.\n For more information, see the Amazon Simple Notification Service Developer Guide.

" + } + }, "Capacity": { "target": "com.amazonaws.wafv2#CapacityUnit", "traits": { - "smithy.api#documentation": "

The web ACL capacity units (WCUs) required for this rule group. \n WAF uses web ACL capacity units (WCU) to calculate and control the operating\n resources that are used to run your rules, rule groups, and web ACLs. WAF\n calculates capacity differently for each rule type, to reflect each rule's relative\n cost. Rule group capacity is fixed at creation, so users can plan their \n web ACL WCU usage when they use a rule group. \n The WCU limit for web ACLs is 1,500.

" + "smithy.api#documentation": "

The web ACL capacity units (WCUs) required for this rule group. WAF uses web ACL\n capacity units (WCU) to calculate and control the operating resources that are used to run\n your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule\n type, to reflect each rule's relative cost. Rule group capacity is fixed at creation, so\n users can plan their web ACL WCU usage when they use a rule group. The WCU limit for web\n ACLs is 1,500.

" } }, "Rules": { @@ -2679,7 +2718,7 @@ } ], "traits": { - "smithy.api#documentation": "

Disassociates a web ACL from a regional application resource. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

\n

For Amazon CloudFront, don't use this call. Instead, use your CloudFront distribution configuration. To disassociate a web ACL, provide an empty web ACL ID in the CloudFront call UpdateDistribution. For information, see UpdateDistribution.

" + "smithy.api#documentation": "

Disassociates a web ACL from a regional application resource. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

\n

For Amazon CloudFront, don't use this call. Instead, use your CloudFront distribution configuration. To\n disassociate a web ACL, provide an empty web ACL ID in the CloudFront call\n UpdateDistribution. For information, see UpdateDistribution.

" } }, "com.amazonaws.wafv2#DisassociateWebACLRequest": { @@ -2746,7 +2785,7 @@ } }, "traits": { - "smithy.api#documentation": "

Specifies a single rule to exclude from the rule group. Excluding a rule overrides \n its action setting for the rule group in the web ACL, setting it to COUNT. \n This effectively excludes the rule from acting on web requests.

" + "smithy.api#documentation": "

Specifies a single rule to exclude from the rule group. Excluding a rule overrides its\n action setting for the rule group in the web ACL, setting it to COUNT. This\n effectively excludes the rule from acting on web requests.

" } }, "com.amazonaws.wafv2#ExcludedRules": { @@ -2776,13 +2815,13 @@ "SingleHeader": { "target": "com.amazonaws.wafv2#SingleHeader", "traits": { - "smithy.api#documentation": "

Inspect a single header. Provide the name of the header to inspect, for example, User-Agent or Referer. This setting isn't case sensitive.

\n

Example JSON: \"SingleHeader\": { \"Name\": \"haystack\" }\n

" + "smithy.api#documentation": "

Inspect a single header. Provide the name of the header to inspect, for example,\n User-Agent or Referer. This setting isn't case\n sensitive.

\n

Example JSON: \"SingleHeader\": { \"Name\": \"haystack\" }\n

" } }, "SingleQueryArgument": { "target": "com.amazonaws.wafv2#SingleQueryArgument", "traits": { - "smithy.api#documentation": "

Inspect a single query argument. Provide the name of the query argument to inspect, such as UserName or SalesRegion. The name can be up to 30 characters long and isn't case sensitive.

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

\n

Example JSON: \"SingleQueryArgument\": { \"Name\": \"myArgument\" }\n

" + "smithy.api#documentation": "

Inspect a single query argument. Provide the name of the query argument to inspect, such\n as UserName or SalesRegion. The name can be up to\n 30 characters long and isn't case sensitive.

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

\n

Example JSON: \"SingleQueryArgument\": { \"Name\": \"myArgument\" }\n

" } }, "AllQueryArguments": { @@ -2794,36 +2833,36 @@ "UriPath": { "target": "com.amazonaws.wafv2#UriPath", "traits": { - "smithy.api#documentation": "

Inspect the request URI path. This is the part of a web request that identifies a resource, for example, /images/daily-ad.jpg.

" + "smithy.api#documentation": "

Inspect the request URI path. This is the part of a web request that identifies a\n resource, for example, /images/daily-ad.jpg.

" } }, "QueryString": { "target": "com.amazonaws.wafv2#QueryString", "traits": { - "smithy.api#documentation": "

Inspect the query string. This is the part of a URL that appears after a ? character, if any.

" + "smithy.api#documentation": "

Inspect the query string. This is the part of a URL that appears after a ?\n character, if any.

" } }, "Body": { "target": "com.amazonaws.wafv2#Body", "traits": { - "smithy.api#documentation": "

Inspect the request body as plain text. The request body immediately follows the request headers. This is the part of a request that contains any \n additional data that you want to send to your web server as the HTTP request body, such as data from a form.

\n

Note that only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. If you don't need to inspect more than 8 KB, you can guarantee that you don't allow additional bytes in by combining a statement that inspects the body of the web request, such as ByteMatchStatement or RegexPatternSetReferenceStatement, with a SizeConstraintStatement that enforces an 8 KB size limit on the body of the request. WAF doesn't support inspecting the entire contents of web requests whose bodies exceed the 8 KB limit.

" + "smithy.api#documentation": "

Inspect the request body as plain text. The request body immediately follows the request\n headers. This is the part of a request that contains any additional data that you want to\n send to your web server as the HTTP request body, such as data from a form.

\n

Note that only the first 8 KB (8192 bytes) of the request body are forwarded to\n WAF for inspection by the underlying host service. If you don't need to inspect more\n than 8 KB, you can guarantee that you don't allow additional bytes in by combining a\n statement that inspects the body of the web request, such as ByteMatchStatement or RegexPatternSetReferenceStatement,\n with a SizeConstraintStatement that enforces an 8 KB size limit on the\n body of the request. WAF doesn't support inspecting the entire contents of web requests\n whose bodies exceed the 8 KB limit.

" } }, "Method": { "target": "com.amazonaws.wafv2#Method", "traits": { - "smithy.api#documentation": "

Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin to perform.

" + "smithy.api#documentation": "

Inspect the HTTP method. The method indicates the type of operation that the request is\n asking the origin to perform.

" } }, "JsonBody": { "target": "com.amazonaws.wafv2#JsonBody", "traits": { - "smithy.api#documentation": "

Inspect the request body as JSON. The request body immediately follows the request headers. This is the part of a request that contains any \n additional data that you want to send to your web server as the HTTP request body, such as data from a form.

\n

Note that only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. If you don't need to inspect more than 8 KB, you can guarantee that you don't allow additional bytes in by combining a statement that inspects the body of the web request, such as ByteMatchStatement or RegexPatternSetReferenceStatement, with a SizeConstraintStatement that enforces an 8 KB size limit on the body of the request. WAF doesn't support inspecting the entire contents of web requests whose bodies exceed the 8 KB limit.

" + "smithy.api#documentation": "

Inspect the request body as JSON. The request body immediately follows the request\n headers. This is the part of a request that contains any additional data that you want to\n send to your web server as the HTTP request body, such as data from a form.

\n

Note that only the first 8 KB (8192 bytes) of the request body are forwarded to\n WAF for inspection by the underlying host service. If you don't need to inspect more\n than 8 KB, you can guarantee that you don't allow additional bytes in by combining a\n statement that inspects the body of the web request, such as ByteMatchStatement or RegexPatternSetReferenceStatement,\n with a SizeConstraintStatement that enforces an 8 KB size limit on the\n body of the request. WAF doesn't support inspecting the entire contents of web requests\n whose bodies exceed the 8 KB limit.

" } } }, "traits": { - "smithy.api#documentation": "

The part of a web request that you want WAF to inspect. Include the single FieldToMatch type that you want to inspect, with additional specifications as needed, according to the type. You specify a single request component in FieldToMatch for each rule statement that requires it. To inspect more than one component of a web request, create a separate rule statement for each component.

" + "smithy.api#documentation": "

The part of a web request that you want WAF to inspect. Include the single\n FieldToMatch type that you want to inspect, with additional specifications\n as needed, according to the type. You specify a single request component in\n FieldToMatch for each rule statement that requires it. To inspect more than\n one component of a web request, create a separate rule statement for each component.

" } }, "com.amazonaws.wafv2#FieldToMatchData": { @@ -2849,7 +2888,7 @@ "Requirement": { "target": "com.amazonaws.wafv2#FilterRequirement", "traits": { - "smithy.api#documentation": "

Logic to apply to the filtering conditions. You can specify that, in order to satisfy the filter, a log must match all conditions or must match at least one condition.

", + "smithy.api#documentation": "

Logic to apply to the filtering conditions. You can specify that, in order to satisfy\n the filter, a log must match all conditions or must match at least one condition.

", "smithy.api#required": {} } }, @@ -2919,7 +2958,7 @@ "Priority": { "target": "com.amazonaws.wafv2#RulePriority", "traits": { - "smithy.api#documentation": "

If you define more than one rule group in the first or last Firewall Manager rule groups,\n WAF evaluates each request against the rule groups in order, starting from the lowest priority setting. \n The priorities don't need to be consecutive, but they must all be different.

", + "smithy.api#documentation": "

If you define more than one rule group in the first or last Firewall Manager rule groups, WAF\n evaluates each request against the rule groups in order, starting from the lowest priority\n setting. The priorities don't need to be consecutive, but they must all be\n different.

", "smithy.api#required": {} } }, @@ -2994,7 +3033,7 @@ } }, "traits": { - "smithy.api#documentation": "

The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.

\n \n \n

If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.

\n
\n \n \n

This configuration is used for GeoMatchStatement and RateBasedStatement. \n For IPSetReferenceStatement, use IPSetForwardedIPConfig instead.

\n

WAF only evaluates the first IP address found in the specified HTTP header.

" + "smithy.api#documentation": "

The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.

\n \n \n

If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.

\n
\n \n \n

This configuration is used for GeoMatchStatement and RateBasedStatement. For IPSetReferenceStatement, use IPSetForwardedIPConfig instead.

\n

WAF only evaluates the first IP address found in the specified HTTP header.\n

" } }, "com.amazonaws.wafv2#ForwardedIPHeaderName": { @@ -3032,7 +3071,7 @@ "CountryCodes": { "target": "com.amazonaws.wafv2#CountryCodes", "traits": { - "smithy.api#documentation": "

An array of two-character country codes, for example, [ \"US\", \"CN\" ], from the alpha-2 country ISO codes of the ISO 3166 international standard.

" + "smithy.api#documentation": "

An array of two-character country codes, for example, [ \"US\", \"CN\" ], from\n the alpha-2 country ISO codes of the ISO 3166 international standard.

" } }, "ForwardedIPConfig": { @@ -3110,7 +3149,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" } } } @@ -3164,6 +3203,75 @@ } } }, + "com.amazonaws.wafv2#GetManagedRuleSet": { + "type": "operation", + "input": { + "target": "com.amazonaws.wafv2#GetManagedRuleSetRequest" + }, + "output": { + "target": "com.amazonaws.wafv2#GetManagedRuleSetResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wafv2#WAFInternalErrorException" + }, + { + "target": "com.amazonaws.wafv2#WAFInvalidOperationException" + }, + { + "target": "com.amazonaws.wafv2#WAFInvalidParameterException" + }, + { + "target": "com.amazonaws.wafv2#WAFNonexistentItemException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the specified managed rule set.

\n \n

This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Marketplace sellers.

\n

Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and UpdateManagedRuleSetVersionExpiryDate.

\n
" + } + }, + "com.amazonaws.wafv2#GetManagedRuleSetRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.wafv2#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set.

\n

This name is assigned to the corresponding managed rule group, which your customers can access and use.

", + "smithy.api#required": {} + } + }, + "Scope": { + "target": "com.amazonaws.wafv2#Scope", + "traits": { + "smithy.api#documentation": "

Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

\n

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

\n ", + "smithy.api#required": {} + } + }, + "Id": { + "target": "com.amazonaws.wafv2#EntityId", + "traits": { + "smithy.api#documentation": "

A unique identifier for the managed rule set. The ID is returned in the responses to commands like list. You provide it to operations like get and update.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wafv2#GetManagedRuleSetResponse": { + "type": "structure", + "members": { + "ManagedRuleSet": { + "target": "com.amazonaws.wafv2#ManagedRuleSet", + "traits": { + "smithy.api#documentation": "

The managed rule set that you requested.

" + } + }, + "LockToken": { + "target": "com.amazonaws.wafv2#LockToken", + "traits": { + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" + } + } + } + }, "com.amazonaws.wafv2#GetPermissionPolicy": { "type": "operation", "input": { @@ -3184,7 +3292,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the IAM policy that is attached to the specified rule group.

\n

You must be the owner of the rule group to perform this operation.

" + "smithy.api#documentation": "

Returns the IAM policy that is attached to the specified rule group.

\n

You must be the owner of the rule group to perform this operation.

" } }, "com.amazonaws.wafv2#GetPermissionPolicyRequest": { @@ -3193,7 +3301,7 @@ "ResourceArn": { "target": "com.amazonaws.wafv2#ResourceArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the rule group for which you want to get the policy.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the rule group for which you want to get the\n policy.

", "smithy.api#required": {} } } @@ -3233,7 +3341,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the keys that are currently blocked by a rate-based rule. The maximum number of managed keys that can be blocked for a single rate-based rule is 10,000. If more than 10,000 addresses exceed the rate limit, those with the highest rates are blocked.

" + "smithy.api#documentation": "

Retrieves the keys that are currently blocked by a rate-based rule. The maximum number\n of managed keys that can be blocked for a single rate-based rule is 10,000. If more than\n 10,000 addresses exceed the rate limit, those with the highest rates are blocked.

" } }, "com.amazonaws.wafv2#GetRateBasedStatementManagedKeysRequest": { @@ -3350,7 +3458,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" } } } @@ -3422,7 +3530,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" } } } @@ -3447,7 +3555,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets detailed information about a specified number of requests--a sample--that WAF randomly selects from among the first 5,000 requests that your Amazon Web Services resource received during a time range that you choose. You can specify a sample size of up to 500 requests, and you can specify any time range in the previous three hours.

\n

\n GetSampledRequests returns a time range, which is usually the time range that you specified. However, if your resource \n (such as a CloudFront distribution) received 5,000 requests before the specified time range elapsed, GetSampledRequests \n returns an updated time range. This new time range indicates the actual period during which WAF selected the requests in the sample.

" + "smithy.api#documentation": "

Gets detailed information about a specified number of requests--a sample--that WAF\n randomly selects from among the first 5,000 requests that your Amazon Web Services resource received\n during a time range that you choose. You can specify a sample size of up to 500 requests,\n and you can specify any time range in the previous three hours.

\n

\n GetSampledRequests returns a time range, which is usually the time range that\n you specified. However, if your resource (such as a CloudFront distribution) received 5,000\n requests before the specified time range elapsed, GetSampledRequests returns\n an updated time range. This new time range indicates the actual period during which WAF\n selected the requests in the sample.

" } }, "com.amazonaws.wafv2#GetSampledRequestsRequest": { @@ -3456,14 +3564,14 @@ "WebAclArn": { "target": "com.amazonaws.wafv2#ResourceArn", "traits": { - "smithy.api#documentation": "

The Amazon resource name (ARN) of the WebACL for which you want a sample of requests.

", + "smithy.api#documentation": "

The Amazon resource name (ARN) of the WebACL for which you want a sample of\n requests.

", "smithy.api#required": {} } }, "RuleMetricName": { "target": "com.amazonaws.wafv2#MetricName", "traits": { - "smithy.api#documentation": "

The metric name assigned to the Rule or RuleGroup for which you want a sample of requests.

", + "smithy.api#documentation": "

The metric name assigned to the Rule or RuleGroup for which\n you want a sample of requests.

", "smithy.api#required": {} } }, @@ -3477,14 +3585,14 @@ "TimeWindow": { "target": "com.amazonaws.wafv2#TimeWindow", "traits": { - "smithy.api#documentation": "

The start date and time and the end date and time of the range for which you want GetSampledRequests to return a \n sample of requests. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, \"2016-09-27T14:50Z\". You can specify any time range in the previous three hours. If you specify a start time that's earlier than three hours ago, WAF sets it to three hours ago.

", + "smithy.api#documentation": "

The start date and time and the end date and time of the range for which you want\n GetSampledRequests to return a sample of requests. You must specify the\n times in Coordinated Universal Time (UTC) format. UTC format includes the special\n designator, Z. For example, \"2016-09-27T14:50Z\". You can specify\n any time range in the previous three hours. If you specify a start time that's earlier than\n three hours ago, WAF sets it to three hours ago.

", "smithy.api#required": {} } }, "MaxItems": { "target": "com.amazonaws.wafv2#ListMaxItems", "traits": { - "smithy.api#documentation": "

The number of requests that you want WAF to return from among the first 5,000 requests that your Amazon Web Services resource received\n during the time range. If your resource received fewer requests than the value of MaxItems, GetSampledRequests \n returns information about all of them.

", + "smithy.api#documentation": "

The number of requests that you want WAF to return from among the first 5,000\n requests that your Amazon Web Services resource received during the time range. If your resource received\n fewer requests than the value of MaxItems, GetSampledRequests\n returns information about all of them.

", "smithy.api#required": {} } } @@ -3496,19 +3604,19 @@ "SampledRequests": { "target": "com.amazonaws.wafv2#SampledHTTPRequests", "traits": { - "smithy.api#documentation": "

A complex type that contains detailed information about each of the requests in the sample.

" + "smithy.api#documentation": "

A complex type that contains detailed information about each of the requests in the\n sample.

" } }, "PopulationSize": { "target": "com.amazonaws.wafv2#PopulationSize", "traits": { - "smithy.api#documentation": "

The total number of requests from which GetSampledRequests got a sample of MaxItems requests. \n If PopulationSize is less than MaxItems, the sample includes every request that your Amazon Web Services resource \n received during the specified time range.

" + "smithy.api#documentation": "

The total number of requests from which GetSampledRequests got a sample of\n MaxItems requests. If PopulationSize is less than\n MaxItems, the sample includes every request that your Amazon Web Services resource\n received during the specified time range.

" } }, "TimeWindow": { "target": "com.amazonaws.wafv2#TimeWindow", "traits": { - "smithy.api#documentation": "

Usually, TimeWindow is the time range that you specified in the GetSampledRequests request. \n However, if your Amazon Web Services resource received more than 5,000 requests during the time range that you specified in the request, \n GetSampledRequests returns the time range for the first 5,000 requests. Times are in Coordinated Universal Time (UTC) format.

" + "smithy.api#documentation": "

Usually, TimeWindow is the time range that you specified in the\n GetSampledRequests request. However, if your Amazon Web Services resource received more\n than 5,000 requests during the time range that you specified in the request,\n GetSampledRequests returns the time range for the first 5,000 requests.\n Times are in Coordinated Universal Time (UTC) format.

" } } } @@ -3586,7 +3694,7 @@ "WebACL": { "target": "com.amazonaws.wafv2#WebACL", "traits": { - "smithy.api#documentation": "

The web ACL that is associated with the resource. If there is no associated resource, WAF returns a null web ACL.

" + "smithy.api#documentation": "

The web ACL that is associated with the resource. If there is no associated resource,\n WAF returns a null web ACL.

" } } } @@ -3623,13 +3731,13 @@ "WebACL": { "target": "com.amazonaws.wafv2#WebACL", "traits": { - "smithy.api#documentation": "

The web ACL specification. You can modify the settings in this web ACL and use it to update this web ACL or create a new one.

" + "smithy.api#documentation": "

The web ACL specification. You can modify the settings in this web ACL and use it to\n update this web ACL or create a new one.

" } }, "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" } } } @@ -3651,7 +3759,7 @@ } }, "traits": { - "smithy.api#documentation": "

Part of the response from GetSampledRequests. This is a complex type that \n appears as Headers in the response syntax. HTTPHeader contains the names and values of \n all of the headers that appear in one of the web requests.

" + "smithy.api#documentation": "

Part of the response from GetSampledRequests. This is a complex type\n that appears as Headers in the response syntax. HTTPHeader\n contains the names and values of all of the headers that appear in one of the web requests.\n

" } }, "com.amazonaws.wafv2#HTTPHeaders": { @@ -3669,19 +3777,19 @@ "ClientIP": { "target": "com.amazonaws.wafv2#IPString", "traits": { - "smithy.api#documentation": "

The IP address that the request originated from. If the web ACL is associated with a CloudFront distribution, \n this is the value of one of the following fields in CloudFront access logs:

\n " + "smithy.api#documentation": "

The IP address that the request originated from. If the web ACL is associated with a\n CloudFront distribution, this is the value of one of the following fields in CloudFront access\n logs:

\n " } }, "Country": { "target": "com.amazonaws.wafv2#Country", "traits": { - "smithy.api#documentation": "

The two-letter country code for the country that the request originated from. For a current list of country codes, \n see the Wikipedia entry ISO 3166-1 alpha-2.

" + "smithy.api#documentation": "

The two-letter country code for the country that the request originated from. For a\n current list of country codes, see the Wikipedia entry ISO 3166-1\n alpha-2.

" } }, "URI": { "target": "com.amazonaws.wafv2#URIString", "traits": { - "smithy.api#documentation": "

The URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg.

" + "smithy.api#documentation": "

The URI path of the request, which identifies the resource, for example,\n /images/daily-ad.jpg.

" } }, "Method": { @@ -3693,18 +3801,18 @@ "HTTPVersion": { "target": "com.amazonaws.wafv2#HTTPVersion", "traits": { - "smithy.api#documentation": "

The HTTP version specified in the sampled web request, for example, HTTP/1.1.

" + "smithy.api#documentation": "

The HTTP version specified in the sampled web request, for example,\n HTTP/1.1.

" } }, "Headers": { "target": "com.amazonaws.wafv2#HTTPHeaders", "traits": { - "smithy.api#documentation": "

A complex type that contains the name and value for each header in the sampled web request.

" + "smithy.api#documentation": "

A complex type that contains the name and value for each header in the sampled web\n request.

" } } }, "traits": { - "smithy.api#documentation": "

Part of the response from GetSampledRequests. This is a complex type that \n appears as Request in the response syntax. HTTPRequest contains information about \n one of the web requests.

" + "smithy.api#documentation": "

Part of the response from GetSampledRequests. This is a complex type\n that appears as Request in the response syntax. HTTPRequest\n contains information about one of the web requests.

" } }, "com.amazonaws.wafv2#HTTPVersion": { @@ -3780,20 +3888,20 @@ "IPAddressVersion": { "target": "com.amazonaws.wafv2#IPAddressVersion", "traits": { - "smithy.api#documentation": "

Specify IPV4 or IPV6.

", + "smithy.api#documentation": "

The version of the IP addresses, either IPV4 or IPV6.

", "smithy.api#required": {} } }, "Addresses": { "target": "com.amazonaws.wafv2#IPAddresses", "traits": { - "smithy.api#documentation": "

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except for /0.

\n

Examples:

\n \n

For more information about CIDR notation, see the Wikipedia entry Classless\n Inter-Domain Routing.

", + "smithy.api#documentation": "

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except for /0.

\n

Examples:

\n \n

For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Contains one or more IP addresses or blocks of IP addresses specified in Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except for /0. For information about CIDR notation, see the Wikipedia entry Classless\n Inter-Domain Routing.

\n

WAF assigns an ARN to each IPSet that you create. To use an IP set in a rule, you provide the ARN to the Rule statement IPSetReferenceStatement.

" + "smithy.api#documentation": "

Contains one or more IP addresses or blocks of IP addresses specified in Classless\n Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges\n except for /0. For information about CIDR notation, see the Wikipedia entry Classless\n Inter-Domain Routing.

\n

WAF assigns an ARN to each IPSet that you create. To use an IP set in a\n rule, you provide the ARN to the Rule statement IPSetReferenceStatement.

" } }, "com.amazonaws.wafv2#IPSetForwardedIPConfig": { @@ -3816,13 +3924,13 @@ "Position": { "target": "com.amazonaws.wafv2#ForwardedIPPosition", "traits": { - "smithy.api#documentation": "

The position in the header to search for the IP address. The header can contain IP addresses of the original client and also of proxies. For example, the header value could be 10.1.1.1, 127.0.0.0, 10.10.10.10 where the first IP address identifies the original client and the rest identify proxies that the request went through.

\n

The options for this setting are the following:

\n ", + "smithy.api#documentation": "

The position in the header to search for the IP address. The header can contain IP\n addresses of the original client and also of proxies. For example, the header value could\n be 10.1.1.1, 127.0.0.0, 10.10.10.10 where the first IP address identifies the\n original client and the rest identify proxies that the request went through.

\n

The options for this setting are the following:

\n ", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.

\n \n \n

If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.

\n
\n \n \n

This configuration is used only for IPSetReferenceStatement. For GeoMatchStatement and RateBasedStatement, use ForwardedIPConfig instead.

" + "smithy.api#documentation": "

The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.

\n \n \n

If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.

\n
\n \n \n

This configuration is used only for IPSetReferenceStatement. For GeoMatchStatement and RateBasedStatement, use ForwardedIPConfig instead.

" } }, "com.amazonaws.wafv2#IPSetReferenceStatement": { @@ -3831,7 +3939,7 @@ "ARN": { "target": "com.amazonaws.wafv2#ResourceArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IPSet that this statement references.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IPSet that this statement\n references.

", "smithy.api#required": {} } }, @@ -3876,7 +3984,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" } }, "ARN": { @@ -3899,26 +4007,26 @@ "MatchPattern": { "target": "com.amazonaws.wafv2#JsonMatchPattern", "traits": { - "smithy.api#documentation": "

The patterns to look for in the JSON body. WAF inspects the results of these pattern matches against the rule inspection criteria.

", + "smithy.api#documentation": "

The patterns to look for in the JSON body. WAF inspects the results of these\n pattern matches against the rule inspection criteria.

", "smithy.api#required": {} } }, "MatchScope": { "target": "com.amazonaws.wafv2#JsonMatchScope", "traits": { - "smithy.api#documentation": "

The parts of the JSON to match against using the MatchPattern. If you specify All, WAF matches against keys and values.

", + "smithy.api#documentation": "

The parts of the JSON to match against using the MatchPattern. If you\n specify All, WAF matches against keys and values.

", "smithy.api#required": {} } }, "InvalidFallbackBehavior": { "target": "com.amazonaws.wafv2#BodyParsingFallbackBehavior", "traits": { - "smithy.api#documentation": "

What WAF should do if it fails to completely parse the JSON body. The options are the following:

\n \n

If you don't provide this setting, WAF parses and evaluates the content only up to the first parsing failure that it encounters.

\n

WAF does its best to parse the entire JSON body, but might be forced\n \tto stop for reasons such as characters that aren't valid, duplicate keys,\n \ttruncation, and any content whose root node isn't an object or an array.

\n

WAF parses the JSON in the following examples as two valid key,\n \tvalue pairs:

\n " + "smithy.api#documentation": "

What WAF should do if it fails to completely parse the JSON body. The options are\n the following:

\n \n

If you don't provide this setting, WAF parses and evaluates the content only up to the\n first parsing failure that it encounters.

\n

WAF does its best to parse the entire JSON body, but might be forced to stop for\n reasons such as invalid characters, duplicate keys, truncation, and any content whose root\n node isn't an object or an array.

\n

WAF parses the JSON in the following examples as two valid key, value pairs:

\n " } } }, "traits": { - "smithy.api#documentation": "

The body of a web request, inspected as JSON. The body immediately follows the request headers. This is used in the FieldToMatch specification.

\n

Use the specifications in this object to indicate which parts of the JSON body to inspect using the rule's inspection criteria. WAF inspects only the parts of the JSON that result from the matches that you indicate.

" + "smithy.api#documentation": "

The body of a web request, inspected as JSON. The body immediately follows the request\n headers. This is used in the FieldToMatch specification.

\n

Use the specifications in this object to indicate which parts of the JSON body to\n inspect using the rule's inspection criteria. WAF inspects only the parts of the JSON\n that result from the matches that you\n indicate.\n

" } }, "com.amazonaws.wafv2#JsonMatchPattern": { @@ -3927,18 +4035,18 @@ "All": { "target": "com.amazonaws.wafv2#All", "traits": { - "smithy.api#documentation": "

Match all of the elements. See also MatchScope in JsonBody.

\n

You must specify either this setting or the IncludedPaths setting, but not both.

" + "smithy.api#documentation": "

Match all of the elements. See also\n MatchScope\n in JsonBody.

\n

You must specify either this setting or the IncludedPaths setting, but not\n both.

" } }, "IncludedPaths": { "target": "com.amazonaws.wafv2#JsonPointerPaths", "traits": { - "smithy.api#documentation": "

Match only the specified include paths. See also MatchScope in JsonBody.

\n

Provide the include paths using JSON Pointer syntax. For example, \"IncludedPaths\": [\"/dogs/0/name\", \"/dogs/1/name\"]. For information about this syntax, see the Internet Engineering Task Force (IETF) documentation \n JavaScript Object Notation (JSON) Pointer.

\n

You must specify either this setting or the All setting, but not both.

\n \n

Don't use this option to include all paths. Instead, use the All setting.

\n
" + "smithy.api#documentation": "

Match only the specified include paths. See also\n MatchScope\n in JsonBody.

\n

Provide the include paths using JSON Pointer syntax. For example, \"IncludedPaths\":\n [\"/dogs/0/name\", \"/dogs/1/name\"]. For information about this syntax, see the\n Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON)\n Pointer.

\n

You must specify either this setting or the All setting, but not\n both.

\n \n

Don't use this option to include all paths. Instead, use the All\n setting.

\n
" } } }, "traits": { - "smithy.api#documentation": "

The patterns to look for in the JSON body. WAF inspects the results of these pattern matches against the rule inspection criteria. This is used with the FieldToMatch option JsonBody.

" + "smithy.api#documentation": "

The patterns to look for in the JSON body. WAF inspects the results of these\n pattern matches against the rule inspection criteria. This is used with the FieldToMatch option JsonBody.

" } }, "com.amazonaws.wafv2#JsonMatchScope": { @@ -3993,7 +4101,7 @@ } }, "traits": { - "smithy.api#documentation": "

A single label container. This is used as an element of a label array in multiple contexts, for example, in RuleLabels inside a Rule and in Labels inside a SampledHTTPRequest.

" + "smithy.api#documentation": "

A single label container. This is used as an element of a label array in multiple\n contexts, for example, in RuleLabels inside a Rule and in\n Labels inside a SampledHTTPRequest.

" } }, "com.amazonaws.wafv2#LabelMatchKey": { @@ -4034,7 +4142,7 @@ "Key": { "target": "com.amazonaws.wafv2#LabelMatchKey", "traits": { - "smithy.api#documentation": "

The string to match against. The setting you provide for this depends on the match statement's Scope setting:

\n \n

Labels are case sensitive and components of a label must be separated by colon, for example NS1:NS2:name.

", + "smithy.api#documentation": "

The string to match against. The setting you provide for this depends on the match\n statement's Scope setting:

\n \n

Labels are case sensitive and components of a label must be separated by colon, for\n example NS1:NS2:name.

", "smithy.api#required": {} } } @@ -4059,13 +4167,13 @@ "LabelName": { "target": "com.amazonaws.wafv2#LabelName", "traits": { - "smithy.api#documentation": "

The label name that a log record must contain in order to meet the condition. This must be a fully qualified label name. Fully qualified labels have a prefix, optional namespaces, and label name. The prefix identifies the rule group or web ACL context of the rule that added the label.

", + "smithy.api#documentation": "

The label name that a log record must contain in order to meet the condition. This must\n be a fully qualified label name. Fully qualified labels have a prefix, optional namespaces, and label name. The prefix identifies the rule group or web ACL context of the rule that added the label.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

A single label name condition for a Condition in a logging filter.

" + "smithy.api#documentation": "

A single label name condition for a Condition in a logging\n filter.

" } }, "com.amazonaws.wafv2#LabelSummaries": { @@ -4085,7 +4193,7 @@ } }, "traits": { - "smithy.api#documentation": "

List of labels used by one or more of the rules of a RuleGroup. This summary object is used for the following rule group lists:

\n " + "smithy.api#documentation": "

List of labels used by one or more of the rules of a RuleGroup. This\n summary object is used for the following rule group lists:

\n " } }, "com.amazonaws.wafv2#Labels": { @@ -4094,6 +4202,84 @@ "target": "com.amazonaws.wafv2#Label" } }, + "com.amazonaws.wafv2#ListAvailableManagedRuleGroupVersions": { + "type": "operation", + "input": { + "target": "com.amazonaws.wafv2#ListAvailableManagedRuleGroupVersionsRequest" + }, + "output": { + "target": "com.amazonaws.wafv2#ListAvailableManagedRuleGroupVersionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wafv2#WAFInternalErrorException" + }, + { + "target": "com.amazonaws.wafv2#WAFInvalidOperationException" + }, + { + "target": "com.amazonaws.wafv2#WAFInvalidParameterException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of the available versions for the specified managed rule group.

" + } + }, + "com.amazonaws.wafv2#ListAvailableManagedRuleGroupVersionsRequest": { + "type": "structure", + "members": { + "VendorName": { + "target": "com.amazonaws.wafv2#VendorName", + "traits": { + "smithy.api#documentation": "

The name of the managed rule group vendor. You use this, along with the rule group name, to identify the rule group.

", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.wafv2#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.

", + "smithy.api#required": {} + } + }, + "Scope": { + "target": "com.amazonaws.wafv2#Scope", + "traits": { + "smithy.api#documentation": "

Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

\n

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

\n ", + "smithy.api#required": {} + } + }, + "NextMarker": { + "target": "com.amazonaws.wafv2#NextMarker", + "traits": { + "smithy.api#documentation": "

When you request a list of objects with a Limit setting, if the number of objects that are still available\n for retrieval exceeds the limit, WAF returns a NextMarker \n value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

" + } + }, + "Limit": { + "target": "com.amazonaws.wafv2#PaginationLimit", + "traits": { + "smithy.api#documentation": "

The maximum number of objects that you want WAF to return for this request. If more \n objects are available, in the response, WAF provides a \n NextMarker value that you can use in a subsequent call to get the next batch of objects.

" + } + } + } + }, + "com.amazonaws.wafv2#ListAvailableManagedRuleGroupVersionsResponse": { + "type": "structure", + "members": { + "NextMarker": { + "target": "com.amazonaws.wafv2#NextMarker", + "traits": { + "smithy.api#documentation": "

When you request a list of objects with a Limit setting, if the number of objects that are still available\n for retrieval exceeds the limit, WAF returns a NextMarker \n value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

" + } + }, + "Versions": { + "target": "com.amazonaws.wafv2#ManagedRuleGroupVersions", + "traits": { + "smithy.api#documentation": "

The versions that are currently available for the specified managed rule group.

" + } + } + } + }, "com.amazonaws.wafv2#ListAvailableManagedRuleGroups": { "type": "operation", "input": { @@ -4114,7 +4300,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves an array of managed rule groups that are available for you to use. This list includes all Amazon Web Services Managed Rules rule groups and the Marketplace managed rule groups that you're subscribed to.

" + "smithy.api#documentation": "

Retrieves an array of managed rule groups that are available for you to use. This list\n includes all Amazon Web Services Managed Rules rule groups and all of the Marketplace managed rule groups that you're\n subscribed to.

" } }, "com.amazonaws.wafv2#ListAvailableManagedRuleGroupsRequest": { @@ -4178,7 +4364,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves an array of IPSetSummary objects for the IP sets that you manage.

" + "smithy.api#documentation": "

Retrieves an array of IPSetSummary objects for the IP sets that you\n manage.

" } }, "com.amazonaws.wafv2#ListIPSetsRequest": { @@ -4217,7 +4403,7 @@ "IPSets": { "target": "com.amazonaws.wafv2#IPSetSummaries", "traits": { - "smithy.api#documentation": "

Array of IPSets. This may not be the full list of IPSets that you have defined. See the Limit specification for this request.

" + "smithy.api#documentation": "

Array of IPSets. This may not be the full list of IPSets that you have defined. See the\n Limit specification for this request.

" } } } @@ -4285,6 +4471,70 @@ } } }, + "com.amazonaws.wafv2#ListManagedRuleSets": { + "type": "operation", + "input": { + "target": "com.amazonaws.wafv2#ListManagedRuleSetsRequest" + }, + "output": { + "target": "com.amazonaws.wafv2#ListManagedRuleSetsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wafv2#WAFInternalErrorException" + }, + { + "target": "com.amazonaws.wafv2#WAFInvalidOperationException" + }, + { + "target": "com.amazonaws.wafv2#WAFInvalidParameterException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the managed rule sets that you own.

\n \n

This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Marketplace sellers.

\n

Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and UpdateManagedRuleSetVersionExpiryDate.

\n
" + } + }, + "com.amazonaws.wafv2#ListManagedRuleSetsRequest": { + "type": "structure", + "members": { + "Scope": { + "target": "com.amazonaws.wafv2#Scope", + "traits": { + "smithy.api#documentation": "

Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

\n

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

\n ", + "smithy.api#required": {} + } + }, + "NextMarker": { + "target": "com.amazonaws.wafv2#NextMarker", + "traits": { + "smithy.api#documentation": "

When you request a list of objects with a Limit setting, if the number of objects that are still available\n for retrieval exceeds the limit, WAF returns a NextMarker \n value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

" + } + }, + "Limit": { + "target": "com.amazonaws.wafv2#PaginationLimit", + "traits": { + "smithy.api#documentation": "

The maximum number of objects that you want WAF to return for this request. If more \n objects are available, in the response, WAF provides a \n NextMarker value that you can use in a subsequent call to get the next batch of objects.

" + } + } + } + }, + "com.amazonaws.wafv2#ListManagedRuleSetsResponse": { + "type": "structure", + "members": { + "NextMarker": { + "target": "com.amazonaws.wafv2#NextMarker", + "traits": { + "smithy.api#documentation": "

When you request a list of objects with a Limit setting, if the number of objects that are still available\n for retrieval exceeds the limit, WAF returns a NextMarker \n value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

" + } + }, + "ManagedRuleSets": { + "target": "com.amazonaws.wafv2#ManagedRuleSetSummaries", + "traits": { + "smithy.api#documentation": "

Your managed rule sets.

" + } + } + } + }, "com.amazonaws.wafv2#ListMaxItems": { "type": "long", "traits": { @@ -4314,7 +4564,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves an array of RegexPatternSetSummary objects for the regex pattern sets that you manage.

" + "smithy.api#documentation": "

Retrieves an array of RegexPatternSetSummary objects for the regex\n pattern sets that you manage.

" } }, "com.amazonaws.wafv2#ListRegexPatternSetsRequest": { @@ -4381,7 +4631,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves an array of the Amazon Resource Names (ARNs) for the regional resources that are associated with the specified web ACL. If you want the list of Amazon CloudFront resources, use the CloudFront call ListDistributionsByWebACLId.

" + "smithy.api#documentation": "

Retrieves an array of the Amazon Resource Names (ARNs) for the regional resources that\n are associated with the specified web ACL. If you want the list of Amazon CloudFront resources, use\n the CloudFront call ListDistributionsByWebACLId.

" } }, "com.amazonaws.wafv2#ListResourcesForWebACLRequest": { @@ -4397,7 +4647,7 @@ "ResourceType": { "target": "com.amazonaws.wafv2#ResourceType", "traits": { - "smithy.api#documentation": "

Used for web ACLs that are scoped for regional applications. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

" + "smithy.api#documentation": "

Used for web ACLs that are scoped for regional applications.\n A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

" } } } @@ -4433,7 +4683,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves an array of RuleGroupSummary objects for the rule groups that you manage.

" + "smithy.api#documentation": "

Retrieves an array of RuleGroupSummary objects for the rule groups\n that you manage.

" } }, "com.amazonaws.wafv2#ListRuleGroupsRequest": { @@ -4506,7 +4756,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the TagInfoForResource for the specified resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing. For example, you might set the tag key to \"customer\" and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.

\n

You can tag the Amazon Web Services resources that you manage through WAF: web ACLs, rule groups, IP \n sets, and regex pattern sets. You can't manage or view tags through the WAF console.

" + "smithy.api#documentation": "

Retrieves the TagInfoForResource for the specified resource. Tags are\n key:value pairs that you can use to categorize and manage your resources, for purposes like\n billing. For example, you might set the tag key to \"customer\" and the value to the customer\n name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags\n for a resource.

\n

You can tag the Amazon Web Services resources that you manage through WAF: web ACLs, rule\n groups, IP sets, and regex pattern sets. You can't manage or view tags through the WAF\n console.

" } }, "com.amazonaws.wafv2#ListTagsForResourceRequest": { @@ -4570,7 +4820,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves an array of WebACLSummary objects for the web ACLs that you manage.

" + "smithy.api#documentation": "

Retrieves an array of WebACLSummary objects for the web ACLs that you\n manage.

" } }, "com.amazonaws.wafv2#ListWebACLsRequest": { @@ -4642,38 +4892,38 @@ "ResourceArn": { "target": "com.amazonaws.wafv2#ResourceArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the web ACL that you want to associate with\n LogDestinationConfigs.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the web ACL that you want to associate with\n LogDestinationConfigs.

", "smithy.api#required": {} } }, "LogDestinationConfigs": { "target": "com.amazonaws.wafv2#LogDestinationConfigs", "traits": { - "smithy.api#documentation": "

The Amazon Kinesis Data Firehose Amazon Resource Name (ARNs) that you want to associate with the web ACL.

", + "smithy.api#documentation": "

The Amazon Kinesis Data Firehose Amazon Resource Name (ARNs) that you want to associate\n with the web ACL.

", "smithy.api#required": {} } }, "RedactedFields": { "target": "com.amazonaws.wafv2#RedactedFields", "traits": { - "smithy.api#documentation": "

The parts of the request that you want to keep out of the logs. For\n example, if you redact the HEADER field, the HEADER field in the firehose will be xxx.

\n \n

You must use one of the following values: URI, QUERY_STRING, HEADER, or METHOD.

\n
" + "smithy.api#documentation": "

The parts of the request that you want to keep out of the logs. For example, if you\n redact the HEADER field, the HEADER field in the firehose will be\n xxx.

\n \n

You must use one of the following values: URI,\n QUERY_STRING, HEADER, or METHOD.

\n
" } }, "ManagedByFirewallManager": { "target": "com.amazonaws.wafv2#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy configuration. If true, only \n Firewall Manager can modify or delete the configuration.

" + "smithy.api#documentation": "

Indicates whether the logging configuration was created by Firewall Manager, as part of an\n WAF policy configuration. If true, only Firewall Manager can modify or delete the\n configuration.

" } }, "LoggingFilter": { "target": "com.amazonaws.wafv2#LoggingFilter", "traits": { - "smithy.api#documentation": "

Filtering that specifies which web requests are kept in the logs and which are dropped. You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.

" + "smithy.api#documentation": "

Filtering that specifies which web requests are kept in the logs and which are dropped.\n You can filter on the rule action and on the web request labels that were applied by\n matching rules during web ACL evaluation.

" } } }, "traits": { - "smithy.api#documentation": "

Defines an association between Amazon Kinesis Data Firehose destinations and a web ACL resource, for \n logging from WAF.\n As part of the association, you can specify parts of the standard logging fields to keep out of the logs and you \n can specify filters so that you log only a subset of the logging records.

" + "smithy.api#documentation": "

Defines an association between Amazon Kinesis Data Firehose destinations and a web ACL\n resource, for logging from WAF. As part of the association, you can specify parts of\n the standard logging fields to keep out of the logs and you can specify filters so that you\n log only a subset of the logging records.

" } }, "com.amazonaws.wafv2#LoggingConfigurations": { @@ -4695,13 +4945,13 @@ "DefaultBehavior": { "target": "com.amazonaws.wafv2#FilterBehavior", "traits": { - "smithy.api#documentation": "

Default handling for logs that don't match any of the specified filtering conditions.

", + "smithy.api#documentation": "

Default handling for logs that don't match any of the specified filtering conditions.\n

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Filtering that specifies which web requests are kept in the logs and which are dropped, defined for a web ACL's LoggingConfiguration.

\n

You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.

" + "smithy.api#documentation": "

Filtering that specifies which web requests are kept in the logs and which are dropped,\n defined for a web ACL's LoggingConfiguration.

\n

You can filter on the rule action and on the web request labels that were applied by\n matching rules during web ACL evaluation.

" } }, "com.amazonaws.wafv2#ManagedRuleGroupStatement": { @@ -4721,16 +4971,22 @@ "smithy.api#required": {} } }, + "Version": { + "target": "com.amazonaws.wafv2#VersionKeyString", + "traits": { + "smithy.api#documentation": "

The version of the managed rule group to use. If you specify this, the version setting \n is fixed until you change it. \n If you don't specify this, WAF uses the vendor's default version, and then keeps the version \n at the vendor's default when the vendor updates the managed rule group settings.

" + } + }, "ExcludedRules": { "target": "com.amazonaws.wafv2#ExcludedRules", "traits": { - "smithy.api#documentation": "

The rules whose actions are set to COUNT by the web ACL, regardless of the action that is set on the rule. This effectively excludes the rule from acting on web requests.

" + "smithy.api#documentation": "

The rules whose actions are set to COUNT by the web ACL, regardless of the\n action that is set on the rule. This effectively excludes the rule from acting on web\n requests.

" } }, "ScopeDownStatement": { "target": "com.amazonaws.wafv2#Statement", "traits": { - "smithy.api#documentation": "

An optional nested statement that narrows the scope of the web requests that are evaluated by the managed rule group. Requests are only evaluated by the rule group if they match the scope-down statement. You can use any nestable Statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.

" + "smithy.api#documentation": "

An optional nested statement that narrows the scope of the web requests that are\n evaluated by the managed rule group. Requests are only evaluated by the rule group if they\n match the scope-down statement. You can use any nestable Statement in the\n scope-down statement, and you can nest statements at any level, the same as you can for a\n rule statement.

" } } }, @@ -4770,62 +5026,235 @@ "smithy.api#documentation": "

High-level information about a managed rule group, returned by ListAvailableManagedRuleGroups. This provides information like the name and vendor name, that you provide when you add a ManagedRuleGroupStatement to a web ACL. Managed rule groups include Amazon Web Services Managed Rules rule groups, which are free of charge to WAF customers, and Marketplace managed rule groups, which you can subscribe to through Marketplace.

" } }, - "com.amazonaws.wafv2#Method": { + "com.amazonaws.wafv2#ManagedRuleGroupVersion": { "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

The HTTP method of a web request. The method indicates the type of operation that the request is asking the origin to perform.

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

" - } - }, - "com.amazonaws.wafv2#MetricName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 255 + "members": { + "Name": { + "target": "com.amazonaws.wafv2#VersionKeyString", + "traits": { + "smithy.api#documentation": "

The version name.

" + } }, - "smithy.api#pattern": "^[\\w#:\\.\\-/]+$" - } - }, - "com.amazonaws.wafv2#NextMarker": { - "type": "string", + "LastUpdateTimestamp": { + "target": "com.amazonaws.wafv2#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time that the managed rule group owner updated the rule group version\n information.

" + } + } + }, "traits": { - "smithy.api#length": { - "min": 1, - "max": 256 - }, - "smithy.api#pattern": "\\S" + "smithy.api#documentation": "

Describes a single version of a managed rule group.

" } }, - "com.amazonaws.wafv2#NoneAction": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

Specifies that WAF should do nothing. This is generally used to try out a rule without performing any actions. You set the OverrideAction on the Rule.

\n

This is used in the context of other settings, for example to specify values for RuleAction and web ACL DefaultAction.

" + "com.amazonaws.wafv2#ManagedRuleGroupVersions": { + "type": "list", + "member": { + "target": "com.amazonaws.wafv2#ManagedRuleGroupVersion" } }, - "com.amazonaws.wafv2#NotStatement": { + "com.amazonaws.wafv2#ManagedRuleSet": { "type": "structure", "members": { - "Statement": { - "target": "com.amazonaws.wafv2#Statement", + "Name": { + "target": "com.amazonaws.wafv2#EntityName", "traits": { - "smithy.api#documentation": "

The statement to negate. You can use any statement that can be nested.

", + "smithy.api#documentation": "

The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set.

\n

This name is assigned to the corresponding managed rule group, which your customers can access and use.

", "smithy.api#required": {} } - } - }, - "traits": { - "smithy.api#documentation": "

A logical rule statement used to negate the results of another rule statement. You provide one Statement within the NotStatement.

" - } - }, + }, + "Id": { + "target": "com.amazonaws.wafv2#EntityId", + "traits": { + "smithy.api#documentation": "

A unique identifier for the managed rule set. The ID is returned in the responses to commands like list. You provide it to operations like get and update.

", + "smithy.api#required": {} + } + }, + "ARN": { + "target": "com.amazonaws.wafv2#ResourceArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the entity.

", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.wafv2#EntityDescription", + "traits": { + "smithy.api#documentation": "

A description of the set that helps with identification.

" + } + }, + "PublishedVersions": { + "target": "com.amazonaws.wafv2#PublishedVersions", + "traits": { + "smithy.api#documentation": "

The versions of this managed rule set that are available for use by customers.

" + } + }, + "RecommendedVersion": { + "target": "com.amazonaws.wafv2#VersionKeyString", + "traits": { + "smithy.api#documentation": "

The version that you would like your customers to use.

" + } + }, + "LabelNamespace": { + "target": "com.amazonaws.wafv2#LabelName", + "traits": { + "smithy.api#documentation": "

The label namespace prefix for the managed rule groups that are offered to customers from this managed rule set. All labels that are added by rules in the managed rule group have this prefix.

\n " + } + } + }, + "traits": { + "smithy.api#documentation": "

A set of rules that is managed by Amazon Web Services and Marketplace sellers to provide versioned managed\n rule groups for customers of WAF.

\n \n

This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Marketplace sellers.

\n

Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and UpdateManagedRuleSetVersionExpiryDate.

\n
" + } + }, + "com.amazonaws.wafv2#ManagedRuleSetSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.wafv2#ManagedRuleSetSummary" + } + }, + "com.amazonaws.wafv2#ManagedRuleSetSummary": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.wafv2#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set.

\n

This name is assigned to the corresponding managed rule group, which your customers can access and use.

" + } + }, + "Id": { + "target": "com.amazonaws.wafv2#EntityId", + "traits": { + "smithy.api#documentation": "

A unique identifier for the managed rule set. The ID is returned in the responses to commands like list. You provide it to operations like get and update.

" + } + }, + "Description": { + "target": "com.amazonaws.wafv2#EntityDescription", + "traits": { + "smithy.api#documentation": "

A description of the set that helps with identification.

" + } + }, + "LockToken": { + "target": "com.amazonaws.wafv2#LockToken", + "traits": { + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" + } + }, + "ARN": { + "target": "com.amazonaws.wafv2#ResourceArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the entity.

" + } + }, + "LabelNamespace": { + "target": "com.amazonaws.wafv2#LabelName", + "traits": { + "smithy.api#documentation": "

The label namespace prefix for the managed rule groups that are offered to customers from this managed rule set. All labels that are added by rules in the managed rule group have this prefix.

\n " + } + } + }, + "traits": { + "smithy.api#documentation": "

High-level information for a managed rule set.

\n \n

This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Marketplace sellers.

\n

Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and UpdateManagedRuleSetVersionExpiryDate.

\n
" + } + }, + "com.amazonaws.wafv2#ManagedRuleSetVersion": { + "type": "structure", + "members": { + "AssociatedRuleGroupArn": { + "target": "com.amazonaws.wafv2#ResourceArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the vendor rule group that's used to define the\n published version of your managed rule group.

" + } + }, + "Capacity": { + "target": "com.amazonaws.wafv2#CapacityUnit", + "traits": { + "smithy.api#documentation": "

The web ACL capacity units (WCUs) required for this rule group.

\n

WAF uses WCUs to calculate and control the operating\n resources that are used to run your rules, rule groups, and web ACLs. WAF\n calculates capacity differently for each rule type, to reflect the relative cost of each rule. \n Simple rules that cost little to run use fewer WCUs than more complex rules\n\t\t\t\tthat use more processing power. \n\t\t\t\tRule group capacity is fixed at creation, which helps users plan their \n web ACL WCU usage when they use a rule group. \n The WCU limit for web ACLs is 1,500.

" + } + }, + "ForecastedLifetime": { + "target": "com.amazonaws.wafv2#TimeWindowDay", + "traits": { + "smithy.api#documentation": "

The amount of time you expect this version of your managed rule group to last, in days.\n

" + } + }, + "PublishTimestamp": { + "target": "com.amazonaws.wafv2#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that you first published this version.

\n

Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, \"2016-09-27T14:50Z\".

" + } + }, + "LastUpdateTimestamp": { + "target": "com.amazonaws.wafv2#Timestamp", + "traits": { + "smithy.api#documentation": "

The last time that you updated this version.

\n

Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, \"2016-09-27T14:50Z\".

" + } + }, + "ExpiryTimestamp": { + "target": "com.amazonaws.wafv2#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that this version is set to expire.

\n

Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, \"2016-09-27T14:50Z\".

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information for a single version of a managed rule set.

\n \n

This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Marketplace sellers.

\n

Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and UpdateManagedRuleSetVersionExpiryDate.

\n
" + } + }, + "com.amazonaws.wafv2#Method": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The HTTP method of a web request. The method indicates the type of operation that the\n request is asking the origin to perform.

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

" + } + }, + "com.amazonaws.wafv2#MetricName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[\\w#:\\.\\-/]+$" + } + }, + "com.amazonaws.wafv2#NextMarker": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "\\S" + } + }, + "com.amazonaws.wafv2#NoneAction": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

Specifies that WAF should do nothing. This is generally used to try out a rule\n without performing any actions. You set the OverrideAction on the Rule.

\n

This is used in the context of other settings, for example to specify values for RuleAction and web ACL DefaultAction.

" + } + }, + "com.amazonaws.wafv2#NotStatement": { + "type": "structure", + "members": { + "Statement": { + "target": "com.amazonaws.wafv2#Statement", + "traits": { + "smithy.api#documentation": "

The statement to negate. You can use any statement that can be nested.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A logical rule statement used to negate the results of another rule statement. You provide one Statement within the NotStatement.

" + } + }, "com.amazonaws.wafv2#OrStatement": { "type": "structure", "members": { "Statements": { "target": "com.amazonaws.wafv2#Statements", "traits": { - "smithy.api#documentation": "

The statements to combine with OR logic. You can use any statements that can be nested.

", + "smithy.api#documentation": "

The statements to combine with OR logic. You can use any statements that can be\n nested.

", "smithy.api#required": {} } } @@ -5131,6 +5560,15 @@ ] } }, + "com.amazonaws.wafv2#PublishedVersions": { + "type": "map", + "key": { + "target": "com.amazonaws.wafv2#VersionKeyString" + }, + "value": { + "target": "com.amazonaws.wafv2#ManagedRuleSetVersion" + } + }, "com.amazonaws.wafv2#PutLoggingConfiguration": { "type": "operation", "input": { @@ -5163,7 +5601,7 @@ } ], "traits": { - "smithy.api#documentation": "

Enables the specified LoggingConfiguration, to start logging from a web ACL, according to the configuration provided.

\n

You can access information about all traffic that WAF inspects using the following\n steps:

\n
    \n
  1. \n

    Create an Amazon Kinesis Data\n Firehose.

    \n

    Create the data firehose with a PUT source and in the Region that you are operating. If you are capturing logs for Amazon CloudFront, always create the firehose in US East (N. Virginia).

    \n

    Give the data firehose a name that starts with the prefix aws-waf-logs-. For example, aws-waf-logs-us-east-2-analytics.

    \n \n

    Do not create the data firehose using a Kinesis stream as your source.

    \n
    \n
  2. \n
  3. \n

    Associate that firehose to your web ACL using a PutLoggingConfiguration request.

    \n
  4. \n
\n \n

When you successfully enable logging using a PutLoggingConfiguration request, WAF will create a service linked role with the necessary permissions to write logs to the Amazon Kinesis Data Firehose. For more information, see Logging Web ACL Traffic Information in the WAF Developer Guide.

\n \n

This operation completely replaces the mutable specifications that you already have for the logging configuration with the ones that you provide to this call. To modify the logging configuration, retrieve it by calling GetLoggingConfiguration, update the settings as needed, and then provide the complete logging configuration specification to this call.

\n
" + "smithy.api#documentation": "

Enables the specified LoggingConfiguration, to start logging from a\n web ACL, according to the configuration provided.

\n

You can access information about all traffic that WAF inspects using the following\n steps:

\n
    \n
  1. \n

    Create an Amazon Kinesis Data Firehose.

    \n

    Create the data firehose with a PUT source and in the Region that you are\n operating. If you are capturing logs for Amazon CloudFront, always create the firehose in US\n East (N. Virginia).

    \n

    Give the data firehose a name that starts with the prefix\n aws-waf-logs-. For example,\n aws-waf-logs-us-east-2-analytics.

    \n \n

    Do not create the data firehose using a Kinesis stream as your\n source.

    \n
    \n
  2. \n
  3. \n

    Associate that firehose to your web ACL using a\n PutLoggingConfiguration request.

    \n
  4. \n
\n

When you successfully enable logging using a PutLoggingConfiguration\n request, WAF will create a service linked role with the necessary permissions to write\n logs to the Amazon Kinesis Data Firehose. For more information, see Logging Web ACL\n Traffic Information in the WAF Developer\n Guide.

\n \n

This operation completely replaces the mutable specifications that you already have for the logging configuration with the ones that you provide to this call. To modify the logging configuration, retrieve it by calling GetLoggingConfiguration, update the settings as needed, and then provide the complete logging configuration specification to this call.

\n
" } }, "com.amazonaws.wafv2#PutLoggingConfigurationRequest": { @@ -5189,6 +5627,91 @@ } } }, + "com.amazonaws.wafv2#PutManagedRuleSetVersions": { + "type": "operation", + "input": { + "target": "com.amazonaws.wafv2#PutManagedRuleSetVersionsRequest" + }, + "output": { + "target": "com.amazonaws.wafv2#PutManagedRuleSetVersionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wafv2#WAFInternalErrorException" + }, + { + "target": "com.amazonaws.wafv2#WAFInvalidOperationException" + }, + { + "target": "com.amazonaws.wafv2#WAFInvalidParameterException" + }, + { + "target": "com.amazonaws.wafv2#WAFNonexistentItemException" + }, + { + "target": "com.amazonaws.wafv2#WAFOptimisticLockException" + } + ], + "traits": { + "smithy.api#documentation": "

Defines the versions of your managed rule set that you are offering to the customers.\n Customers see your offerings as managed rule groups with versioning.

\n \n

This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Marketplace sellers.

\n

Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and UpdateManagedRuleSetVersionExpiryDate.

\n
\n

Customers retrieve their managed rule group list by calling ListAvailableManagedRuleGroups. The name that you provide here for your\n managed rule set is the name the customer sees for the corresponding managed rule group.\n Customers can retrieve the available versions for a managed rule group by calling ListAvailableManagedRuleGroupVersions. You provide a rule group\n specification for each version. For each managed rule set, you must specify a version that\n you recommend using.

\n

To initiate the expiration of a managed rule group version, use UpdateManagedRuleSetVersionExpiryDate.

" + } + }, + "com.amazonaws.wafv2#PutManagedRuleSetVersionsRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.wafv2#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set.

\n

This name is assigned to the corresponding managed rule group, which your customers can access and use.

", + "smithy.api#required": {} + } + }, + "Scope": { + "target": "com.amazonaws.wafv2#Scope", + "traits": { + "smithy.api#documentation": "

Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

\n

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

\n ", + "smithy.api#required": {} + } + }, + "Id": { + "target": "com.amazonaws.wafv2#EntityId", + "traits": { + "smithy.api#documentation": "

A unique identifier for the managed rule set. The ID is returned in the responses to commands like list. You provide it to operations like get and update.

", + "smithy.api#required": {} + } + }, + "LockToken": { + "target": "com.amazonaws.wafv2#LockToken", + "traits": { + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", + "smithy.api#required": {} + } + }, + "RecommendedVersion": { + "target": "com.amazonaws.wafv2#VersionKeyString", + "traits": { + "smithy.api#documentation": "

The version of the named managed rule group that you'd like your customers to choose,\n from among your version offerings.

" + } + }, + "VersionsToPublish": { + "target": "com.amazonaws.wafv2#VersionsToPublish", + "traits": { + "smithy.api#documentation": "

The versions of the named managed rule group that you want to offer to your customers.\n

" + } + } + } + }, + "com.amazonaws.wafv2#PutManagedRuleSetVersionsResponse": { + "type": "structure", + "members": { + "NextLockToken": { + "target": "com.amazonaws.wafv2#LockToken", + "traits": { + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" + } + } + } + }, "com.amazonaws.wafv2#PutPermissionPolicy": { "type": "operation", "input": { @@ -5212,7 +5735,7 @@ } ], "traits": { - "smithy.api#documentation": "

Attaches an IAM policy to the specified resource. Use this to share a rule group across accounts.

\n

You must be the owner of the rule group to perform this operation.

\n

This action is subject to the following restrictions:

\n " + "smithy.api#documentation": "

Attaches an IAM policy to the specified resource. Use this to share a rule group across\n accounts.

\n

You must be the owner of the rule group to perform this operation.

\n

This action is subject to the following restrictions:

\n " } }, "com.amazonaws.wafv2#PutPermissionPolicyRequest": { @@ -5221,14 +5744,14 @@ "ResourceArn": { "target": "com.amazonaws.wafv2#ResourceArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the RuleGroup to which you want to attach the policy.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the RuleGroup to which you want to\n attach the policy.

", "smithy.api#required": {} } }, "Policy": { "target": "com.amazonaws.wafv2#PolicyString", "traits": { - "smithy.api#documentation": "

The policy to attach to the specified rule group.

\n \n

The policy specifications must conform to the following:

\n \n

For more information, see IAM Policies.

", + "smithy.api#documentation": "

The policy to attach to the specified rule group.

\n \n

The policy specifications must conform to the following:

\n \n

For more information, see IAM Policies.

", "smithy.api#required": {} } } @@ -5242,7 +5765,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The query string of a web request. This is the part of a URL that appears after a ? character, if any.

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

" + "smithy.api#documentation": "

The query string of a web request. This is the part of a URL that appears after a\n ? character, if any.

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

" } }, "com.amazonaws.wafv2#RateBasedStatement": { @@ -5251,27 +5774,27 @@ "Limit": { "target": "com.amazonaws.wafv2#RateLimit", "traits": { - "smithy.api#documentation": "

The limit on requests per 5-minute period for a single originating IP address. If the statement includes a ScopeDownStatement, this limit is applied only to the requests that match the statement.

", + "smithy.api#documentation": "

The limit on requests per 5-minute period for a single originating IP address. If the\n statement includes a ScopeDownStatement, this limit is applied only to the\n requests that match the statement.

", "smithy.api#required": {} } }, "AggregateKeyType": { "target": "com.amazonaws.wafv2#RateBasedStatementAggregateKeyType", "traits": { - "smithy.api#documentation": "

Setting that indicates how to aggregate the request counts. The options are the following:

\n ", + "smithy.api#documentation": "

Setting that indicates how to aggregate the request counts. The options are the\n following:

\n ", "smithy.api#required": {} } }, "ScopeDownStatement": { "target": "com.amazonaws.wafv2#Statement", "traits": { - "smithy.api#documentation": "

An optional nested statement that narrows the scope of the web requests that are evaluated by the rate-based statement. Requests are only tracked by the rate-based statement if they match the scope-down statement. You can use any nestable Statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.

" + "smithy.api#documentation": "

An optional nested statement that narrows the scope of the web requests that are\n evaluated by the rate-based statement. Requests are only tracked by the rate-based\n statement if they match the scope-down statement. You can use any nestable Statement in the scope-down statement, and you can nest statements at any\n level, the same as you can for a rule statement.

" } }, "ForwardedIPConfig": { "target": "com.amazonaws.wafv2#ForwardedIPConfig", "traits": { - "smithy.api#documentation": "

The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.

\n \n \n

If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.

\n
\n \n \n

This is required if AggregateKeyType is set to FORWARDED_IP.

" + "smithy.api#documentation": "

The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.

\n \n \n

If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.

\n
\n \n \n

This is required if AggregateKeyType is set to\n FORWARDED_IP.

" } } }, @@ -5298,7 +5821,10 @@ "type": "structure", "members": { "IPAddressVersion": { - "target": "com.amazonaws.wafv2#IPAddressVersion" + "target": "com.amazonaws.wafv2#IPAddressVersion", + "traits": { + "smithy.api#documentation": "

The version of the IP addresses, either IPV4 or IPV6.

" + } }, "Addresses": { "target": "com.amazonaws.wafv2#IPAddresses", @@ -5381,7 +5907,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains one or more regular expressions.

\n

WAF assigns an ARN to each RegexPatternSet that you create. To use a set in a rule, you provide the ARN to the Rule statement RegexPatternSetReferenceStatement.

" + "smithy.api#documentation": "

Contains one or more regular expressions.

\n

WAF assigns an ARN to each RegexPatternSet that you create. To use a\n set in a rule, you provide the ARN to the Rule statement RegexPatternSetReferenceStatement.

" } }, "com.amazonaws.wafv2#RegexPatternSetReferenceStatement": { @@ -5390,7 +5916,7 @@ "ARN": { "target": "com.amazonaws.wafv2#ResourceArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the RegexPatternSet that this statement references.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the RegexPatternSet that this\n statement references.

", "smithy.api#required": {} } }, @@ -5443,7 +5969,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" } }, "ARN": { @@ -5553,14 +6079,14 @@ "Name": { "target": "com.amazonaws.wafv2#EntityName", "traits": { - "smithy.api#documentation": "

The name of the rule. You can't change the name of a Rule after you create it.

", + "smithy.api#documentation": "

The name of the rule. You can't change the name of a Rule after you create\n it.

", "smithy.api#required": {} } }, "Priority": { "target": "com.amazonaws.wafv2#RulePriority", "traits": { - "smithy.api#documentation": "

If you define more than one Rule in a\n WebACL, WAF evaluates each request against the Rules\n in order based on the value of Priority. \n WAF processes rules with lower priority first. The priorities don't need to be consecutive, but they must all be different.

", + "smithy.api#documentation": "

If you define more than one Rule in a WebACL, WAF\n evaluates each request against the Rules in order based on the value of\n Priority. WAF processes rules with lower priority first. The priorities\n don't need to be consecutive, but they must all be different.

", "smithy.api#required": {} } }, @@ -5586,7 +6112,7 @@ "RuleLabels": { "target": "com.amazonaws.wafv2#Labels", "traits": { - "smithy.api#documentation": "

Labels to apply to web requests that match the rule match statement. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

\n

Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement.

\n

For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:

\n \n

For example, myLabelName or nameSpace1:nameSpace2:myLabelName.

" + "smithy.api#documentation": "

Labels to apply to web requests that match the rule match statement. WAF applies\n fully qualified labels to matching web requests. A fully qualified label is the\n concatenation of a label namespace and a rule label. The rule's rule group or web ACL\n defines the label namespace.

\n

Rules that run after this rule in the web ACL can match against these labels using a\n LabelMatchStatement.

\n

For each label, provide a case-sensitive string containing optional namespaces and a\n label name, according to the following guidelines:

\n \n

For example, myLabelName or nameSpace1:nameSpace2:myLabelName.\n

" } }, "VisibilityConfig": { @@ -5598,7 +6124,7 @@ } }, "traits": { - "smithy.api#documentation": "

A single rule, which you can use in a WebACL or RuleGroup to identify \n web requests that you want to allow, block, or count. \n Each rule includes one top-level Statement that WAF uses to identify matching \n web requests, and parameters that govern how WAF handles them.

" + "smithy.api#documentation": "

A single rule, which you can use in a WebACL or RuleGroup to identify web requests that you want to allow, block, or count.\n Each rule includes one top-level Statement that WAF uses to\n identify matching web requests, and parameters that govern how WAF handles them.

" } }, "com.amazonaws.wafv2#RuleAction": { @@ -5624,7 +6150,7 @@ } }, "traits": { - "smithy.api#documentation": "

The action that WAF should take on a web request when it matches a rule's statement. Settings at the web ACL level can override the rule action setting.

" + "smithy.api#documentation": "

The action that WAF should take on a web request when it matches a rule's\n statement. Settings at the web ACL level can override the rule action setting.

" } }, "com.amazonaws.wafv2#RuleGroup": { @@ -5719,7 +6245,7 @@ "ExcludedRules": { "target": "com.amazonaws.wafv2#ExcludedRules", "traits": { - "smithy.api#documentation": "

The names of rules that are in the referenced rule group, but that you want WAF to exclude from processing for this rule statement.

" + "smithy.api#documentation": "

The names of rules that are in the referenced rule group, but that you want WAF to\n exclude from processing for this rule statement.

" } } }, @@ -5757,7 +6283,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" } }, "ARN": { @@ -5797,7 +6323,7 @@ "Action": { "target": "com.amazonaws.wafv2#RuleAction", "traits": { - "smithy.api#documentation": "

The action that WAF should take on a web request when it matches a rule's statement. Settings at the web ACL level can override the rule action setting.

" + "smithy.api#documentation": "

The action that WAF should take on a web request when it matches a rule's\n statement. Settings at the web ACL level can override the rule action setting.

" } } }, @@ -5832,32 +6358,32 @@ "Weight": { "target": "com.amazonaws.wafv2#SampleWeight", "traits": { - "smithy.api#documentation": "

A value that indicates how one result in the response relates \n proportionally to other results in the response. \n For example, a result that has a weight of 2 represents roughly twice \n as many web requests as a result \n that has a weight of 1.

", + "smithy.api#documentation": "

A value that indicates how one result in the response relates proportionally to other\n results in the response. For example, a result that has a weight of 2\n represents roughly twice as many web requests as a result that has a weight of\n 1.

", "smithy.api#required": {} } }, "Timestamp": { "target": "com.amazonaws.wafv2#Timestamp", "traits": { - "smithy.api#documentation": "

The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).

" + "smithy.api#documentation": "

The time at which WAF received the request from your Amazon Web Services resource, in Unix time\n format (in seconds).

" } }, "Action": { "target": "com.amazonaws.wafv2#Action", "traits": { - "smithy.api#documentation": "

The action for the Rule that the request matched: ALLOW, BLOCK, or COUNT.

" + "smithy.api#documentation": "

The action for the Rule that the request matched: ALLOW,\n BLOCK, or COUNT.

" } }, "RuleNameWithinRuleGroup": { "target": "com.amazonaws.wafv2#EntityName", "traits": { - "smithy.api#documentation": "

The name of the Rule that the request matched. For managed rule groups, the format for this name is ##. For your own rule\n groups, the format for this name is #. If the rule is not in a rule group, this field is absent.

" + "smithy.api#documentation": "

The name of the Rule that the request matched. For managed rule groups, the\n format for this name is ##. For your own rule groups, the format for this name is #. If the rule is not in a rule group, this field\n is absent.

" } }, "RequestHeadersInserted": { "target": "com.amazonaws.wafv2#HTTPHeaders", "traits": { - "smithy.api#documentation": "

Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.

" + "smithy.api#documentation": "

Custom request headers inserted by WAF into the request, according to the custom\n request configuration for the matching rule action.

" } }, "ResponseCodeSent": { @@ -5869,12 +6395,12 @@ "Labels": { "target": "com.amazonaws.wafv2#Labels", "traits": { - "smithy.api#documentation": "

Labels applied to the web request by matching rules. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

\n

For example, awswaf:111122223333:myRuleGroup:testRules:testNS1:testNS2:labelNameA or awswaf:managed:aws:managed-rule-set:header:encoding:utf8.

" + "smithy.api#documentation": "

Labels applied to the web request by matching rules. WAF applies fully qualified\n labels to matching web requests. A fully qualified label is the concatenation of a label\n namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

\n

For example,\n awswaf:111122223333:myRuleGroup:testRules:testNS1:testNS2:labelNameA or\n awswaf:managed:aws:managed-rule-set:header:encoding:utf8.

" } } }, "traits": { - "smithy.api#documentation": "

Represents a single sampled web request. The response from GetSampledRequests includes a SampledHTTPRequests complex type that \n appears as SampledRequests in the response syntax. SampledHTTPRequests contains an array of SampledHTTPRequest objects.

" + "smithy.api#documentation": "

Represents a single sampled web request. The response from GetSampledRequests includes a SampledHTTPRequests complex type\n that appears as SampledRequests in the response syntax.\n SampledHTTPRequests contains an array of SampledHTTPRequest\n objects.

" } }, "com.amazonaws.wafv2#SampledHTTPRequests": { @@ -5913,7 +6439,7 @@ } }, "traits": { - "smithy.api#documentation": "

One of the headers in a web request, identified by name, for example, User-Agent or Referer. This setting isn't case sensitive.

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

" + "smithy.api#documentation": "

One of the headers in a web request, identified by name, for example,\n User-Agent or Referer. This setting isn't case\n sensitive.

\n

This is used only to indicate the web request component for WAF to inspect, in the FieldToMatch specification.

" } }, "com.amazonaws.wafv2#SingleQueryArgument": { @@ -5928,7 +6454,7 @@ } }, "traits": { - "smithy.api#documentation": "

One query argument in a web request, identified by name, for example UserName or SalesRegion. The name can be up to 30 characters long and isn't case sensitive.

" + "smithy.api#documentation": "

One query argument in a web request, identified by name, for example\n UserName or SalesRegion. The name can be up to\n 30 characters long and isn't case sensitive.

" } }, "com.amazonaws.wafv2#Size": { @@ -6087,7 +6613,7 @@ } }, "traits": { - "smithy.api#documentation": "

The processing guidance for a Rule, used by WAF to determine whether a web request matches the rule.

" + "smithy.api#documentation": "

The processing guidance for a Rule, used by WAF to determine\n whether a web request matches the rule.

" } }, "com.amazonaws.wafv2#Statements": { @@ -6102,20 +6628,20 @@ "Key": { "target": "com.amazonaws.wafv2#TagKey", "traits": { - "smithy.api#documentation": "

Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as \"customer.\" Tag keys are case-sensitive.

", + "smithy.api#documentation": "

Part of the key:value pair that defines a tag. You can use a tag key to describe a\n category of information, such as \"customer.\" Tag keys are case-sensitive.

", "smithy.api#required": {} } }, "Value": { "target": "com.amazonaws.wafv2#TagValue", "traits": { - "smithy.api#documentation": "

Part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as \"companyA\" or \"companyB.\" Tag values are case-sensitive.

", + "smithy.api#documentation": "

Part of the key:value pair that defines a tag. You can use a tag value to describe a\n specific value within a category, such as \"companyA\" or \"companyB.\" Tag values are\n case-sensitive.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

A tag associated with an Amazon Web Services resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing or other management. Typically, the tag key represents a category, such as \"environment\", and the tag value represents a \n specific value within that category, such as \"test,\" \"development,\" or \"production\". Or you might set the tag key to \"customer\" and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.

\n

You can tag the Amazon Web Services resources that you manage through WAF: web ACLs, rule groups, IP \n sets, and regex pattern sets. You can't manage or view tags through the WAF console.

" + "smithy.api#documentation": "

A tag associated with an Amazon Web Services resource. Tags are key:value pairs that you can use to\n categorize and manage your resources, for purposes like billing or other management.\n Typically, the tag key represents a category, such as \"environment\", and the tag value\n represents a specific value within that category, such as \"test,\" \"development,\" or\n \"production\". Or you might set the tag key to \"customer\" and the value to the customer name\n or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a\n resource.

\n

You can tag the Amazon Web Services resources that you manage through WAF: web ACLs, rule\n groups, IP sets, and regex pattern sets. You can't manage or view tags through the WAF\n console.

" } }, "com.amazonaws.wafv2#TagInfoForResource": { @@ -6135,7 +6661,7 @@ } }, "traits": { - "smithy.api#documentation": "

The collection of tagging definitions for an Amazon Web Services resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing or other management. Typically, the tag key represents a category, such as \"environment\", and the tag value represents a \n specific value within that category, such as \"test,\" \"development,\" or \"production\". Or you might set the tag key to \"customer\" and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.

\n

You can tag the Amazon Web Services resources that you manage through WAF: web ACLs, rule groups, IP \n sets, and regex pattern sets. You can't manage or view tags through the WAF console.

" + "smithy.api#documentation": "

The collection of tagging definitions for an Amazon Web Services resource. Tags are key:value pairs\n that you can use to categorize and manage your resources, for purposes like billing or\n other management. Typically, the tag key represents a category, such as \"environment\", and\n the tag value represents a specific value within that category, such as \"test,\"\n \"development,\" or \"production\". Or you might set the tag key to \"customer\" and the value to\n the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up\n to 50 tags for a resource.

\n

You can tag the Amazon Web Services resources that you manage through WAF: web ACLs, rule\n groups, IP sets, and regex pattern sets. You can't manage or view tags through the WAF\n console.

" } }, "com.amazonaws.wafv2#TagKey": { @@ -6202,7 +6728,7 @@ } ], "traits": { - "smithy.api#documentation": "

Associates tags with the specified Amazon Web Services resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing. For example, you might set the tag key to \"customer\" and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.

\n

You can tag the Amazon Web Services resources that you manage through WAF: web ACLs, rule groups, IP \n sets, and regex pattern sets. You can't manage or view tags through the WAF console.

" + "smithy.api#documentation": "

Associates tags with the specified Amazon Web Services resource. Tags are key:value pairs that you can\n use to categorize and manage your resources, for purposes like billing. For example, you\n might set the tag key to \"customer\" and the value to the customer name or ID. You can\n specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a\n resource.

\n

You can tag the Amazon Web Services resources that you manage through WAF: web ACLs, rule\n groups, IP sets, and regex pattern sets. You can't manage or view tags through the WAF\n console.

" } }, "com.amazonaws.wafv2#TagResourceRequest": { @@ -6244,20 +6770,20 @@ "Priority": { "target": "com.amazonaws.wafv2#TextTransformationPriority", "traits": { - "smithy.api#documentation": "

Sets the relative processing order for multiple transformations that are defined for a rule statement. WAF processes all\n transformations, from lowest priority to highest, before inspecting the transformed content. The priorities don't need to be consecutive, but they must all be different.

", + "smithy.api#documentation": "

Sets the relative processing order for multiple transformations that are defined for a\n rule statement. WAF processes all transformations, from lowest priority to highest,\n before inspecting the transformed content. The priorities don't need to be consecutive, but\n they must all be different.

", "smithy.api#required": {} } }, "Type": { "target": "com.amazonaws.wafv2#TextTransformationType", "traits": { - "smithy.api#documentation": "

You can specify the following transformation types:

\n

\n BASE64_DECODE - Decode a Base64-encoded\n string.

\n

\n BASE64_DECODE_EXT - Decode a\n Base64-encoded string, but use a forgiving implementation that ignores\n characters that aren't valid.

\n

\n CMD_LINE - Command-line transformations. These are\n helpful in reducing effectiveness of attackers who inject an operating system command-line\n command and use unusual formatting to disguise some or all of the command.

\n \n \n

\n COMPRESS_WHITE_SPACE - Replace these characters\n with a space character (decimal 32):

\n \n

\n COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.

\t\t\n

\n CSS_DECODE - Decode characters that were encoded\n using CSS 2.x escape rules syndata.html#characters. This function uses up to two bytes in\n the decoding process, so it can help to uncover ASCII characters that were encoded using\n CSS encoding that wouldn’t typically be encoded. It's also useful in countering evasion,\n which is a combination of a backslash and non-hexadecimal characters. For example,\n ja\\vascript for javascript.

\n

\n ESCAPE_SEQ_DECODE - Decode the following ANSI C escape sequences:\n \\a, \\b, \\f, \\n, \\r, \\t, \\v, \\\\, \\?, \\', \\\", \\xHH (hexadecimal), \\0OOO (octal). Encodings\n that aren't valid remain in the output.

\n

\n HEX_DECODE - Decode a string of hexadecimal characters into a binary.

\n

\n HTML_ENTITY_DECODE - Replace HTML-encoded\n characters with unencoded characters. HTML_ENTITY_DECODE performs these\n operations:

\n \t\t\n

\n JS_DECODE - Decode JavaScript escape sequences. If\n a \\\n u\n HHHH code is in the full-width ASCII code range of FF01-FF5E, then the higher byte is\n used to detect and adjust the lower byte. If not, only the lower byte is used and the\n higher byte is zeroed, causing a possible loss of information.

\n

\n LOWERCASE - Convert uppercase letters (A-Z) to\n lowercase (a-z).

\n

\n MD5 - Calculate an MD5 hash from the data in the\n input. The computed hash is in a raw binary form.

\n

\n NONE - Specify NONE if you don't want any text transformations.\n

\n

\n NORMALIZE_PATH - Remove multiple slashes, directory\n self-references, and directory back-references that are not at the beginning of the input\n from an input string.

\n

\n NORMALIZE_PATH_WIN - This is the same as\n NORMALIZE_PATH, but first converts backslash characters to forward slashes.

\n

\n REMOVE_NULLS - Remove all NULL bytes\n from the input.

\n

\n REPLACE_COMMENTS - Replace each occurrence of a\n C-style comment (/* ... */) with a single space. Multiple consecutive occurrences are not\n compressed. Unterminated comments are also replaced with a space (ASCII 0x20). However, a\n standalone termination of a comment (*/) is not acted upon.

\n

\n REPLACE_NULLS - Replace NULL bytes in the input\n with space characters (ASCII 0x20).

\n

\n SQL_HEX_DECODE - Decode the following ANSI C escape sequences:\n \\a, \\b, \\f, \\n, \\r, \\t, \\v, \\\\, \\?, \\', \\\", \\xHH (hexadecimal), \\0OOO (octal). Encodings\n that aren't valid remain in the output.

\n

\n URL_DECODE - Decode a URL-encoded value.

\n

\n URL_DECODE_UNI - Like URL_DECODE, but with support\n for Microsoft-specific %u encoding. If the code is in the full-width ASCII code range of\n FF01-FF5E, the higher byte is used to detect and adjust the lower byte. Otherwise, only the\n lower byte is used and the higher byte is zeroed.

\n

\n UTF8_TO_UNICODE - Convert all UTF-8 character\n sequences to Unicode. This helps input normalization, and minimizing false-positives and\n false-negatives for non-English languages.

", + "smithy.api#documentation": "

You can specify the following transformation types:

\n

\n BASE64_DECODE - Decode a Base64-encoded\n string.

\n

\n BASE64_DECODE_EXT - Decode a\n Base64-encoded string, but use a forgiving implementation that ignores\n characters that aren't valid.

\n

\n CMD_LINE - Command-line transformations. These are\n helpful in reducing effectiveness of attackers who inject an operating system command-line\n command and use unusual formatting to disguise some or all of the command.

\n \n \n

\n COMPRESS_WHITE_SPACE - Replace these characters\n with a space character (decimal 32):

\n \n

\n COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.

\t\t\n

\n CSS_DECODE - Decode characters that were encoded\n using CSS 2.x escape rules syndata.html#characters. This function uses up to two bytes in\n the decoding process, so it can help to uncover ASCII characters that were encoded using\n CSS encoding that wouldn’t typically be encoded. It's also useful in countering evasion,\n which is a combination of a backslash and non-hexadecimal characters. For example,\n ja\\vascript for javascript.

\n

\n ESCAPE_SEQ_DECODE - Decode the following ANSI C escape sequences:\n \\a, \\b, \\f, \\n, \\r, \\t, \\v, \\\\, \\?, \\', \\\", \\xHH (hexadecimal), \\0OOO (octal). Encodings\n that aren't valid remain in the output.

\n

\n HEX_DECODE - Decode a string of hexadecimal characters into a binary.

\n

\n HTML_ENTITY_DECODE - Replace HTML-encoded\n characters with unencoded characters. HTML_ENTITY_DECODE performs these\n operations:

\n \t\t\n

\n JS_DECODE - Decode JavaScript escape sequences. If\n a \\\n u\n HHHH code is in the full-width ASCII code range of FF01-FF5E, then the higher byte is\n used to detect and adjust the lower byte. If not, only the lower byte is used and the\n higher byte is zeroed, causing a possible loss of information.

\n

\n LOWERCASE - Convert uppercase letters (A-Z) to\n lowercase (a-z).

\n

\n MD5 - Calculate an MD5 hash from the data in the\n input. The computed hash is in a raw binary form.

\n

\n NONE - Specify NONE if you don't want any text transformations.\n

\n

\n NORMALIZE_PATH - Remove multiple slashes, directory\n self-references, and directory back-references that are not at the beginning of the input\n from an input string.

\n

\n NORMALIZE_PATH_WIN - This is the same as\n NORMALIZE_PATH, but first converts backslash characters to forward slashes.

\n

\n REMOVE_NULLS - Remove all NULL bytes\n from the input.

\n

\n REPLACE_COMMENTS - Replace each occurrence of a\n C-style comment (/* ... */) with a single space. Multiple consecutive occurrences are not\n compressed. Unterminated comments are also replaced with a space (ASCII 0x20). However, a\n standalone termination of a comment (*/) is not acted upon.

\n

\n REPLACE_NULLS - Replace NULL bytes in the input\n with space characters (ASCII 0x20).

\n

\n SQL_HEX_DECODE - Decode SQL hex data. Example (0x414243) will be decoded to (ABC).

\n

\n URL_DECODE - Decode a URL-encoded value.

\n

\n URL_DECODE_UNI - Like URL_DECODE, but with support\n for Microsoft-specific %u encoding. If the code is in the full-width ASCII code range of\n FF01-FF5E, the higher byte is used to detect and adjust the lower byte. Otherwise, only the\n lower byte is used and the higher byte is zeroed.

\n

\n UTF8_TO_UNICODE - Convert all UTF-8 character\n sequences to Unicode. This helps input normalization, and minimizing false-positives and\n false-negatives for non-English languages.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. \n

" + "smithy.api#documentation": "

Text transformations eliminate some of the unusual formatting that attackers use in web\n requests in an effort to bypass detection.

" } }, "com.amazonaws.wafv2#TextTransformationPriority": { @@ -6376,20 +6902,29 @@ "StartTime": { "target": "com.amazonaws.wafv2#Timestamp", "traits": { - "smithy.api#documentation": "

The beginning of the time range from which you want GetSampledRequests to return a sample of the requests that your \n Amazon Web Services resource received. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, \"2016-09-27T14:50Z\". You can specify any time range in the previous three hours.

", + "smithy.api#documentation": "

The beginning of the time range from which you want GetSampledRequests to\n return a sample of the requests that your Amazon Web Services resource received. You must specify the\n times in Coordinated Universal Time (UTC) format. UTC format includes the special\n designator, Z. For example, \"2016-09-27T14:50Z\". You can specify\n any time range in the previous three hours.

", "smithy.api#required": {} } }, "EndTime": { "target": "com.amazonaws.wafv2#Timestamp", "traits": { - "smithy.api#documentation": "

The end of the time range from which you want GetSampledRequests to return a sample of the requests that your \n Amazon Web Services resource received. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, \"2016-09-27T14:50Z\". You can specify any time range in the previous three hours.

", + "smithy.api#documentation": "

The end of the time range from which you want GetSampledRequests to return\n a sample of the requests that your Amazon Web Services resource received. You must specify the times in\n Coordinated Universal Time (UTC) format. UTC format includes the special designator,\n Z. For example, \"2016-09-27T14:50Z\". You can specify any time\n range in the previous three hours.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

In a GetSampledRequests request, the StartTime and EndTime objects specify the time range \n for which you want WAF to return a sample of web requests.

\n

You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, \"2016-09-27T14:50Z\". You can specify any time range in the previous three hours.

\n

In a GetSampledRequests response, the StartTime and EndTime objects specify the time range \n for which WAF actually returned a sample of web requests. WAF gets the specified number of requests from among the first \n 5,000 requests that your Amazon Web Services resource receives during the specified time period. If your resource receives more than 5,000 \n requests during that period, WAF stops sampling after the 5,000th request. In that case, EndTime \n is the time that WAF received the 5,000th request.

" + "smithy.api#documentation": "

In a GetSampledRequests request, the StartTime and\n EndTime objects specify the time range for which you want WAF to\n return a sample of web requests.

\n

You must specify the times in Coordinated Universal Time (UTC) format. UTC format\n includes the special designator, Z. For example,\n \"2016-09-27T14:50Z\". You can specify any time range in the previous three\n hours.

\n

In a GetSampledRequests response, the StartTime and\n EndTime objects specify the time range for which WAF actually returned a\n sample of web requests. WAF gets the specified number of requests from among the first\n 5,000 requests that your Amazon Web Services resource receives during the specified time period. If your\n resource receives more than 5,000 requests during that period, WAF stops sampling after\n the 5,000th request. In that case, EndTime is the time that WAF received the\n 5,000th request.

" + } + }, + "com.amazonaws.wafv2#TimeWindowDay": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1 + } } }, "com.amazonaws.wafv2#Timestamp": { @@ -6427,7 +6962,7 @@ } ], "traits": { - "smithy.api#documentation": "

Disassociates tags from an Amazon Web Services resource. Tags are key:value pairs that you can associate with Amazon Web Services resources. For example, the tag key might be \"customer\" and the tag value might be \"companyA.\" You can specify one or more tags to add to each container. You can add up to 50 tags to each Amazon Web Services resource.

" + "smithy.api#documentation": "

Disassociates tags from an Amazon Web Services resource. Tags are key:value pairs that you can\n associate with Amazon Web Services resources. For example, the tag key might be \"customer\" and the tag\n value might be \"companyA.\" You can specify one or more tags to add to each container. You\n can add up to 50 tags to each Amazon Web Services resource.

" } }, "com.amazonaws.wafv2#UntagResourceRequest": { @@ -6521,14 +7056,14 @@ "Addresses": { "target": "com.amazonaws.wafv2#IPAddresses", "traits": { - "smithy.api#documentation": "

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except for /0.

\n

Examples:

\n \n

For more information about CIDR notation, see the Wikipedia entry Classless\n Inter-Domain Routing.

", + "smithy.api#documentation": "

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except for /0.

\n

Examples:

\n \n

For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing.

", "smithy.api#required": {} } }, "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", "smithy.api#required": {} } } @@ -6540,7 +7075,106 @@ "NextLockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.

" + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.

" + } + } + } + }, + "com.amazonaws.wafv2#UpdateManagedRuleSetVersionExpiryDate": { + "type": "operation", + "input": { + "target": "com.amazonaws.wafv2#UpdateManagedRuleSetVersionExpiryDateRequest" + }, + "output": { + "target": "com.amazonaws.wafv2#UpdateManagedRuleSetVersionExpiryDateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wafv2#WAFInternalErrorException" + }, + { + "target": "com.amazonaws.wafv2#WAFInvalidOperationException" + }, + { + "target": "com.amazonaws.wafv2#WAFInvalidParameterException" + }, + { + "target": "com.amazonaws.wafv2#WAFNonexistentItemException" + }, + { + "target": "com.amazonaws.wafv2#WAFOptimisticLockException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates the expiration information for your managed rule set. Use this to initiate the\n expiration of a managed rule group version. After you initiate expiration for a version,\n WAF excludes it from the reponse to ListAvailableManagedRuleGroupVersions for the managed rule group.

\n \n

This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Marketplace sellers.

\n

Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and UpdateManagedRuleSetVersionExpiryDate.

\n
" + } + }, + "com.amazonaws.wafv2#UpdateManagedRuleSetVersionExpiryDateRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.wafv2#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set.

\n

This name is assigned to the corresponding managed rule group, which your customers can access and use.

", + "smithy.api#required": {} + } + }, + "Scope": { + "target": "com.amazonaws.wafv2#Scope", + "traits": { + "smithy.api#documentation": "

Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

\n

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

\n ", + "smithy.api#required": {} + } + }, + "Id": { + "target": "com.amazonaws.wafv2#EntityId", + "traits": { + "smithy.api#documentation": "

A unique identifier for the managed rule set. The ID is returned in the responses to commands like list. You provide it to operations like get and update.

", + "smithy.api#required": {} + } + }, + "LockToken": { + "target": "com.amazonaws.wafv2#LockToken", + "traits": { + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", + "smithy.api#required": {} + } + }, + "VersionToExpire": { + "target": "com.amazonaws.wafv2#VersionKeyString", + "traits": { + "smithy.api#documentation": "

The version that you want to remove from your list of offerings for the named managed\n rule group.

", + "smithy.api#required": {} + } + }, + "ExpiryTimestamp": { + "target": "com.amazonaws.wafv2#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that you want the version to expire.

\n

Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, \"2016-09-27T14:50Z\".

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wafv2#UpdateManagedRuleSetVersionExpiryDateResponse": { + "type": "structure", + "members": { + "ExpiringVersion": { + "target": "com.amazonaws.wafv2#VersionKeyString", + "traits": { + "smithy.api#documentation": "

The version that is set to expire.

" + } + }, + "ExpiryTimestamp": { + "target": "com.amazonaws.wafv2#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the version will expire.

\n

Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, \"2016-09-27T14:50Z\".

" + } + }, + "NextLockToken": { + "target": "com.amazonaws.wafv2#LockToken", + "traits": { + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" } } } @@ -6620,7 +7254,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", "smithy.api#required": {} } } @@ -6632,7 +7266,7 @@ "NextLockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.

" + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.

" } } } @@ -6724,7 +7358,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", "smithy.api#required": {} } }, @@ -6742,7 +7376,7 @@ "NextLockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.

" + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.

" } } } @@ -6759,6 +7393,9 @@ { "target": "com.amazonaws.wafv2#WAFDuplicateItemException" }, + { + "target": "com.amazonaws.wafv2#WAFExpiredManagedRuleGroupVersionException" + }, { "target": "com.amazonaws.wafv2#WAFInternalErrorException" }, @@ -6844,7 +7481,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

", "smithy.api#required": {} } }, @@ -6862,7 +7499,7 @@ "NextLockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.

" + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.

" } } } @@ -6884,27 +7521,66 @@ "smithy.api#pattern": "\\S" } }, + "com.amazonaws.wafv2#VersionKeyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[\\w#:\\.\\-/]+$" + } + }, + "com.amazonaws.wafv2#VersionToPublish": { + "type": "structure", + "members": { + "AssociatedRuleGroupArn": { + "target": "com.amazonaws.wafv2#ResourceArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the vendor's rule group that's used in the published\n managed rule group version.

" + } + }, + "ForecastedLifetime": { + "target": "com.amazonaws.wafv2#TimeWindowDay", + "traits": { + "smithy.api#documentation": "

The amount of time the vendor expects this version of the managed rule group to last, in\n days.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A version of the named managed rule group, that the rule group's vendor publishes for\n use by customers.

\n \n

This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Marketplace sellers.

\n

Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and UpdateManagedRuleSetVersionExpiryDate.

\n
" + } + }, + "com.amazonaws.wafv2#VersionsToPublish": { + "type": "map", + "key": { + "target": "com.amazonaws.wafv2#VersionKeyString" + }, + "value": { + "target": "com.amazonaws.wafv2#VersionToPublish" + } + }, "com.amazonaws.wafv2#VisibilityConfig": { "type": "structure", "members": { "SampledRequestsEnabled": { "target": "com.amazonaws.wafv2#Boolean", "traits": { - "smithy.api#documentation": "

A boolean indicating whether WAF should store a sampling of the web \n requests that match the rules. You can view the sampled requests through the \n WAF console.

", + "smithy.api#documentation": "

A boolean indicating whether WAF should store a sampling of the web requests that\n match the rules. You can view the sampled requests through the WAF console.

", "smithy.api#required": {} } }, "CloudWatchMetricsEnabled": { "target": "com.amazonaws.wafv2#Boolean", "traits": { - "smithy.api#documentation": "

A boolean indicating whether the associated resource sends metrics to Amazon CloudWatch. For the list of available metrics, see WAF Metrics.

", + "smithy.api#documentation": "

A boolean indicating whether the associated resource sends metrics to Amazon CloudWatch. For the\n list of available metrics, see WAF\n Metrics.

", "smithy.api#required": {} } }, "MetricName": { "target": "com.amazonaws.wafv2#MetricName", "traits": { - "smithy.api#documentation": "

A name of the Amazon CloudWatch metric. The name can contain only the characters: A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can be from one to 128 characters long. It can't contain\n whitespace or metric names reserved for WAF, for example \"All\" and \"Default_Action.\"

", + "smithy.api#documentation": "

A name of the Amazon CloudWatch metric. The name can contain only the characters: A-Z, a-z, 0-9,\n - (hyphen), and _ (underscore). The name can be from one to 128 characters long. It can't\n contain whitespace or metric names reserved for WAF, for example \"All\" and\n \"Default_Action.\"

", "smithy.api#required": {} } } @@ -6921,7 +7597,7 @@ } }, "traits": { - "smithy.api#documentation": "

WAF couldn’t perform the operation because your resource is being used by another resource or it’s associated with another resource.

", + "smithy.api#documentation": "

WAF couldn’t perform the operation because your resource is being used by another\n resource or it’s associated with another resource.

", "smithy.api#error": "client" } }, @@ -6933,7 +7609,19 @@ } }, "traits": { - "smithy.api#documentation": "

WAF couldn’t perform the operation because the resource that you tried to save is a duplicate of an existing one.

", + "smithy.api#documentation": "

WAF couldn’t perform the operation because the resource that you tried to save is\n a duplicate of an existing one.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.wafv2#WAFExpiredManagedRuleGroupVersionException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.wafv2#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The operation failed because the specified version for the managed rule group has\n expired. You can retrieve the available versions for the managed rule group by calling\n ListAvailableManagedRuleGroupVersions.

", "smithy.api#error": "client" } }, @@ -6945,7 +7633,7 @@ } }, "traits": { - "smithy.api#documentation": "

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

", + "smithy.api#documentation": "

Your request is valid, but WAF couldn’t perform the operation because of a system\n problem. Retry your request.

", "smithy.api#error": "server" } }, @@ -6968,17 +7656,26 @@ "target": "com.amazonaws.wafv2#ErrorMessage" }, "Field": { - "target": "com.amazonaws.wafv2#ParameterExceptionField" + "target": "com.amazonaws.wafv2#ParameterExceptionField", + "traits": { + "smithy.api#documentation": "

The settings where the invalid parameter was found.

" + } }, "Parameter": { - "target": "com.amazonaws.wafv2#ParameterExceptionParameter" + "target": "com.amazonaws.wafv2#ParameterExceptionParameter", + "traits": { + "smithy.api#documentation": "

The invalid parameter that resulted in the exception.

" + } }, "Reason": { - "target": "com.amazonaws.wafv2#ErrorReason" + "target": "com.amazonaws.wafv2#ErrorReason", + "traits": { + "smithy.api#documentation": "

Additional information about the exception.

" + } } }, "traits": { - "smithy.api#documentation": "

The operation failed because WAF didn't recognize a parameter in the request. For example:

\n ", + "smithy.api#documentation": "

The operation failed because WAF didn't recognize a parameter in the request. For\n example:

\n ", "smithy.api#error": "client" } }, @@ -7002,7 +7699,7 @@ } }, "traits": { - "smithy.api#documentation": "

WAF couldn’t perform the operation because the resource that you requested isn’t valid. Check the resource, and try again.

", + "smithy.api#documentation": "

WAF couldn’t perform the operation because the resource that you requested isn’t\n valid. Check the resource, and try again.

", "smithy.api#error": "client" } }, @@ -7014,7 +7711,7 @@ } }, "traits": { - "smithy.api#documentation": "

WAF couldn’t perform the operation because you exceeded your resource limit. For example, the maximum number of WebACL objects that you can create \n for an account. For more information, see \n Limits in the WAF Developer Guide.

", + "smithy.api#documentation": "

WAF couldn’t perform the operation because you exceeded your resource limit. For\n example, the maximum number of WebACL objects that you can create for an Amazon Web Services\n account. For more information, see WAF quotas in the\n WAF Developer Guide.

", "smithy.api#error": "client" } }, @@ -7038,7 +7735,7 @@ } }, "traits": { - "smithy.api#documentation": "

WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.

", + "smithy.api#documentation": "

WAF couldn’t save your changes because you tried to update or delete a resource\n that has changed since you last retrieved it. Get the resource again, make any changes you\n need to make to the new copy, and retry your operation.

", "smithy.api#error": "client" } }, @@ -7050,7 +7747,7 @@ } }, "traits": { - "smithy.api#documentation": "

WAF is not able to access the service linked role. This can be caused by a previous PutLoggingConfiguration request, which can lock the service linked role for about 20 seconds. Please try your request again. The service linked role can also be locked by a previous DeleteServiceLinkedRole request, which can lock the role for 15 minutes or more. If you recently made a call to DeleteServiceLinkedRole, wait at least 15 minutes and try the request again. If you receive this same exception again, you will have to wait additional time until the role is unlocked.

", + "smithy.api#documentation": "

WAF is not able to access the service linked role. This can be caused by a\n previous PutLoggingConfiguration request, which can lock the service linked\n role for about 20 seconds. Please try your request again. The service linked role can also\n be locked by a previous DeleteServiceLinkedRole request, which can lock the\n role for 15 minutes or more. If you recently made a call to\n DeleteServiceLinkedRole, wait at least 15 minutes and try the request\n again. If you receive this same exception again, you will have to wait additional time\n until the role is unlocked.

", "smithy.api#error": "client" } }, @@ -7062,7 +7759,7 @@ } }, "traits": { - "smithy.api#documentation": "

You tried to use a managed rule group that's available by subscription, but you aren't subscribed to it yet.

", + "smithy.api#documentation": "

You tried to use a managed rule group that's available by subscription, but you aren't\n subscribed to it yet.

", "smithy.api#error": "client" } }, @@ -7086,7 +7783,7 @@ } }, "traits": { - "smithy.api#documentation": "

WAF couldn’t perform your tagging operation because of an internal error. Retry your request.

", + "smithy.api#documentation": "

WAF couldn’t perform your tagging operation because of an internal error. Retry\n your request.

", "smithy.api#error": "server" } }, @@ -7115,14 +7812,14 @@ "Id": { "target": "com.amazonaws.wafv2#EntityId", "traits": { - "smithy.api#documentation": "

A unique identifier for the WebACL. This ID is returned in the responses to create and list commands. You use this ID to do things like get, update, and delete a WebACL.

", + "smithy.api#documentation": "

A unique identifier for the WebACL. This ID is returned in the responses to\n create and list commands. You use this ID to do things like get, update, and delete a\n WebACL.

", "smithy.api#required": {} } }, "ARN": { "target": "com.amazonaws.wafv2#ResourceArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the web ACL that you want to associate with the\n resource.

", "smithy.api#required": {} } }, @@ -7161,19 +7858,19 @@ "PreProcessFirewallManagerRuleGroups": { "target": "com.amazonaws.wafv2#FirewallManagerRuleGroups", "traits": { - "smithy.api#documentation": "

The first set of rules for WAF to process in the web ACL. This is defined in an Firewall Manager WAF policy and \n contains only rule group references. You can't alter these. Any rules and rule groups that you define for the web ACL are \n prioritized after these.

\n

In the Firewall Manager WAF policy, the Firewall Manager administrator can define a set of rule groups to run first in the web ACL \n and a set of rule groups to run last. Within each set, the administrator prioritizes the rule groups, to\n determine their relative processing order.

" + "smithy.api#documentation": "

The first set of rules for WAF to process in the web ACL. This is defined in an\n Firewall Manager WAF policy and contains only rule group references. You can't alter these. Any\n rules and rule groups that you define for the web ACL are prioritized after these.

\n

In the Firewall Manager WAF policy, the Firewall Manager administrator can define a set of rule groups to run\n first in the web ACL and a set of rule groups to run last. Within each set, the\n administrator prioritizes the rule groups, to determine their relative processing\n order.

" } }, "PostProcessFirewallManagerRuleGroups": { "target": "com.amazonaws.wafv2#FirewallManagerRuleGroups", "traits": { - "smithy.api#documentation": "

The last set of rules for WAF to process in the web ACL. This is defined in an Firewall Manager WAF policy and \n contains only rule group references. You can't alter these. Any rules and rule groups that you define for the web ACL are \n prioritized before these.

\n

In the Firewall Manager WAF policy, the Firewall Manager administrator can define a set of rule groups to run first in the web ACL \n and a set of rule groups to run last. Within each set, the administrator prioritizes the rule groups, to\n determine their relative processing order.

" + "smithy.api#documentation": "

The last set of rules for WAF to process in the web ACL. This is defined in an\n Firewall Manager WAF policy and contains only rule group references. You can't alter these. Any\n rules and rule groups that you define for the web ACL are prioritized before these.

\n

In the Firewall Manager WAF policy, the Firewall Manager administrator can define a set of rule groups to run\n first in the web ACL and a set of rule groups to run last. Within each set, the\n administrator prioritizes the rule groups, to determine their relative processing\n order.

" } }, "ManagedByFirewallManager": { "target": "com.amazonaws.wafv2#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether this web ACL is managed by Firewall Manager. If true, then only Firewall Manager can delete the web ACL or any Firewall Manager rule groups in the web ACL.

" + "smithy.api#documentation": "

Indicates whether this web ACL is managed by Firewall Manager. If true, then only Firewall Manager can\n delete the web ACL or any Firewall Manager rule groups in the web ACL.

" } }, "LabelNamespace": { @@ -7223,7 +7920,7 @@ "LockToken": { "target": "com.amazonaws.wafv2#LockToken", "traits": { - "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" + "smithy.api#documentation": "

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

" } }, "ARN": { diff --git a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json index 58aab318563..1eed56267db 100644 --- a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json +++ b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json @@ -29,6 +29,8 @@ "Braket": "braket", "Budgets": "budgets", "Chime": "chime", + "Chime SDK Identity": "identity-chime", + "Chime SDK Messaging": "messaging-chime", "Cloud9": "cloud9", "CloudDirectory": "clouddirectory", "CloudFormation": "cloudformation", @@ -251,6 +253,7 @@ "ServiceDiscovery": "servicediscovery", "Shield": "shield", "Signer": "signer", + "Snow Device Management": "snow-device-management", "Snowball": "snowball", "Storage Gateway": "storagegateway", "Support": "support", diff --git a/service/athena/api_op_CreateDataCatalog.go b/service/athena/api_op_CreateDataCatalog.go index de3bfd4949f..410d224ecb3 100644 --- a/service/athena/api_op_CreateDataCatalog.go +++ b/service/athena/api_op_CreateDataCatalog.go @@ -12,7 +12,8 @@ import ( ) // Creates (registers) a data catalog with the specified name and properties. -// Catalogs created are visible to all users of the same AWS account. +// Catalogs created are visible to all users of the same Amazon Web Services +// account. func (c *Client) CreateDataCatalog(ctx context.Context, params *CreateDataCatalogInput, optFns ...func(*Options)) (*CreateDataCatalogOutput, error) { if params == nil { params = &CreateDataCatalogInput{} @@ -31,16 +32,14 @@ func (c *Client) CreateDataCatalog(ctx context.Context, params *CreateDataCatalo type CreateDataCatalogInput struct { // The name of the data catalog to create. The catalog name must be unique for the - // AWS account and can use a maximum of 128 alphanumeric, underscore, at sign, or - // hyphen characters. + // Amazon Web Services account and can use a maximum of 128 alphanumeric, + // underscore, at sign, or hyphen characters. // // This member is required. Name *string - // The type of data catalog to create: LAMBDA for a federated catalog or HIVE for - // an external hive metastore. Do not use the GLUE type. This refers to the - // AwsDataCatalog that already exists in your account, of which you can have only - // one. Specifying the GLUE type will result in an INVALID_INPUT error. + // The type of data catalog to create: LAMBDA for a federated catalog, HIVE for an + // external hive metastore, or GLUE for an Glue Data Catalog. // // This member is required. Type types.DataCatalogType @@ -68,6 +67,22 @@ type CreateDataCatalogInput struct { // * If you have a composite Lambda function that // processes both metadata and data, use the following syntax to specify your // Lambda function. function=lambda_arn + // + // * The GLUE type takes a catalog ID + // parameter and is required. The catalog_id is the account ID of the Amazon Web + // Services account to which the Glue Data Catalog belongs. + // catalog-id=catalog_id + // + // * The GLUE data catalog type also applies to the default + // AwsDataCatalog that already exists in your account, of which you can have only + // one and cannot modify. + // + // * Queries that specify a Glue Data Catalog other than + // the default AwsDataCatalog must be run on Athena engine version 2. + // + // * In Regions + // where Athena engine version 2 is not available, creating new Glue data catalogs + // results in an INVALID_INPUT error. Parameters map[string]string // A list of comma separated tags to add to the data catalog that is created. diff --git a/service/athena/api_op_CreateNamedQuery.go b/service/athena/api_op_CreateNamedQuery.go index cef63efbf40..03017dd116c 100644 --- a/service/athena/api_op_CreateNamedQuery.go +++ b/service/athena/api_op_CreateNamedQuery.go @@ -12,9 +12,10 @@ import ( ) // Creates a named query in the specified workgroup. Requires that you have access -// to the workgroup. For code samples using the AWS SDK for Java, see Examples and -// Code Samples (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in -// the Amazon Athena User Guide. +// to the workgroup. For code samples using the Amazon Web Services SDK for Java, +// see Examples and Code Samples +// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon +// Athena User Guide. func (c *Client) CreateNamedQuery(ctx context.Context, params *CreateNamedQueryInput, optFns ...func(*Options)) (*CreateNamedQueryOutput, error) { if params == nil { params = &CreateNamedQueryInput{} @@ -51,9 +52,10 @@ type CreateNamedQueryInput struct { // idempotent (executes only once). If another CreateNamedQuery request is // received, the same response is returned and another query is not created. If a // parameter has changed, for example, the QueryString, an error is returned. This - // token is listed as not required because AWS SDKs (for example the AWS SDK for - // Java) auto-generate the token for users. If you are not using the AWS SDK or the - // AWS CLI, you must provide this token or the action will fail. + // token is listed as not required because Amazon Web Services SDKs (for example + // the Amazon Web Services SDK for Java) auto-generate the token for users. If you + // are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you + // must provide this token or the action will fail. ClientRequestToken *string // The query description. diff --git a/service/athena/api_op_DeleteNamedQuery.go b/service/athena/api_op_DeleteNamedQuery.go index 28a2b2b7a32..5b0db16bc10 100644 --- a/service/athena/api_op_DeleteNamedQuery.go +++ b/service/athena/api_op_DeleteNamedQuery.go @@ -12,9 +12,10 @@ import ( ) // Deletes the named query if you have access to the workgroup in which the query -// was saved. For code samples using the AWS SDK for Java, see Examples and Code -// Samples (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the -// Amazon Athena User Guide. +// was saved. For code samples using the Amazon Web Services SDK for Java, see +// Examples and Code Samples +// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon +// Athena User Guide. func (c *Client) DeleteNamedQuery(ctx context.Context, params *DeleteNamedQueryInput, optFns ...func(*Options)) (*DeleteNamedQueryOutput, error) { if params == nil { params = &DeleteNamedQueryInput{} diff --git a/service/athena/api_op_ListDataCatalogs.go b/service/athena/api_op_ListDataCatalogs.go index 21797009fc4..19ffd11e26a 100644 --- a/service/athena/api_op_ListDataCatalogs.go +++ b/service/athena/api_op_ListDataCatalogs.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the data catalogs in the current AWS account. +// Lists the data catalogs in the current Amazon Web Services account. func (c *Client) ListDataCatalogs(ctx context.Context, params *ListDataCatalogsInput, optFns ...func(*Options)) (*ListDataCatalogsOutput, error) { if params == nil { params = &ListDataCatalogsInput{} diff --git a/service/athena/api_op_ListNamedQueries.go b/service/athena/api_op_ListNamedQueries.go index d1092b68d10..9c9c466824b 100644 --- a/service/athena/api_op_ListNamedQueries.go +++ b/service/athena/api_op_ListNamedQueries.go @@ -14,9 +14,9 @@ import ( // Provides a list of available query IDs only for queries saved in the specified // workgroup. Requires that you have access to the specified workgroup. If a // workgroup is not specified, lists the saved queries for the primary workgroup. -// For code samples using the AWS SDK for Java, see Examples and Code Samples -// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon -// Athena User Guide. +// For code samples using the Amazon Web Services SDK for Java, see Examples and +// Code Samples (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in +// the Amazon Athena User Guide. func (c *Client) ListNamedQueries(ctx context.Context, params *ListNamedQueriesInput, optFns ...func(*Options)) (*ListNamedQueriesOutput, error) { if params == nil { params = &ListNamedQueriesInput{} diff --git a/service/athena/api_op_ListQueryExecutions.go b/service/athena/api_op_ListQueryExecutions.go index 01c60cd0a05..3988bc66615 100644 --- a/service/athena/api_op_ListQueryExecutions.go +++ b/service/athena/api_op_ListQueryExecutions.go @@ -14,8 +14,8 @@ import ( // Provides a list of available query execution IDs for the queries in the // specified workgroup. If a workgroup is not specified, returns a list of query // execution IDs for the primary workgroup. Requires you to have access to the -// workgroup in which the queries ran. For code samples using the AWS SDK for Java, -// see Examples and Code Samples +// workgroup in which the queries ran. For code samples using the Amazon Web +// Services SDK for Java, see Examples and Code Samples // (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon // Athena User Guide. func (c *Client) ListQueryExecutions(ctx context.Context, params *ListQueryExecutionsInput, optFns ...func(*Options)) (*ListQueryExecutionsOutput, error) { diff --git a/service/athena/api_op_StartQueryExecution.go b/service/athena/api_op_StartQueryExecution.go index 28dc79ade99..041479fa6c1 100644 --- a/service/athena/api_op_StartQueryExecution.go +++ b/service/athena/api_op_StartQueryExecution.go @@ -15,9 +15,9 @@ import ( // Runs the SQL query statements contained in the Query. Requires you to have // access to the workgroup in which the query ran. Running queries against an // external catalog requires GetDataCatalog permission to the catalog. For code -// samples using the AWS SDK for Java, see Examples and Code Samples -// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon -// Athena User Guide. +// samples using the Amazon Web Services SDK for Java, see Examples and Code +// Samples (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the +// Amazon Athena User Guide. func (c *Client) StartQueryExecution(ctx context.Context, params *StartQueryExecutionInput, optFns ...func(*Options)) (*StartQueryExecutionOutput, error) { if params == nil { params = &StartQueryExecutionInput{} @@ -44,9 +44,10 @@ type StartQueryExecutionInput struct { // idempotent (executes only once). If another StartQueryExecution request is // received, the same response is returned and another query is not created. If a // parameter has changed, for example, the QueryString, an error is returned. This - // token is listed as not required because AWS SDKs (for example the AWS SDK for - // Java) auto-generate the token for users. If you are not using the AWS SDK or the - // AWS CLI, you must provide this token or the action will fail. + // token is listed as not required because Amazon Web Services SDKs (for example + // the Amazon Web Services SDK for Java) auto-generate the token for users. If you + // are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you + // must provide this token or the action will fail. ClientRequestToken *string // The database within which the query executes. diff --git a/service/athena/api_op_StopQueryExecution.go b/service/athena/api_op_StopQueryExecution.go index ce55e636ff4..4388d133386 100644 --- a/service/athena/api_op_StopQueryExecution.go +++ b/service/athena/api_op_StopQueryExecution.go @@ -12,9 +12,10 @@ import ( ) // Stops a query execution. Requires you to have access to the workgroup in which -// the query ran. For code samples using the AWS SDK for Java, see Examples and -// Code Samples (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in -// the Amazon Athena User Guide. +// the query ran. For code samples using the Amazon Web Services SDK for Java, see +// Examples and Code Samples +// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon +// Athena User Guide. func (c *Client) StopQueryExecution(ctx context.Context, params *StopQueryExecutionInput, optFns ...func(*Options)) (*StopQueryExecutionOutput, error) { if params == nil { params = &StopQueryExecutionInput{} diff --git a/service/athena/api_op_UpdateDataCatalog.go b/service/athena/api_op_UpdateDataCatalog.go index af985328409..5f756e38583 100644 --- a/service/athena/api_op_UpdateDataCatalog.go +++ b/service/athena/api_op_UpdateDataCatalog.go @@ -30,17 +30,14 @@ func (c *Client) UpdateDataCatalog(ctx context.Context, params *UpdateDataCatalo type UpdateDataCatalogInput struct { // The name of the data catalog to update. The catalog name must be unique for the - // AWS account and can use a maximum of 128 alphanumeric, underscore, at sign, or - // hyphen characters. + // Amazon Web Services account and can use a maximum of 128 alphanumeric, + // underscore, at sign, or hyphen characters. // // This member is required. Name *string // Specifies the type of data catalog to update. Specify LAMBDA for a federated - // catalog or HIVE for an external hive metastore. Do not use the GLUE type. This - // refers to the AwsDataCatalog that already exists in your account, of which you - // can have only one. Specifying the GLUE type will result in an INVALID_INPUT - // error. + // catalog, HIVE for an external hive metastore, or GLUE for an Glue Data Catalog. // // This member is required. Type types.DataCatalogType diff --git a/service/athena/doc.go b/service/athena/doc.go index c12cc572145..1ddf55f904d 100644 --- a/service/athena/doc.go +++ b/service/athena/doc.go @@ -15,7 +15,7 @@ // version drivers do not support the API. For more information and to download the // driver, see Accessing Amazon Athena with JDBC // (https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html). For code -// samples using the AWS SDK for Java, see Examples and Code Samples -// (https://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon -// Athena User Guide. +// samples using the Amazon Web Services SDK for Java, see Examples and Code +// Samples (https://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the +// Amazon Athena User Guide. package athena diff --git a/service/athena/types/types.go b/service/athena/types/types.go index 04a2729a883..41922fec07b 100644 --- a/service/athena/types/types.go +++ b/service/athena/types/types.go @@ -83,19 +83,18 @@ type Database struct { noSmithyDocumentSerde } -// Contains information about a data catalog in an AWS account. +// Contains information about a data catalog in an Amazon Web Services account. type DataCatalog struct { - // The name of the data catalog. The catalog name must be unique for the AWS - // account and can use a maximum of 128 alphanumeric, underscore, at sign, or - // hyphen characters. + // The name of the data catalog. The catalog name must be unique for the Amazon Web + // Services account and can use a maximum of 128 alphanumeric, underscore, at sign, + // or hyphen characters. // // This member is required. Name *string - // The type of data catalog: LAMBDA for a federated catalog or HIVE for an external - // hive metastore. GLUE refers to the AwsDataCatalog that already exists in your - // account, of which you can have only one. + // The type of data catalog to create: LAMBDA for a federated catalog, HIVE for an + // external hive metastore, or GLUE for an Glue Data Catalog. // // This member is required. Type DataCatalogType @@ -122,6 +121,18 @@ type DataCatalog struct { // * If you // have a composite Lambda function that processes both metadata and data, use the // following syntax to specify your Lambda function. function=lambda_arn + // + // * The + // GLUE type takes a catalog ID parameter and is required. The catalog_id is the + // account ID of the Amazon Web Services account to which the Glue catalog belongs. + // catalog-id=catalog_id + // + // * The GLUE data catalog type also applies to the default + // AwsDataCatalog that already exists in your account, of which you can have only + // one and cannot modify. + // + // * Queries that specify a Glue Data Catalog other than + // the default AwsDataCatalog must be run on Athena engine version 2. Parameters map[string]string noSmithyDocumentSerde @@ -275,7 +286,7 @@ type QueryExecution struct { // The type of query statement that was run. DDL indicates DDL query statements. // DML indicates DML (Data Manipulation Language) query statements, such as CREATE // TABLE AS SELECT. UTILITY indicates query statements other than DDL and DML, such - // as SHOW CREATE TABLE, or DESCRIBE . + // as SHOW CREATE TABLE, or DESCRIBE TABLE. StatementType StatementType // Query execution statistics, such as the amount of data scanned, the amount of @@ -298,7 +309,8 @@ type QueryExecutionContext struct { // The name of the data catalog used in the query execution. Catalog *string - // The name of the database used in the query execution. + // The name of the database used in the query execution. The database must exist in + // the catalog. Database *string noSmithyDocumentSerde diff --git a/service/autoscaling/api_op_StartInstanceRefresh.go b/service/autoscaling/api_op_StartInstanceRefresh.go index fc1b6e69239..0fa3fb6fc59 100644 --- a/service/autoscaling/api_op_StartInstanceRefresh.go +++ b/service/autoscaling/api_op_StartInstanceRefresh.go @@ -11,17 +11,22 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Starts a new instance refresh operation, which triggers a rolling replacement of -// previously launched instances in the Auto Scaling group with a new group of -// instances. This operation is part of the instance refresh feature +// Starts a new instance refresh operation. An instance refresh performs a rolling +// replacement of all or some instances in an Auto Scaling group. Each instance is +// terminated first and then replaced, which temporarily reduces the capacity +// available within your Auto Scaling group. This operation is part of the instance +// refresh feature // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html) // in Amazon EC2 Auto Scaling, which helps you update instances in your Auto -// Scaling group after you make configuration changes. If the call succeeds, it -// creates a new instance refresh request with a unique ID that you can use to -// track its progress. To query its status, call the DescribeInstanceRefreshes API. -// To describe the instance refreshes that have already run, call the -// DescribeInstanceRefreshes API. To cancel an instance refresh operation in -// progress, use the CancelInstanceRefresh API. +// Scaling group. This feature is helpful, for example, when you have a new AMI or +// a new user data script. You just need to create a new launch template that +// specifies the new AMI or user data script. Then start an instance refresh to +// immediately begin the process of updating instances in the group. If the call +// succeeds, it creates a new instance refresh request with a unique ID that you +// can use to track its progress. To query its status, call the +// DescribeInstanceRefreshes API. To describe the instance refreshes that have +// already run, call the DescribeInstanceRefreshes API. To cancel an instance +// refresh operation in progress, use the CancelInstanceRefresh API. func (c *Client) StartInstanceRefresh(ctx context.Context, params *StartInstanceRefreshInput, optFns ...func(*Options)) (*StartInstanceRefreshOutput, error) { if params == nil { params = &StartInstanceRefreshInput{} @@ -44,20 +49,25 @@ type StartInstanceRefreshInput struct { // This member is required. AutoScalingGroupName *string + // The desired configuration. For example, the desired configuration can specify a + // new launch template or a new version of the current launch template. Once the + // instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the + // Auto Scaling group to reflect the new desired configuration. When you specify a + // new launch template or a new version of the current launch template for your + // desired configuration, consider enabling the SkipMatching property in + // preferences. If it's enabled, Amazon EC2 Auto Scaling skips replacing instances + // that already use the specified launch template and version. This can help you + // reduce the number of replacements that are required to apply updates. + DesiredConfiguration *types.DesiredConfiguration + // Set of preferences associated with the instance refresh request. If not - // provided, the default values are used. For MinHealthyPercentage, the default - // value is 90. For InstanceWarmup, the default is to use the value specified for - // the health check grace period for the Auto Scaling group. For more information, - // see RefreshPreferences - // (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_RefreshPreferences.html) - // in the Amazon EC2 Auto Scaling API Reference. + // provided, the default values are used. Preferences *types.RefreshPreferences // The strategy to use for the instance refresh. The only valid value is Rolling. A - // rolling update is an update that is applied to all instances in an Auto Scaling - // group until all instances have been updated. A rolling update can fail due to - // failed health checks or if instances are on standby or are protected from scale - // in. If the rolling update process fails, any instances that were already + // rolling update helps you update your instances gradually. A rolling update can + // fail due to failed health checks or if instances are on standby or are protected + // from scale in. If the rolling update process fails, any instances that are // replaced are not rolled back to their previous configuration. Strategy types.RefreshStrategy diff --git a/service/autoscaling/deserializers.go b/service/autoscaling/deserializers.go index a994805cac1..21ca2fea87c 100644 --- a/service/autoscaling/deserializers.go +++ b/service/autoscaling/deserializers.go @@ -8146,6 +8146,94 @@ func awsAwsquery_deserializeDocumentCapacityForecast(v **types.CapacityForecast, return nil } +func awsAwsquery_deserializeDocumentCheckpointPercentages(v *[]int32, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []int32 + if *v == nil { + sv = make([]int32, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col int32 + 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 + } + col = int32(i64) + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentCheckpointPercentagesUnwrapped(v *[]int32, decoder smithyxml.NodeDecoder) error { + var sv []int32 + if *v == nil { + sv = make([]int32, 0) + } else { + sv = *v + } + + switch { + default: + var mv int32 + t := decoder.StartEl + _ = t + 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 + } + mv = int32(i64) + } + sv = append(sv, mv) + } + *v = sv + return nil +} func awsAwsquery_deserializeDocumentClassicLinkVPCSecurityGroups(v *[]string, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8320,6 +8408,54 @@ func awsAwsquery_deserializeDocumentCustomizedMetricSpecification(v **types.Cust return nil } +func awsAwsquery_deserializeDocumentDesiredConfiguration(v **types.DesiredConfiguration, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DesiredConfiguration + if *v == nil { + sv = &types.DesiredConfiguration{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("LaunchTemplate", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentLaunchTemplateSpecification(&sv.LaunchTemplate, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MixedInstancesPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMixedInstancesPolicy(&sv.MixedInstancesPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentEbs(v **types.Ebs, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9053,6 +9189,12 @@ func awsAwsquery_deserializeDocumentInstanceRefresh(v **types.InstanceRefresh, d sv.AutoScalingGroupName = ptr.String(xtv) } + case strings.EqualFold("DesiredConfiguration", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentDesiredConfiguration(&sv.DesiredConfiguration, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("EndTime", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -9117,6 +9259,12 @@ func awsAwsquery_deserializeDocumentInstanceRefresh(v **types.InstanceRefresh, d sv.PercentageComplete = ptr.Int32(int32(i64)) } + case strings.EqualFold("Preferences", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentRefreshPreferences(&sv.Preferences, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("ProgressDetails", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentInstanceRefreshProgressDetails(&sv.ProgressDetails, nodeDecoder); err != nil { @@ -12403,6 +12551,115 @@ func awsAwsquery_deserializeDocumentProcessType(v **types.ProcessType, decoder s return nil } +func awsAwsquery_deserializeDocumentRefreshPreferences(v **types.RefreshPreferences, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RefreshPreferences + if *v == nil { + sv = &types.RefreshPreferences{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CheckpointDelay", 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.CheckpointDelay = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("CheckpointPercentages", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentCheckpointPercentages(&sv.CheckpointPercentages, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("InstanceWarmup", 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.InstanceWarmup = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("MinHealthyPercentage", 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.MinHealthyPercentage = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("SkipMatching", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected SkipMatching to be of type *bool, got %T instead", val) + } + sv.SkipMatching = ptr.Bool(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentResourceContentionFault(v **types.ResourceContentionFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/autoscaling/serializers.go b/service/autoscaling/serializers.go index b9c9697efae..780f5af9568 100644 --- a/service/autoscaling/serializers.go +++ b/service/autoscaling/serializers.go @@ -3559,6 +3559,27 @@ func awsAwsquery_serializeDocumentCustomizedMetricSpecification(v *types.Customi return nil } +func awsAwsquery_serializeDocumentDesiredConfiguration(v *types.DesiredConfiguration, value query.Value) error { + object := value.Object() + _ = object + + if v.LaunchTemplate != nil { + objectKey := object.Key("LaunchTemplate") + if err := awsAwsquery_serializeDocumentLaunchTemplateSpecification(v.LaunchTemplate, objectKey); err != nil { + return err + } + } + + if v.MixedInstancesPolicy != nil { + objectKey := object.Key("MixedInstancesPolicy") + if err := awsAwsquery_serializeDocumentMixedInstancesPolicy(v.MixedInstancesPolicy, objectKey); err != nil { + return err + } + } + + return nil +} + func awsAwsquery_serializeDocumentEbs(v *types.Ebs, value query.Value) error { object := value.Object() _ = object @@ -4204,6 +4225,11 @@ func awsAwsquery_serializeDocumentRefreshPreferences(v *types.RefreshPreferences objectKey.Integer(*v.MinHealthyPercentage) } + if v.SkipMatching != nil { + objectKey := object.Key("SkipMatching") + objectKey.Boolean(*v.SkipMatching) + } + return nil } @@ -5961,6 +5987,13 @@ func awsAwsquery_serializeOpDocumentStartInstanceRefreshInput(v *StartInstanceRe objectKey.String(*v.AutoScalingGroupName) } + if v.DesiredConfiguration != nil { + objectKey := object.Key("DesiredConfiguration") + if err := awsAwsquery_serializeDocumentDesiredConfiguration(v.DesiredConfiguration, objectKey); err != nil { + return err + } + } + if v.Preferences != nil { objectKey := object.Key("Preferences") if err := awsAwsquery_serializeDocumentRefreshPreferences(v.Preferences, objectKey); err != nil { diff --git a/service/autoscaling/types/types.go b/service/autoscaling/types/types.go index 6175a27b285..8a232abce1a 100644 --- a/service/autoscaling/types/types.go +++ b/service/autoscaling/types/types.go @@ -360,6 +360,30 @@ type CustomizedMetricSpecification struct { noSmithyDocumentSerde } +// Describes the desired configuration for an instance refresh. If you specify a +// desired configuration, you must specify either a LaunchTemplate or a +// MixedInstancesPolicy. +type DesiredConfiguration struct { + + // Describes the launch template and the version of the launch template that Amazon + // EC2 Auto Scaling uses to launch Amazon EC2 instances. For more information about + // launch templates, see Launch templates + // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchTemplates.html) in + // the Amazon EC2 Auto Scaling User Guide. + LaunchTemplate *LaunchTemplateSpecification + + // Describes a mixed instances policy. A mixed instances policy contains the + // instance types Amazon EC2 Auto Scaling can launch, and other information Amazon + // EC2 Auto Scaling can use to launch instances to help you optimize your costs. + // For more information, see Auto Scaling groups with multiple instance types and + // purchase options + // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html) + // in the Amazon EC2 Auto Scaling User Guide. + MixedInstancesPolicy *MixedInstancesPolicy + + noSmithyDocumentSerde +} + // Describes information used to set up an Amazon EBS volume specified in a block // device mapping. type Ebs struct { @@ -634,6 +658,9 @@ type InstanceRefresh struct { // The name of the Auto Scaling group. AutoScalingGroupName *string + // Describes the specific update you want to deploy. + DesiredConfiguration *DesiredConfiguration + // The date and time at which the instance refresh ended. EndTime *time.Time @@ -651,6 +678,9 @@ type InstanceRefresh struct { // to the percentage complete. PercentageComplete *int32 + // Describes the preferences for an instance refresh. + Preferences *RefreshPreferences + // Additional progress details for an Auto Scaling group that has a warm pool. ProgressDetails *InstanceRefreshProgressDetails @@ -739,14 +769,14 @@ type InstanceRefreshWarmPoolProgress struct { // MixedInstancesPolicy. The instances distribution specifies the distribution of // On-Demand Instances and Spot Instances, the maximum price to pay for Spot // Instances, and how the Auto Scaling group allocates instance types to fulfill -// On-Demand and Spot capacities. When you update SpotAllocationStrategy, -// SpotInstancePools, or SpotMaxPrice, this update action does not deploy any -// changes across the running Amazon EC2 instances in the group. Your existing Spot -// Instances continue to run as long as the maximum price for those instances is -// higher than the current Spot price. When scale out occurs, Amazon EC2 Auto -// Scaling launches instances based on the new settings. When scale in occurs, -// Amazon EC2 Auto Scaling terminates instances according to the group's -// termination policies. +// On-Demand and Spot capacities. When you modify SpotAllocationStrategy, +// SpotInstancePools, or SpotMaxPrice in the UpdateAutoScalingGroup API call, this +// update action does not deploy any changes across the running Amazon EC2 +// instances in the group. Your existing Spot Instances continue to run as long as +// the maximum price for those instances is higher than the current Spot price. +// When scale out occurs, Amazon EC2 Auto Scaling launches instances based on the +// new settings. When scale in occurs, Amazon EC2 Auto Scaling terminates instances +// according to the group's termination policies. type InstancesDistribution struct { // Indicates how to allocate instance types to fulfill On-Demand capacity. The only @@ -936,11 +966,11 @@ type LaunchConfiguration struct { } // Describes a launch template and overrides. You specify these properties as part -// of a mixed instances policy. When you update the launch template or overrides, -// existing Amazon EC2 instances continue to run. When scale out occurs, Amazon EC2 -// Auto Scaling launches instances to match the new settings. When scale in occurs, -// Amazon EC2 Auto Scaling terminates instances according to the group's -// termination policies. +// of a mixed instances policy. When you update the launch template or overrides in +// the UpdateAutoScalingGroup API call, existing Amazon EC2 instances continue to +// run. When scale out occurs, Amazon EC2 Auto Scaling launches instances to match +// the new settings. When scale in occurs, Amazon EC2 Auto Scaling terminates +// instances according to the group's termination policies. type LaunchTemplate struct { // The launch template to use. @@ -996,13 +1026,11 @@ type LaunchTemplateOverrides struct { noSmithyDocumentSerde } -// Describes the Amazon EC2 launch template and the launch template version that -// can be used by an Auto Scaling group to configure Amazon EC2 instances. The -// launch template that is specified must be configured for use with an Auto -// Scaling group. For more information, see Creating a launch template for an Auto -// Scaling group -// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html) -// in the Amazon EC2 Auto Scaling User Guide. +// Describes the launch template and the version of the launch template that Amazon +// EC2 Auto Scaling uses to launch Amazon EC2 instances. For more information about +// launch templates, see Launch templates +// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchTemplates.html) in +// the Amazon EC2 Auto Scaling User Guide. type LaunchTemplateSpecification struct { // The ID of the launch template. To get the template ID, use the Amazon EC2 @@ -1327,25 +1355,22 @@ type MetricGranularityType struct { noSmithyDocumentSerde } -// Describes a mixed instances policy for an Auto Scaling group. With mixed -// instances, your Auto Scaling group can provision a combination of On-Demand -// Instances and Spot Instances across multiple instance types. For more -// information, see Auto Scaling groups with multiple instance types and purchase -// options +// Describes a mixed instances policy. A mixed instances policy contains the +// instance types Amazon EC2 Auto Scaling can launch, and other information Amazon +// EC2 Auto Scaling can use to launch instances to help you optimize your costs. +// For more information, see Auto Scaling groups with multiple instance types and +// purchase options // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html) -// in the Amazon EC2 Auto Scaling User Guide. You can create a mixed instances -// policy for a new Auto Scaling group, or you can create it for an existing group -// by updating the group to specify MixedInstancesPolicy as the top-level property -// instead of a launch configuration or launch template. +// in the Amazon EC2 Auto Scaling User Guide. type MixedInstancesPolicy struct { // Specifies the instances distribution. If not provided, the value for each // property in InstancesDistribution uses a default value. InstancesDistribution *InstancesDistribution - // Specifies the launch template to use and optionally the instance types - // (overrides) that are used to provision EC2 instances to fulfill On-Demand and - // Spot capacities. Required when creating a mixed instances policy. + // Specifies the launch template to use and the instance types (overrides) that are + // used to provision EC2 instances to fulfill On-Demand and Spot capacities. + // Required when creating a mixed instances policy. LaunchTemplate *LaunchTemplate noSmithyDocumentSerde @@ -1685,9 +1710,7 @@ type ProcessType struct { noSmithyDocumentSerde } -// Describes information used to start an instance refresh. All properties are -// optional. However, if you specify a value for CheckpointDelay, you must also -// provide a value for CheckpointPercentages. +// Describes the preferences for an instance refresh. type RefreshPreferences struct { // The amount of time, in seconds, to wait after a checkpoint before continuing. @@ -1712,11 +1735,21 @@ type RefreshPreferences struct { InstanceWarmup *int32 // The amount of capacity in the Auto Scaling group that must remain healthy during - // an instance refresh to allow the operation to continue, as a percentage of the - // desired capacity of the Auto Scaling group (rounded up to the nearest integer). - // The default is 90. + // an instance refresh to allow the operation to continue. The value is expressed + // as a percentage of the desired capacity of the Auto Scaling group (rounded up to + // the nearest integer). The default is 90. Setting the minimum healthy percentage + // to 100 percent limits the rate of replacement to one instance at a time. In + // contrast, setting it to 0 percent has the effect of replacing all instances at + // the same time. MinHealthyPercentage *int32 + // A boolean value that indicates whether skip matching is enabled. If true, then + // Amazon EC2 Auto Scaling skips replacing instances that match the desired + // configuration. If no desired configuration is specified, then it skips replacing + // instances that have the same configuration that is already set on the group. The + // default is false. + SkipMatching *bool + noSmithyDocumentSerde } diff --git a/service/chime/api_op_DescribeAppInstanceUser.go b/service/chime/api_op_DescribeAppInstanceUser.go index 3b76678f7a6..1e3a4221645 100644 --- a/service/chime/api_op_DescribeAppInstanceUser.go +++ b/service/chime/api_op_DescribeAppInstanceUser.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns the full details of an AppInstanceUser . +// Returns the full details of an AppInstanceUser. func (c *Client) DescribeAppInstanceUser(ctx context.Context, params *DescribeAppInstanceUserInput, optFns ...func(*Options)) (*DescribeAppInstanceUserOutput, error) { if params == nil { params = &DescribeAppInstanceUserInput{} diff --git a/service/chime/types/enums.go b/service/chime/types/enums.go index 5939a4e48ee..7f38c8608c9 100644 --- a/service/chime/types/enums.go +++ b/service/chime/types/enums.go @@ -756,6 +756,7 @@ const ( TranscribeMedicalRegionApSoutheast2 TranscribeMedicalRegion = "ap-southeast-2" TranscribeMedicalRegionCaCentral1 TranscribeMedicalRegion = "ca-central-1" TranscribeMedicalRegionEuWest1 TranscribeMedicalRegion = "eu-west-1" + TranscribeMedicalRegionAuto TranscribeMedicalRegion = "auto" ) // Values returns all known values for TranscribeMedicalRegion. Note that this can @@ -769,6 +770,7 @@ func (TranscribeMedicalRegion) Values() []TranscribeMedicalRegion { "ap-southeast-2", "ca-central-1", "eu-west-1", + "auto", } } @@ -831,6 +833,7 @@ const ( TranscribeRegionEuWest1 TranscribeRegion = "eu-west-1" TranscribeRegionEuWest2 TranscribeRegion = "eu-west-2" TranscribeRegionSaEast1 TranscribeRegion = "sa-east-1" + TranscribeRegionAuto TranscribeRegion = "auto" ) // Values returns all known values for TranscribeRegion. Note that this can be @@ -849,6 +852,7 @@ func (TranscribeRegion) Values() []TranscribeRegion { "eu-west-1", "eu-west-2", "sa-east-1", + "auto", } } diff --git a/service/chime/types/types.go b/service/chime/types/types.go index 1dbdb16f72f..aec82f7d916 100644 --- a/service/chime/types/types.go +++ b/service/chime/types/types.go @@ -245,7 +245,7 @@ type BatchChannelMemberships struct { // The ARN of the channel to which you're adding users. ChannelArn *string - // The details of a user. + // The identifier of the member who invited another member. InvitedBy *Identity // The users successfully added to the request. @@ -404,7 +404,7 @@ type ChannelMembership struct { // Summary of the channel membership details of an AppInstanceUser. type ChannelMembershipForAppInstanceUserSummary struct { - // Returns the channel membership data for an AppInstance. + // Summary of the membership details of an AppInstanceUser. AppInstanceUserMembershipSummary *AppInstanceUserMembershipSummary // Summary of the details of a Channel. @@ -674,7 +674,7 @@ type EngineTranscribeMedicalSettings struct { Type TranscribeMedicalType // The AWS Region passed to Amazon Transcribe Medical. If you don't specify a - // Region, Amazon Chime uses the Region closest to the meeting's Region. + // Region, Amazon Chime uses the meeting's Region. Region TranscribeMedicalRegion // The name of the vocabulary passed to Amazon Transcribe Medical. @@ -692,7 +692,7 @@ type EngineTranscribeSettings struct { LanguageCode TranscribeLanguageCode // The AWS Region passed to Amazon Transcribe. If you don't specify a Region, - // Amazon Chime uses the Region closest to the meeting's Region. + // Amazon Chime uses the meeting's Region. Region TranscribeRegion // The filtering method passed to Amazon Transcribe. diff --git a/service/chimesdkidentity/LICENSE.txt b/service/chimesdkidentity/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/chimesdkidentity/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/service/chimesdkidentity/api_client.go b/service/chimesdkidentity/api_client.go new file mode 100644 index 00000000000..a58c922df09 --- /dev/null +++ b/service/chimesdkidentity/api_client.go @@ -0,0 +1,282 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +import ( + "context" + cryptorand "crypto/rand" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "time" +) + +const ServiceID = "Chime SDK Identity" +const ServiceAPIVersion = "2021-04-20" + +// Client provides the API client to make operations call for Amazon Chime SDK +// Identity. +type Client struct { + options Options +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveDefaultEndpointConfiguration(&options) + + resolveIdempotencyTokenProvider(&options) + + for _, fn := range optFns { + fn(&options) + } + + client := &Client{ + options: options, + } + + return client +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + EndpointResolver EndpointResolver + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. + Retryer aws.Retryer + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// WithEndpointResolver returns a functional option for setting the Client's +// EndpointResolver option. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + return to +} +func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { + ctx = middleware.ClearStackValues(ctx) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + for _, fn := range optFns { + fn(&options) + } + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + if o.HTTPClient != nil { + return + } + o.HTTPClient = awshttp.NewBuildableClient() +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + o.Retryer = retry.NewStandard() +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "chimesdkidentity", goModuleVersion)(stack) +} + +func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { + mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ + CredentialsProvider: o.Credentials, + Signer: o.HTTPSignerV4, + LogSigning: o.ClientLogMode.IsSigning(), + }) + return stack.Finalize.Add(mw, middleware.After) +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + +func addRetryMiddlewares(stack *middleware.Stack, o Options) error { + mo := retry.AddRetryMiddlewaresOptions{ + Retryer: o.Retryer, + LogRetryAttempts: o.ClientLogMode.IsRetries(), + } + return retry.AddRetryMiddlewares(stack, mo) +} + +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return awshttp.AddResponseErrorMiddleware(stack) +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} diff --git a/service/chimesdkidentity/api_op_CreateAppInstance.go b/service/chimesdkidentity/api_op_CreateAppInstance.go new file mode 100644 index 00000000000..76e690dfaca --- /dev/null +++ b/service/chimesdkidentity/api_op_CreateAppInstance.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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/chimesdkidentity/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an Amazon Chime SDK messaging AppInstance under an AWS account. Only SDK +// messaging customers use this API. CreateAppInstance supports idempotency +// behavior as described in the AWS API Standard. identity +func (c *Client) CreateAppInstance(ctx context.Context, params *CreateAppInstanceInput, optFns ...func(*Options)) (*CreateAppInstanceOutput, error) { + if params == nil { + params = &CreateAppInstanceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAppInstance", params, optFns, c.addOperationCreateAppInstanceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAppInstanceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAppInstanceInput struct { + + // The ClientRequestToken of the AppInstance. + // + // This member is required. + ClientRequestToken *string + + // The name of the AppInstance. + // + // This member is required. + Name *string + + // The metadata of the AppInstance. Limited to a 1KB string in UTF-8. + Metadata *string + + // Tags assigned to the AppInstanceUser. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateAppInstanceOutput struct { + + // The Amazon Resource Number (ARN) of the AppInstance. + AppInstanceArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAppInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAppInstance{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAppInstance{}, 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_opCreateAppInstanceMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateAppInstanceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAppInstance(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_initializeOpCreateAppInstance struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateAppInstance) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateAppInstance) 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.(*CreateAppInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAppInstanceInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateAppInstanceMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAppInstance{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateAppInstance(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "CreateAppInstance", + } +} diff --git a/service/chimesdkidentity/api_op_CreateAppInstanceAdmin.go b/service/chimesdkidentity/api_op_CreateAppInstanceAdmin.go new file mode 100644 index 00000000000..60b678d9f88 --- /dev/null +++ b/service/chimesdkidentity/api_op_CreateAppInstanceAdmin.go @@ -0,0 +1,138 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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/chimesdkidentity/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Promotes an AppInstanceUser to an AppInstanceAdmin. The promoted user can +// perform the following actions. +// +// * ChannelModerator actions across all channels +// in the AppInstance. +// +// * DeleteChannelMessage actions. +// +// Only an AppInstanceUser +// can be promoted to an AppInstanceAdmin role. +func (c *Client) CreateAppInstanceAdmin(ctx context.Context, params *CreateAppInstanceAdminInput, optFns ...func(*Options)) (*CreateAppInstanceAdminOutput, error) { + if params == nil { + params = &CreateAppInstanceAdminInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAppInstanceAdmin", params, optFns, c.addOperationCreateAppInstanceAdminMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAppInstanceAdminOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAppInstanceAdminInput struct { + + // The ARN of the administrator of the current AppInstance. + // + // This member is required. + AppInstanceAdminArn *string + + // The ARN of the AppInstance. + // + // This member is required. + AppInstanceArn *string + + noSmithyDocumentSerde +} + +type CreateAppInstanceAdminOutput struct { + + // The name and ARN of the admin for the AppInstance. + AppInstanceAdmin *types.Identity + + // The ARN of the of the admin for the AppInstance. + AppInstanceArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAppInstanceAdminMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAppInstanceAdmin{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAppInstanceAdmin{}, 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 = addOpCreateAppInstanceAdminValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAppInstanceAdmin(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_opCreateAppInstanceAdmin(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "CreateAppInstanceAdmin", + } +} diff --git a/service/chimesdkidentity/api_op_CreateAppInstanceUser.go b/service/chimesdkidentity/api_op_CreateAppInstanceUser.go new file mode 100644 index 00000000000..d755ef0fbbc --- /dev/null +++ b/service/chimesdkidentity/api_op_CreateAppInstanceUser.go @@ -0,0 +1,180 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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/chimesdkidentity/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a user under an Amazon Chime AppInstance. The request consists of a +// unique appInstanceUserId and Name for that user. +func (c *Client) CreateAppInstanceUser(ctx context.Context, params *CreateAppInstanceUserInput, optFns ...func(*Options)) (*CreateAppInstanceUserOutput, error) { + if params == nil { + params = &CreateAppInstanceUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAppInstanceUser", params, optFns, c.addOperationCreateAppInstanceUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAppInstanceUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAppInstanceUserInput struct { + + // The ARN of the AppInstance request. + // + // This member is required. + AppInstanceArn *string + + // The user ID of the AppInstance. + // + // This member is required. + AppInstanceUserId *string + + // The token assigned to the user requesting an AppInstance. + // + // This member is required. + ClientRequestToken *string + + // The user's name. + // + // This member is required. + Name *string + + // The request's metadata. Limited to a 1KB string in UTF-8. + Metadata *string + + // Tags assigned to the AppInstanceUser. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateAppInstanceUserOutput struct { + + // The user's ARN. + AppInstanceUserArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAppInstanceUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAppInstanceUser{}, 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_opCreateAppInstanceUserMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateAppInstanceUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAppInstanceUser(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_initializeOpCreateAppInstanceUser struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateAppInstanceUser) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateAppInstanceUser) 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.(*CreateAppInstanceUserInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAppInstanceUserInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateAppInstanceUserMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAppInstanceUser{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "CreateAppInstanceUser", + } +} diff --git a/service/chimesdkidentity/api_op_DeleteAppInstance.go b/service/chimesdkidentity/api_op_DeleteAppInstance.go new file mode 100644 index 00000000000..df88e980547 --- /dev/null +++ b/service/chimesdkidentity/api_op_DeleteAppInstance.go @@ -0,0 +1,116 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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 an AppInstance and all associated data asynchronously. +func (c *Client) DeleteAppInstance(ctx context.Context, params *DeleteAppInstanceInput, optFns ...func(*Options)) (*DeleteAppInstanceOutput, error) { + if params == nil { + params = &DeleteAppInstanceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAppInstance", params, optFns, c.addOperationDeleteAppInstanceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAppInstanceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAppInstanceInput struct { + + // The ARN of the AppInstance. + // + // This member is required. + AppInstanceArn *string + + noSmithyDocumentSerde +} + +type DeleteAppInstanceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAppInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAppInstance{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAppInstance{}, 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 = addOpDeleteAppInstanceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAppInstance(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_opDeleteAppInstance(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DeleteAppInstance", + } +} diff --git a/service/chimesdkidentity/api_op_DeleteAppInstanceAdmin.go b/service/chimesdkidentity/api_op_DeleteAppInstanceAdmin.go new file mode 100644 index 00000000000..0c27986e30e --- /dev/null +++ b/service/chimesdkidentity/api_op_DeleteAppInstanceAdmin.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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" +) + +// Demotes an AppInstanceAdmin to an AppInstanceUser. This action does not delete +// the user. +func (c *Client) DeleteAppInstanceAdmin(ctx context.Context, params *DeleteAppInstanceAdminInput, optFns ...func(*Options)) (*DeleteAppInstanceAdminOutput, error) { + if params == nil { + params = &DeleteAppInstanceAdminInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAppInstanceAdmin", params, optFns, c.addOperationDeleteAppInstanceAdminMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAppInstanceAdminOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAppInstanceAdminInput struct { + + // The ARN of the AppInstance's administrator. + // + // This member is required. + AppInstanceAdminArn *string + + // The ARN of the AppInstance. + // + // This member is required. + AppInstanceArn *string + + noSmithyDocumentSerde +} + +type DeleteAppInstanceAdminOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAppInstanceAdminMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAppInstanceAdmin{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAppInstanceAdmin{}, 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 = addOpDeleteAppInstanceAdminValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAppInstanceAdmin(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_opDeleteAppInstanceAdmin(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DeleteAppInstanceAdmin", + } +} diff --git a/service/chimesdkidentity/api_op_DeleteAppInstanceUser.go b/service/chimesdkidentity/api_op_DeleteAppInstanceUser.go new file mode 100644 index 00000000000..41734b8e52f --- /dev/null +++ b/service/chimesdkidentity/api_op_DeleteAppInstanceUser.go @@ -0,0 +1,116 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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 an AppInstanceUser. +func (c *Client) DeleteAppInstanceUser(ctx context.Context, params *DeleteAppInstanceUserInput, optFns ...func(*Options)) (*DeleteAppInstanceUserOutput, error) { + if params == nil { + params = &DeleteAppInstanceUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAppInstanceUser", params, optFns, c.addOperationDeleteAppInstanceUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAppInstanceUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAppInstanceUserInput struct { + + // The ARN of the user request being deleted. + // + // This member is required. + AppInstanceUserArn *string + + noSmithyDocumentSerde +} + +type DeleteAppInstanceUserOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAppInstanceUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAppInstanceUser{}, 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 = addOpDeleteAppInstanceUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAppInstanceUser(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_opDeleteAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DeleteAppInstanceUser", + } +} diff --git a/service/chimesdkidentity/api_op_DescribeAppInstance.go b/service/chimesdkidentity/api_op_DescribeAppInstance.go new file mode 100644 index 00000000000..73664049f9e --- /dev/null +++ b/service/chimesdkidentity/api_op_DescribeAppInstance.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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/chimesdkidentity/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the full details of an AppInstance. +func (c *Client) DescribeAppInstance(ctx context.Context, params *DescribeAppInstanceInput, optFns ...func(*Options)) (*DescribeAppInstanceOutput, error) { + if params == nil { + params = &DescribeAppInstanceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAppInstance", params, optFns, c.addOperationDescribeAppInstanceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAppInstanceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAppInstanceInput struct { + + // The ARN of the AppInstance. + // + // This member is required. + AppInstanceArn *string + + noSmithyDocumentSerde +} + +type DescribeAppInstanceOutput struct { + + // The ARN, metadata, created and last-updated timestamps, and the name of the + // AppInstance. All timestamps use epoch milliseconds. + AppInstance *types.AppInstance + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAppInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAppInstance{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAppInstance{}, 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 = addOpDescribeAppInstanceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAppInstance(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_opDescribeAppInstance(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DescribeAppInstance", + } +} diff --git a/service/chimesdkidentity/api_op_DescribeAppInstanceAdmin.go b/service/chimesdkidentity/api_op_DescribeAppInstanceAdmin.go new file mode 100644 index 00000000000..5d7c763860f --- /dev/null +++ b/service/chimesdkidentity/api_op_DescribeAppInstanceAdmin.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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/chimesdkidentity/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the full details of an AppInstanceAdmin. +func (c *Client) DescribeAppInstanceAdmin(ctx context.Context, params *DescribeAppInstanceAdminInput, optFns ...func(*Options)) (*DescribeAppInstanceAdminOutput, error) { + if params == nil { + params = &DescribeAppInstanceAdminInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAppInstanceAdmin", params, optFns, c.addOperationDescribeAppInstanceAdminMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAppInstanceAdminOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAppInstanceAdminInput struct { + + // The ARN of the AppInstanceAdmin. + // + // This member is required. + AppInstanceAdminArn *string + + // The ARN of the AppInstance. + // + // This member is required. + AppInstanceArn *string + + noSmithyDocumentSerde +} + +type DescribeAppInstanceAdminOutput struct { + + // The ARN and name of the AppInstanceUser, the ARN of the AppInstance, and the + // created and last-updated timestamps. All timestamps use epoch milliseconds. + AppInstanceAdmin *types.AppInstanceAdmin + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAppInstanceAdminMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAppInstanceAdmin{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAppInstanceAdmin{}, 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 = addOpDescribeAppInstanceAdminValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAppInstanceAdmin(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_opDescribeAppInstanceAdmin(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DescribeAppInstanceAdmin", + } +} diff --git a/service/chimesdkidentity/api_op_DescribeAppInstanceUser.go b/service/chimesdkidentity/api_op_DescribeAppInstanceUser.go new file mode 100644 index 00000000000..42e08185a67 --- /dev/null +++ b/service/chimesdkidentity/api_op_DescribeAppInstanceUser.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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/chimesdkidentity/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the full details of an AppInstanceUser. +func (c *Client) DescribeAppInstanceUser(ctx context.Context, params *DescribeAppInstanceUserInput, optFns ...func(*Options)) (*DescribeAppInstanceUserOutput, error) { + if params == nil { + params = &DescribeAppInstanceUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAppInstanceUser", params, optFns, c.addOperationDescribeAppInstanceUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAppInstanceUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAppInstanceUserInput struct { + + // The ARN of the AppInstanceUser. + // + // This member is required. + AppInstanceUserArn *string + + noSmithyDocumentSerde +} + +type DescribeAppInstanceUserOutput struct { + + // The name of the AppInstanceUser. + AppInstanceUser *types.AppInstanceUser + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAppInstanceUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAppInstanceUser{}, 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 = addOpDescribeAppInstanceUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAppInstanceUser(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_opDescribeAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DescribeAppInstanceUser", + } +} diff --git a/service/chimesdkidentity/api_op_GetAppInstanceRetentionSettings.go b/service/chimesdkidentity/api_op_GetAppInstanceRetentionSettings.go new file mode 100644 index 00000000000..f1c9bef4f5d --- /dev/null +++ b/service/chimesdkidentity/api_op_GetAppInstanceRetentionSettings.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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/chimesdkidentity/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Gets the retention settings for an AppInstance. +func (c *Client) GetAppInstanceRetentionSettings(ctx context.Context, params *GetAppInstanceRetentionSettingsInput, optFns ...func(*Options)) (*GetAppInstanceRetentionSettingsOutput, error) { + if params == nil { + params = &GetAppInstanceRetentionSettingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAppInstanceRetentionSettings", params, optFns, c.addOperationGetAppInstanceRetentionSettingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAppInstanceRetentionSettingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAppInstanceRetentionSettingsInput struct { + + // The ARN of the AppInstance. + // + // This member is required. + AppInstanceArn *string + + noSmithyDocumentSerde +} + +type GetAppInstanceRetentionSettingsOutput struct { + + // The retention settings for the AppInstance. + AppInstanceRetentionSettings *types.AppInstanceRetentionSettings + + // The timestamp representing the time at which the specified items are retained, + // in Epoch Seconds. + InitiateDeletionTimestamp *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAppInstanceRetentionSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAppInstanceRetentionSettings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAppInstanceRetentionSettings{}, 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 = addOpGetAppInstanceRetentionSettingsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAppInstanceRetentionSettings(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_opGetAppInstanceRetentionSettings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "GetAppInstanceRetentionSettings", + } +} diff --git a/service/chimesdkidentity/api_op_ListAppInstanceAdmins.go b/service/chimesdkidentity/api_op_ListAppInstanceAdmins.go new file mode 100644 index 00000000000..97c14cbd254 --- /dev/null +++ b/service/chimesdkidentity/api_op_ListAppInstanceAdmins.go @@ -0,0 +1,223 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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/chimesdkidentity/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of the administrators in the AppInstance. +func (c *Client) ListAppInstanceAdmins(ctx context.Context, params *ListAppInstanceAdminsInput, optFns ...func(*Options)) (*ListAppInstanceAdminsOutput, error) { + if params == nil { + params = &ListAppInstanceAdminsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAppInstanceAdmins", params, optFns, c.addOperationListAppInstanceAdminsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAppInstanceAdminsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAppInstanceAdminsInput struct { + + // The ARN of the AppInstance. + // + // This member is required. + AppInstanceArn *string + + // The maximum number of administrators that you want to return. + MaxResults *int32 + + // The token returned from previous API requests until the number of administrators + // is reached. + NextToken *string + + noSmithyDocumentSerde +} + +type ListAppInstanceAdminsOutput struct { + + // The information for each administrator. + AppInstanceAdmins []types.AppInstanceAdminSummary + + // The ARN of the AppInstance. + AppInstanceArn *string + + // The token returned from previous API requests until the number of administrators + // is reached. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAppInstanceAdminsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAppInstanceAdmins{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAppInstanceAdmins{}, 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 = addOpListAppInstanceAdminsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAppInstanceAdmins(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 +} + +// ListAppInstanceAdminsAPIClient is a client that implements the +// ListAppInstanceAdmins operation. +type ListAppInstanceAdminsAPIClient interface { + ListAppInstanceAdmins(context.Context, *ListAppInstanceAdminsInput, ...func(*Options)) (*ListAppInstanceAdminsOutput, error) +} + +var _ ListAppInstanceAdminsAPIClient = (*Client)(nil) + +// ListAppInstanceAdminsPaginatorOptions is the paginator options for +// ListAppInstanceAdmins +type ListAppInstanceAdminsPaginatorOptions struct { + // The maximum number of administrators that you want to return. + 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 +} + +// ListAppInstanceAdminsPaginator is a paginator for ListAppInstanceAdmins +type ListAppInstanceAdminsPaginator struct { + options ListAppInstanceAdminsPaginatorOptions + client ListAppInstanceAdminsAPIClient + params *ListAppInstanceAdminsInput + nextToken *string + firstPage bool +} + +// NewListAppInstanceAdminsPaginator returns a new ListAppInstanceAdminsPaginator +func NewListAppInstanceAdminsPaginator(client ListAppInstanceAdminsAPIClient, params *ListAppInstanceAdminsInput, optFns ...func(*ListAppInstanceAdminsPaginatorOptions)) *ListAppInstanceAdminsPaginator { + if params == nil { + params = &ListAppInstanceAdminsInput{} + } + + options := ListAppInstanceAdminsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAppInstanceAdminsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAppInstanceAdminsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListAppInstanceAdmins page. +func (p *ListAppInstanceAdminsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAppInstanceAdminsOutput, 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.ListAppInstanceAdmins(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_opListAppInstanceAdmins(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "ListAppInstanceAdmins", + } +} diff --git a/service/chimesdkidentity/api_op_ListAppInstanceUsers.go b/service/chimesdkidentity/api_op_ListAppInstanceUsers.go new file mode 100644 index 00000000000..9cb534f8602 --- /dev/null +++ b/service/chimesdkidentity/api_op_ListAppInstanceUsers.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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/chimesdkidentity/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List all AppInstanceUsers created under a single AppInstance. +func (c *Client) ListAppInstanceUsers(ctx context.Context, params *ListAppInstanceUsersInput, optFns ...func(*Options)) (*ListAppInstanceUsersOutput, error) { + if params == nil { + params = &ListAppInstanceUsersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAppInstanceUsers", params, optFns, c.addOperationListAppInstanceUsersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAppInstanceUsersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAppInstanceUsersInput struct { + + // The ARN of the AppInstance. + // + // This member is required. + AppInstanceArn *string + + // The maximum number of requests that you want returned. + MaxResults *int32 + + // The token passed by previous API calls until all requested users are returned. + NextToken *string + + noSmithyDocumentSerde +} + +type ListAppInstanceUsersOutput struct { + + // The ARN of the AppInstance. + AppInstanceArn *string + + // The information for each requested AppInstanceUser. + AppInstanceUsers []types.AppInstanceUserSummary + + // The token passed by previous API calls until all requested users are returned. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAppInstanceUsersMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAppInstanceUsers{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAppInstanceUsers{}, 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 = addOpListAppInstanceUsersValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAppInstanceUsers(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 +} + +// ListAppInstanceUsersAPIClient is a client that implements the +// ListAppInstanceUsers operation. +type ListAppInstanceUsersAPIClient interface { + ListAppInstanceUsers(context.Context, *ListAppInstanceUsersInput, ...func(*Options)) (*ListAppInstanceUsersOutput, error) +} + +var _ ListAppInstanceUsersAPIClient = (*Client)(nil) + +// ListAppInstanceUsersPaginatorOptions is the paginator options for +// ListAppInstanceUsers +type ListAppInstanceUsersPaginatorOptions struct { + // The maximum number of requests that you want returned. + 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 +} + +// ListAppInstanceUsersPaginator is a paginator for ListAppInstanceUsers +type ListAppInstanceUsersPaginator struct { + options ListAppInstanceUsersPaginatorOptions + client ListAppInstanceUsersAPIClient + params *ListAppInstanceUsersInput + nextToken *string + firstPage bool +} + +// NewListAppInstanceUsersPaginator returns a new ListAppInstanceUsersPaginator +func NewListAppInstanceUsersPaginator(client ListAppInstanceUsersAPIClient, params *ListAppInstanceUsersInput, optFns ...func(*ListAppInstanceUsersPaginatorOptions)) *ListAppInstanceUsersPaginator { + if params == nil { + params = &ListAppInstanceUsersInput{} + } + + options := ListAppInstanceUsersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAppInstanceUsersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAppInstanceUsersPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListAppInstanceUsers page. +func (p *ListAppInstanceUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAppInstanceUsersOutput, 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.ListAppInstanceUsers(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_opListAppInstanceUsers(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "ListAppInstanceUsers", + } +} diff --git a/service/chimesdkidentity/api_op_ListAppInstances.go b/service/chimesdkidentity/api_op_ListAppInstances.go new file mode 100644 index 00000000000..bd252aae2c0 --- /dev/null +++ b/service/chimesdkidentity/api_op_ListAppInstances.go @@ -0,0 +1,211 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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/chimesdkidentity/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all Amazon Chime AppInstances created under a single AWS account. +func (c *Client) ListAppInstances(ctx context.Context, params *ListAppInstancesInput, optFns ...func(*Options)) (*ListAppInstancesOutput, error) { + if params == nil { + params = &ListAppInstancesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAppInstances", params, optFns, c.addOperationListAppInstancesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAppInstancesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAppInstancesInput struct { + + // The maximum number of AppInstances that you want to return. + MaxResults *int32 + + // The token passed by previous API requests until you reach the maximum number of + // AppInstances. + NextToken *string + + noSmithyDocumentSerde +} + +type ListAppInstancesOutput struct { + + // The information for each AppInstance. + AppInstances []types.AppInstanceSummary + + // The token passed by previous API requests until the maximum number of + // AppInstances is reached. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAppInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAppInstances{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAppInstances{}, 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_opListAppInstances(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 +} + +// ListAppInstancesAPIClient is a client that implements the ListAppInstances +// operation. +type ListAppInstancesAPIClient interface { + ListAppInstances(context.Context, *ListAppInstancesInput, ...func(*Options)) (*ListAppInstancesOutput, error) +} + +var _ ListAppInstancesAPIClient = (*Client)(nil) + +// ListAppInstancesPaginatorOptions is the paginator options for ListAppInstances +type ListAppInstancesPaginatorOptions struct { + // The maximum number of AppInstances that you want to return. + 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 +} + +// ListAppInstancesPaginator is a paginator for ListAppInstances +type ListAppInstancesPaginator struct { + options ListAppInstancesPaginatorOptions + client ListAppInstancesAPIClient + params *ListAppInstancesInput + nextToken *string + firstPage bool +} + +// NewListAppInstancesPaginator returns a new ListAppInstancesPaginator +func NewListAppInstancesPaginator(client ListAppInstancesAPIClient, params *ListAppInstancesInput, optFns ...func(*ListAppInstancesPaginatorOptions)) *ListAppInstancesPaginator { + if params == nil { + params = &ListAppInstancesInput{} + } + + options := ListAppInstancesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAppInstancesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAppInstancesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListAppInstances page. +func (p *ListAppInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAppInstancesOutput, 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.ListAppInstances(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_opListAppInstances(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "ListAppInstances", + } +} diff --git a/service/chimesdkidentity/api_op_PutAppInstanceRetentionSettings.go b/service/chimesdkidentity/api_op_PutAppInstanceRetentionSettings.go new file mode 100644 index 00000000000..13f2133d459 --- /dev/null +++ b/service/chimesdkidentity/api_op_PutAppInstanceRetentionSettings.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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/chimesdkidentity/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Sets the amount of time in days that a given AppInstance retains data. +func (c *Client) PutAppInstanceRetentionSettings(ctx context.Context, params *PutAppInstanceRetentionSettingsInput, optFns ...func(*Options)) (*PutAppInstanceRetentionSettingsOutput, error) { + if params == nil { + params = &PutAppInstanceRetentionSettingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutAppInstanceRetentionSettings", params, optFns, c.addOperationPutAppInstanceRetentionSettingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutAppInstanceRetentionSettingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutAppInstanceRetentionSettingsInput struct { + + // The ARN of the AppInstance. + // + // This member is required. + AppInstanceArn *string + + // The time in days to retain data. Data type: number. + // + // This member is required. + AppInstanceRetentionSettings *types.AppInstanceRetentionSettings + + noSmithyDocumentSerde +} + +type PutAppInstanceRetentionSettingsOutput struct { + + // The time in days to retain data. Data type: number. + AppInstanceRetentionSettings *types.AppInstanceRetentionSettings + + // The time at which the API deletes data. + InitiateDeletionTimestamp *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutAppInstanceRetentionSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutAppInstanceRetentionSettings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutAppInstanceRetentionSettings{}, 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 = addOpPutAppInstanceRetentionSettingsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAppInstanceRetentionSettings(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_opPutAppInstanceRetentionSettings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "PutAppInstanceRetentionSettings", + } +} diff --git a/service/chimesdkidentity/api_op_UpdateAppInstance.go b/service/chimesdkidentity/api_op_UpdateAppInstance.go new file mode 100644 index 00000000000..e217e4af837 --- /dev/null +++ b/service/chimesdkidentity/api_op_UpdateAppInstance.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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" +) + +// Updates AppInstance metadata. +func (c *Client) UpdateAppInstance(ctx context.Context, params *UpdateAppInstanceInput, optFns ...func(*Options)) (*UpdateAppInstanceOutput, error) { + if params == nil { + params = &UpdateAppInstanceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAppInstance", params, optFns, c.addOperationUpdateAppInstanceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAppInstanceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAppInstanceInput struct { + + // The ARN of the AppInstance. + // + // This member is required. + AppInstanceArn *string + + // The metadata that you want to change. + // + // This member is required. + Metadata *string + + // The name that you want to change. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type UpdateAppInstanceOutput struct { + + // The ARN of the AppInstance. + AppInstanceArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAppInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAppInstance{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAppInstance{}, 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 = addOpUpdateAppInstanceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAppInstance(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_opUpdateAppInstance(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "UpdateAppInstance", + } +} diff --git a/service/chimesdkidentity/api_op_UpdateAppInstanceUser.go b/service/chimesdkidentity/api_op_UpdateAppInstanceUser.go new file mode 100644 index 00000000000..c7e9a0ba900 --- /dev/null +++ b/service/chimesdkidentity/api_op_UpdateAppInstanceUser.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +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" +) + +// Updates the details of an AppInstanceUser. You can update names and metadata. +func (c *Client) UpdateAppInstanceUser(ctx context.Context, params *UpdateAppInstanceUserInput, optFns ...func(*Options)) (*UpdateAppInstanceUserOutput, error) { + if params == nil { + params = &UpdateAppInstanceUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAppInstanceUser", params, optFns, c.addOperationUpdateAppInstanceUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAppInstanceUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAppInstanceUserInput struct { + + // The ARN of the AppInstanceUser. + // + // This member is required. + AppInstanceUserArn *string + + // The metadata of the AppInstanceUser. + // + // This member is required. + Metadata *string + + // The name of the AppInstanceUser. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type UpdateAppInstanceUserOutput struct { + + // The ARN of the AppInstanceUser. + AppInstanceUserArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAppInstanceUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAppInstanceUser{}, 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 = addOpUpdateAppInstanceUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAppInstanceUser(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_opUpdateAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "UpdateAppInstanceUser", + } +} diff --git a/service/chimesdkidentity/deserializers.go b/service/chimesdkidentity/deserializers.go new file mode 100644 index 00000000000..d0c531011f6 --- /dev/null +++ b/service/chimesdkidentity/deserializers.go @@ -0,0 +1,3890 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/chimesdkidentity/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "strings" +) + +type awsRestjson1_deserializeOpCreateAppInstance struct { +} + +func (*awsRestjson1_deserializeOpCreateAppInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateAppInstance) 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_deserializeOpErrorCreateAppInstance(response, &metadata) + } + output := &CreateAppInstanceOutput{} + 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_deserializeOpDocumentCreateAppInstanceOutput(&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_deserializeOpErrorCreateAppInstance(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateAppInstanceOutput(v **CreateAppInstanceOutput, 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 *CreateAppInstanceOutput + if *v == nil { + sv = &CreateAppInstanceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.AppInstanceArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateAppInstanceAdmin struct { +} + +func (*awsRestjson1_deserializeOpCreateAppInstanceAdmin) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateAppInstanceAdmin) 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_deserializeOpErrorCreateAppInstanceAdmin(response, &metadata) + } + output := &CreateAppInstanceAdminOutput{} + 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_deserializeOpDocumentCreateAppInstanceAdminOutput(&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_deserializeOpErrorCreateAppInstanceAdmin(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateAppInstanceAdminOutput(v **CreateAppInstanceAdminOutput, 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 *CreateAppInstanceAdminOutput + if *v == nil { + sv = &CreateAppInstanceAdminOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceAdmin": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.AppInstanceAdmin, value); err != nil { + return err + } + + case "AppInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.AppInstanceArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateAppInstanceUser struct { +} + +func (*awsRestjson1_deserializeOpCreateAppInstanceUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateAppInstanceUser) 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_deserializeOpErrorCreateAppInstanceUser(response, &metadata) + } + output := &CreateAppInstanceUserOutput{} + 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_deserializeOpDocumentCreateAppInstanceUserOutput(&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_deserializeOpErrorCreateAppInstanceUser(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateAppInstanceUserOutput(v **CreateAppInstanceUserOutput, 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 *CreateAppInstanceUserOutput + if *v == nil { + sv = &CreateAppInstanceUserOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceUserArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.AppInstanceUserArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteAppInstance struct { +} + +func (*awsRestjson1_deserializeOpDeleteAppInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteAppInstance) 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_deserializeOpErrorDeleteAppInstance(response, &metadata) + } + output := &DeleteAppInstanceOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteAppInstance(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteAppInstanceAdmin struct { +} + +func (*awsRestjson1_deserializeOpDeleteAppInstanceAdmin) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteAppInstanceAdmin) 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_deserializeOpErrorDeleteAppInstanceAdmin(response, &metadata) + } + output := &DeleteAppInstanceAdminOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteAppInstanceAdmin(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteAppInstanceUser struct { +} + +func (*awsRestjson1_deserializeOpDeleteAppInstanceUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteAppInstanceUser) 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_deserializeOpErrorDeleteAppInstanceUser(response, &metadata) + } + output := &DeleteAppInstanceUserOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteAppInstanceUser(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDescribeAppInstance struct { +} + +func (*awsRestjson1_deserializeOpDescribeAppInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeAppInstance) 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_deserializeOpErrorDescribeAppInstance(response, &metadata) + } + output := &DescribeAppInstanceOutput{} + 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_deserializeOpDocumentDescribeAppInstanceOutput(&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_deserializeOpErrorDescribeAppInstance(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeAppInstanceOutput(v **DescribeAppInstanceOutput, 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 *DescribeAppInstanceOutput + if *v == nil { + sv = &DescribeAppInstanceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstance": + if err := awsRestjson1_deserializeDocumentAppInstance(&sv.AppInstance, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeAppInstanceAdmin struct { +} + +func (*awsRestjson1_deserializeOpDescribeAppInstanceAdmin) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeAppInstanceAdmin) 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_deserializeOpErrorDescribeAppInstanceAdmin(response, &metadata) + } + output := &DescribeAppInstanceAdminOutput{} + 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_deserializeOpDocumentDescribeAppInstanceAdminOutput(&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_deserializeOpErrorDescribeAppInstanceAdmin(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeAppInstanceAdminOutput(v **DescribeAppInstanceAdminOutput, 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 *DescribeAppInstanceAdminOutput + if *v == nil { + sv = &DescribeAppInstanceAdminOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceAdmin": + if err := awsRestjson1_deserializeDocumentAppInstanceAdmin(&sv.AppInstanceAdmin, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeAppInstanceUser struct { +} + +func (*awsRestjson1_deserializeOpDescribeAppInstanceUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeAppInstanceUser) 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_deserializeOpErrorDescribeAppInstanceUser(response, &metadata) + } + output := &DescribeAppInstanceUserOutput{} + 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_deserializeOpDocumentDescribeAppInstanceUserOutput(&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_deserializeOpErrorDescribeAppInstanceUser(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeAppInstanceUserOutput(v **DescribeAppInstanceUserOutput, 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 *DescribeAppInstanceUserOutput + if *v == nil { + sv = &DescribeAppInstanceUserOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceUser": + if err := awsRestjson1_deserializeDocumentAppInstanceUser(&sv.AppInstanceUser, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetAppInstanceRetentionSettings struct { +} + +func (*awsRestjson1_deserializeOpGetAppInstanceRetentionSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetAppInstanceRetentionSettings) 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_deserializeOpErrorGetAppInstanceRetentionSettings(response, &metadata) + } + output := &GetAppInstanceRetentionSettingsOutput{} + 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_deserializeOpDocumentGetAppInstanceRetentionSettingsOutput(&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_deserializeOpErrorGetAppInstanceRetentionSettings(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetAppInstanceRetentionSettingsOutput(v **GetAppInstanceRetentionSettingsOutput, 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 *GetAppInstanceRetentionSettingsOutput + if *v == nil { + sv = &GetAppInstanceRetentionSettingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceRetentionSettings": + if err := awsRestjson1_deserializeDocumentAppInstanceRetentionSettings(&sv.AppInstanceRetentionSettings, value); err != nil { + return err + } + + case "InitiateDeletionTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.InitiateDeletionTimestamp = 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 +} + +type awsRestjson1_deserializeOpListAppInstanceAdmins struct { +} + +func (*awsRestjson1_deserializeOpListAppInstanceAdmins) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAppInstanceAdmins) 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_deserializeOpErrorListAppInstanceAdmins(response, &metadata) + } + output := &ListAppInstanceAdminsOutput{} + 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_deserializeOpDocumentListAppInstanceAdminsOutput(&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_deserializeOpErrorListAppInstanceAdmins(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListAppInstanceAdminsOutput(v **ListAppInstanceAdminsOutput, 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 *ListAppInstanceAdminsOutput + if *v == nil { + sv = &ListAppInstanceAdminsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceAdmins": + if err := awsRestjson1_deserializeDocumentAppInstanceAdminList(&sv.AppInstanceAdmins, value); err != nil { + return err + } + + case "AppInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.AppInstanceArn = ptr.String(jtv) + } + + 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListAppInstances struct { +} + +func (*awsRestjson1_deserializeOpListAppInstances) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAppInstances) 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_deserializeOpErrorListAppInstances(response, &metadata) + } + output := &ListAppInstancesOutput{} + 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_deserializeOpDocumentListAppInstancesOutput(&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_deserializeOpErrorListAppInstances(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListAppInstancesOutput(v **ListAppInstancesOutput, 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 *ListAppInstancesOutput + if *v == nil { + sv = &ListAppInstancesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstances": + if err := awsRestjson1_deserializeDocumentAppInstanceList(&sv.AppInstances, 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListAppInstanceUsers struct { +} + +func (*awsRestjson1_deserializeOpListAppInstanceUsers) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAppInstanceUsers) 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_deserializeOpErrorListAppInstanceUsers(response, &metadata) + } + output := &ListAppInstanceUsersOutput{} + 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_deserializeOpDocumentListAppInstanceUsersOutput(&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_deserializeOpErrorListAppInstanceUsers(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListAppInstanceUsersOutput(v **ListAppInstanceUsersOutput, 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 *ListAppInstanceUsersOutput + if *v == nil { + sv = &ListAppInstanceUsersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.AppInstanceArn = ptr.String(jtv) + } + + case "AppInstanceUsers": + if err := awsRestjson1_deserializeDocumentAppInstanceUserList(&sv.AppInstanceUsers, 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutAppInstanceRetentionSettings struct { +} + +func (*awsRestjson1_deserializeOpPutAppInstanceRetentionSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutAppInstanceRetentionSettings) 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_deserializeOpErrorPutAppInstanceRetentionSettings(response, &metadata) + } + output := &PutAppInstanceRetentionSettingsOutput{} + 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_deserializeOpDocumentPutAppInstanceRetentionSettingsOutput(&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_deserializeOpErrorPutAppInstanceRetentionSettings(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutAppInstanceRetentionSettingsOutput(v **PutAppInstanceRetentionSettingsOutput, 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 *PutAppInstanceRetentionSettingsOutput + if *v == nil { + sv = &PutAppInstanceRetentionSettingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceRetentionSettings": + if err := awsRestjson1_deserializeDocumentAppInstanceRetentionSettings(&sv.AppInstanceRetentionSettings, value); err != nil { + return err + } + + case "InitiateDeletionTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.InitiateDeletionTimestamp = 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 +} + +type awsRestjson1_deserializeOpUpdateAppInstance struct { +} + +func (*awsRestjson1_deserializeOpUpdateAppInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateAppInstance) 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_deserializeOpErrorUpdateAppInstance(response, &metadata) + } + output := &UpdateAppInstanceOutput{} + 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_deserializeOpDocumentUpdateAppInstanceOutput(&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_deserializeOpErrorUpdateAppInstance(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateAppInstanceOutput(v **UpdateAppInstanceOutput, 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 *UpdateAppInstanceOutput + if *v == nil { + sv = &UpdateAppInstanceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.AppInstanceArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateAppInstanceUser struct { +} + +func (*awsRestjson1_deserializeOpUpdateAppInstanceUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateAppInstanceUser) 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_deserializeOpErrorUpdateAppInstanceUser(response, &metadata) + } + output := &UpdateAppInstanceUserOutput{} + 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_deserializeOpDocumentUpdateAppInstanceUserOutput(&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_deserializeOpErrorUpdateAppInstanceUser(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateAppInstanceUserOutput(v **UpdateAppInstanceUserOutput, 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 *UpdateAppInstanceUserOutput + if *v == nil { + sv = &UpdateAppInstanceUserOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceUserArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.AppInstanceUserArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorBadRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.BadRequestException{} + 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_deserializeDocumentBadRequestException(&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_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + 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_deserializeDocumentConflictException(&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_deserializeErrorForbiddenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ForbiddenException{} + 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_deserializeDocumentForbiddenException(&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_deserializeErrorResourceLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceLimitExceededException{} + 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_deserializeDocumentResourceLimitExceededException(&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_deserializeErrorServiceFailureException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceFailureException{} + 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_deserializeDocumentServiceFailureException(&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_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceUnavailableException{} + 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_deserializeDocumentServiceUnavailableException(&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_deserializeErrorThrottledClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottledClientException{} + 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_deserializeDocumentThrottledClientException(&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_deserializeErrorUnauthorizedClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnauthorizedClientException{} + 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_deserializeDocumentUnauthorizedClientException(&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_deserializeDocumentAppInstance(v **types.AppInstance, 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.AppInstance + if *v == nil { + sv = &types.AppInstance{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.AppInstanceArn = ptr.String(jtv) + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastUpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Metadata": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) + } + sv.Metadata = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppInstanceAdmin(v **types.AppInstanceAdmin, 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.AppInstanceAdmin + if *v == nil { + sv = &types.AppInstanceAdmin{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Admin": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.Admin, value); err != nil { + return err + } + + case "AppInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.AppInstanceArn = ptr.String(jtv) + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = 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_deserializeDocumentAppInstanceAdminList(v *[]types.AppInstanceAdminSummary, 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.AppInstanceAdminSummary + if *v == nil { + cv = []types.AppInstanceAdminSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AppInstanceAdminSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentAppInstanceAdminSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAppInstanceAdminSummary(v **types.AppInstanceAdminSummary, 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.AppInstanceAdminSummary + if *v == nil { + sv = &types.AppInstanceAdminSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Admin": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.Admin, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppInstanceList(v *[]types.AppInstanceSummary, 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.AppInstanceSummary + if *v == nil { + cv = []types.AppInstanceSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AppInstanceSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentAppInstanceSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAppInstanceRetentionSettings(v **types.AppInstanceRetentionSettings, 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.AppInstanceRetentionSettings + if *v == nil { + sv = &types.AppInstanceRetentionSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelRetentionSettings": + if err := awsRestjson1_deserializeDocumentChannelRetentionSettings(&sv.ChannelRetentionSettings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppInstanceSummary(v **types.AppInstanceSummary, 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.AppInstanceSummary + if *v == nil { + sv = &types.AppInstanceSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.AppInstanceArn = ptr.String(jtv) + } + + case "Metadata": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) + } + sv.Metadata = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppInstanceUser(v **types.AppInstanceUser, 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.AppInstanceUser + if *v == nil { + sv = &types.AppInstanceUser{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceUserArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.AppInstanceUserArn = ptr.String(jtv) + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastUpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Metadata": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) + } + sv.Metadata = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppInstanceUserList(v *[]types.AppInstanceUserSummary, 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.AppInstanceUserSummary + if *v == nil { + cv = []types.AppInstanceUserSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AppInstanceUserSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentAppInstanceUserSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAppInstanceUserSummary(v **types.AppInstanceUserSummary, 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.AppInstanceUserSummary + if *v == nil { + sv = &types.AppInstanceUserSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceUserArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.AppInstanceUserArn = ptr.String(jtv) + } + + case "Metadata": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) + } + sv.Metadata = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestException, 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.BadRequestException + if *v == nil { + sv = &types.BadRequestException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentChannelRetentionSettings(v **types.ChannelRetentionSettings, 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.ChannelRetentionSettings + if *v == nil { + sv = &types.ChannelRetentionSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RetentionDays": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RetentionDays to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RetentionDays = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, 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.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentForbiddenException(v **types.ForbiddenException, 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.ForbiddenException + if *v == nil { + sv = &types.ForbiddenException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentIdentity(v **types.Identity, 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.Identity + if *v == nil { + sv = &types.Identity{} + } 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 ChimeArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_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 "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentServiceFailureException(v **types.ServiceFailureException, 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.ServiceFailureException + if *v == nil { + sv = &types.ServiceFailureException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, 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.ServiceUnavailableException + if *v == nil { + sv = &types.ServiceUnavailableException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentThrottledClientException(v **types.ThrottledClientException, 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.ThrottledClientException + if *v == nil { + sv = &types.ThrottledClientException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentUnauthorizedClientException(v **types.UnauthorizedClientException, 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.UnauthorizedClientException + if *v == nil { + sv = &types.UnauthorizedClientException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 +} diff --git a/service/chimesdkidentity/doc.go b/service/chimesdkidentity/doc.go new file mode 100644 index 00000000000..10533835d94 --- /dev/null +++ b/service/chimesdkidentity/doc.go @@ -0,0 +1,10 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package chimesdkidentity provides the API client, operations, and parameter +// types for Amazon Chime SDK Identity. +// +// The Amazon Chime SDK Identity APIs in this section allow software developers to +// create and manage unique instances of their messaging applications. These APIs +// provide the overarching framework for creating and sending messages. For more +// information about the identity APIs, refer to . +package chimesdkidentity diff --git a/service/chimesdkidentity/endpoints.go b/service/chimesdkidentity/endpoints.go new file mode 100644 index 00000000000..6047dc520f4 --- /dev/null +++ b/service/chimesdkidentity/endpoints.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/chimesdkidentity/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +func resolveDefaultEndpointConfiguration(o *Options) { + if o.EndpointResolver != nil { + return + } + o.EndpointResolver = NewDefaultEndpointResolver() +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), m.Options) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "chime" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolver + resolver EndpointResolver +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + if w.awsResolver == nil { + goto fallback + } + endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region) + if err == nil { + return endpoint, nil + } + + if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { + return endpoint, err + } + +fallback: + if w.resolver == nil { + return endpoint, fmt.Errorf("default endpoint resolver provided was nil") + } + return w.resolver.ResolveEndpoint(region, options) +} + +// withEndpointResolver returns an EndpointResolver that first delegates endpoint +// resolution to the awsResolver. If awsResolver returns aws.EndpointNotFoundError +// error, the resolver will use the the provided fallbackResolver for resolution. +// awsResolver and fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver { + return &wrappedEndpointResolver{ + awsResolver: awsResolver, + resolver: fallbackResolver, + } +} diff --git a/service/chimesdkidentity/generated.json b/service/chimesdkidentity/generated.json new file mode 100644 index 00000000000..c5335415da1 --- /dev/null +++ b/service/chimesdkidentity/generated.json @@ -0,0 +1,40 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_op_CreateAppInstance.go", + "api_op_CreateAppInstanceAdmin.go", + "api_op_CreateAppInstanceUser.go", + "api_op_DeleteAppInstance.go", + "api_op_DeleteAppInstanceAdmin.go", + "api_op_DeleteAppInstanceUser.go", + "api_op_DescribeAppInstance.go", + "api_op_DescribeAppInstanceAdmin.go", + "api_op_DescribeAppInstanceUser.go", + "api_op_GetAppInstanceRetentionSettings.go", + "api_op_ListAppInstanceAdmins.go", + "api_op_ListAppInstanceUsers.go", + "api_op_ListAppInstances.go", + "api_op_PutAppInstanceRetentionSettings.go", + "api_op_UpdateAppInstance.go", + "api_op_UpdateAppInstanceUser.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "protocol_test.go", + "serializers.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/chimesdkidentity", + "unstable": false +} diff --git a/service/chimesdkidentity/go.mod b/service/chimesdkidentity/go.mod new file mode 100644 index 00000000000..6d7ec078c25 --- /dev/null +++ b/service/chimesdkidentity/go.mod @@ -0,0 +1,10 @@ +module github.com/aws/aws-sdk-go-v2/service/chimesdkidentity + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.8.0 + github.com/aws/smithy-go v1.7.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/chimesdkidentity/go.sum b/service/chimesdkidentity/go.sum new file mode 100644 index 00000000000..1fe5ea17219 --- /dev/null +++ b/service/chimesdkidentity/go.sum @@ -0,0 +1,14 @@ +github.com/aws/smithy-go v1.7.0 h1:+cLHMRrDZvQ4wk+KuQ9yH6eEg6KZEJ9RI2IkDqnygCg= +github.com/aws/smithy-go v1.7.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/chimesdkidentity/go_module_metadata.go b/service/chimesdkidentity/go_module_metadata.go new file mode 100644 index 00000000000..0316e4a853f --- /dev/null +++ b/service/chimesdkidentity/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package chimesdkidentity + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/chimesdkidentity/internal/endpoints/endpoints.go b/service/chimesdkidentity/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..9767a3c59f9 --- /dev/null +++ b/service/chimesdkidentity/internal/endpoints/endpoints.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + DisableHTTPS bool +} + +// Resolver Chime SDK Identity endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := endpoints.Options{ + DisableHTTPS: options.DisableHTTPS, + } + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: endpoints.Endpoint{ + Hostname: "identity-chime.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: endpoints.Endpoint{ + Hostname: "identity-chime.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: endpoints.Endpoint{ + Hostname: "identity-chime.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: endpoints.Endpoint{ + Hostname: "identity-chime.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: endpoints.Endpoint{ + Hostname: "identity-chime.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/chimesdkidentity/internal/endpoints/endpoints_test.go b/service/chimesdkidentity/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/chimesdkidentity/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/chimesdkidentity/protocol_test.go b/service/chimesdkidentity/protocol_test.go new file mode 100644 index 00000000000..263ae0e239c --- /dev/null +++ b/service/chimesdkidentity/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity diff --git a/service/chimesdkidentity/serializers.go b/service/chimesdkidentity/serializers.go new file mode 100644 index 00000000000..f1f3e31d488 --- /dev/null +++ b/service/chimesdkidentity/serializers.go @@ -0,0 +1,1195 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/chimesdkidentity/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +type awsRestjson1_serializeOpCreateAppInstance struct { +} + +func (*awsRestjson1_serializeOpCreateAppInstance) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateAppInstance) 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.(*CreateAppInstanceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances") + 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_serializeOpDocumentCreateAppInstanceInput(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_serializeOpHttpBindingsCreateAppInstanceInput(v *CreateAppInstanceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateAppInstanceInput(v *CreateAppInstanceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("ClientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.Metadata != nil { + ok := object.Key("Metadata") + ok.String(*v.Metadata) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateAppInstanceAdmin struct { +} + +func (*awsRestjson1_serializeOpCreateAppInstanceAdmin) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateAppInstanceAdmin) 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.(*CreateAppInstanceAdminInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/admins") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateAppInstanceAdminInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateAppInstanceAdminInput(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_serializeOpHttpBindingsCreateAppInstanceAdminInput(v *CreateAppInstanceAdminInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + } + if v.AppInstanceArn != nil { + if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateAppInstanceAdminInput(v *CreateAppInstanceAdminInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppInstanceAdminArn != nil { + ok := object.Key("AppInstanceAdminArn") + ok.String(*v.AppInstanceAdminArn) + } + + return nil +} + +type awsRestjson1_serializeOpCreateAppInstanceUser struct { +} + +func (*awsRestjson1_serializeOpCreateAppInstanceUser) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateAppInstanceUser) 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.(*CreateAppInstanceUserInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instance-users") + 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_serializeOpDocumentCreateAppInstanceUserInput(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_serializeOpHttpBindingsCreateAppInstanceUserInput(v *CreateAppInstanceUserInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateAppInstanceUserInput(v *CreateAppInstanceUserInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppInstanceArn != nil { + ok := object.Key("AppInstanceArn") + ok.String(*v.AppInstanceArn) + } + + if v.AppInstanceUserId != nil { + ok := object.Key("AppInstanceUserId") + ok.String(*v.AppInstanceUserId) + } + + if v.ClientRequestToken != nil { + ok := object.Key("ClientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.Metadata != nil { + ok := object.Key("Metadata") + ok.String(*v.Metadata) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteAppInstance struct { +} + +func (*awsRestjson1_serializeOpDeleteAppInstance) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteAppInstance) 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.(*DeleteAppInstanceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceInput(v *DeleteAppInstanceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + } + if v.AppInstanceArn != nil { + if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteAppInstanceAdmin struct { +} + +func (*awsRestjson1_serializeOpDeleteAppInstanceAdmin) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteAppInstanceAdmin) 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.(*DeleteAppInstanceAdminInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceAdminInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceAdminInput(v *DeleteAppInstanceAdminInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceAdminArn == nil || len(*v.AppInstanceAdminArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceAdminArn must not be empty")} + } + if v.AppInstanceAdminArn != nil { + if err := encoder.SetURI("AppInstanceAdminArn").String(*v.AppInstanceAdminArn); err != nil { + return err + } + } + + if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + } + if v.AppInstanceArn != nil { + if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteAppInstanceUser struct { +} + +func (*awsRestjson1_serializeOpDeleteAppInstanceUser) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteAppInstanceUser) 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.(*DeleteAppInstanceUserInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instance-users/{AppInstanceUserArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceUserInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceUserInput(v *DeleteAppInstanceUserInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceUserArn == nil || len(*v.AppInstanceUserArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceUserArn must not be empty")} + } + if v.AppInstanceUserArn != nil { + if err := encoder.SetURI("AppInstanceUserArn").String(*v.AppInstanceUserArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeAppInstance struct { +} + +func (*awsRestjson1_serializeOpDescribeAppInstance) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeAppInstance) 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.(*DescribeAppInstanceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeAppInstanceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeAppInstanceInput(v *DescribeAppInstanceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + } + if v.AppInstanceArn != nil { + if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeAppInstanceAdmin struct { +} + +func (*awsRestjson1_serializeOpDescribeAppInstanceAdmin) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeAppInstanceAdmin) 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.(*DescribeAppInstanceAdminInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeAppInstanceAdminInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeAppInstanceAdminInput(v *DescribeAppInstanceAdminInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceAdminArn == nil || len(*v.AppInstanceAdminArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceAdminArn must not be empty")} + } + if v.AppInstanceAdminArn != nil { + if err := encoder.SetURI("AppInstanceAdminArn").String(*v.AppInstanceAdminArn); err != nil { + return err + } + } + + if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + } + if v.AppInstanceArn != nil { + if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeAppInstanceUser struct { +} + +func (*awsRestjson1_serializeOpDescribeAppInstanceUser) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeAppInstanceUser) 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.(*DescribeAppInstanceUserInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instance-users/{AppInstanceUserArn}") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeAppInstanceUserInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeAppInstanceUserInput(v *DescribeAppInstanceUserInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceUserArn == nil || len(*v.AppInstanceUserArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceUserArn must not be empty")} + } + if v.AppInstanceUserArn != nil { + if err := encoder.SetURI("AppInstanceUserArn").String(*v.AppInstanceUserArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetAppInstanceRetentionSettings struct { +} + +func (*awsRestjson1_serializeOpGetAppInstanceRetentionSettings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetAppInstanceRetentionSettings) 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.(*GetAppInstanceRetentionSettingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/retention-settings") + 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 err := awsRestjson1_serializeOpHttpBindingsGetAppInstanceRetentionSettingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetAppInstanceRetentionSettingsInput(v *GetAppInstanceRetentionSettingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + } + if v.AppInstanceArn != nil { + if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListAppInstanceAdmins struct { +} + +func (*awsRestjson1_serializeOpListAppInstanceAdmins) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListAppInstanceAdmins) 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.(*ListAppInstanceAdminsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/admins") + 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 err := awsRestjson1_serializeOpHttpBindingsListAppInstanceAdminsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListAppInstanceAdminsInput(v *ListAppInstanceAdminsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + } + if v.AppInstanceArn != nil { + if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListAppInstances struct { +} + +func (*awsRestjson1_serializeOpListAppInstances) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListAppInstances) 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.(*ListAppInstancesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances") + 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 err := awsRestjson1_serializeOpHttpBindingsListAppInstancesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListAppInstancesInput(v *ListAppInstancesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListAppInstanceUsers struct { +} + +func (*awsRestjson1_serializeOpListAppInstanceUsers) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListAppInstanceUsers) 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.(*ListAppInstanceUsersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instance-users") + 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 err := awsRestjson1_serializeOpHttpBindingsListAppInstanceUsersInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListAppInstanceUsersInput(v *ListAppInstanceUsersInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceArn != nil { + encoder.SetQuery("app-instance-arn").String(*v.AppInstanceArn) + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpPutAppInstanceRetentionSettings struct { +} + +func (*awsRestjson1_serializeOpPutAppInstanceRetentionSettings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutAppInstanceRetentionSettings) 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.(*PutAppInstanceRetentionSettingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/retention-settings") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutAppInstanceRetentionSettingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutAppInstanceRetentionSettingsInput(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_serializeOpHttpBindingsPutAppInstanceRetentionSettingsInput(v *PutAppInstanceRetentionSettingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + } + if v.AppInstanceArn != nil { + if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutAppInstanceRetentionSettingsInput(v *PutAppInstanceRetentionSettingsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppInstanceRetentionSettings != nil { + ok := object.Key("AppInstanceRetentionSettings") + if err := awsRestjson1_serializeDocumentAppInstanceRetentionSettings(v.AppInstanceRetentionSettings, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateAppInstance struct { +} + +func (*awsRestjson1_serializeOpUpdateAppInstance) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateAppInstance) 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.(*UpdateAppInstanceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateAppInstanceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateAppInstanceInput(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_serializeOpHttpBindingsUpdateAppInstanceInput(v *UpdateAppInstanceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + } + if v.AppInstanceArn != nil { + if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateAppInstanceInput(v *UpdateAppInstanceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Metadata != nil { + ok := object.Key("Metadata") + ok.String(*v.Metadata) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateAppInstanceUser struct { +} + +func (*awsRestjson1_serializeOpUpdateAppInstanceUser) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateAppInstanceUser) 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.(*UpdateAppInstanceUserInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instance-users/{AppInstanceUserArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateAppInstanceUserInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateAppInstanceUserInput(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_serializeOpHttpBindingsUpdateAppInstanceUserInput(v *UpdateAppInstanceUserInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceUserArn == nil || len(*v.AppInstanceUserArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceUserArn must not be empty")} + } + if v.AppInstanceUserArn != nil { + if err := encoder.SetURI("AppInstanceUserArn").String(*v.AppInstanceUserArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateAppInstanceUserInput(v *UpdateAppInstanceUserInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Metadata != nil { + ok := object.Key("Metadata") + ok.String(*v.Metadata) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +func awsRestjson1_serializeDocumentAppInstanceRetentionSettings(v *types.AppInstanceRetentionSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ChannelRetentionSettings != nil { + ok := object.Key("ChannelRetentionSettings") + if err := awsRestjson1_serializeDocumentChannelRetentionSettings(v.ChannelRetentionSettings, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentChannelRetentionSettings(v *types.ChannelRetentionSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RetentionDays != nil { + ok := object.Key("RetentionDays") + ok.Integer(*v.RetentionDays) + } + + return nil +} + +func awsRestjson1_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentTag(&v[i], av); err != nil { + return err + } + } + return nil +} diff --git a/service/chimesdkidentity/types/enums.go b/service/chimesdkidentity/types/enums.go new file mode 100644 index 00000000000..720e875e4cf --- /dev/null +++ b/service/chimesdkidentity/types/enums.go @@ -0,0 +1,47 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type ErrorCode string + +// Enum values for ErrorCode +const ( + ErrorCodeBadRequest ErrorCode = "BadRequest" + ErrorCodeConflict ErrorCode = "Conflict" + ErrorCodeForbidden ErrorCode = "Forbidden" + ErrorCodeNotFound ErrorCode = "NotFound" + ErrorCodePreconditionFailed ErrorCode = "PreconditionFailed" + ErrorCodeResourceLimitExceeded ErrorCode = "ResourceLimitExceeded" + ErrorCodeServiceFailure ErrorCode = "ServiceFailure" + ErrorCodeAccessDenied ErrorCode = "AccessDenied" + ErrorCodeServiceUnavailable ErrorCode = "ServiceUnavailable" + ErrorCodeThrottled ErrorCode = "Throttled" + ErrorCodeThrottling ErrorCode = "Throttling" + ErrorCodeUnauthorized ErrorCode = "Unauthorized" + ErrorCodeUnprocessable ErrorCode = "Unprocessable" + ErrorCodeVoiceConnectorGroupAssociationsExist ErrorCode = "VoiceConnectorGroupAssociationsExist" + ErrorCodePhoneNumberAssociationsExist ErrorCode = "PhoneNumberAssociationsExist" +) + +// Values returns all known values for ErrorCode. 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 (ErrorCode) Values() []ErrorCode { + return []ErrorCode{ + "BadRequest", + "Conflict", + "Forbidden", + "NotFound", + "PreconditionFailed", + "ResourceLimitExceeded", + "ServiceFailure", + "AccessDenied", + "ServiceUnavailable", + "Throttled", + "Throttling", + "Unauthorized", + "Unprocessable", + "VoiceConnectorGroupAssociationsExist", + "PhoneNumberAssociationsExist", + } +} diff --git a/service/chimesdkidentity/types/errors.go b/service/chimesdkidentity/types/errors.go new file mode 100644 index 00000000000..479d24197d3 --- /dev/null +++ b/service/chimesdkidentity/types/errors.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// The input parameters don't match the service's restrictions. +type BadRequestException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *BadRequestException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *BadRequestException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *BadRequestException) ErrorCode() string { return "BadRequestException" } +func (e *BadRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request could not be processed because of conflict in the current state of +// the resource. +type ConflictException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { return "ConflictException" } +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The client is permanently forbidden from making the request. +type ForbiddenException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *ForbiddenException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ForbiddenException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ForbiddenException) ErrorCode() string { return "ForbiddenException" } +func (e *ForbiddenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request exceeds the resource limit. +type ResourceLimitExceededException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *ResourceLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceLimitExceededException) ErrorCode() string { return "ResourceLimitExceededException" } +func (e *ResourceLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The service encountered an unexpected error. +type ServiceFailureException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *ServiceFailureException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceFailureException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceFailureException) ErrorCode() string { return "ServiceFailureException" } +func (e *ServiceFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The service is currently unavailable. +type ServiceUnavailableException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *ServiceUnavailableException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceUnavailableException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceUnavailableException) ErrorCode() string { return "ServiceUnavailableException" } +func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The client exceeded its request rate limit. +type ThrottledClientException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *ThrottledClientException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottledClientException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottledClientException) ErrorCode() string { return "ThrottledClientException" } +func (e *ThrottledClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The client is not currently authorized to make the request. +type UnauthorizedClientException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *UnauthorizedClientException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnauthorizedClientException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnauthorizedClientException) ErrorCode() string { return "UnauthorizedClientException" } +func (e *UnauthorizedClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/chimesdkidentity/types/types.go b/service/chimesdkidentity/types/types.go new file mode 100644 index 00000000000..bf69e5f45d7 --- /dev/null +++ b/service/chimesdkidentity/types/types.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// The details of an AppInstance, an instance of an Amazon Chime SDK messaging +// application. +type AppInstance struct { + + // The ARN of the messaging instance. + AppInstanceArn *string + + // The time at which an AppInstance was created. In epoch milliseconds. + CreatedTimestamp *time.Time + + // The time an AppInstance was last updated. In epoch milliseconds. + LastUpdatedTimestamp *time.Time + + // The metadata of an AppInstance. + Metadata *string + + // The name of an AppInstance. + Name *string + + noSmithyDocumentSerde +} + +// The details of an AppInstanceAdmin. +type AppInstanceAdmin struct { + + // The AppInstanceAdmin data. + Admin *Identity + + // The ARN of the AppInstance for which the user is an administrator. + AppInstanceArn *string + + // The time at which an administrator was created. + CreatedTimestamp *time.Time + + noSmithyDocumentSerde +} + +// Summary of the details of an AppInstanceAdmin. +type AppInstanceAdminSummary struct { + + // The details of the AppInstanceAdmin. + Admin *Identity + + noSmithyDocumentSerde +} + +// The details of the data-retention settings for an AppInstance. +type AppInstanceRetentionSettings struct { + + // The length of time in days to retain the messages in a channel. + ChannelRetentionSettings *ChannelRetentionSettings + + noSmithyDocumentSerde +} + +// Summary of the data for an AppInstance. +type AppInstanceSummary struct { + + // The AppInstance ARN. + AppInstanceArn *string + + // The metadata of the AppInstance. + Metadata *string + + // The name of the AppInstance. + Name *string + + noSmithyDocumentSerde +} + +// The details of an AppInstanceUser. +type AppInstanceUser struct { + + // The ARN of the AppInstanceUser. + AppInstanceUserArn *string + + // The time at which the AppInstanceUser was created. + CreatedTimestamp *time.Time + + // The time at which the AppInstanceUser was last updated. + LastUpdatedTimestamp *time.Time + + // The metadata of the AppInstanceUser. + Metadata *string + + // The name of the AppInstanceUser. + Name *string + + noSmithyDocumentSerde +} + +// Summary of the details of an AppInstanceUser. +type AppInstanceUserSummary struct { + + // The ARN of the AppInstanceUser. + AppInstanceUserArn *string + + // The metadata of the AppInstanceUser. + Metadata *string + + // The name of an AppInstanceUser. + Name *string + + noSmithyDocumentSerde +} + +// The details of the retention settings for a channel. +type ChannelRetentionSettings struct { + + // The time in days to retain the messages in a channel. + RetentionDays *int32 + + noSmithyDocumentSerde +} + +// The details of a user. +type Identity struct { + + // The ARN in an Identity. + Arn *string + + // The name in an Identity. + Name *string + + noSmithyDocumentSerde +} + +// Describes a tag applied to a resource. +type Tag struct { + + // The key of the tag. + // + // This member is required. + Key *string + + // The value of the tag. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/chimesdkidentity/validators.go b/service/chimesdkidentity/validators.go new file mode 100644 index 00000000000..07cc5a4c868 --- /dev/null +++ b/service/chimesdkidentity/validators.go @@ -0,0 +1,677 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkidentity + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/chimesdkidentity/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpCreateAppInstanceAdmin struct { +} + +func (*validateOpCreateAppInstanceAdmin) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAppInstanceAdmin) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAppInstanceAdminInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAppInstanceAdminInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateAppInstance struct { +} + +func (*validateOpCreateAppInstance) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAppInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAppInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAppInstanceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateAppInstanceUser struct { +} + +func (*validateOpCreateAppInstanceUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAppInstanceUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAppInstanceUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteAppInstanceAdmin struct { +} + +func (*validateOpDeleteAppInstanceAdmin) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteAppInstanceAdmin) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteAppInstanceAdminInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteAppInstanceAdminInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteAppInstance struct { +} + +func (*validateOpDeleteAppInstance) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteAppInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteAppInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteAppInstanceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteAppInstanceUser struct { +} + +func (*validateOpDeleteAppInstanceUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteAppInstanceUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteAppInstanceUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeAppInstanceAdmin struct { +} + +func (*validateOpDescribeAppInstanceAdmin) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeAppInstanceAdmin) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeAppInstanceAdminInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeAppInstanceAdminInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeAppInstance struct { +} + +func (*validateOpDescribeAppInstance) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeAppInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeAppInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeAppInstanceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeAppInstanceUser struct { +} + +func (*validateOpDescribeAppInstanceUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeAppInstanceUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeAppInstanceUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetAppInstanceRetentionSettings struct { +} + +func (*validateOpGetAppInstanceRetentionSettings) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAppInstanceRetentionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAppInstanceRetentionSettingsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAppInstanceRetentionSettingsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListAppInstanceAdmins struct { +} + +func (*validateOpListAppInstanceAdmins) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAppInstanceAdmins) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAppInstanceAdminsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAppInstanceAdminsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListAppInstanceUsers struct { +} + +func (*validateOpListAppInstanceUsers) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAppInstanceUsers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAppInstanceUsersInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAppInstanceUsersInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutAppInstanceRetentionSettings struct { +} + +func (*validateOpPutAppInstanceRetentionSettings) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutAppInstanceRetentionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutAppInstanceRetentionSettingsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutAppInstanceRetentionSettingsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateAppInstance struct { +} + +func (*validateOpUpdateAppInstance) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAppInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAppInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAppInstanceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateAppInstanceUser struct { +} + +func (*validateOpUpdateAppInstanceUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAppInstanceUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAppInstanceUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpCreateAppInstanceAdminValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAppInstanceAdmin{}, middleware.After) +} + +func addOpCreateAppInstanceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAppInstance{}, middleware.After) +} + +func addOpCreateAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAppInstanceUser{}, middleware.After) +} + +func addOpDeleteAppInstanceAdminValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAppInstanceAdmin{}, middleware.After) +} + +func addOpDeleteAppInstanceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAppInstance{}, middleware.After) +} + +func addOpDeleteAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAppInstanceUser{}, middleware.After) +} + +func addOpDescribeAppInstanceAdminValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeAppInstanceAdmin{}, middleware.After) +} + +func addOpDescribeAppInstanceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeAppInstance{}, middleware.After) +} + +func addOpDescribeAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeAppInstanceUser{}, middleware.After) +} + +func addOpGetAppInstanceRetentionSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAppInstanceRetentionSettings{}, middleware.After) +} + +func addOpListAppInstanceAdminsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAppInstanceAdmins{}, middleware.After) +} + +func addOpListAppInstanceUsersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAppInstanceUsers{}, middleware.After) +} + +func addOpPutAppInstanceRetentionSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutAppInstanceRetentionSettings{}, middleware.After) +} + +func addOpUpdateAppInstanceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAppInstance{}, middleware.After) +} + +func addOpUpdateAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAppInstanceUser{}, middleware.After) +} + +func validateTag(v *types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Tag"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTagList(v []types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagList"} + for i := range v { + if err := validateTag(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateAppInstanceAdminInput(v *CreateAppInstanceAdminInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAppInstanceAdminInput"} + if v.AppInstanceAdminArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceAdminArn")) + } + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateAppInstanceInput(v *CreateAppInstanceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAppInstanceInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.ClientRequestToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateAppInstanceUserInput(v *CreateAppInstanceUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAppInstanceUserInput"} + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if v.AppInstanceUserId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.ClientRequestToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteAppInstanceAdminInput(v *DeleteAppInstanceAdminInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAppInstanceAdminInput"} + if v.AppInstanceAdminArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceAdminArn")) + } + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteAppInstanceInput(v *DeleteAppInstanceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAppInstanceInput"} + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteAppInstanceUserInput(v *DeleteAppInstanceUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAppInstanceUserInput"} + if v.AppInstanceUserArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeAppInstanceAdminInput(v *DescribeAppInstanceAdminInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeAppInstanceAdminInput"} + if v.AppInstanceAdminArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceAdminArn")) + } + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeAppInstanceInput(v *DescribeAppInstanceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeAppInstanceInput"} + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeAppInstanceUserInput(v *DescribeAppInstanceUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeAppInstanceUserInput"} + if v.AppInstanceUserArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetAppInstanceRetentionSettingsInput(v *GetAppInstanceRetentionSettingsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAppInstanceRetentionSettingsInput"} + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListAppInstanceAdminsInput(v *ListAppInstanceAdminsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAppInstanceAdminsInput"} + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListAppInstanceUsersInput(v *ListAppInstanceUsersInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAppInstanceUsersInput"} + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutAppInstanceRetentionSettingsInput(v *PutAppInstanceRetentionSettingsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutAppInstanceRetentionSettingsInput"} + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if v.AppInstanceRetentionSettings == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceRetentionSettings")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateAppInstanceInput(v *UpdateAppInstanceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAppInstanceInput"} + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Metadata == nil { + invalidParams.Add(smithy.NewErrParamRequired("Metadata")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateAppInstanceUserInput(v *UpdateAppInstanceUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAppInstanceUserInput"} + if v.AppInstanceUserArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Metadata == nil { + invalidParams.Add(smithy.NewErrParamRequired("Metadata")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/chimesdkmessaging/LICENSE.txt b/service/chimesdkmessaging/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/chimesdkmessaging/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/service/chimesdkmessaging/api_client.go b/service/chimesdkmessaging/api_client.go new file mode 100644 index 00000000000..badd0e180a0 --- /dev/null +++ b/service/chimesdkmessaging/api_client.go @@ -0,0 +1,282 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +import ( + "context" + cryptorand "crypto/rand" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "time" +) + +const ServiceID = "Chime SDK Messaging" +const ServiceAPIVersion = "2021-05-15" + +// Client provides the API client to make operations call for Amazon Chime SDK +// Messaging. +type Client struct { + options Options +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveDefaultEndpointConfiguration(&options) + + resolveIdempotencyTokenProvider(&options) + + for _, fn := range optFns { + fn(&options) + } + + client := &Client{ + options: options, + } + + return client +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + EndpointResolver EndpointResolver + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. + Retryer aws.Retryer + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// WithEndpointResolver returns a functional option for setting the Client's +// EndpointResolver option. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + return to +} +func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { + ctx = middleware.ClearStackValues(ctx) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + for _, fn := range optFns { + fn(&options) + } + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + if o.HTTPClient != nil { + return + } + o.HTTPClient = awshttp.NewBuildableClient() +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + o.Retryer = retry.NewStandard() +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "chimesdkmessaging", goModuleVersion)(stack) +} + +func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { + mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ + CredentialsProvider: o.Credentials, + Signer: o.HTTPSignerV4, + LogSigning: o.ClientLogMode.IsSigning(), + }) + return stack.Finalize.Add(mw, middleware.After) +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + +func addRetryMiddlewares(stack *middleware.Stack, o Options) error { + mo := retry.AddRetryMiddlewaresOptions{ + Retryer: o.Retryer, + LogRetryAttempts: o.ClientLogMode.IsRetries(), + } + return retry.AddRetryMiddlewares(stack, mo) +} + +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return awshttp.AddResponseErrorMiddleware(stack) +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} diff --git a/service/chimesdkmessaging/api_op_BatchCreateChannelMembership.go b/service/chimesdkmessaging/api_op_BatchCreateChannelMembership.go new file mode 100644 index 00000000000..9f6001a9451 --- /dev/null +++ b/service/chimesdkmessaging/api_op_BatchCreateChannelMembership.go @@ -0,0 +1,141 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds a specified number of users to a channel. +func (c *Client) BatchCreateChannelMembership(ctx context.Context, params *BatchCreateChannelMembershipInput, optFns ...func(*Options)) (*BatchCreateChannelMembershipOutput, error) { + if params == nil { + params = &BatchCreateChannelMembershipInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchCreateChannelMembership", params, optFns, c.addOperationBatchCreateChannelMembershipMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchCreateChannelMembershipOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchCreateChannelMembershipInput struct { + + // The ARN of the channel to which you're adding users. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The ARNs of the members you want to add to the channel. + // + // This member is required. + MemberArns []string + + // The membership type of a user, DEFAULT or HIDDEN. Default members are always + // returned as part of ListChannelMemberships. Hidden members are only returned if + // the type filter in ListChannelMemberships equals HIDDEN. Otherwise hidden + // members are not returned. This is only supported by moderators. + Type types.ChannelMembershipType + + noSmithyDocumentSerde +} + +type BatchCreateChannelMembershipOutput struct { + + // The list of channel memberships in the response. + BatchChannelMemberships *types.BatchChannelMemberships + + // If the action fails for one or more of the memberships in the request, a list of + // the memberships is returned, along with error codes and error messages. + Errors []types.BatchCreateChannelMembershipError + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchCreateChannelMembershipMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchCreateChannelMembership{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchCreateChannelMembership{}, 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 = addOpBatchCreateChannelMembershipValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchCreateChannelMembership(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_opBatchCreateChannelMembership(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "BatchCreateChannelMembership", + } +} diff --git a/service/chimesdkmessaging/api_op_CreateChannel.go b/service/chimesdkmessaging/api_op_CreateChannel.go new file mode 100644 index 00000000000..1e50b451a77 --- /dev/null +++ b/service/chimesdkmessaging/api_op_CreateChannel.go @@ -0,0 +1,192 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a channel to which you can add users and send messages. Restriction: You +// can't change a channel's privacy. The x-amz-chime-bearer request header is +// mandatory. Use the AppInstanceUserArn of the user that makes the API call as the +// value in the header. +func (c *Client) CreateChannel(ctx context.Context, params *CreateChannelInput, optFns ...func(*Options)) (*CreateChannelOutput, error) { + if params == nil { + params = &CreateChannelInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateChannel", params, optFns, c.addOperationCreateChannelMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateChannelOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateChannelInput struct { + + // The ARN of the channel request. + // + // This member is required. + AppInstanceArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The client token for the request. An Idempotency token. + // + // This member is required. + ClientRequestToken *string + + // The name of the channel. + // + // This member is required. + Name *string + + // The metadata of the creation request. Limited to 1KB and UTF-8. + Metadata *string + + // The channel mode: UNRESTRICTED or RESTRICTED. Administrators, moderators, and + // channel members can add themselves and other members to unrestricted channels. + // Only administrators and moderators can add members to restricted channels. + Mode types.ChannelMode + + // The channel's privacy level: PUBLIC or PRIVATE. Private channels aren't + // discoverable by users outside the channel. Public channels are discoverable by + // anyone in the AppInstance. + Privacy types.ChannelPrivacy + + // The tags for the creation request. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateChannelOutput struct { + + // The ARN of the channel. + ChannelArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateChannel{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateChannel{}, 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_opCreateChannelMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateChannelValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChannel(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_initializeOpCreateChannel struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateChannel) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateChannel) 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.(*CreateChannelInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateChannelInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateChannelMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateChannel{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateChannel(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "CreateChannel", + } +} diff --git a/service/chimesdkmessaging/api_op_CreateChannelBan.go b/service/chimesdkmessaging/api_op_CreateChannelBan.go new file mode 100644 index 00000000000..04280c5cad8 --- /dev/null +++ b/service/chimesdkmessaging/api_op_CreateChannelBan.go @@ -0,0 +1,140 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Permanently bans a member from a channel. Moderators can't add banned members to +// a channel. To undo a ban, you first have to DeleteChannelBan, and then +// CreateChannelMembership. Bans are cleaned up when you delete users or channels. +// If you ban a user who is already part of a channel, that user is automatically +// kicked from the channel. The x-amz-chime-bearer request header is mandatory. Use +// the AppInstanceUserArn of the user that makes the API call as the value in the +// header. +func (c *Client) CreateChannelBan(ctx context.Context, params *CreateChannelBanInput, optFns ...func(*Options)) (*CreateChannelBanOutput, error) { + if params == nil { + params = &CreateChannelBanInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateChannelBan", params, optFns, c.addOperationCreateChannelBanMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateChannelBanOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateChannelBanInput struct { + + // The ARN of the ban request. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The ARN of the member being banned. + // + // This member is required. + MemberArn *string + + noSmithyDocumentSerde +} + +type CreateChannelBanOutput struct { + + // The ARN of the response to the ban request. + ChannelArn *string + + // The ChannelArn and BannedIdentity of the member in the ban response. + Member *types.Identity + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateChannelBanMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateChannelBan{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateChannelBan{}, 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 = addOpCreateChannelBanValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChannelBan(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_opCreateChannelBan(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "CreateChannelBan", + } +} diff --git a/service/chimesdkmessaging/api_op_CreateChannelMembership.go b/service/chimesdkmessaging/api_op_CreateChannelMembership.go new file mode 100644 index 00000000000..e0e82069a3e --- /dev/null +++ b/service/chimesdkmessaging/api_op_CreateChannelMembership.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds a user to a channel. The InvitedBy response field is derived from the +// request header. A channel member can: +// +// * List messages +// +// * Send messages +// +// * +// Receive messages +// +// * Edit their own messages +// +// * Leave the channel +// +// Privacy +// settings impact this action as follows: +// +// * Public Channels: You do not need to +// be a member to list messages, but you must be a member to send messages. +// +// * +// Private Channels: You must be a member to list or send messages. +// +// The +// x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of +// the user that makes the API call as the value in the header. +func (c *Client) CreateChannelMembership(ctx context.Context, params *CreateChannelMembershipInput, optFns ...func(*Options)) (*CreateChannelMembershipOutput, error) { + if params == nil { + params = &CreateChannelMembershipInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateChannelMembership", params, optFns, c.addOperationCreateChannelMembershipMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateChannelMembershipOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateChannelMembershipInput struct { + + // The ARN of the channel to which you're adding users. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The ARN of the member you want to add to the channel. + // + // This member is required. + MemberArn *string + + // The membership type of a user, DEFAULT or HIDDEN. Default members are always + // returned as part of ListChannelMemberships. Hidden members are only returned if + // the type filter in ListChannelMemberships equals HIDDEN. Otherwise hidden + // members are not returned. This is only supported by moderators. + // + // This member is required. + Type types.ChannelMembershipType + + noSmithyDocumentSerde +} + +type CreateChannelMembershipOutput struct { + + // The ARN of the channel. + ChannelArn *string + + // The ARN and metadata of the member being added. + Member *types.Identity + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateChannelMembershipMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateChannelMembership{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateChannelMembership{}, 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 = addOpCreateChannelMembershipValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChannelMembership(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_opCreateChannelMembership(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "CreateChannelMembership", + } +} diff --git a/service/chimesdkmessaging/api_op_CreateChannelModerator.go b/service/chimesdkmessaging/api_op_CreateChannelModerator.go new file mode 100644 index 00000000000..5a2a5b0c700 --- /dev/null +++ b/service/chimesdkmessaging/api_op_CreateChannelModerator.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new ChannelModerator. A channel moderator can: +// +// * Add and remove other +// members of the channel. +// +// * Add and remove other moderators of the channel. +// +// * +// Add and remove user bans for the channel. +// +// * Redact messages in the channel. +// +// * +// List messages in the channel. +// +// The x-amz-chime-bearer request header is +// mandatory. Use the AppInstanceUserArn of the user that makes the API call as the +// value in the header. +func (c *Client) CreateChannelModerator(ctx context.Context, params *CreateChannelModeratorInput, optFns ...func(*Options)) (*CreateChannelModeratorOutput, error) { + if params == nil { + params = &CreateChannelModeratorInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateChannelModerator", params, optFns, c.addOperationCreateChannelModeratorMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateChannelModeratorOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateChannelModeratorInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The ARN of the moderator. + // + // This member is required. + ChannelModeratorArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + noSmithyDocumentSerde +} + +type CreateChannelModeratorOutput struct { + + // The ARN of the channel. + ChannelArn *string + + // The ARNs of the channel and the moderator. + ChannelModerator *types.Identity + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateChannelModeratorMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateChannelModerator{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateChannelModerator{}, 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 = addOpCreateChannelModeratorValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChannelModerator(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_opCreateChannelModerator(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "CreateChannelModerator", + } +} diff --git a/service/chimesdkmessaging/api_op_DeleteChannel.go b/service/chimesdkmessaging/api_op_DeleteChannel.go new file mode 100644 index 00000000000..f5aed73c84d --- /dev/null +++ b/service/chimesdkmessaging/api_op_DeleteChannel.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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" +) + +// Immediately makes a channel and its memberships inaccessible and marks them for +// deletion. This is an irreversible process. The x-amz-chime-bearer request header +// is mandatory. Use the AppInstanceUserArn of the user that makes the API call as +// the value in the header. +func (c *Client) DeleteChannel(ctx context.Context, params *DeleteChannelInput, optFns ...func(*Options)) (*DeleteChannelOutput, error) { + if params == nil { + params = &DeleteChannelInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteChannel", params, optFns, c.addOperationDeleteChannelMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteChannelOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteChannelInput struct { + + // The ARN of the channel being deleted. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + noSmithyDocumentSerde +} + +type DeleteChannelOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannel{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannel{}, 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 = addOpDeleteChannelValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannel(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_opDeleteChannel(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DeleteChannel", + } +} diff --git a/service/chimesdkmessaging/api_op_DeleteChannelBan.go b/service/chimesdkmessaging/api_op_DeleteChannelBan.go new file mode 100644 index 00000000000..9c89c54f18a --- /dev/null +++ b/service/chimesdkmessaging/api_op_DeleteChannelBan.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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" +) + +// Removes a user from a channel's ban list. The x-amz-chime-bearer request header +// is mandatory. Use the AppInstanceUserArn of the user that makes the API call as +// the value in the header. +func (c *Client) DeleteChannelBan(ctx context.Context, params *DeleteChannelBanInput, optFns ...func(*Options)) (*DeleteChannelBanOutput, error) { + if params == nil { + params = &DeleteChannelBanInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteChannelBan", params, optFns, c.addOperationDeleteChannelBanMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteChannelBanOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteChannelBanInput struct { + + // The ARN of the channel from which the AppInstanceUser was banned. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The ARN of the AppInstanceUser that you want to reinstate. + // + // This member is required. + MemberArn *string + + noSmithyDocumentSerde +} + +type DeleteChannelBanOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteChannelBanMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannelBan{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannelBan{}, 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 = addOpDeleteChannelBanValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannelBan(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_opDeleteChannelBan(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DeleteChannelBan", + } +} diff --git a/service/chimesdkmessaging/api_op_DeleteChannelMembership.go b/service/chimesdkmessaging/api_op_DeleteChannelMembership.go new file mode 100644 index 00000000000..4e9ee526d0b --- /dev/null +++ b/service/chimesdkmessaging/api_op_DeleteChannelMembership.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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" +) + +// Removes a member from a channel. The x-amz-chime-bearer request header is +// mandatory. Use the AppInstanceUserArn of the user that makes the API call as the +// value in the header. +func (c *Client) DeleteChannelMembership(ctx context.Context, params *DeleteChannelMembershipInput, optFns ...func(*Options)) (*DeleteChannelMembershipOutput, error) { + if params == nil { + params = &DeleteChannelMembershipInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteChannelMembership", params, optFns, c.addOperationDeleteChannelMembershipMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteChannelMembershipOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteChannelMembershipInput struct { + + // The ARN of the channel from which you want to remove the user. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The ARN of the member that you're removing from the channel. + // + // This member is required. + MemberArn *string + + noSmithyDocumentSerde +} + +type DeleteChannelMembershipOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteChannelMembershipMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannelMembership{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannelMembership{}, 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 = addOpDeleteChannelMembershipValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannelMembership(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_opDeleteChannelMembership(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DeleteChannelMembership", + } +} diff --git a/service/chimesdkmessaging/api_op_DeleteChannelMessage.go b/service/chimesdkmessaging/api_op_DeleteChannelMessage.go new file mode 100644 index 00000000000..b6cf8770559 --- /dev/null +++ b/service/chimesdkmessaging/api_op_DeleteChannelMessage.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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 channel message. Only admins can perform this action. Deletion makes +// messages inaccessible immediately. A background process deletes any revisions +// created by UpdateChannelMessage. The x-amz-chime-bearer request header is +// mandatory. Use the AppInstanceUserArn of the user that makes the API call as the +// value in the header. +func (c *Client) DeleteChannelMessage(ctx context.Context, params *DeleteChannelMessageInput, optFns ...func(*Options)) (*DeleteChannelMessageOutput, error) { + if params == nil { + params = &DeleteChannelMessageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteChannelMessage", params, optFns, c.addOperationDeleteChannelMessageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteChannelMessageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteChannelMessageInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The ID of the message being deleted. + // + // This member is required. + MessageId *string + + noSmithyDocumentSerde +} + +type DeleteChannelMessageOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteChannelMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannelMessage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannelMessage{}, 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 = addOpDeleteChannelMessageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannelMessage(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_opDeleteChannelMessage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DeleteChannelMessage", + } +} diff --git a/service/chimesdkmessaging/api_op_DeleteChannelModerator.go b/service/chimesdkmessaging/api_op_DeleteChannelModerator.go new file mode 100644 index 00000000000..4c299e4b80a --- /dev/null +++ b/service/chimesdkmessaging/api_op_DeleteChannelModerator.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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 channel moderator. The x-amz-chime-bearer request header is mandatory. +// Use the AppInstanceUserArn of the user that makes the API call as the value in +// the header. +func (c *Client) DeleteChannelModerator(ctx context.Context, params *DeleteChannelModeratorInput, optFns ...func(*Options)) (*DeleteChannelModeratorOutput, error) { + if params == nil { + params = &DeleteChannelModeratorInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteChannelModerator", params, optFns, c.addOperationDeleteChannelModeratorMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteChannelModeratorOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteChannelModeratorInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The ARN of the moderator being deleted. + // + // This member is required. + ChannelModeratorArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + noSmithyDocumentSerde +} + +type DeleteChannelModeratorOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteChannelModeratorMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannelModerator{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannelModerator{}, 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 = addOpDeleteChannelModeratorValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannelModerator(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_opDeleteChannelModerator(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DeleteChannelModerator", + } +} diff --git a/service/chimesdkmessaging/api_op_DescribeChannel.go b/service/chimesdkmessaging/api_op_DescribeChannel.go new file mode 100644 index 00000000000..36f315899a7 --- /dev/null +++ b/service/chimesdkmessaging/api_op_DescribeChannel.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the full details of a channel in an Amazon Chime AppInstance. The +// x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of +// the user that makes the API call as the value in the header. +func (c *Client) DescribeChannel(ctx context.Context, params *DescribeChannelInput, optFns ...func(*Options)) (*DescribeChannelOutput, error) { + if params == nil { + params = &DescribeChannelInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeChannel", params, optFns, c.addOperationDescribeChannelMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeChannelOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeChannelInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + noSmithyDocumentSerde +} + +type DescribeChannelOutput struct { + + // The channel details. + Channel *types.Channel + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeChannel{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeChannel{}, 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 = addOpDescribeChannelValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChannel(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_opDescribeChannel(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DescribeChannel", + } +} diff --git a/service/chimesdkmessaging/api_op_DescribeChannelBan.go b/service/chimesdkmessaging/api_op_DescribeChannelBan.go new file mode 100644 index 00000000000..2d79d5b4f23 --- /dev/null +++ b/service/chimesdkmessaging/api_op_DescribeChannelBan.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the full details of a channel ban. The x-amz-chime-bearer request header +// is mandatory. Use the AppInstanceUserArn of the user that makes the API call as +// the value in the header. +func (c *Client) DescribeChannelBan(ctx context.Context, params *DescribeChannelBanInput, optFns ...func(*Options)) (*DescribeChannelBanOutput, error) { + if params == nil { + params = &DescribeChannelBanInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeChannelBan", params, optFns, c.addOperationDescribeChannelBanMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeChannelBanOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeChannelBanInput struct { + + // The ARN of the channel from which the user is banned. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The ARN of the member being banned. + // + // This member is required. + MemberArn *string + + noSmithyDocumentSerde +} + +type DescribeChannelBanOutput struct { + + // The details of the ban. + ChannelBan *types.ChannelBan + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeChannelBanMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeChannelBan{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeChannelBan{}, 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 = addOpDescribeChannelBanValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChannelBan(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_opDescribeChannelBan(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DescribeChannelBan", + } +} diff --git a/service/chimesdkmessaging/api_op_DescribeChannelMembership.go b/service/chimesdkmessaging/api_op_DescribeChannelMembership.go new file mode 100644 index 00000000000..77c97d697d1 --- /dev/null +++ b/service/chimesdkmessaging/api_op_DescribeChannelMembership.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the full details of a user's channel membership. The x-amz-chime-bearer +// request header is mandatory. Use the AppInstanceUserArn of the user that makes +// the API call as the value in the header. +func (c *Client) DescribeChannelMembership(ctx context.Context, params *DescribeChannelMembershipInput, optFns ...func(*Options)) (*DescribeChannelMembershipOutput, error) { + if params == nil { + params = &DescribeChannelMembershipInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeChannelMembership", params, optFns, c.addOperationDescribeChannelMembershipMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeChannelMembershipOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeChannelMembershipInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The ARN of the member. + // + // This member is required. + MemberArn *string + + noSmithyDocumentSerde +} + +type DescribeChannelMembershipOutput struct { + + // The details of the membership. + ChannelMembership *types.ChannelMembership + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeChannelMembershipMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeChannelMembership{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeChannelMembership{}, 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 = addOpDescribeChannelMembershipValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChannelMembership(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_opDescribeChannelMembership(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DescribeChannelMembership", + } +} diff --git a/service/chimesdkmessaging/api_op_DescribeChannelMembershipForAppInstanceUser.go b/service/chimesdkmessaging/api_op_DescribeChannelMembershipForAppInstanceUser.go new file mode 100644 index 00000000000..2ca4b6e010a --- /dev/null +++ b/service/chimesdkmessaging/api_op_DescribeChannelMembershipForAppInstanceUser.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the details of a channel based on the membership of the specified +// AppInstanceUser. The x-amz-chime-bearer request header is mandatory. Use the +// AppInstanceUserArn of the user that makes the API call as the value in the +// header. +func (c *Client) DescribeChannelMembershipForAppInstanceUser(ctx context.Context, params *DescribeChannelMembershipForAppInstanceUserInput, optFns ...func(*Options)) (*DescribeChannelMembershipForAppInstanceUserOutput, error) { + if params == nil { + params = &DescribeChannelMembershipForAppInstanceUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeChannelMembershipForAppInstanceUser", params, optFns, c.addOperationDescribeChannelMembershipForAppInstanceUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeChannelMembershipForAppInstanceUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeChannelMembershipForAppInstanceUserInput struct { + + // The ARN of the user in a channel. + // + // This member is required. + AppInstanceUserArn *string + + // The ARN of the channel to which the user belongs. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + noSmithyDocumentSerde +} + +type DescribeChannelMembershipForAppInstanceUserOutput struct { + + // The channel to which a user belongs. + ChannelMembership *types.ChannelMembershipForAppInstanceUserSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeChannelMembershipForAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeChannelMembershipForAppInstanceUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeChannelMembershipForAppInstanceUser{}, 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 = addOpDescribeChannelMembershipForAppInstanceUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChannelMembershipForAppInstanceUser(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_opDescribeChannelMembershipForAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DescribeChannelMembershipForAppInstanceUser", + } +} diff --git a/service/chimesdkmessaging/api_op_DescribeChannelModeratedByAppInstanceUser.go b/service/chimesdkmessaging/api_op_DescribeChannelModeratedByAppInstanceUser.go new file mode 100644 index 00000000000..a622e0dc0e3 --- /dev/null +++ b/service/chimesdkmessaging/api_op_DescribeChannelModeratedByAppInstanceUser.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the full details of a channel moderated by the specified +// AppInstanceUser. The x-amz-chime-bearer request header is mandatory. Use the +// AppInstanceUserArn of the user that makes the API call as the value in the +// header. +func (c *Client) DescribeChannelModeratedByAppInstanceUser(ctx context.Context, params *DescribeChannelModeratedByAppInstanceUserInput, optFns ...func(*Options)) (*DescribeChannelModeratedByAppInstanceUserOutput, error) { + if params == nil { + params = &DescribeChannelModeratedByAppInstanceUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeChannelModeratedByAppInstanceUser", params, optFns, c.addOperationDescribeChannelModeratedByAppInstanceUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeChannelModeratedByAppInstanceUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeChannelModeratedByAppInstanceUserInput struct { + + // The ARN of the AppInstanceUser in the moderated channel. + // + // This member is required. + AppInstanceUserArn *string + + // The ARN of the moderated channel. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + noSmithyDocumentSerde +} + +type DescribeChannelModeratedByAppInstanceUserOutput struct { + + // The moderated channel. + Channel *types.ChannelModeratedByAppInstanceUserSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeChannelModeratedByAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeChannelModeratedByAppInstanceUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeChannelModeratedByAppInstanceUser{}, 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 = addOpDescribeChannelModeratedByAppInstanceUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChannelModeratedByAppInstanceUser(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_opDescribeChannelModeratedByAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DescribeChannelModeratedByAppInstanceUser", + } +} diff --git a/service/chimesdkmessaging/api_op_DescribeChannelModerator.go b/service/chimesdkmessaging/api_op_DescribeChannelModerator.go new file mode 100644 index 00000000000..2982db27595 --- /dev/null +++ b/service/chimesdkmessaging/api_op_DescribeChannelModerator.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the full details of a single ChannelModerator. The x-amz-chime-bearer +// request header is mandatory. Use the AppInstanceUserArn of the user that makes +// the API call as the value in the header. +func (c *Client) DescribeChannelModerator(ctx context.Context, params *DescribeChannelModeratorInput, optFns ...func(*Options)) (*DescribeChannelModeratorOutput, error) { + if params == nil { + params = &DescribeChannelModeratorInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeChannelModerator", params, optFns, c.addOperationDescribeChannelModeratorMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeChannelModeratorOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeChannelModeratorInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The ARN of the channel moderator. + // + // This member is required. + ChannelModeratorArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + noSmithyDocumentSerde +} + +type DescribeChannelModeratorOutput struct { + + // The details of the channel moderator. + ChannelModerator *types.ChannelModerator + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeChannelModeratorMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeChannelModerator{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeChannelModerator{}, 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 = addOpDescribeChannelModeratorValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChannelModerator(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_opDescribeChannelModerator(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DescribeChannelModerator", + } +} diff --git a/service/chimesdkmessaging/api_op_GetChannelMessage.go b/service/chimesdkmessaging/api_op_GetChannelMessage.go new file mode 100644 index 00000000000..bf0ea4a5082 --- /dev/null +++ b/service/chimesdkmessaging/api_op_GetChannelMessage.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the full details of a channel message. The x-amz-chime-bearer request +// header is mandatory. Use the AppInstanceUserArn of the user that makes the API +// call as the value in the header. +func (c *Client) GetChannelMessage(ctx context.Context, params *GetChannelMessageInput, optFns ...func(*Options)) (*GetChannelMessageOutput, error) { + if params == nil { + params = &GetChannelMessageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetChannelMessage", params, optFns, c.addOperationGetChannelMessageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetChannelMessageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetChannelMessageInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The ID of the message. + // + // This member is required. + MessageId *string + + noSmithyDocumentSerde +} + +type GetChannelMessageOutput struct { + + // The details of and content in the message. + ChannelMessage *types.ChannelMessage + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetChannelMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetChannelMessage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetChannelMessage{}, 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 = addOpGetChannelMessageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChannelMessage(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_opGetChannelMessage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "GetChannelMessage", + } +} diff --git a/service/chimesdkmessaging/api_op_GetMessagingSessionEndpoint.go b/service/chimesdkmessaging/api_op_GetMessagingSessionEndpoint.go new file mode 100644 index 00000000000..75e7e6b75a7 --- /dev/null +++ b/service/chimesdkmessaging/api_op_GetMessagingSessionEndpoint.go @@ -0,0 +1,112 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The details of the endpoint for the messaging session. +func (c *Client) GetMessagingSessionEndpoint(ctx context.Context, params *GetMessagingSessionEndpointInput, optFns ...func(*Options)) (*GetMessagingSessionEndpointOutput, error) { + if params == nil { + params = &GetMessagingSessionEndpointInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMessagingSessionEndpoint", params, optFns, c.addOperationGetMessagingSessionEndpointMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMessagingSessionEndpointOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetMessagingSessionEndpointInput struct { + noSmithyDocumentSerde +} + +type GetMessagingSessionEndpointOutput struct { + + // The endpoint returned in the response. + Endpoint *types.MessagingSessionEndpoint + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMessagingSessionEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetMessagingSessionEndpoint{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetMessagingSessionEndpoint{}, 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_opGetMessagingSessionEndpoint(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_opGetMessagingSessionEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "GetMessagingSessionEndpoint", + } +} diff --git a/service/chimesdkmessaging/api_op_ListChannelBans.go b/service/chimesdkmessaging/api_op_ListChannelBans.go new file mode 100644 index 00000000000..0544bc36016 --- /dev/null +++ b/service/chimesdkmessaging/api_op_ListChannelBans.go @@ -0,0 +1,227 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the users banned from a particular channel. The x-amz-chime-bearer +// request header is mandatory. Use the AppInstanceUserArn of the user that makes +// the API call as the value in the header. +func (c *Client) ListChannelBans(ctx context.Context, params *ListChannelBansInput, optFns ...func(*Options)) (*ListChannelBansOutput, error) { + if params == nil { + params = &ListChannelBansInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListChannelBans", params, optFns, c.addOperationListChannelBansMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListChannelBansOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListChannelBansInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The maximum number of bans that you want returned. + MaxResults *int32 + + // The token passed by previous API calls until all requested bans are returned. + NextToken *string + + noSmithyDocumentSerde +} + +type ListChannelBansOutput struct { + + // The ARN of the channel. + ChannelArn *string + + // The information for each requested ban. + ChannelBans []types.ChannelBanSummary + + // The token passed by previous API calls until all requested bans are returned. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListChannelBansMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelBans{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelBans{}, 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 = addOpListChannelBansValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelBans(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 +} + +// ListChannelBansAPIClient is a client that implements the ListChannelBans +// operation. +type ListChannelBansAPIClient interface { + ListChannelBans(context.Context, *ListChannelBansInput, ...func(*Options)) (*ListChannelBansOutput, error) +} + +var _ ListChannelBansAPIClient = (*Client)(nil) + +// ListChannelBansPaginatorOptions is the paginator options for ListChannelBans +type ListChannelBansPaginatorOptions struct { + // The maximum number of bans that you want returned. + 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 +} + +// ListChannelBansPaginator is a paginator for ListChannelBans +type ListChannelBansPaginator struct { + options ListChannelBansPaginatorOptions + client ListChannelBansAPIClient + params *ListChannelBansInput + nextToken *string + firstPage bool +} + +// NewListChannelBansPaginator returns a new ListChannelBansPaginator +func NewListChannelBansPaginator(client ListChannelBansAPIClient, params *ListChannelBansInput, optFns ...func(*ListChannelBansPaginatorOptions)) *ListChannelBansPaginator { + if params == nil { + params = &ListChannelBansInput{} + } + + options := ListChannelBansPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListChannelBansPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListChannelBansPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListChannelBans page. +func (p *ListChannelBansPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelBansOutput, 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.ListChannelBans(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_opListChannelBans(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "ListChannelBans", + } +} diff --git a/service/chimesdkmessaging/api_op_ListChannelMemberships.go b/service/chimesdkmessaging/api_op_ListChannelMemberships.go new file mode 100644 index 00000000000..60281c7f429 --- /dev/null +++ b/service/chimesdkmessaging/api_op_ListChannelMemberships.go @@ -0,0 +1,236 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all channel memberships in a channel. The x-amz-chime-bearer request +// header is mandatory. Use the AppInstanceUserArn of the user that makes the API +// call as the value in the header. +func (c *Client) ListChannelMemberships(ctx context.Context, params *ListChannelMembershipsInput, optFns ...func(*Options)) (*ListChannelMembershipsOutput, error) { + if params == nil { + params = &ListChannelMembershipsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListChannelMemberships", params, optFns, c.addOperationListChannelMembershipsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListChannelMembershipsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListChannelMembershipsInput struct { + + // The maximum number of channel memberships that you want returned. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The maximum number of channel memberships that you want returned. + MaxResults *int32 + + // The token passed by previous API calls until all requested channel memberships + // are returned. + NextToken *string + + // The membership type of a user, DEFAULT or HIDDEN. Default members are always + // returned as part of ListChannelMemberships. Hidden members are only returned if + // the type filter in ListChannelMemberships equals HIDDEN. Otherwise hidden + // members are not returned. + Type types.ChannelMembershipType + + noSmithyDocumentSerde +} + +type ListChannelMembershipsOutput struct { + + // The ARN of the channel. + ChannelArn *string + + // The information for the requested channel memberships. + ChannelMemberships []types.ChannelMembershipSummary + + // The token passed by previous API calls until all requested channel memberships + // are returned. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListChannelMembershipsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelMemberships{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelMemberships{}, 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 = addOpListChannelMembershipsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelMemberships(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 +} + +// ListChannelMembershipsAPIClient is a client that implements the +// ListChannelMemberships operation. +type ListChannelMembershipsAPIClient interface { + ListChannelMemberships(context.Context, *ListChannelMembershipsInput, ...func(*Options)) (*ListChannelMembershipsOutput, error) +} + +var _ ListChannelMembershipsAPIClient = (*Client)(nil) + +// ListChannelMembershipsPaginatorOptions is the paginator options for +// ListChannelMemberships +type ListChannelMembershipsPaginatorOptions struct { + // The maximum number of channel memberships that you want returned. + 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 +} + +// ListChannelMembershipsPaginator is a paginator for ListChannelMemberships +type ListChannelMembershipsPaginator struct { + options ListChannelMembershipsPaginatorOptions + client ListChannelMembershipsAPIClient + params *ListChannelMembershipsInput + nextToken *string + firstPage bool +} + +// NewListChannelMembershipsPaginator returns a new ListChannelMembershipsPaginator +func NewListChannelMembershipsPaginator(client ListChannelMembershipsAPIClient, params *ListChannelMembershipsInput, optFns ...func(*ListChannelMembershipsPaginatorOptions)) *ListChannelMembershipsPaginator { + if params == nil { + params = &ListChannelMembershipsInput{} + } + + options := ListChannelMembershipsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListChannelMembershipsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListChannelMembershipsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListChannelMemberships page. +func (p *ListChannelMembershipsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelMembershipsOutput, 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.ListChannelMemberships(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_opListChannelMemberships(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "ListChannelMemberships", + } +} diff --git a/service/chimesdkmessaging/api_op_ListChannelMembershipsForAppInstanceUser.go b/service/chimesdkmessaging/api_op_ListChannelMembershipsForAppInstanceUser.go new file mode 100644 index 00000000000..a4137115006 --- /dev/null +++ b/service/chimesdkmessaging/api_op_ListChannelMembershipsForAppInstanceUser.go @@ -0,0 +1,227 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all channels that a particular AppInstanceUser is a part of. Only an +// AppInstanceAdmin can call the API with a user ARN that is not their own. The +// x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of +// the user that makes the API call as the value in the header. +func (c *Client) ListChannelMembershipsForAppInstanceUser(ctx context.Context, params *ListChannelMembershipsForAppInstanceUserInput, optFns ...func(*Options)) (*ListChannelMembershipsForAppInstanceUserOutput, error) { + if params == nil { + params = &ListChannelMembershipsForAppInstanceUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListChannelMembershipsForAppInstanceUser", params, optFns, c.addOperationListChannelMembershipsForAppInstanceUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListChannelMembershipsForAppInstanceUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListChannelMembershipsForAppInstanceUserInput struct { + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The ARN of the AppInstanceUsers + AppInstanceUserArn *string + + // The maximum number of users that you want returned. + MaxResults *int32 + + // The token returned from previous API requests until the number of channel + // memberships is reached. + NextToken *string + + noSmithyDocumentSerde +} + +type ListChannelMembershipsForAppInstanceUserOutput struct { + + // The token passed by previous API calls until all requested users are returned. + ChannelMemberships []types.ChannelMembershipForAppInstanceUserSummary + + // The token passed by previous API calls until all requested users are returned. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListChannelMembershipsForAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelMembershipsForAppInstanceUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelMembershipsForAppInstanceUser{}, 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 = addOpListChannelMembershipsForAppInstanceUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelMembershipsForAppInstanceUser(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 +} + +// ListChannelMembershipsForAppInstanceUserAPIClient is a client that implements +// the ListChannelMembershipsForAppInstanceUser operation. +type ListChannelMembershipsForAppInstanceUserAPIClient interface { + ListChannelMembershipsForAppInstanceUser(context.Context, *ListChannelMembershipsForAppInstanceUserInput, ...func(*Options)) (*ListChannelMembershipsForAppInstanceUserOutput, error) +} + +var _ ListChannelMembershipsForAppInstanceUserAPIClient = (*Client)(nil) + +// ListChannelMembershipsForAppInstanceUserPaginatorOptions is the paginator +// options for ListChannelMembershipsForAppInstanceUser +type ListChannelMembershipsForAppInstanceUserPaginatorOptions struct { + // The maximum number of users that you want returned. + 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 +} + +// ListChannelMembershipsForAppInstanceUserPaginator is a paginator for +// ListChannelMembershipsForAppInstanceUser +type ListChannelMembershipsForAppInstanceUserPaginator struct { + options ListChannelMembershipsForAppInstanceUserPaginatorOptions + client ListChannelMembershipsForAppInstanceUserAPIClient + params *ListChannelMembershipsForAppInstanceUserInput + nextToken *string + firstPage bool +} + +// NewListChannelMembershipsForAppInstanceUserPaginator returns a new +// ListChannelMembershipsForAppInstanceUserPaginator +func NewListChannelMembershipsForAppInstanceUserPaginator(client ListChannelMembershipsForAppInstanceUserAPIClient, params *ListChannelMembershipsForAppInstanceUserInput, optFns ...func(*ListChannelMembershipsForAppInstanceUserPaginatorOptions)) *ListChannelMembershipsForAppInstanceUserPaginator { + if params == nil { + params = &ListChannelMembershipsForAppInstanceUserInput{} + } + + options := ListChannelMembershipsForAppInstanceUserPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListChannelMembershipsForAppInstanceUserPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListChannelMembershipsForAppInstanceUserPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListChannelMembershipsForAppInstanceUser page. +func (p *ListChannelMembershipsForAppInstanceUserPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelMembershipsForAppInstanceUserOutput, 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.ListChannelMembershipsForAppInstanceUser(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_opListChannelMembershipsForAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "ListChannelMembershipsForAppInstanceUser", + } +} diff --git a/service/chimesdkmessaging/api_op_ListChannelMessages.go b/service/chimesdkmessaging/api_op_ListChannelMessages.go new file mode 100644 index 00000000000..085332dc871 --- /dev/null +++ b/service/chimesdkmessaging/api_op_ListChannelMessages.go @@ -0,0 +1,245 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// List all the messages in a channel. Returns a paginated list of ChannelMessages. +// By default, sorted by creation timestamp in descending order. Redacted messages +// appear in the results as empty, since they are only redacted, not deleted. +// Deleted messages do not appear in the results. This action always returns the +// latest version of an edited message. Also, the x-amz-chime-bearer request header +// is mandatory. Use the AppInstanceUserArn of the user that makes the API call as +// the value in the header. +func (c *Client) ListChannelMessages(ctx context.Context, params *ListChannelMessagesInput, optFns ...func(*Options)) (*ListChannelMessagesOutput, error) { + if params == nil { + params = &ListChannelMessagesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListChannelMessages", params, optFns, c.addOperationListChannelMessagesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListChannelMessagesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListChannelMessagesInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The maximum number of messages that you want returned. + MaxResults *int32 + + // The token passed by previous API calls until all requested messages are + // returned. + NextToken *string + + // The final or ending time stamp for your requested messages. + NotAfter *time.Time + + // The initial or starting time stamp for your requested messages. + NotBefore *time.Time + + // The order in which you want messages sorted. Default is Descending, based on + // time created. + SortOrder types.SortOrder + + noSmithyDocumentSerde +} + +type ListChannelMessagesOutput struct { + + // The ARN of the channel containing the requested messages. + ChannelArn *string + + // The information about, and content of, each requested message. + ChannelMessages []types.ChannelMessageSummary + + // The token passed by previous API calls until all requested messages are + // returned. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListChannelMessagesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelMessages{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelMessages{}, 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 = addOpListChannelMessagesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelMessages(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 +} + +// ListChannelMessagesAPIClient is a client that implements the ListChannelMessages +// operation. +type ListChannelMessagesAPIClient interface { + ListChannelMessages(context.Context, *ListChannelMessagesInput, ...func(*Options)) (*ListChannelMessagesOutput, error) +} + +var _ ListChannelMessagesAPIClient = (*Client)(nil) + +// ListChannelMessagesPaginatorOptions is the paginator options for +// ListChannelMessages +type ListChannelMessagesPaginatorOptions struct { + // The maximum number of messages that you want returned. + 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 +} + +// ListChannelMessagesPaginator is a paginator for ListChannelMessages +type ListChannelMessagesPaginator struct { + options ListChannelMessagesPaginatorOptions + client ListChannelMessagesAPIClient + params *ListChannelMessagesInput + nextToken *string + firstPage bool +} + +// NewListChannelMessagesPaginator returns a new ListChannelMessagesPaginator +func NewListChannelMessagesPaginator(client ListChannelMessagesAPIClient, params *ListChannelMessagesInput, optFns ...func(*ListChannelMessagesPaginatorOptions)) *ListChannelMessagesPaginator { + if params == nil { + params = &ListChannelMessagesInput{} + } + + options := ListChannelMessagesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListChannelMessagesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListChannelMessagesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListChannelMessages page. +func (p *ListChannelMessagesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelMessagesOutput, 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.ListChannelMessages(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_opListChannelMessages(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "ListChannelMessages", + } +} diff --git a/service/chimesdkmessaging/api_op_ListChannelModerators.go b/service/chimesdkmessaging/api_op_ListChannelModerators.go new file mode 100644 index 00000000000..fec212b93b4 --- /dev/null +++ b/service/chimesdkmessaging/api_op_ListChannelModerators.go @@ -0,0 +1,230 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the moderators for a channel. The x-amz-chime-bearer request header is +// mandatory. Use the AppInstanceUserArn of the user that makes the API call as the +// value in the header. +func (c *Client) ListChannelModerators(ctx context.Context, params *ListChannelModeratorsInput, optFns ...func(*Options)) (*ListChannelModeratorsOutput, error) { + if params == nil { + params = &ListChannelModeratorsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListChannelModerators", params, optFns, c.addOperationListChannelModeratorsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListChannelModeratorsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListChannelModeratorsInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The maximum number of moderators that you want returned. + MaxResults *int32 + + // The token passed by previous API calls until all requested moderators are + // returned. + NextToken *string + + noSmithyDocumentSerde +} + +type ListChannelModeratorsOutput struct { + + // The ARN of the channel. + ChannelArn *string + + // The information about and names of each moderator. + ChannelModerators []types.ChannelModeratorSummary + + // The token passed by previous API calls until all requested moderators are + // returned. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListChannelModeratorsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelModerators{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelModerators{}, 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 = addOpListChannelModeratorsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelModerators(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 +} + +// ListChannelModeratorsAPIClient is a client that implements the +// ListChannelModerators operation. +type ListChannelModeratorsAPIClient interface { + ListChannelModerators(context.Context, *ListChannelModeratorsInput, ...func(*Options)) (*ListChannelModeratorsOutput, error) +} + +var _ ListChannelModeratorsAPIClient = (*Client)(nil) + +// ListChannelModeratorsPaginatorOptions is the paginator options for +// ListChannelModerators +type ListChannelModeratorsPaginatorOptions struct { + // The maximum number of moderators that you want returned. + 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 +} + +// ListChannelModeratorsPaginator is a paginator for ListChannelModerators +type ListChannelModeratorsPaginator struct { + options ListChannelModeratorsPaginatorOptions + client ListChannelModeratorsAPIClient + params *ListChannelModeratorsInput + nextToken *string + firstPage bool +} + +// NewListChannelModeratorsPaginator returns a new ListChannelModeratorsPaginator +func NewListChannelModeratorsPaginator(client ListChannelModeratorsAPIClient, params *ListChannelModeratorsInput, optFns ...func(*ListChannelModeratorsPaginatorOptions)) *ListChannelModeratorsPaginator { + if params == nil { + params = &ListChannelModeratorsInput{} + } + + options := ListChannelModeratorsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListChannelModeratorsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListChannelModeratorsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListChannelModerators page. +func (p *ListChannelModeratorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelModeratorsOutput, 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.ListChannelModerators(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_opListChannelModerators(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "ListChannelModerators", + } +} diff --git a/service/chimesdkmessaging/api_op_ListChannels.go b/service/chimesdkmessaging/api_op_ListChannels.go new file mode 100644 index 00000000000..cd80a78599a --- /dev/null +++ b/service/chimesdkmessaging/api_op_ListChannels.go @@ -0,0 +1,239 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all Channels created under a single Chime App as a paginated list. You can +// specify filters to narrow results. Functionality & restrictions +// +// * Use privacy = +// PUBLIC to retrieve all public channels in the account. +// +// * Only an +// AppInstanceAdmin can set privacy = PRIVATE to list the private channels in an +// account. +// +// The x-amz-chime-bearer request header is mandatory. Use the +// AppInstanceUserArn of the user that makes the API call as the value in the +// header. +func (c *Client) ListChannels(ctx context.Context, params *ListChannelsInput, optFns ...func(*Options)) (*ListChannelsOutput, error) { + if params == nil { + params = &ListChannelsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListChannels", params, optFns, c.addOperationListChannelsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListChannelsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListChannelsInput struct { + + // The ARN of the AppInstance. + // + // This member is required. + AppInstanceArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The maximum number of channels that you want to return. + MaxResults *int32 + + // The token passed by previous API calls until all requested channels are + // returned. + NextToken *string + + // The privacy setting. PUBLIC retrieves all the public channels. PRIVATE retrieves + // private channels. Only an AppInstanceAdmin can retrieve private channels. + Privacy types.ChannelPrivacy + + noSmithyDocumentSerde +} + +type ListChannelsOutput struct { + + // The information about each channel. + Channels []types.ChannelSummary + + // The token returned from previous API requests until the number of channels is + // reached. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannels{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannels{}, 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 = addOpListChannelsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannels(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 +} + +// ListChannelsAPIClient is a client that implements the ListChannels operation. +type ListChannelsAPIClient interface { + ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) +} + +var _ ListChannelsAPIClient = (*Client)(nil) + +// ListChannelsPaginatorOptions is the paginator options for ListChannels +type ListChannelsPaginatorOptions struct { + // The maximum number of channels that you want to return. + 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 +} + +// ListChannelsPaginator is a paginator for ListChannels +type ListChannelsPaginator struct { + options ListChannelsPaginatorOptions + client ListChannelsAPIClient + params *ListChannelsInput + nextToken *string + firstPage bool +} + +// NewListChannelsPaginator returns a new ListChannelsPaginator +func NewListChannelsPaginator(client ListChannelsAPIClient, params *ListChannelsInput, optFns ...func(*ListChannelsPaginatorOptions)) *ListChannelsPaginator { + if params == nil { + params = &ListChannelsInput{} + } + + options := ListChannelsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListChannelsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListChannelsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListChannels page. +func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelsOutput, 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.ListChannels(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_opListChannels(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "ListChannels", + } +} diff --git a/service/chimesdkmessaging/api_op_ListChannelsModeratedByAppInstanceUser.go b/service/chimesdkmessaging/api_op_ListChannelsModeratedByAppInstanceUser.go new file mode 100644 index 00000000000..77cc40bd767 --- /dev/null +++ b/service/chimesdkmessaging/api_op_ListChannelsModeratedByAppInstanceUser.go @@ -0,0 +1,227 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// A list of the channels moderated by an AppInstanceUser. The x-amz-chime-bearer +// request header is mandatory. Use the AppInstanceUserArn of the user that makes +// the API call as the value in the header. +func (c *Client) ListChannelsModeratedByAppInstanceUser(ctx context.Context, params *ListChannelsModeratedByAppInstanceUserInput, optFns ...func(*Options)) (*ListChannelsModeratedByAppInstanceUserOutput, error) { + if params == nil { + params = &ListChannelsModeratedByAppInstanceUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListChannelsModeratedByAppInstanceUser", params, optFns, c.addOperationListChannelsModeratedByAppInstanceUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListChannelsModeratedByAppInstanceUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListChannelsModeratedByAppInstanceUserInput struct { + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The ARN of the user in the moderated channel. + AppInstanceUserArn *string + + // The maximum number of channels in the request. + MaxResults *int32 + + // The token returned from previous API requests until the number of channels + // moderated by the user is reached. + NextToken *string + + noSmithyDocumentSerde +} + +type ListChannelsModeratedByAppInstanceUserOutput struct { + + // The moderated channels in the request. + Channels []types.ChannelModeratedByAppInstanceUserSummary + + // The token returned from previous API requests until the number of channels + // moderated by the user is reached. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListChannelsModeratedByAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelsModeratedByAppInstanceUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelsModeratedByAppInstanceUser{}, 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 = addOpListChannelsModeratedByAppInstanceUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelsModeratedByAppInstanceUser(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 +} + +// ListChannelsModeratedByAppInstanceUserAPIClient is a client that implements the +// ListChannelsModeratedByAppInstanceUser operation. +type ListChannelsModeratedByAppInstanceUserAPIClient interface { + ListChannelsModeratedByAppInstanceUser(context.Context, *ListChannelsModeratedByAppInstanceUserInput, ...func(*Options)) (*ListChannelsModeratedByAppInstanceUserOutput, error) +} + +var _ ListChannelsModeratedByAppInstanceUserAPIClient = (*Client)(nil) + +// ListChannelsModeratedByAppInstanceUserPaginatorOptions is the paginator options +// for ListChannelsModeratedByAppInstanceUser +type ListChannelsModeratedByAppInstanceUserPaginatorOptions struct { + // The maximum number of channels in the request. + 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 +} + +// ListChannelsModeratedByAppInstanceUserPaginator is a paginator for +// ListChannelsModeratedByAppInstanceUser +type ListChannelsModeratedByAppInstanceUserPaginator struct { + options ListChannelsModeratedByAppInstanceUserPaginatorOptions + client ListChannelsModeratedByAppInstanceUserAPIClient + params *ListChannelsModeratedByAppInstanceUserInput + nextToken *string + firstPage bool +} + +// NewListChannelsModeratedByAppInstanceUserPaginator returns a new +// ListChannelsModeratedByAppInstanceUserPaginator +func NewListChannelsModeratedByAppInstanceUserPaginator(client ListChannelsModeratedByAppInstanceUserAPIClient, params *ListChannelsModeratedByAppInstanceUserInput, optFns ...func(*ListChannelsModeratedByAppInstanceUserPaginatorOptions)) *ListChannelsModeratedByAppInstanceUserPaginator { + if params == nil { + params = &ListChannelsModeratedByAppInstanceUserInput{} + } + + options := ListChannelsModeratedByAppInstanceUserPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListChannelsModeratedByAppInstanceUserPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListChannelsModeratedByAppInstanceUserPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListChannelsModeratedByAppInstanceUser page. +func (p *ListChannelsModeratedByAppInstanceUserPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelsModeratedByAppInstanceUserOutput, 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.ListChannelsModeratedByAppInstanceUser(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_opListChannelsModeratedByAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "ListChannelsModeratedByAppInstanceUser", + } +} diff --git a/service/chimesdkmessaging/api_op_RedactChannelMessage.go b/service/chimesdkmessaging/api_op_RedactChannelMessage.go new file mode 100644 index 00000000000..8a4ec0d8ba0 --- /dev/null +++ b/service/chimesdkmessaging/api_op_RedactChannelMessage.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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" +) + +// Redacts message content, but not metadata. The message exists in the back end, +// but the action returns null content, and the state shows as redacted. The +// x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of +// the user that makes the API call as the value in the header. +func (c *Client) RedactChannelMessage(ctx context.Context, params *RedactChannelMessageInput, optFns ...func(*Options)) (*RedactChannelMessageOutput, error) { + if params == nil { + params = &RedactChannelMessageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RedactChannelMessage", params, optFns, c.addOperationRedactChannelMessageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RedactChannelMessageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RedactChannelMessageInput struct { + + // The ARN of the channel containing the messages that you want to redact. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The ID of the message being redacted. + // + // This member is required. + MessageId *string + + noSmithyDocumentSerde +} + +type RedactChannelMessageOutput struct { + + // The ARN of the channel containing the messages that you want to redact. + ChannelArn *string + + // The ID of the message being redacted. + MessageId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRedactChannelMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpRedactChannelMessage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRedactChannelMessage{}, 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 = addOpRedactChannelMessageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRedactChannelMessage(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_opRedactChannelMessage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "RedactChannelMessage", + } +} diff --git a/service/chimesdkmessaging/api_op_SendChannelMessage.go b/service/chimesdkmessaging/api_op_SendChannelMessage.go new file mode 100644 index 00000000000..fa22883e508 --- /dev/null +++ b/service/chimesdkmessaging/api_op_SendChannelMessage.go @@ -0,0 +1,194 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sends a message to a particular channel that the member is a part of. The +// x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of +// the user that makes the API call as the value in the header. Also, STANDARD +// messages can contain 4KB of data and the 1KB of metadata. CONTROL messages can +// contain 30 bytes of data and no metadata. +func (c *Client) SendChannelMessage(ctx context.Context, params *SendChannelMessageInput, optFns ...func(*Options)) (*SendChannelMessageOutput, error) { + if params == nil { + params = &SendChannelMessageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SendChannelMessage", params, optFns, c.addOperationSendChannelMessageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SendChannelMessageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SendChannelMessageInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The Idempotency token for each client request. + // + // This member is required. + ClientRequestToken *string + + // The content of the message. + // + // This member is required. + Content *string + + // Boolean that controls whether the message is persisted on the back end. + // Required. + // + // This member is required. + Persistence types.ChannelMessagePersistenceType + + // The type of message, STANDARD or CONTROL. + // + // This member is required. + Type types.ChannelMessageType + + // The optional metadata for each message. + Metadata *string + + noSmithyDocumentSerde +} + +type SendChannelMessageOutput struct { + + // The ARN of the channel. + ChannelArn *string + + // The ID string assigned to each message. + MessageId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSendChannelMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpSendChannelMessage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSendChannelMessage{}, 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_opSendChannelMessageMiddleware(stack, options); err != nil { + return err + } + if err = addOpSendChannelMessageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendChannelMessage(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_initializeOpSendChannelMessage struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpSendChannelMessage) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpSendChannelMessage) 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.(*SendChannelMessageInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *SendChannelMessageInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opSendChannelMessageMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpSendChannelMessage{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opSendChannelMessage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "SendChannelMessage", + } +} diff --git a/service/chimesdkmessaging/api_op_UpdateChannel.go b/service/chimesdkmessaging/api_op_UpdateChannel.go new file mode 100644 index 00000000000..e23936a6782 --- /dev/null +++ b/service/chimesdkmessaging/api_op_UpdateChannel.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update a channel's attributes. Restriction: You can't change a channel's +// privacy. The x-amz-chime-bearer request header is mandatory. Use the +// AppInstanceUserArn of the user that makes the API call as the value in the +// header. +func (c *Client) UpdateChannel(ctx context.Context, params *UpdateChannelInput, optFns ...func(*Options)) (*UpdateChannelOutput, error) { + if params == nil { + params = &UpdateChannelInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateChannel", params, optFns, c.addOperationUpdateChannelMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateChannelOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateChannelInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The mode of the update request. + // + // This member is required. + Mode types.ChannelMode + + // The name of the channel. + // + // This member is required. + Name *string + + // The metadata for the update request. + Metadata *string + + noSmithyDocumentSerde +} + +type UpdateChannelOutput struct { + + // The ARN of the channel. + ChannelArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateChannel{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateChannel{}, 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 = addOpUpdateChannelValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateChannel(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_opUpdateChannel(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "UpdateChannel", + } +} diff --git a/service/chimesdkmessaging/api_op_UpdateChannelMessage.go b/service/chimesdkmessaging/api_op_UpdateChannelMessage.go new file mode 100644 index 00000000000..38ffad20d1e --- /dev/null +++ b/service/chimesdkmessaging/api_op_UpdateChannelMessage.go @@ -0,0 +1,141 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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" +) + +// Updates the content of a message. The x-amz-chime-bearer request header is +// mandatory. Use the AppInstanceUserArn of the user that makes the API call as the +// value in the header. +func (c *Client) UpdateChannelMessage(ctx context.Context, params *UpdateChannelMessageInput, optFns ...func(*Options)) (*UpdateChannelMessageOutput, error) { + if params == nil { + params = &UpdateChannelMessageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateChannelMessage", params, optFns, c.addOperationUpdateChannelMessageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateChannelMessageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateChannelMessageInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + // The ID string of the message being updated. + // + // This member is required. + MessageId *string + + // The content of the message being updated. + Content *string + + // The metadata of the message being updated. + Metadata *string + + noSmithyDocumentSerde +} + +type UpdateChannelMessageOutput struct { + + // The ARN of the channel. + ChannelArn *string + + // The ID string of the message being updated. + MessageId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateChannelMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateChannelMessage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateChannelMessage{}, 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 = addOpUpdateChannelMessageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateChannelMessage(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_opUpdateChannelMessage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "UpdateChannelMessage", + } +} diff --git a/service/chimesdkmessaging/api_op_UpdateChannelReadMarker.go b/service/chimesdkmessaging/api_op_UpdateChannelReadMarker.go new file mode 100644 index 00000000000..eec776154ef --- /dev/null +++ b/service/chimesdkmessaging/api_op_UpdateChannelReadMarker.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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" +) + +// The details of the time when a user last read messages in a channel. The +// x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of +// the user that makes the API call as the value in the header. +func (c *Client) UpdateChannelReadMarker(ctx context.Context, params *UpdateChannelReadMarkerInput, optFns ...func(*Options)) (*UpdateChannelReadMarkerOutput, error) { + if params == nil { + params = &UpdateChannelReadMarkerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateChannelReadMarker", params, optFns, c.addOperationUpdateChannelReadMarkerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateChannelReadMarkerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateChannelReadMarkerInput struct { + + // The ARN of the channel. + // + // This member is required. + ChannelArn *string + + // The AppInstanceUserArn of the user that makes the API call. + // + // This member is required. + ChimeBearer *string + + noSmithyDocumentSerde +} + +type UpdateChannelReadMarkerOutput struct { + + // The ARN of the channel. + ChannelArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateChannelReadMarkerMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateChannelReadMarker{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateChannelReadMarker{}, 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 = addOpUpdateChannelReadMarkerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateChannelReadMarker(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_opUpdateChannelReadMarker(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "UpdateChannelReadMarker", + } +} diff --git a/service/chimesdkmessaging/deserializers.go b/service/chimesdkmessaging/deserializers.go new file mode 100644 index 00000000000..78330c9918c --- /dev/null +++ b/service/chimesdkmessaging/deserializers.go @@ -0,0 +1,7059 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "strings" +) + +type awsRestjson1_deserializeOpBatchCreateChannelMembership struct { +} + +func (*awsRestjson1_deserializeOpBatchCreateChannelMembership) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpBatchCreateChannelMembership) 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_deserializeOpErrorBatchCreateChannelMembership(response, &metadata) + } + output := &BatchCreateChannelMembershipOutput{} + 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_deserializeOpDocumentBatchCreateChannelMembershipOutput(&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_deserializeOpErrorBatchCreateChannelMembership(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentBatchCreateChannelMembershipOutput(v **BatchCreateChannelMembershipOutput, 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 *BatchCreateChannelMembershipOutput + if *v == nil { + sv = &BatchCreateChannelMembershipOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BatchChannelMemberships": + if err := awsRestjson1_deserializeDocumentBatchChannelMemberships(&sv.BatchChannelMemberships, value); err != nil { + return err + } + + case "Errors": + if err := awsRestjson1_deserializeDocumentBatchCreateChannelMembershipErrors(&sv.Errors, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateChannel struct { +} + +func (*awsRestjson1_deserializeOpCreateChannel) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateChannel) 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_deserializeOpErrorCreateChannel(response, &metadata) + } + output := &CreateChannelOutput{} + 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_deserializeOpDocumentCreateChannelOutput(&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_deserializeOpErrorCreateChannel(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateChannelOutput(v **CreateChannelOutput, 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 *CreateChannelOutput + if *v == nil { + sv = &CreateChannelOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateChannelBan struct { +} + +func (*awsRestjson1_deserializeOpCreateChannelBan) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateChannelBan) 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_deserializeOpErrorCreateChannelBan(response, &metadata) + } + output := &CreateChannelBanOutput{} + 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_deserializeOpDocumentCreateChannelBanOutput(&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_deserializeOpErrorCreateChannelBan(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateChannelBanOutput(v **CreateChannelBanOutput, 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 *CreateChannelBanOutput + if *v == nil { + sv = &CreateChannelBanOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "Member": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.Member, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateChannelMembership struct { +} + +func (*awsRestjson1_deserializeOpCreateChannelMembership) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateChannelMembership) 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_deserializeOpErrorCreateChannelMembership(response, &metadata) + } + output := &CreateChannelMembershipOutput{} + 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_deserializeOpDocumentCreateChannelMembershipOutput(&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_deserializeOpErrorCreateChannelMembership(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateChannelMembershipOutput(v **CreateChannelMembershipOutput, 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 *CreateChannelMembershipOutput + if *v == nil { + sv = &CreateChannelMembershipOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "Member": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.Member, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateChannelModerator struct { +} + +func (*awsRestjson1_deserializeOpCreateChannelModerator) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateChannelModerator) 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_deserializeOpErrorCreateChannelModerator(response, &metadata) + } + output := &CreateChannelModeratorOutput{} + 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_deserializeOpDocumentCreateChannelModeratorOutput(&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_deserializeOpErrorCreateChannelModerator(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateChannelModeratorOutput(v **CreateChannelModeratorOutput, 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 *CreateChannelModeratorOutput + if *v == nil { + sv = &CreateChannelModeratorOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "ChannelModerator": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.ChannelModerator, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteChannel struct { +} + +func (*awsRestjson1_deserializeOpDeleteChannel) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteChannel) 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_deserializeOpErrorDeleteChannel(response, &metadata) + } + output := &DeleteChannelOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteChannel(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteChannelBan struct { +} + +func (*awsRestjson1_deserializeOpDeleteChannelBan) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteChannelBan) 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_deserializeOpErrorDeleteChannelBan(response, &metadata) + } + output := &DeleteChannelBanOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteChannelBan(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteChannelMembership struct { +} + +func (*awsRestjson1_deserializeOpDeleteChannelMembership) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteChannelMembership) 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_deserializeOpErrorDeleteChannelMembership(response, &metadata) + } + output := &DeleteChannelMembershipOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteChannelMembership(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteChannelMessage struct { +} + +func (*awsRestjson1_deserializeOpDeleteChannelMessage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteChannelMessage) 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_deserializeOpErrorDeleteChannelMessage(response, &metadata) + } + output := &DeleteChannelMessageOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteChannelMessage(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteChannelModerator struct { +} + +func (*awsRestjson1_deserializeOpDeleteChannelModerator) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteChannelModerator) 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_deserializeOpErrorDeleteChannelModerator(response, &metadata) + } + output := &DeleteChannelModeratorOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteChannelModerator(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDescribeChannel struct { +} + +func (*awsRestjson1_deserializeOpDescribeChannel) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeChannel) 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_deserializeOpErrorDescribeChannel(response, &metadata) + } + output := &DescribeChannelOutput{} + 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_deserializeOpDocumentDescribeChannelOutput(&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_deserializeOpErrorDescribeChannel(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeChannelOutput(v **DescribeChannelOutput, 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 *DescribeChannelOutput + if *v == nil { + sv = &DescribeChannelOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Channel": + if err := awsRestjson1_deserializeDocumentChannel(&sv.Channel, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeChannelBan struct { +} + +func (*awsRestjson1_deserializeOpDescribeChannelBan) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeChannelBan) 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_deserializeOpErrorDescribeChannelBan(response, &metadata) + } + output := &DescribeChannelBanOutput{} + 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_deserializeOpDocumentDescribeChannelBanOutput(&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_deserializeOpErrorDescribeChannelBan(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeChannelBanOutput(v **DescribeChannelBanOutput, 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 *DescribeChannelBanOutput + if *v == nil { + sv = &DescribeChannelBanOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelBan": + if err := awsRestjson1_deserializeDocumentChannelBan(&sv.ChannelBan, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeChannelMembership struct { +} + +func (*awsRestjson1_deserializeOpDescribeChannelMembership) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeChannelMembership) 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_deserializeOpErrorDescribeChannelMembership(response, &metadata) + } + output := &DescribeChannelMembershipOutput{} + 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_deserializeOpDocumentDescribeChannelMembershipOutput(&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_deserializeOpErrorDescribeChannelMembership(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeChannelMembershipOutput(v **DescribeChannelMembershipOutput, 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 *DescribeChannelMembershipOutput + if *v == nil { + sv = &DescribeChannelMembershipOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelMembership": + if err := awsRestjson1_deserializeDocumentChannelMembership(&sv.ChannelMembership, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeChannelMembershipForAppInstanceUser struct { +} + +func (*awsRestjson1_deserializeOpDescribeChannelMembershipForAppInstanceUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeChannelMembershipForAppInstanceUser) 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_deserializeOpErrorDescribeChannelMembershipForAppInstanceUser(response, &metadata) + } + output := &DescribeChannelMembershipForAppInstanceUserOutput{} + 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_deserializeOpDocumentDescribeChannelMembershipForAppInstanceUserOutput(&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_deserializeOpErrorDescribeChannelMembershipForAppInstanceUser(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeChannelMembershipForAppInstanceUserOutput(v **DescribeChannelMembershipForAppInstanceUserOutput, 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 *DescribeChannelMembershipForAppInstanceUserOutput + if *v == nil { + sv = &DescribeChannelMembershipForAppInstanceUserOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelMembership": + if err := awsRestjson1_deserializeDocumentChannelMembershipForAppInstanceUserSummary(&sv.ChannelMembership, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeChannelModeratedByAppInstanceUser struct { +} + +func (*awsRestjson1_deserializeOpDescribeChannelModeratedByAppInstanceUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeChannelModeratedByAppInstanceUser) 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_deserializeOpErrorDescribeChannelModeratedByAppInstanceUser(response, &metadata) + } + output := &DescribeChannelModeratedByAppInstanceUserOutput{} + 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_deserializeOpDocumentDescribeChannelModeratedByAppInstanceUserOutput(&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_deserializeOpErrorDescribeChannelModeratedByAppInstanceUser(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeChannelModeratedByAppInstanceUserOutput(v **DescribeChannelModeratedByAppInstanceUserOutput, 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 *DescribeChannelModeratedByAppInstanceUserOutput + if *v == nil { + sv = &DescribeChannelModeratedByAppInstanceUserOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Channel": + if err := awsRestjson1_deserializeDocumentChannelModeratedByAppInstanceUserSummary(&sv.Channel, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeChannelModerator struct { +} + +func (*awsRestjson1_deserializeOpDescribeChannelModerator) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeChannelModerator) 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_deserializeOpErrorDescribeChannelModerator(response, &metadata) + } + output := &DescribeChannelModeratorOutput{} + 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_deserializeOpDocumentDescribeChannelModeratorOutput(&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_deserializeOpErrorDescribeChannelModerator(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeChannelModeratorOutput(v **DescribeChannelModeratorOutput, 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 *DescribeChannelModeratorOutput + if *v == nil { + sv = &DescribeChannelModeratorOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelModerator": + if err := awsRestjson1_deserializeDocumentChannelModerator(&sv.ChannelModerator, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetChannelMessage struct { +} + +func (*awsRestjson1_deserializeOpGetChannelMessage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetChannelMessage) 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_deserializeOpErrorGetChannelMessage(response, &metadata) + } + output := &GetChannelMessageOutput{} + 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_deserializeOpDocumentGetChannelMessageOutput(&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_deserializeOpErrorGetChannelMessage(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetChannelMessageOutput(v **GetChannelMessageOutput, 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 *GetChannelMessageOutput + if *v == nil { + sv = &GetChannelMessageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelMessage": + if err := awsRestjson1_deserializeDocumentChannelMessage(&sv.ChannelMessage, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetMessagingSessionEndpoint struct { +} + +func (*awsRestjson1_deserializeOpGetMessagingSessionEndpoint) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetMessagingSessionEndpoint) 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_deserializeOpErrorGetMessagingSessionEndpoint(response, &metadata) + } + output := &GetMessagingSessionEndpointOutput{} + 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_deserializeOpDocumentGetMessagingSessionEndpointOutput(&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_deserializeOpErrorGetMessagingSessionEndpoint(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("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetMessagingSessionEndpointOutput(v **GetMessagingSessionEndpointOutput, 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 *GetMessagingSessionEndpointOutput + if *v == nil { + sv = &GetMessagingSessionEndpointOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Endpoint": + if err := awsRestjson1_deserializeDocumentMessagingSessionEndpoint(&sv.Endpoint, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListChannelBans struct { +} + +func (*awsRestjson1_deserializeOpListChannelBans) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListChannelBans) 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_deserializeOpErrorListChannelBans(response, &metadata) + } + output := &ListChannelBansOutput{} + 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_deserializeOpDocumentListChannelBansOutput(&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_deserializeOpErrorListChannelBans(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListChannelBansOutput(v **ListChannelBansOutput, 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 *ListChannelBansOutput + if *v == nil { + sv = &ListChannelBansOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "ChannelBans": + if err := awsRestjson1_deserializeDocumentChannelBanSummaryList(&sv.ChannelBans, 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListChannelMemberships struct { +} + +func (*awsRestjson1_deserializeOpListChannelMemberships) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListChannelMemberships) 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_deserializeOpErrorListChannelMemberships(response, &metadata) + } + output := &ListChannelMembershipsOutput{} + 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_deserializeOpDocumentListChannelMembershipsOutput(&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_deserializeOpErrorListChannelMemberships(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListChannelMembershipsOutput(v **ListChannelMembershipsOutput, 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 *ListChannelMembershipsOutput + if *v == nil { + sv = &ListChannelMembershipsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "ChannelMemberships": + if err := awsRestjson1_deserializeDocumentChannelMembershipSummaryList(&sv.ChannelMemberships, 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListChannelMembershipsForAppInstanceUser struct { +} + +func (*awsRestjson1_deserializeOpListChannelMembershipsForAppInstanceUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListChannelMembershipsForAppInstanceUser) 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_deserializeOpErrorListChannelMembershipsForAppInstanceUser(response, &metadata) + } + output := &ListChannelMembershipsForAppInstanceUserOutput{} + 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_deserializeOpDocumentListChannelMembershipsForAppInstanceUserOutput(&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_deserializeOpErrorListChannelMembershipsForAppInstanceUser(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListChannelMembershipsForAppInstanceUserOutput(v **ListChannelMembershipsForAppInstanceUserOutput, 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 *ListChannelMembershipsForAppInstanceUserOutput + if *v == nil { + sv = &ListChannelMembershipsForAppInstanceUserOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelMemberships": + if err := awsRestjson1_deserializeDocumentChannelMembershipForAppInstanceUserSummaryList(&sv.ChannelMemberships, 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListChannelMessages struct { +} + +func (*awsRestjson1_deserializeOpListChannelMessages) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListChannelMessages) 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_deserializeOpErrorListChannelMessages(response, &metadata) + } + output := &ListChannelMessagesOutput{} + 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_deserializeOpDocumentListChannelMessagesOutput(&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_deserializeOpErrorListChannelMessages(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListChannelMessagesOutput(v **ListChannelMessagesOutput, 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 *ListChannelMessagesOutput + if *v == nil { + sv = &ListChannelMessagesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "ChannelMessages": + if err := awsRestjson1_deserializeDocumentChannelMessageSummaryList(&sv.ChannelMessages, 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListChannelModerators struct { +} + +func (*awsRestjson1_deserializeOpListChannelModerators) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListChannelModerators) 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_deserializeOpErrorListChannelModerators(response, &metadata) + } + output := &ListChannelModeratorsOutput{} + 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_deserializeOpDocumentListChannelModeratorsOutput(&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_deserializeOpErrorListChannelModerators(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListChannelModeratorsOutput(v **ListChannelModeratorsOutput, 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 *ListChannelModeratorsOutput + if *v == nil { + sv = &ListChannelModeratorsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "ChannelModerators": + if err := awsRestjson1_deserializeDocumentChannelModeratorSummaryList(&sv.ChannelModerators, 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListChannels struct { +} + +func (*awsRestjson1_deserializeOpListChannels) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListChannels) 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_deserializeOpErrorListChannels(response, &metadata) + } + output := &ListChannelsOutput{} + 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_deserializeOpDocumentListChannelsOutput(&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_deserializeOpErrorListChannels(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListChannelsOutput(v **ListChannelsOutput, 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 *ListChannelsOutput + if *v == nil { + sv = &ListChannelsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Channels": + if err := awsRestjson1_deserializeDocumentChannelSummaryList(&sv.Channels, 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListChannelsModeratedByAppInstanceUser struct { +} + +func (*awsRestjson1_deserializeOpListChannelsModeratedByAppInstanceUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListChannelsModeratedByAppInstanceUser) 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_deserializeOpErrorListChannelsModeratedByAppInstanceUser(response, &metadata) + } + output := &ListChannelsModeratedByAppInstanceUserOutput{} + 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_deserializeOpDocumentListChannelsModeratedByAppInstanceUserOutput(&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_deserializeOpErrorListChannelsModeratedByAppInstanceUser(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListChannelsModeratedByAppInstanceUserOutput(v **ListChannelsModeratedByAppInstanceUserOutput, 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 *ListChannelsModeratedByAppInstanceUserOutput + if *v == nil { + sv = &ListChannelsModeratedByAppInstanceUserOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Channels": + if err := awsRestjson1_deserializeDocumentChannelModeratedByAppInstanceUserSummaryList(&sv.Channels, 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpRedactChannelMessage struct { +} + +func (*awsRestjson1_deserializeOpRedactChannelMessage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRedactChannelMessage) 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_deserializeOpErrorRedactChannelMessage(response, &metadata) + } + output := &RedactChannelMessageOutput{} + 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_deserializeOpDocumentRedactChannelMessageOutput(&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_deserializeOpErrorRedactChannelMessage(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentRedactChannelMessageOutput(v **RedactChannelMessageOutput, 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 *RedactChannelMessageOutput + if *v == nil { + sv = &RedactChannelMessageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "MessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) + } + sv.MessageId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpSendChannelMessage struct { +} + +func (*awsRestjson1_deserializeOpSendChannelMessage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSendChannelMessage) 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_deserializeOpErrorSendChannelMessage(response, &metadata) + } + output := &SendChannelMessageOutput{} + 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_deserializeOpDocumentSendChannelMessageOutput(&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_deserializeOpErrorSendChannelMessage(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentSendChannelMessageOutput(v **SendChannelMessageOutput, 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 *SendChannelMessageOutput + if *v == nil { + sv = &SendChannelMessageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "MessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) + } + sv.MessageId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateChannel struct { +} + +func (*awsRestjson1_deserializeOpUpdateChannel) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateChannel) 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_deserializeOpErrorUpdateChannel(response, &metadata) + } + output := &UpdateChannelOutput{} + 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_deserializeOpDocumentUpdateChannelOutput(&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_deserializeOpErrorUpdateChannel(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateChannelOutput(v **UpdateChannelOutput, 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 *UpdateChannelOutput + if *v == nil { + sv = &UpdateChannelOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateChannelMessage struct { +} + +func (*awsRestjson1_deserializeOpUpdateChannelMessage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateChannelMessage) 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_deserializeOpErrorUpdateChannelMessage(response, &metadata) + } + output := &UpdateChannelMessageOutput{} + 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_deserializeOpDocumentUpdateChannelMessageOutput(&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_deserializeOpErrorUpdateChannelMessage(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateChannelMessageOutput(v **UpdateChannelMessageOutput, 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 *UpdateChannelMessageOutput + if *v == nil { + sv = &UpdateChannelMessageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "MessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) + } + sv.MessageId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateChannelReadMarker struct { +} + +func (*awsRestjson1_deserializeOpUpdateChannelReadMarker) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateChannelReadMarker) 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_deserializeOpErrorUpdateChannelReadMarker(response, &metadata) + } + output := &UpdateChannelReadMarkerOutput{} + 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_deserializeOpDocumentUpdateChannelReadMarkerOutput(&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_deserializeOpErrorUpdateChannelReadMarker(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateChannelReadMarkerOutput(v **UpdateChannelReadMarkerOutput, 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 *UpdateChannelReadMarkerOutput + if *v == nil { + sv = &UpdateChannelReadMarkerOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorBadRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.BadRequestException{} + 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_deserializeDocumentBadRequestException(&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_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + 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_deserializeDocumentConflictException(&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_deserializeErrorForbiddenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ForbiddenException{} + 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_deserializeDocumentForbiddenException(&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_deserializeErrorNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NotFoundException{} + 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_deserializeDocumentNotFoundException(&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_deserializeErrorResourceLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceLimitExceededException{} + 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_deserializeDocumentResourceLimitExceededException(&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_deserializeErrorServiceFailureException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceFailureException{} + 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_deserializeDocumentServiceFailureException(&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_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceUnavailableException{} + 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_deserializeDocumentServiceUnavailableException(&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_deserializeErrorThrottledClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottledClientException{} + 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_deserializeDocumentThrottledClientException(&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_deserializeErrorUnauthorizedClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnauthorizedClientException{} + 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_deserializeDocumentUnauthorizedClientException(&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_deserializeDocumentAppInstanceUserMembershipSummary(v **types.AppInstanceUserMembershipSummary, 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.AppInstanceUserMembershipSummary + if *v == nil { + sv = &types.AppInstanceUserMembershipSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ReadMarkerTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ReadMarkerTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelMembershipType to be of type string, got %T instead", value) + } + sv.Type = types.ChannelMembershipType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestException, 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.BadRequestException + if *v == nil { + sv = &types.BadRequestException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentBatchChannelMemberships(v **types.BatchChannelMemberships, 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.BatchChannelMemberships + if *v == nil { + sv = &types.BatchChannelMemberships{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "InvitedBy": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.InvitedBy, value); err != nil { + return err + } + + case "Members": + if err := awsRestjson1_deserializeDocumentMembers(&sv.Members, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelMembershipType to be of type string, got %T instead", value) + } + sv.Type = types.ChannelMembershipType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBatchCreateChannelMembershipError(v **types.BatchCreateChannelMembershipError, 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.BatchCreateChannelMembershipError + if *v == nil { + sv = &types.BatchCreateChannelMembershipError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.ErrorCode(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) + } + + case "MemberArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.MemberArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBatchCreateChannelMembershipErrors(v *[]types.BatchCreateChannelMembershipError, 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.BatchCreateChannelMembershipError + if *v == nil { + cv = []types.BatchCreateChannelMembershipError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchCreateChannelMembershipError + destAddr := &col + if err := awsRestjson1_deserializeDocumentBatchCreateChannelMembershipError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentChannel(v **types.Channel, 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.Channel + if *v == nil { + sv = &types.Channel{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "CreatedBy": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.CreatedBy, value); err != nil { + return err + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastMessageTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastMessageTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastUpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Metadata": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) + } + sv.Metadata = ptr.String(jtv) + } + + case "Mode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelMode to be of type string, got %T instead", value) + } + sv.Mode = types.ChannelMode(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Privacy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelPrivacy to be of type string, got %T instead", value) + } + sv.Privacy = types.ChannelPrivacy(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChannelBan(v **types.ChannelBan, 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.ChannelBan + if *v == nil { + sv = &types.ChannelBan{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "CreatedBy": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.CreatedBy, value); err != nil { + return err + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Member": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.Member, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChannelBanSummary(v **types.ChannelBanSummary, 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.ChannelBanSummary + if *v == nil { + sv = &types.ChannelBanSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Member": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.Member, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChannelBanSummaryList(v *[]types.ChannelBanSummary, 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.ChannelBanSummary + if *v == nil { + cv = []types.ChannelBanSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ChannelBanSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentChannelBanSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentChannelMembership(v **types.ChannelMembership, 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.ChannelMembership + if *v == nil { + sv = &types.ChannelMembership{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "InvitedBy": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.InvitedBy, value); err != nil { + return err + } + + case "LastUpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Member": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.Member, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelMembershipType to be of type string, got %T instead", value) + } + sv.Type = types.ChannelMembershipType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChannelMembershipForAppInstanceUserSummary(v **types.ChannelMembershipForAppInstanceUserSummary, 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.ChannelMembershipForAppInstanceUserSummary + if *v == nil { + sv = &types.ChannelMembershipForAppInstanceUserSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppInstanceUserMembershipSummary": + if err := awsRestjson1_deserializeDocumentAppInstanceUserMembershipSummary(&sv.AppInstanceUserMembershipSummary, value); err != nil { + return err + } + + case "ChannelSummary": + if err := awsRestjson1_deserializeDocumentChannelSummary(&sv.ChannelSummary, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChannelMembershipForAppInstanceUserSummaryList(v *[]types.ChannelMembershipForAppInstanceUserSummary, 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.ChannelMembershipForAppInstanceUserSummary + if *v == nil { + cv = []types.ChannelMembershipForAppInstanceUserSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ChannelMembershipForAppInstanceUserSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentChannelMembershipForAppInstanceUserSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentChannelMembershipSummary(v **types.ChannelMembershipSummary, 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.ChannelMembershipSummary + if *v == nil { + sv = &types.ChannelMembershipSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Member": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.Member, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChannelMembershipSummaryList(v *[]types.ChannelMembershipSummary, 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.ChannelMembershipSummary + if *v == nil { + cv = []types.ChannelMembershipSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ChannelMembershipSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentChannelMembershipSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentChannelMessage(v **types.ChannelMessage, 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.ChannelMessage + if *v == nil { + sv = &types.ChannelMessage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "Content": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Content to be of type string, got %T instead", value) + } + sv.Content = ptr.String(jtv) + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastEditedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastEditedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastUpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "MessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) + } + sv.MessageId = ptr.String(jtv) + } + + case "Metadata": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) + } + sv.Metadata = ptr.String(jtv) + } + + case "Persistence": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelMessagePersistenceType to be of type string, got %T instead", value) + } + sv.Persistence = types.ChannelMessagePersistenceType(jtv) + } + + case "Redacted": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected NonNullableBoolean to be of type *bool, got %T instead", value) + } + sv.Redacted = jtv + } + + case "Sender": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.Sender, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelMessageType to be of type string, got %T instead", value) + } + sv.Type = types.ChannelMessageType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChannelMessageSummary(v **types.ChannelMessageSummary, 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.ChannelMessageSummary + if *v == nil { + sv = &types.ChannelMessageSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Content": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Content to be of type string, got %T instead", value) + } + sv.Content = ptr.String(jtv) + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastEditedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastEditedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastUpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "MessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) + } + sv.MessageId = ptr.String(jtv) + } + + case "Metadata": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) + } + sv.Metadata = ptr.String(jtv) + } + + case "Redacted": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected NonNullableBoolean to be of type *bool, got %T instead", value) + } + sv.Redacted = jtv + } + + case "Sender": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.Sender, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelMessageType to be of type string, got %T instead", value) + } + sv.Type = types.ChannelMessageType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChannelMessageSummaryList(v *[]types.ChannelMessageSummary, 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.ChannelMessageSummary + if *v == nil { + cv = []types.ChannelMessageSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ChannelMessageSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentChannelMessageSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentChannelModeratedByAppInstanceUserSummary(v **types.ChannelModeratedByAppInstanceUserSummary, 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.ChannelModeratedByAppInstanceUserSummary + if *v == nil { + sv = &types.ChannelModeratedByAppInstanceUserSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelSummary": + if err := awsRestjson1_deserializeDocumentChannelSummary(&sv.ChannelSummary, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChannelModeratedByAppInstanceUserSummaryList(v *[]types.ChannelModeratedByAppInstanceUserSummary, 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.ChannelModeratedByAppInstanceUserSummary + if *v == nil { + cv = []types.ChannelModeratedByAppInstanceUserSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ChannelModeratedByAppInstanceUserSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentChannelModeratedByAppInstanceUserSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentChannelModerator(v **types.ChannelModerator, 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.ChannelModerator + if *v == nil { + sv = &types.ChannelModerator{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "CreatedBy": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.CreatedBy, value); err != nil { + return err + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Moderator": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.Moderator, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChannelModeratorSummary(v **types.ChannelModeratorSummary, 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.ChannelModeratorSummary + if *v == nil { + sv = &types.ChannelModeratorSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Moderator": + if err := awsRestjson1_deserializeDocumentIdentity(&sv.Moderator, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChannelModeratorSummaryList(v *[]types.ChannelModeratorSummary, 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.ChannelModeratorSummary + if *v == nil { + cv = []types.ChannelModeratorSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ChannelModeratorSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentChannelModeratorSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentChannelSummary(v **types.ChannelSummary, 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.ChannelSummary + if *v == nil { + sv = &types.ChannelSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + + case "LastMessageTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastMessageTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Metadata": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) + } + sv.Metadata = ptr.String(jtv) + } + + case "Mode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelMode to be of type string, got %T instead", value) + } + sv.Mode = types.ChannelMode(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Privacy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelPrivacy to be of type string, got %T instead", value) + } + sv.Privacy = types.ChannelPrivacy(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChannelSummaryList(v *[]types.ChannelSummary, 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.ChannelSummary + if *v == nil { + cv = []types.ChannelSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ChannelSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentChannelSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, 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.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentForbiddenException(v **types.ForbiddenException, 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.ForbiddenException + if *v == nil { + sv = &types.ForbiddenException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentIdentity(v **types.Identity, 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.Identity + if *v == nil { + sv = &types.Identity{} + } 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 ChimeArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMembers(v *[]types.Identity, 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.Identity + if *v == nil { + cv = []types.Identity{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Identity + destAddr := &col + if err := awsRestjson1_deserializeDocumentIdentity(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMessagingSessionEndpoint(v **types.MessagingSessionEndpoint, 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.MessagingSessionEndpoint + if *v == nil { + sv = &types.MessagingSessionEndpoint{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UrlType to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNotFoundException(v **types.NotFoundException, 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.NotFoundException + if *v == nil { + sv = &types.NotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_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 "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentServiceFailureException(v **types.ServiceFailureException, 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.ServiceFailureException + if *v == nil { + sv = &types.ServiceFailureException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, 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.ServiceUnavailableException + if *v == nil { + sv = &types.ServiceUnavailableException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentThrottledClientException(v **types.ThrottledClientException, 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.ThrottledClientException + if *v == nil { + sv = &types.ThrottledClientException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 awsRestjson1_deserializeDocumentUnauthorizedClientException(v **types.UnauthorizedClientException, 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.UnauthorizedClientException + if *v == nil { + sv = &types.UnauthorizedClientException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(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 +} diff --git a/service/chimesdkmessaging/doc.go b/service/chimesdkmessaging/doc.go new file mode 100644 index 00000000000..91e3afb8f10 --- /dev/null +++ b/service/chimesdkmessaging/doc.go @@ -0,0 +1,10 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package chimesdkmessaging provides the API client, operations, and parameter +// types for Amazon Chime SDK Messaging. +// +// The Amazon Chime SDK Messaging APIs in this section allow software developers to +// send and receive messages in custom messaging applications. These APIs depend on +// the frameworks provided by the Amazon Chime SDK Identity APIs. For more +// information about the messaging APIs, see . +package chimesdkmessaging diff --git a/service/chimesdkmessaging/endpoints.go b/service/chimesdkmessaging/endpoints.go new file mode 100644 index 00000000000..dc3a21c3a2e --- /dev/null +++ b/service/chimesdkmessaging/endpoints.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +func resolveDefaultEndpointConfiguration(o *Options) { + if o.EndpointResolver != nil { + return + } + o.EndpointResolver = NewDefaultEndpointResolver() +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), m.Options) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "chime" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolver + resolver EndpointResolver +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + if w.awsResolver == nil { + goto fallback + } + endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region) + if err == nil { + return endpoint, nil + } + + if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { + return endpoint, err + } + +fallback: + if w.resolver == nil { + return endpoint, fmt.Errorf("default endpoint resolver provided was nil") + } + return w.resolver.ResolveEndpoint(region, options) +} + +// withEndpointResolver returns an EndpointResolver that first delegates endpoint +// resolution to the awsResolver. If awsResolver returns aws.EndpointNotFoundError +// error, the resolver will use the the provided fallbackResolver for resolution. +// awsResolver and fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver { + return &wrappedEndpointResolver{ + awsResolver: awsResolver, + resolver: fallbackResolver, + } +} diff --git a/service/chimesdkmessaging/generated.json b/service/chimesdkmessaging/generated.json new file mode 100644 index 00000000000..672af470328 --- /dev/null +++ b/service/chimesdkmessaging/generated.json @@ -0,0 +1,54 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_op_BatchCreateChannelMembership.go", + "api_op_CreateChannel.go", + "api_op_CreateChannelBan.go", + "api_op_CreateChannelMembership.go", + "api_op_CreateChannelModerator.go", + "api_op_DeleteChannel.go", + "api_op_DeleteChannelBan.go", + "api_op_DeleteChannelMembership.go", + "api_op_DeleteChannelMessage.go", + "api_op_DeleteChannelModerator.go", + "api_op_DescribeChannel.go", + "api_op_DescribeChannelBan.go", + "api_op_DescribeChannelMembership.go", + "api_op_DescribeChannelMembershipForAppInstanceUser.go", + "api_op_DescribeChannelModeratedByAppInstanceUser.go", + "api_op_DescribeChannelModerator.go", + "api_op_GetChannelMessage.go", + "api_op_GetMessagingSessionEndpoint.go", + "api_op_ListChannelBans.go", + "api_op_ListChannelMemberships.go", + "api_op_ListChannelMembershipsForAppInstanceUser.go", + "api_op_ListChannelMessages.go", + "api_op_ListChannelModerators.go", + "api_op_ListChannels.go", + "api_op_ListChannelsModeratedByAppInstanceUser.go", + "api_op_RedactChannelMessage.go", + "api_op_SendChannelMessage.go", + "api_op_UpdateChannel.go", + "api_op_UpdateChannelMessage.go", + "api_op_UpdateChannelReadMarker.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "protocol_test.go", + "serializers.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging", + "unstable": false +} diff --git a/service/chimesdkmessaging/go.mod b/service/chimesdkmessaging/go.mod new file mode 100644 index 00000000000..ae24f8ab971 --- /dev/null +++ b/service/chimesdkmessaging/go.mod @@ -0,0 +1,10 @@ +module github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.8.0 + github.com/aws/smithy-go v1.7.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/chimesdkmessaging/go.sum b/service/chimesdkmessaging/go.sum new file mode 100644 index 00000000000..1fe5ea17219 --- /dev/null +++ b/service/chimesdkmessaging/go.sum @@ -0,0 +1,14 @@ +github.com/aws/smithy-go v1.7.0 h1:+cLHMRrDZvQ4wk+KuQ9yH6eEg6KZEJ9RI2IkDqnygCg= +github.com/aws/smithy-go v1.7.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/chimesdkmessaging/go_module_metadata.go b/service/chimesdkmessaging/go_module_metadata.go new file mode 100644 index 00000000000..862a9295161 --- /dev/null +++ b/service/chimesdkmessaging/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package chimesdkmessaging + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/chimesdkmessaging/internal/endpoints/endpoints.go b/service/chimesdkmessaging/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..42aa515a1a6 --- /dev/null +++ b/service/chimesdkmessaging/internal/endpoints/endpoints.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + DisableHTTPS bool +} + +// Resolver Chime SDK Messaging endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := endpoints.Options{ + DisableHTTPS: options.DisableHTTPS, + } + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: endpoints.Endpoint{ + Hostname: "messaging-chime.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: endpoints.Endpoint{ + Hostname: "messaging-chime.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: endpoints.Endpoint{ + Hostname: "messaging-chime.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: endpoints.Endpoint{ + Hostname: "messaging-chime.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: endpoints.Endpoint{ + Hostname: "messaging-chime.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/chimesdkmessaging/internal/endpoints/endpoints_test.go b/service/chimesdkmessaging/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/chimesdkmessaging/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/chimesdkmessaging/protocol_test.go b/service/chimesdkmessaging/protocol_test.go new file mode 100644 index 00000000000..1c65ff33114 --- /dev/null +++ b/service/chimesdkmessaging/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging diff --git a/service/chimesdkmessaging/serializers.go b/service/chimesdkmessaging/serializers.go new file mode 100644 index 00000000000..a4782cb3ec6 --- /dev/null +++ b/service/chimesdkmessaging/serializers.go @@ -0,0 +1,2342 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +type awsRestjson1_serializeOpBatchCreateChannelMembership struct { +} + +func (*awsRestjson1_serializeOpBatchCreateChannelMembership) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpBatchCreateChannelMembership) 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.(*BatchCreateChannelMembershipInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/memberships?operation=batch-create") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsBatchCreateChannelMembershipInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentBatchCreateChannelMembershipInput(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_serializeOpHttpBindingsBatchCreateChannelMembershipInput(v *BatchCreateChannelMembershipInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentBatchCreateChannelMembershipInput(v *BatchCreateChannelMembershipInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MemberArns != nil { + ok := object.Key("MemberArns") + if err := awsRestjson1_serializeDocumentMemberArns(v.MemberArns, ok); err != nil { + return err + } + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + +type awsRestjson1_serializeOpCreateChannel struct { +} + +func (*awsRestjson1_serializeOpCreateChannel) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateChannel) 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.(*CreateChannelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateChannelInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateChannelInput(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_serializeOpHttpBindingsCreateChannelInput(v *CreateChannelInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateChannelInput(v *CreateChannelInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppInstanceArn != nil { + ok := object.Key("AppInstanceArn") + ok.String(*v.AppInstanceArn) + } + + if v.ClientRequestToken != nil { + ok := object.Key("ClientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.Metadata != nil { + ok := object.Key("Metadata") + ok.String(*v.Metadata) + } + + if len(v.Mode) > 0 { + ok := object.Key("Mode") + ok.String(string(v.Mode)) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if len(v.Privacy) > 0 { + ok := object.Key("Privacy") + ok.String(string(v.Privacy)) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateChannelBan struct { +} + +func (*awsRestjson1_serializeOpCreateChannelBan) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateChannelBan) 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.(*CreateChannelBanInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/bans") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateChannelBanInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateChannelBanInput(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_serializeOpHttpBindingsCreateChannelBanInput(v *CreateChannelBanInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateChannelBanInput(v *CreateChannelBanInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MemberArn != nil { + ok := object.Key("MemberArn") + ok.String(*v.MemberArn) + } + + return nil +} + +type awsRestjson1_serializeOpCreateChannelMembership struct { +} + +func (*awsRestjson1_serializeOpCreateChannelMembership) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateChannelMembership) 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.(*CreateChannelMembershipInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/memberships") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateChannelMembershipInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateChannelMembershipInput(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_serializeOpHttpBindingsCreateChannelMembershipInput(v *CreateChannelMembershipInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateChannelMembershipInput(v *CreateChannelMembershipInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MemberArn != nil { + ok := object.Key("MemberArn") + ok.String(*v.MemberArn) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + +type awsRestjson1_serializeOpCreateChannelModerator struct { +} + +func (*awsRestjson1_serializeOpCreateChannelModerator) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateChannelModerator) 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.(*CreateChannelModeratorInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/moderators") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateChannelModeratorInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateChannelModeratorInput(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_serializeOpHttpBindingsCreateChannelModeratorInput(v *CreateChannelModeratorInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateChannelModeratorInput(v *CreateChannelModeratorInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ChannelModeratorArn != nil { + ok := object.Key("ChannelModeratorArn") + ok.String(*v.ChannelModeratorArn) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteChannel struct { +} + +func (*awsRestjson1_serializeOpDeleteChannel) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteChannel) 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.(*DeleteChannelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteChannelInput(v *DeleteChannelInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteChannelBan struct { +} + +func (*awsRestjson1_serializeOpDeleteChannelBan) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteChannelBan) 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.(*DeleteChannelBanInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/bans/{MemberArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelBanInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteChannelBanInput(v *DeleteChannelBanInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MemberArn == nil || len(*v.MemberArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MemberArn must not be empty")} + } + if v.MemberArn != nil { + if err := encoder.SetURI("MemberArn").String(*v.MemberArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteChannelMembership struct { +} + +func (*awsRestjson1_serializeOpDeleteChannelMembership) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteChannelMembership) 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.(*DeleteChannelMembershipInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/memberships/{MemberArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelMembershipInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteChannelMembershipInput(v *DeleteChannelMembershipInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MemberArn == nil || len(*v.MemberArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MemberArn must not be empty")} + } + if v.MemberArn != nil { + if err := encoder.SetURI("MemberArn").String(*v.MemberArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteChannelMessage struct { +} + +func (*awsRestjson1_serializeOpDeleteChannelMessage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteChannelMessage) 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.(*DeleteChannelMessageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/messages/{MessageId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelMessageInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteChannelMessageInput(v *DeleteChannelMessageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MessageId == nil || len(*v.MessageId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MessageId must not be empty")} + } + if v.MessageId != nil { + if err := encoder.SetURI("MessageId").String(*v.MessageId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteChannelModerator struct { +} + +func (*awsRestjson1_serializeOpDeleteChannelModerator) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteChannelModerator) 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.(*DeleteChannelModeratorInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/moderators/{ChannelModeratorArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelModeratorInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteChannelModeratorInput(v *DeleteChannelModeratorInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChannelModeratorArn == nil || len(*v.ChannelModeratorArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelModeratorArn must not be empty")} + } + if v.ChannelModeratorArn != nil { + if err := encoder.SetURI("ChannelModeratorArn").String(*v.ChannelModeratorArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +type awsRestjson1_serializeOpDescribeChannel struct { +} + +func (*awsRestjson1_serializeOpDescribeChannel) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeChannel) 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.(*DescribeChannelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeChannelInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeChannelInput(v *DescribeChannelInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +type awsRestjson1_serializeOpDescribeChannelBan struct { +} + +func (*awsRestjson1_serializeOpDescribeChannelBan) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeChannelBan) 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.(*DescribeChannelBanInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/bans/{MemberArn}") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeChannelBanInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeChannelBanInput(v *DescribeChannelBanInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MemberArn == nil || len(*v.MemberArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MemberArn must not be empty")} + } + if v.MemberArn != nil { + if err := encoder.SetURI("MemberArn").String(*v.MemberArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeChannelMembership struct { +} + +func (*awsRestjson1_serializeOpDescribeChannelMembership) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeChannelMembership) 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.(*DescribeChannelMembershipInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/memberships/{MemberArn}") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeChannelMembershipInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeChannelMembershipInput(v *DescribeChannelMembershipInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MemberArn == nil || len(*v.MemberArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MemberArn must not be empty")} + } + if v.MemberArn != nil { + if err := encoder.SetURI("MemberArn").String(*v.MemberArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeChannelMembershipForAppInstanceUser struct { +} + +func (*awsRestjson1_serializeOpDescribeChannelMembershipForAppInstanceUser) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeChannelMembershipForAppInstanceUser) 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.(*DescribeChannelMembershipForAppInstanceUserInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}?scope=app-instance-user-membership") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeChannelMembershipForAppInstanceUserInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeChannelMembershipForAppInstanceUserInput(v *DescribeChannelMembershipForAppInstanceUserInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceUserArn != nil { + encoder.SetQuery("app-instance-user-arn").String(*v.AppInstanceUserArn) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +type awsRestjson1_serializeOpDescribeChannelModeratedByAppInstanceUser struct { +} + +func (*awsRestjson1_serializeOpDescribeChannelModeratedByAppInstanceUser) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeChannelModeratedByAppInstanceUser) 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.(*DescribeChannelModeratedByAppInstanceUserInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}?scope=app-instance-user-moderated-channel") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeChannelModeratedByAppInstanceUserInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeChannelModeratedByAppInstanceUserInput(v *DescribeChannelModeratedByAppInstanceUserInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceUserArn != nil { + encoder.SetQuery("app-instance-user-arn").String(*v.AppInstanceUserArn) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +type awsRestjson1_serializeOpDescribeChannelModerator struct { +} + +func (*awsRestjson1_serializeOpDescribeChannelModerator) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeChannelModerator) 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.(*DescribeChannelModeratorInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/moderators/{ChannelModeratorArn}") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeChannelModeratorInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeChannelModeratorInput(v *DescribeChannelModeratorInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChannelModeratorArn == nil || len(*v.ChannelModeratorArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelModeratorArn must not be empty")} + } + if v.ChannelModeratorArn != nil { + if err := encoder.SetURI("ChannelModeratorArn").String(*v.ChannelModeratorArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +type awsRestjson1_serializeOpGetChannelMessage struct { +} + +func (*awsRestjson1_serializeOpGetChannelMessage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetChannelMessage) 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.(*GetChannelMessageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/messages/{MessageId}") + 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 err := awsRestjson1_serializeOpHttpBindingsGetChannelMessageInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetChannelMessageInput(v *GetChannelMessageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MessageId == nil || len(*v.MessageId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MessageId must not be empty")} + } + if v.MessageId != nil { + if err := encoder.SetURI("MessageId").String(*v.MessageId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetMessagingSessionEndpoint struct { +} + +func (*awsRestjson1_serializeOpGetMessagingSessionEndpoint) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetMessagingSessionEndpoint) 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.(*GetMessagingSessionEndpointInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/endpoints/messaging-session") + 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_serializeOpHttpBindingsGetMessagingSessionEndpointInput(v *GetMessagingSessionEndpointInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestjson1_serializeOpListChannelBans struct { +} + +func (*awsRestjson1_serializeOpListChannelBans) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListChannelBans) 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.(*ListChannelBansInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/bans") + 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 err := awsRestjson1_serializeOpHttpBindingsListChannelBansInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListChannelBansInput(v *ListChannelBansInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListChannelMemberships struct { +} + +func (*awsRestjson1_serializeOpListChannelMemberships) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListChannelMemberships) 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.(*ListChannelMembershipsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/memberships") + 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 err := awsRestjson1_serializeOpHttpBindingsListChannelMembershipsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListChannelMembershipsInput(v *ListChannelMembershipsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if len(v.Type) > 0 { + encoder.SetQuery("type").String(string(v.Type)) + } + + return nil +} + +type awsRestjson1_serializeOpListChannelMembershipsForAppInstanceUser struct { +} + +func (*awsRestjson1_serializeOpListChannelMembershipsForAppInstanceUser) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListChannelMembershipsForAppInstanceUser) 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.(*ListChannelMembershipsForAppInstanceUserInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels?scope=app-instance-user-memberships") + 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 err := awsRestjson1_serializeOpHttpBindingsListChannelMembershipsForAppInstanceUserInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListChannelMembershipsForAppInstanceUserInput(v *ListChannelMembershipsForAppInstanceUserInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceUserArn != nil { + encoder.SetQuery("app-instance-user-arn").String(*v.AppInstanceUserArn) + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListChannelMessages struct { +} + +func (*awsRestjson1_serializeOpListChannelMessages) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListChannelMessages) 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.(*ListChannelMessagesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/messages") + 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 err := awsRestjson1_serializeOpHttpBindingsListChannelMessagesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListChannelMessagesInput(v *ListChannelMessagesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if v.NotAfter != nil { + encoder.SetQuery("not-after").String(smithytime.FormatDateTime(*v.NotAfter)) + } + + if v.NotBefore != nil { + encoder.SetQuery("not-before").String(smithytime.FormatDateTime(*v.NotBefore)) + } + + if len(v.SortOrder) > 0 { + encoder.SetQuery("sort-order").String(string(v.SortOrder)) + } + + return nil +} + +type awsRestjson1_serializeOpListChannelModerators struct { +} + +func (*awsRestjson1_serializeOpListChannelModerators) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListChannelModerators) 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.(*ListChannelModeratorsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/moderators") + 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 err := awsRestjson1_serializeOpHttpBindingsListChannelModeratorsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListChannelModeratorsInput(v *ListChannelModeratorsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListChannels struct { +} + +func (*awsRestjson1_serializeOpListChannels) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListChannels) 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.(*ListChannelsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels") + 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 err := awsRestjson1_serializeOpHttpBindingsListChannelsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListChannelsInput(v *ListChannelsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceArn != nil { + encoder.SetQuery("app-instance-arn").String(*v.AppInstanceArn) + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if len(v.Privacy) > 0 { + encoder.SetQuery("privacy").String(string(v.Privacy)) + } + + return nil +} + +type awsRestjson1_serializeOpListChannelsModeratedByAppInstanceUser struct { +} + +func (*awsRestjson1_serializeOpListChannelsModeratedByAppInstanceUser) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListChannelsModeratedByAppInstanceUser) 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.(*ListChannelsModeratedByAppInstanceUserInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels?scope=app-instance-user-moderated-channels") + 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 err := awsRestjson1_serializeOpHttpBindingsListChannelsModeratedByAppInstanceUserInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListChannelsModeratedByAppInstanceUserInput(v *ListChannelsModeratedByAppInstanceUserInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceUserArn != nil { + encoder.SetQuery("app-instance-user-arn").String(*v.AppInstanceUserArn) + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpRedactChannelMessage struct { +} + +func (*awsRestjson1_serializeOpRedactChannelMessage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRedactChannelMessage) 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.(*RedactChannelMessageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/messages/{MessageId}?operation=redact") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsRedactChannelMessageInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsRedactChannelMessageInput(v *RedactChannelMessageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MessageId == nil || len(*v.MessageId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MessageId must not be empty")} + } + if v.MessageId != nil { + if err := encoder.SetURI("MessageId").String(*v.MessageId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpSendChannelMessage struct { +} + +func (*awsRestjson1_serializeOpSendChannelMessage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSendChannelMessage) 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.(*SendChannelMessageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/messages") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsSendChannelMessageInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSendChannelMessageInput(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_serializeOpHttpBindingsSendChannelMessageInput(v *SendChannelMessageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSendChannelMessageInput(v *SendChannelMessageInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("ClientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.Content != nil { + ok := object.Key("Content") + ok.String(*v.Content) + } + + if v.Metadata != nil { + ok := object.Key("Metadata") + ok.String(*v.Metadata) + } + + if len(v.Persistence) > 0 { + ok := object.Key("Persistence") + ok.String(string(v.Persistence)) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateChannel struct { +} + +func (*awsRestjson1_serializeOpUpdateChannel) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateChannel) 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.(*UpdateChannelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateChannelInput(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_serializeOpHttpBindingsUpdateChannelInput(v *UpdateChannelInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateChannelInput(v *UpdateChannelInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Metadata != nil { + ok := object.Key("Metadata") + ok.String(*v.Metadata) + } + + if len(v.Mode) > 0 { + ok := object.Key("Mode") + ok.String(string(v.Mode)) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateChannelMessage struct { +} + +func (*awsRestjson1_serializeOpUpdateChannelMessage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateChannelMessage) 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.(*UpdateChannelMessageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/messages/{MessageId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelMessageInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateChannelMessageInput(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_serializeOpHttpBindingsUpdateChannelMessageInput(v *UpdateChannelMessageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + if v.MessageId == nil || len(*v.MessageId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MessageId must not be empty")} + } + if v.MessageId != nil { + if err := encoder.SetURI("MessageId").String(*v.MessageId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateChannelMessageInput(v *UpdateChannelMessageInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Content != nil { + ok := object.Key("Content") + ok.String(*v.Content) + } + + if v.Metadata != nil { + ok := object.Key("Metadata") + ok.String(*v.Metadata) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateChannelReadMarker struct { +} + +func (*awsRestjson1_serializeOpUpdateChannelReadMarker) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateChannelReadMarker) 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.(*UpdateChannelReadMarkerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/readMarker") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelReadMarkerInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateChannelReadMarkerInput(v *UpdateChannelReadMarkerInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + } + if v.ChannelArn != nil { + if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + return err + } + } + + if v.ChimeBearer != nil && len(*v.ChimeBearer) > 0 { + locationName := "X-Amz-Chime-Bearer" + encoder.SetHeader(locationName).String(*v.ChimeBearer) + } + + return nil +} + +func awsRestjson1_serializeDocumentMemberArns(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_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentTag(&v[i], av); err != nil { + return err + } + } + return nil +} diff --git a/service/chimesdkmessaging/types/enums.go b/service/chimesdkmessaging/types/enums.go new file mode 100644 index 00000000000..84292509dc2 --- /dev/null +++ b/service/chimesdkmessaging/types/enums.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type ChannelMembershipType string + +// Enum values for ChannelMembershipType +const ( + ChannelMembershipTypeDefault ChannelMembershipType = "DEFAULT" + ChannelMembershipTypeHidden ChannelMembershipType = "HIDDEN" +) + +// Values returns all known values for ChannelMembershipType. 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 (ChannelMembershipType) Values() []ChannelMembershipType { + return []ChannelMembershipType{ + "DEFAULT", + "HIDDEN", + } +} + +type ChannelMessagePersistenceType string + +// Enum values for ChannelMessagePersistenceType +const ( + ChannelMessagePersistenceTypePersistent ChannelMessagePersistenceType = "PERSISTENT" + ChannelMessagePersistenceTypeNonPersistent ChannelMessagePersistenceType = "NON_PERSISTENT" +) + +// Values returns all known values for ChannelMessagePersistenceType. 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 (ChannelMessagePersistenceType) Values() []ChannelMessagePersistenceType { + return []ChannelMessagePersistenceType{ + "PERSISTENT", + "NON_PERSISTENT", + } +} + +type ChannelMessageType string + +// Enum values for ChannelMessageType +const ( + ChannelMessageTypeStandard ChannelMessageType = "STANDARD" + ChannelMessageTypeControl ChannelMessageType = "CONTROL" +) + +// Values returns all known values for ChannelMessageType. 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 (ChannelMessageType) Values() []ChannelMessageType { + return []ChannelMessageType{ + "STANDARD", + "CONTROL", + } +} + +type ChannelMode string + +// Enum values for ChannelMode +const ( + ChannelModeUnrestricted ChannelMode = "UNRESTRICTED" + ChannelModeRestricted ChannelMode = "RESTRICTED" +) + +// Values returns all known values for ChannelMode. 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 (ChannelMode) Values() []ChannelMode { + return []ChannelMode{ + "UNRESTRICTED", + "RESTRICTED", + } +} + +type ChannelPrivacy string + +// Enum values for ChannelPrivacy +const ( + ChannelPrivacyPublic ChannelPrivacy = "PUBLIC" + ChannelPrivacyPrivate ChannelPrivacy = "PRIVATE" +) + +// Values returns all known values for ChannelPrivacy. 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 (ChannelPrivacy) Values() []ChannelPrivacy { + return []ChannelPrivacy{ + "PUBLIC", + "PRIVATE", + } +} + +type ErrorCode string + +// Enum values for ErrorCode +const ( + ErrorCodeBadRequest ErrorCode = "BadRequest" + ErrorCodeConflict ErrorCode = "Conflict" + ErrorCodeForbidden ErrorCode = "Forbidden" + ErrorCodeNotFound ErrorCode = "NotFound" + ErrorCodePreconditionFailed ErrorCode = "PreconditionFailed" + ErrorCodeResourceLimitExceeded ErrorCode = "ResourceLimitExceeded" + ErrorCodeServiceFailure ErrorCode = "ServiceFailure" + ErrorCodeAccessDenied ErrorCode = "AccessDenied" + ErrorCodeServiceUnavailable ErrorCode = "ServiceUnavailable" + ErrorCodeThrottled ErrorCode = "Throttled" + ErrorCodeThrottling ErrorCode = "Throttling" + ErrorCodeUnauthorized ErrorCode = "Unauthorized" + ErrorCodeUnprocessable ErrorCode = "Unprocessable" + ErrorCodeVoiceConnectorGroupAssociationsExist ErrorCode = "VoiceConnectorGroupAssociationsExist" + ErrorCodePhoneNumberAssociationsExist ErrorCode = "PhoneNumberAssociationsExist" +) + +// Values returns all known values for ErrorCode. 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 (ErrorCode) Values() []ErrorCode { + return []ErrorCode{ + "BadRequest", + "Conflict", + "Forbidden", + "NotFound", + "PreconditionFailed", + "ResourceLimitExceeded", + "ServiceFailure", + "AccessDenied", + "ServiceUnavailable", + "Throttled", + "Throttling", + "Unauthorized", + "Unprocessable", + "VoiceConnectorGroupAssociationsExist", + "PhoneNumberAssociationsExist", + } +} + +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", + } +} diff --git a/service/chimesdkmessaging/types/errors.go b/service/chimesdkmessaging/types/errors.go new file mode 100644 index 00000000000..a1ca259f61e --- /dev/null +++ b/service/chimesdkmessaging/types/errors.go @@ -0,0 +1,198 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// The input parameters don't match the service's restrictions. +type BadRequestException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *BadRequestException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *BadRequestException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *BadRequestException) ErrorCode() string { return "BadRequestException" } +func (e *BadRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request could not be processed because of conflict in the current state of +// the resource. +type ConflictException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { return "ConflictException" } +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The client is permanently forbidden from making the request. +type ForbiddenException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *ForbiddenException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ForbiddenException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ForbiddenException) ErrorCode() string { return "ForbiddenException" } +func (e *ForbiddenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// One or more of the resources in the request does not exist in the system. +type NotFoundException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *NotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NotFoundException) ErrorCode() string { return "NotFoundException" } +func (e *NotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request exceeds the resource limit. +type ResourceLimitExceededException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *ResourceLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceLimitExceededException) ErrorCode() string { return "ResourceLimitExceededException" } +func (e *ResourceLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The service encountered an unexpected error. +type ServiceFailureException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *ServiceFailureException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceFailureException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceFailureException) ErrorCode() string { return "ServiceFailureException" } +func (e *ServiceFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The service is currently unavailable. +type ServiceUnavailableException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *ServiceUnavailableException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceUnavailableException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceUnavailableException) ErrorCode() string { return "ServiceUnavailableException" } +func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The client exceeded its request rate limit. +type ThrottledClientException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *ThrottledClientException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottledClientException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottledClientException) ErrorCode() string { return "ThrottledClientException" } +func (e *ThrottledClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The client is not currently authorized to make the request. +type UnauthorizedClientException struct { + Message *string + + Code ErrorCode + + noSmithyDocumentSerde +} + +func (e *UnauthorizedClientException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnauthorizedClientException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnauthorizedClientException) ErrorCode() string { return "UnauthorizedClientException" } +func (e *UnauthorizedClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/chimesdkmessaging/types/types.go b/service/chimesdkmessaging/types/types.go new file mode 100644 index 00000000000..78c290f9c3c --- /dev/null +++ b/service/chimesdkmessaging/types/types.go @@ -0,0 +1,330 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// Summary of the membership details of an AppInstanceUser. +type AppInstanceUserMembershipSummary struct { + + // The time at which a message was last read. + ReadMarkerTimestamp *time.Time + + // The type of ChannelMembership. + Type ChannelMembershipType + + noSmithyDocumentSerde +} + +// The membership information, including member ARNs, the channel ARN, and +// membership types. +type BatchChannelMemberships struct { + + // The ARN of the channel to which you're adding users. + ChannelArn *string + + // The identifier of the member who invited another member. + InvitedBy *Identity + + // The users successfully added to the request. + Members []Identity + + // The membership types set for the channel users. + Type ChannelMembershipType + + noSmithyDocumentSerde +} + +// A list of failed member ARNs, error codes, and error messages. +type BatchCreateChannelMembershipError struct { + + // The error code. + ErrorCode ErrorCode + + // The error message. + ErrorMessage *string + + // The ARN of the member that the service couldn't add. + MemberArn *string + + noSmithyDocumentSerde +} + +// The details of a channel. +type Channel struct { + + // The ARN of a channel. + ChannelArn *string + + // The AppInstanceUser who created the channel. + CreatedBy *Identity + + // The time at which the AppInstanceUser created the channel. + CreatedTimestamp *time.Time + + // The time at which a member sent the last message in the channel. + LastMessageTimestamp *time.Time + + // The time at which a channel was last updated. + LastUpdatedTimestamp *time.Time + + // The channel's metadata. + Metadata *string + + // The mode of the channel. + Mode ChannelMode + + // The name of a channel. + Name *string + + // The channel's privacy setting. + Privacy ChannelPrivacy + + noSmithyDocumentSerde +} + +// The details of a channel ban. +type ChannelBan struct { + + // The ARN of the channel from which a member is being banned. + ChannelArn *string + + // The AppInstanceUser who created the ban. + CreatedBy *Identity + + // The time at which the ban was created. + CreatedTimestamp *time.Time + + // The member being banned from the channel. + Member *Identity + + noSmithyDocumentSerde +} + +// Summary of the details of a ChannelBan. +type ChannelBanSummary struct { + + // The member being banned from a channel. + Member *Identity + + noSmithyDocumentSerde +} + +// The details of a channel member. +type ChannelMembership struct { + + // The ARN of the member's channel. + ChannelArn *string + + // The time at which the channel membership was created. + CreatedTimestamp *time.Time + + // The identifier of the member who invited another member. + InvitedBy *Identity + + // The time at which a channel membership was last updated. + LastUpdatedTimestamp *time.Time + + // The data of the channel member. + Member *Identity + + // The membership type set for the channel member. + Type ChannelMembershipType + + noSmithyDocumentSerde +} + +// Summary of the channel membership details of an AppInstanceUser. +type ChannelMembershipForAppInstanceUserSummary struct { + + // Returns the channel membership data for an AppInstance. + AppInstanceUserMembershipSummary *AppInstanceUserMembershipSummary + + // Returns the channel data for an AppInstance. + ChannelSummary *ChannelSummary + + noSmithyDocumentSerde +} + +// Summary of the details of a ChannelMembership. +type ChannelMembershipSummary struct { + + // A member's summary data. + Member *Identity + + noSmithyDocumentSerde +} + +// The details of a message in a channel. +type ChannelMessage struct { + + // The ARN of the channel. + ChannelArn *string + + // The message content. + Content *string + + // The time at which the message was created. + CreatedTimestamp *time.Time + + // The time at which a message was edited. + LastEditedTimestamp *time.Time + + // The time at which a message was updated. + LastUpdatedTimestamp *time.Time + + // The ID of a message. + MessageId *string + + // The message metadata. + Metadata *string + + // The persistence setting for a channel message. + Persistence ChannelMessagePersistenceType + + // Hides the content of a message. + Redacted bool + + // The message sender. + Sender *Identity + + // The message type. + Type ChannelMessageType + + noSmithyDocumentSerde +} + +// Summary of the messages in a Channel. +type ChannelMessageSummary struct { + + // The content of the message. + Content *string + + // The time at which the message summary was created. + CreatedTimestamp *time.Time + + // The time at which a message was last edited. + LastEditedTimestamp *time.Time + + // The time at which a message was last updated. + LastUpdatedTimestamp *time.Time + + // The ID of the message. + MessageId *string + + // The metadata of the message. + Metadata *string + + // Indicates whether a message was redacted. + Redacted bool + + // The message sender. + Sender *Identity + + // The type of message. + Type ChannelMessageType + + noSmithyDocumentSerde +} + +// Summary of the details of a moderated channel. +type ChannelModeratedByAppInstanceUserSummary struct { + + // Summary of the details of a Channel. + ChannelSummary *ChannelSummary + + noSmithyDocumentSerde +} + +// The details of a channel moderator. +type ChannelModerator struct { + + // The ARN of the moderator's channel. + ChannelArn *string + + // The AppInstanceUser who created the moderator. + CreatedBy *Identity + + // The time at which the moderator was created. + CreatedTimestamp *time.Time + + // The moderator's data. + Moderator *Identity + + noSmithyDocumentSerde +} + +// Summary of the details of a ChannelModerator. +type ChannelModeratorSummary struct { + + // The data for a moderator. + Moderator *Identity + + noSmithyDocumentSerde +} + +// Summary of the details of a Channel. +type ChannelSummary struct { + + // The ARN of the channel. + ChannelArn *string + + // The time at which the last message in a channel was sent. + LastMessageTimestamp *time.Time + + // The metadata of the channel. + Metadata *string + + // The mode of the channel. + Mode ChannelMode + + // The name of the channel. + Name *string + + // The privacy setting of the channel. + Privacy ChannelPrivacy + + noSmithyDocumentSerde +} + +// The details of a user. +type Identity struct { + + // The ARN in an Identity. + Arn *string + + // The name in an Identity. + Name *string + + noSmithyDocumentSerde +} + +// The websocket endpoint used to connect to Amazon Chime SDK messaging. +type MessagingSessionEndpoint struct { + + // The endpoint to which you establish a websocket connection. + Url *string + + noSmithyDocumentSerde +} + +// Describes a tag applied to a resource. +type Tag struct { + + // The key of the tag. + // + // This member is required. + Key *string + + // The value of the tag. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/chimesdkmessaging/validators.go b/service/chimesdkmessaging/validators.go new file mode 100644 index 00000000000..be5ee69100e --- /dev/null +++ b/service/chimesdkmessaging/validators.go @@ -0,0 +1,1338 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpBatchCreateChannelMembership struct { +} + +func (*validateOpBatchCreateChannelMembership) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchCreateChannelMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchCreateChannelMembershipInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchCreateChannelMembershipInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateChannelBan struct { +} + +func (*validateOpCreateChannelBan) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateChannelBan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateChannelBanInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateChannelBanInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateChannel struct { +} + +func (*validateOpCreateChannel) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateChannelInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateChannelInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateChannelMembership struct { +} + +func (*validateOpCreateChannelMembership) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateChannelMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateChannelMembershipInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateChannelMembershipInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateChannelModerator struct { +} + +func (*validateOpCreateChannelModerator) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateChannelModerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateChannelModeratorInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateChannelModeratorInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteChannelBan struct { +} + +func (*validateOpDeleteChannelBan) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteChannelBan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteChannelBanInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteChannelBanInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteChannel struct { +} + +func (*validateOpDeleteChannel) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteChannelInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteChannelInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteChannelMembership struct { +} + +func (*validateOpDeleteChannelMembership) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteChannelMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteChannelMembershipInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteChannelMembershipInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteChannelMessage struct { +} + +func (*validateOpDeleteChannelMessage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteChannelMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteChannelMessageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteChannelMessageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteChannelModerator struct { +} + +func (*validateOpDeleteChannelModerator) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteChannelModerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteChannelModeratorInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteChannelModeratorInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeChannelBan struct { +} + +func (*validateOpDescribeChannelBan) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeChannelBan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeChannelBanInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeChannelBanInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeChannel struct { +} + +func (*validateOpDescribeChannel) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeChannelInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeChannelInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeChannelMembershipForAppInstanceUser struct { +} + +func (*validateOpDescribeChannelMembershipForAppInstanceUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeChannelMembershipForAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeChannelMembershipForAppInstanceUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeChannelMembershipForAppInstanceUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeChannelMembership struct { +} + +func (*validateOpDescribeChannelMembership) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeChannelMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeChannelMembershipInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeChannelMembershipInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeChannelModeratedByAppInstanceUser struct { +} + +func (*validateOpDescribeChannelModeratedByAppInstanceUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeChannelModeratedByAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeChannelModeratedByAppInstanceUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeChannelModeratedByAppInstanceUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeChannelModerator struct { +} + +func (*validateOpDescribeChannelModerator) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeChannelModerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeChannelModeratorInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeChannelModeratorInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetChannelMessage struct { +} + +func (*validateOpGetChannelMessage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetChannelMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetChannelMessageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetChannelMessageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListChannelBans struct { +} + +func (*validateOpListChannelBans) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListChannelBans) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListChannelBansInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListChannelBansInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListChannelMembershipsForAppInstanceUser struct { +} + +func (*validateOpListChannelMembershipsForAppInstanceUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListChannelMembershipsForAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListChannelMembershipsForAppInstanceUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListChannelMembershipsForAppInstanceUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListChannelMemberships struct { +} + +func (*validateOpListChannelMemberships) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListChannelMemberships) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListChannelMembershipsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListChannelMembershipsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListChannelMessages struct { +} + +func (*validateOpListChannelMessages) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListChannelMessages) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListChannelMessagesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListChannelMessagesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListChannelModerators struct { +} + +func (*validateOpListChannelModerators) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListChannelModerators) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListChannelModeratorsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListChannelModeratorsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListChannels struct { +} + +func (*validateOpListChannels) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListChannels) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListChannelsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListChannelsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListChannelsModeratedByAppInstanceUser struct { +} + +func (*validateOpListChannelsModeratedByAppInstanceUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListChannelsModeratedByAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListChannelsModeratedByAppInstanceUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListChannelsModeratedByAppInstanceUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRedactChannelMessage struct { +} + +func (*validateOpRedactChannelMessage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRedactChannelMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RedactChannelMessageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRedactChannelMessageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSendChannelMessage struct { +} + +func (*validateOpSendChannelMessage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSendChannelMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SendChannelMessageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSendChannelMessageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateChannel struct { +} + +func (*validateOpUpdateChannel) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateChannelInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateChannelInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateChannelMessage struct { +} + +func (*validateOpUpdateChannelMessage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateChannelMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateChannelMessageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateChannelMessageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateChannelReadMarker struct { +} + +func (*validateOpUpdateChannelReadMarker) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateChannelReadMarker) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateChannelReadMarkerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateChannelReadMarkerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpBatchCreateChannelMembershipValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchCreateChannelMembership{}, middleware.After) +} + +func addOpCreateChannelBanValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateChannelBan{}, middleware.After) +} + +func addOpCreateChannelValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateChannel{}, middleware.After) +} + +func addOpCreateChannelMembershipValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateChannelMembership{}, middleware.After) +} + +func addOpCreateChannelModeratorValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateChannelModerator{}, middleware.After) +} + +func addOpDeleteChannelBanValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteChannelBan{}, middleware.After) +} + +func addOpDeleteChannelValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteChannel{}, middleware.After) +} + +func addOpDeleteChannelMembershipValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteChannelMembership{}, middleware.After) +} + +func addOpDeleteChannelMessageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteChannelMessage{}, middleware.After) +} + +func addOpDeleteChannelModeratorValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteChannelModerator{}, middleware.After) +} + +func addOpDescribeChannelBanValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeChannelBan{}, middleware.After) +} + +func addOpDescribeChannelValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeChannel{}, middleware.After) +} + +func addOpDescribeChannelMembershipForAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeChannelMembershipForAppInstanceUser{}, middleware.After) +} + +func addOpDescribeChannelMembershipValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeChannelMembership{}, middleware.After) +} + +func addOpDescribeChannelModeratedByAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeChannelModeratedByAppInstanceUser{}, middleware.After) +} + +func addOpDescribeChannelModeratorValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeChannelModerator{}, middleware.After) +} + +func addOpGetChannelMessageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetChannelMessage{}, middleware.After) +} + +func addOpListChannelBansValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListChannelBans{}, middleware.After) +} + +func addOpListChannelMembershipsForAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListChannelMembershipsForAppInstanceUser{}, middleware.After) +} + +func addOpListChannelMembershipsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListChannelMemberships{}, middleware.After) +} + +func addOpListChannelMessagesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListChannelMessages{}, middleware.After) +} + +func addOpListChannelModeratorsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListChannelModerators{}, middleware.After) +} + +func addOpListChannelsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListChannels{}, middleware.After) +} + +func addOpListChannelsModeratedByAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListChannelsModeratedByAppInstanceUser{}, middleware.After) +} + +func addOpRedactChannelMessageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRedactChannelMessage{}, middleware.After) +} + +func addOpSendChannelMessageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSendChannelMessage{}, middleware.After) +} + +func addOpUpdateChannelValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateChannel{}, middleware.After) +} + +func addOpUpdateChannelMessageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateChannelMessage{}, middleware.After) +} + +func addOpUpdateChannelReadMarkerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateChannelReadMarker{}, middleware.After) +} + +func validateTag(v *types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Tag"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTagList(v []types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagList"} + for i := range v { + if err := validateTag(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchCreateChannelMembershipInput(v *BatchCreateChannelMembershipInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchCreateChannelMembershipInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.MemberArns == nil { + invalidParams.Add(smithy.NewErrParamRequired("MemberArns")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateChannelBanInput(v *CreateChannelBanInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateChannelBanInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.MemberArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("MemberArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateChannelInput(v *CreateChannelInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateChannelInput"} + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.ClientRequestToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateChannelMembershipInput(v *CreateChannelMembershipInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateChannelMembershipInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.MemberArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("MemberArn")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateChannelModeratorInput(v *CreateChannelModeratorInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateChannelModeratorInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.ChannelModeratorArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelModeratorArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteChannelBanInput(v *DeleteChannelBanInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelBanInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.MemberArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("MemberArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteChannelInput(v *DeleteChannelInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteChannelMembershipInput(v *DeleteChannelMembershipInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelMembershipInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.MemberArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("MemberArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteChannelMessageInput(v *DeleteChannelMessageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelMessageInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.MessageId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MessageId")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteChannelModeratorInput(v *DeleteChannelModeratorInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelModeratorInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.ChannelModeratorArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelModeratorArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeChannelBanInput(v *DescribeChannelBanInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelBanInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.MemberArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("MemberArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeChannelInput(v *DescribeChannelInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeChannelMembershipForAppInstanceUserInput(v *DescribeChannelMembershipForAppInstanceUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelMembershipForAppInstanceUserInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.AppInstanceUserArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeChannelMembershipInput(v *DescribeChannelMembershipInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelMembershipInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.MemberArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("MemberArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeChannelModeratedByAppInstanceUserInput(v *DescribeChannelModeratedByAppInstanceUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelModeratedByAppInstanceUserInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.AppInstanceUserArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeChannelModeratorInput(v *DescribeChannelModeratorInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelModeratorInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.ChannelModeratorArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelModeratorArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetChannelMessageInput(v *GetChannelMessageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetChannelMessageInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.MessageId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MessageId")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListChannelBansInput(v *ListChannelBansInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListChannelBansInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListChannelMembershipsForAppInstanceUserInput(v *ListChannelMembershipsForAppInstanceUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListChannelMembershipsForAppInstanceUserInput"} + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListChannelMembershipsInput(v *ListChannelMembershipsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListChannelMembershipsInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListChannelMessagesInput(v *ListChannelMessagesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListChannelMessagesInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListChannelModeratorsInput(v *ListChannelModeratorsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListChannelModeratorsInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListChannelsInput(v *ListChannelsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListChannelsInput"} + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListChannelsModeratedByAppInstanceUserInput(v *ListChannelsModeratedByAppInstanceUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListChannelsModeratedByAppInstanceUserInput"} + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRedactChannelMessageInput(v *RedactChannelMessageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RedactChannelMessageInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.MessageId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MessageId")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSendChannelMessageInput(v *SendChannelMessageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SendChannelMessageInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.Content == nil { + invalidParams.Add(smithy.NewErrParamRequired("Content")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if len(v.Persistence) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Persistence")) + } + if v.ClientRequestToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateChannelInput(v *UpdateChannelInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateChannelInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.Mode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Mode")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateChannelMessageInput(v *UpdateChannelMessageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateChannelMessageInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.MessageId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MessageId")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateChannelReadMarkerInput(v *UpdateChannelReadMarkerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateChannelReadMarkerInput"} + if v.ChannelArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + } + if v.ChimeBearer == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChimeBearer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/codebuild/api_op_BatchGetProjects.go b/service/codebuild/api_op_BatchGetProjects.go index a0342d2451c..b4960210798 100644 --- a/service/codebuild/api_op_BatchGetProjects.go +++ b/service/codebuild/api_op_BatchGetProjects.go @@ -30,8 +30,8 @@ func (c *Client) BatchGetProjects(ctx context.Context, params *BatchGetProjectsI type BatchGetProjectsInput struct { // The names or ARNs of the build projects. To get information about a project - // shared with your AWS account, its ARN must be specified. You cannot specify a - // shared project using its name. + // shared with your Amazon Web Services account, its ARN must be specified. You + // cannot specify a shared project using its name. // // This member is required. Names []string diff --git a/service/codebuild/api_op_CreateProject.go b/service/codebuild/api_op_CreateProject.go index 334ba4f6466..119a19034af 100644 --- a/service/codebuild/api_op_CreateProject.go +++ b/service/codebuild/api_op_CreateProject.go @@ -44,8 +44,8 @@ type CreateProjectInput struct { // This member is required. Name *string - // The ARN of the AWS Identity and Access Management (IAM) role that enables AWS - // CodeBuild to interact with dependent AWS services on behalf of the AWS account. + // The ARN of the IAM role that enables CodeBuild to interact with dependent Amazon + // Web Services services on behalf of the Amazon Web Services account. // // This member is required. ServiceRole *string @@ -76,11 +76,11 @@ type CreateProjectInput struct { // A description that makes the build project easy to identify. Description *string - // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used - // for encrypting the build output artifacts. You can use a cross-account KMS key - // to encrypt the build output artifacts if your service role has permission to - // that key. You can specify either the Amazon Resource Name (ARN) of the CMK or, - // if available, the CMK's alias (using the format alias/). + // The Key Management Service customer master key (CMK) to be used for encrypting + // the build output artifacts. You can use a cross-account KMS key to encrypt the + // build output artifacts if your service role has permission to that key. You can + // specify either the Amazon Resource Name (ARN) of the CMK or, if available, the + // CMK's alias (using the format alias/). EncryptionKey *string // An array of ProjectFileSystemLocation objects for a CodeBuild build project. A @@ -89,8 +89,8 @@ type CreateProjectInput struct { // File System. FileSystemLocations []types.ProjectFileSystemLocation - // Information about logs for the build project. These can be logs in Amazon - // CloudWatch Logs, logs uploaded to a specified S3 bucket, or both. + // Information about logs for the build project. These can be logs in CloudWatch + // Logs, logs uploaded to a specified S3 bucket, or both. LogsConfig *types.LogsConfig // The number of minutes a build is allowed to be queued before it times out. @@ -110,43 +110,43 @@ type CreateProjectInput struct { // A version of the build input to be built for this project. If not specified, the // latest version is used. If specified, it must be one of: // - // * For AWS CodeCommit: - // the commit ID, branch, or Git tag to use. + // * For CodeCommit: the + // commit ID, branch, or Git tag to use. // - // * For GitHub: the commit ID, pull - // request ID, branch name, or tag name that corresponds to the version of the - // source code you want to build. If a pull request ID is specified, it must use - // the format pr/pull-request-ID (for example pr/25). If a branch name is - // specified, the branch's HEAD commit ID is used. If not specified, the default - // branch's HEAD commit ID is used. + // * For GitHub: the commit ID, pull request + // ID, branch name, or tag name that corresponds to the version of the source code + // you want to build. If a pull request ID is specified, it must use the format + // pr/pull-request-ID (for example pr/25). If a branch name is specified, the + // branch's HEAD commit ID is used. If not specified, the default branch's HEAD + // commit ID is used. // - // * For Bitbucket: the commit ID, branch name, - // or tag name that corresponds to the version of the source code you want to - // build. If a branch name is specified, the branch's HEAD commit ID is used. If - // not specified, the default branch's HEAD commit ID is used. + // * For Bitbucket: the commit ID, branch name, or tag name + // that corresponds to the version of the source code you want to build. If a + // branch name is specified, the branch's HEAD commit ID is used. If not specified, + // the default branch's HEAD commit ID is used. // - // * For Amazon S3: - // the version ID of the object that represents the build input ZIP file to - // use. + // * For Amazon S3: the version ID of + // the object that represents the build input ZIP file to use. // - // If sourceVersion is specified at the build level, then that version takes - // precedence over this sourceVersion (at the project level). For more information, - // see Source Version Sample with CodeBuild + // If sourceVersion is + // specified at the build level, then that version takes precedence over this + // sourceVersion (at the project level). For more information, see Source Version + // Sample with CodeBuild // (https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html) - // in the AWS CodeBuild User Guide. + // in the CodeBuild User Guide. SourceVersion *string // A list of tag key and value pairs associated with this build project. These tags - // are available for use by AWS services that support AWS CodeBuild build project - // tags. + // are available for use by Amazon Web Services services that support CodeBuild + // build project tags. Tags []types.Tag - // How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before - // it times out any build that has not been marked as completed. The default is 60 + // How long, in minutes, from 5 to 480 (8 hours), for CodeBuild to wait before it + // times out any build that has not been marked as completed. The default is 60 // minutes. TimeoutInMinutes *int32 - // VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC. + // VpcConfig enables CodeBuild to access resources in an Amazon VPC. VpcConfig *types.VpcConfig noSmithyDocumentSerde diff --git a/service/codebuild/api_op_CreateReportGroup.go b/service/codebuild/api_op_CreateReportGroup.go index 304e6a0c5d6..b03c35e23e2 100644 --- a/service/codebuild/api_op_CreateReportGroup.go +++ b/service/codebuild/api_op_CreateReportGroup.go @@ -46,8 +46,8 @@ type CreateReportGroupInput struct { Type types.ReportType // A list of tag key and value pairs associated with this report group. These tags - // are available for use by AWS services that support AWS CodeBuild report group - // tags. + // are available for use by Amazon Web Services services that support CodeBuild + // report group tags. Tags []types.Tag noSmithyDocumentSerde diff --git a/service/codebuild/api_op_CreateWebhook.go b/service/codebuild/api_op_CreateWebhook.go index e23a85b6edb..af039845dad 100644 --- a/service/codebuild/api_op_CreateWebhook.go +++ b/service/codebuild/api_op_CreateWebhook.go @@ -11,16 +11,16 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// For an existing AWS CodeBuild build project that has its source code stored in a -// GitHub or Bitbucket repository, enables AWS CodeBuild to start rebuilding the -// source code every time a code change is pushed to the repository. If you enable -// webhooks for an AWS CodeBuild project, and the project is used as a build step -// in AWS CodePipeline, then two identical builds are created for each commit. One -// build is triggered through webhooks, and one through AWS CodePipeline. Because -// billing is on a per-build basis, you are billed for both builds. Therefore, if -// you are using AWS CodePipeline, we recommend that you disable webhooks in AWS -// CodeBuild. In the AWS CodeBuild console, clear the Webhook box. For more -// information, see step 5 in Change a Build Project's Settings +// For an existing CodeBuild build project that has its source code stored in a +// GitHub or Bitbucket repository, enables CodeBuild to start rebuilding the source +// code every time a code change is pushed to the repository. If you enable +// webhooks for an CodeBuild project, and the project is used as a build step in +// CodePipeline, then two identical builds are created for each commit. One build +// is triggered through webhooks, and one through CodePipeline. Because billing is +// on a per-build basis, you are billed for both builds. Therefore, if you are +// using CodePipeline, we recommend that you disable webhooks in CodeBuild. In the +// CodeBuild console, clear the Webhook box. For more information, see step 5 in +// Change a Build Project's Settings // (https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console). func (c *Client) CreateWebhook(ctx context.Context, params *CreateWebhookInput, optFns ...func(*Options)) (*CreateWebhookOutput, error) { if params == nil { @@ -39,7 +39,7 @@ func (c *Client) CreateWebhook(ctx context.Context, params *CreateWebhookInput, type CreateWebhookInput struct { - // The name of the AWS CodeBuild project. + // The name of the CodeBuild project. // // This member is required. ProjectName *string @@ -65,7 +65,7 @@ type CreateWebhookInput struct { type CreateWebhookOutput struct { // Information about a webhook that connects repository events to a build project - // in AWS CodeBuild. + // in CodeBuild. Webhook *types.Webhook // Metadata pertaining to the operation's result. diff --git a/service/codebuild/api_op_DeleteWebhook.go b/service/codebuild/api_op_DeleteWebhook.go index 63a90f1eb8e..3ce25502894 100644 --- a/service/codebuild/api_op_DeleteWebhook.go +++ b/service/codebuild/api_op_DeleteWebhook.go @@ -10,9 +10,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// For an existing AWS CodeBuild build project that has its source code stored in a -// GitHub or Bitbucket repository, stops AWS CodeBuild from rebuilding the source -// code every time a code change is pushed to the repository. +// For an existing CodeBuild build project that has its source code stored in a +// GitHub or Bitbucket repository, stops CodeBuild from rebuilding the source code +// every time a code change is pushed to the repository. func (c *Client) DeleteWebhook(ctx context.Context, params *DeleteWebhookInput, optFns ...func(*Options)) (*DeleteWebhookOutput, error) { if params == nil { params = &DeleteWebhookInput{} @@ -30,7 +30,7 @@ func (c *Client) DeleteWebhook(ctx context.Context, params *DeleteWebhookInput, type DeleteWebhookInput struct { - // The name of the AWS CodeBuild project. + // The name of the CodeBuild project. // // This member is required. ProjectName *string diff --git a/service/codebuild/api_op_ImportSourceCredentials.go b/service/codebuild/api_op_ImportSourceCredentials.go index 4fa2da59b1e..93d990bfb93 100644 --- a/service/codebuild/api_op_ImportSourceCredentials.go +++ b/service/codebuild/api_op_ImportSourceCredentials.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Imports the source repository credentials for an AWS CodeBuild project that has -// its source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository. +// Imports the source repository credentials for an CodeBuild project that has its +// source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository. func (c *Client) ImportSourceCredentials(ctx context.Context, params *ImportSourceCredentialsInput, optFns ...func(*Options)) (*ImportSourceCredentialsOutput, error) { if params == nil { params = &ImportSourceCredentialsInput{} @@ -32,7 +32,7 @@ type ImportSourceCredentialsInput struct { // The type of authentication used to connect to a GitHub, GitHub Enterprise, or // Bitbucket repository. An OAUTH connection is not supported by the API and must - // be created using the AWS CodeBuild console. + // be created using the CodeBuild console. // // This member is required. AuthType types.AuthType diff --git a/service/codebuild/api_op_InvalidateProjectCache.go b/service/codebuild/api_op_InvalidateProjectCache.go index def0a121d06..429220b3d6f 100644 --- a/service/codebuild/api_op_InvalidateProjectCache.go +++ b/service/codebuild/api_op_InvalidateProjectCache.go @@ -28,7 +28,7 @@ func (c *Client) InvalidateProjectCache(ctx context.Context, params *InvalidateP type InvalidateProjectCacheInput struct { - // The name of the AWS CodeBuild build project that the cache is reset for. + // The name of the CodeBuild build project that the cache is reset for. // // This member is required. ProjectName *string diff --git a/service/codebuild/api_op_ListBuildsForProject.go b/service/codebuild/api_op_ListBuildsForProject.go index 19a86d2c88d..2dfe79b204b 100644 --- a/service/codebuild/api_op_ListBuildsForProject.go +++ b/service/codebuild/api_op_ListBuildsForProject.go @@ -31,7 +31,7 @@ func (c *Client) ListBuildsForProject(ctx context.Context, params *ListBuildsFor type ListBuildsForProjectInput struct { - // The name of the AWS CodeBuild project. + // The name of the CodeBuild project. // // This member is required. ProjectName *string diff --git a/service/codebuild/api_op_ListCuratedEnvironmentImages.go b/service/codebuild/api_op_ListCuratedEnvironmentImages.go index 4bf82282810..3e26c75234e 100644 --- a/service/codebuild/api_op_ListCuratedEnvironmentImages.go +++ b/service/codebuild/api_op_ListCuratedEnvironmentImages.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets information about Docker images that are managed by AWS CodeBuild. +// Gets information about Docker images that are managed by CodeBuild. func (c *Client) ListCuratedEnvironmentImages(ctx context.Context, params *ListCuratedEnvironmentImagesInput, optFns ...func(*Options)) (*ListCuratedEnvironmentImagesOutput, error) { if params == nil { params = &ListCuratedEnvironmentImagesInput{} @@ -33,7 +33,7 @@ type ListCuratedEnvironmentImagesInput struct { type ListCuratedEnvironmentImagesOutput struct { - // Information about supported platforms for Docker images that are managed by AWS + // Information about supported platforms for Docker images that are managed by // CodeBuild. Platforms []types.EnvironmentPlatform diff --git a/service/codebuild/api_op_ListReportGroups.go b/service/codebuild/api_op_ListReportGroups.go index c8cee96e63e..5777b757716 100644 --- a/service/codebuild/api_op_ListReportGroups.go +++ b/service/codebuild/api_op_ListReportGroups.go @@ -12,7 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets a list ARNs for the report groups in the current AWS account. +// Gets a list ARNs for the report groups in the current Amazon Web Services +// account. func (c *Client) ListReportGroups(ctx context.Context, params *ListReportGroupsInput, optFns ...func(*Options)) (*ListReportGroupsOutput, error) { if params == nil { params = &ListReportGroupsInput{} @@ -72,7 +73,8 @@ type ListReportGroupsOutput struct { // token that is returned, until no more next tokens are returned. NextToken *string - // The list of ARNs for the report groups in the current AWS account. + // The list of ARNs for the report groups in the current Amazon Web Services + // account. ReportGroups []string // Metadata pertaining to the operation's result. diff --git a/service/codebuild/api_op_ListReports.go b/service/codebuild/api_op_ListReports.go index bea59d8ecba..73e3eabf89e 100644 --- a/service/codebuild/api_op_ListReports.go +++ b/service/codebuild/api_op_ListReports.go @@ -12,7 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of ARNs for the reports in the current AWS account. +// Returns a list of ARNs for the reports in the current Amazon Web Services +// account. func (c *Client) ListReports(ctx context.Context, params *ListReportsInput, optFns ...func(*Options)) (*ListReportsOutput, error) { if params == nil { params = &ListReportsInput{} @@ -68,7 +69,8 @@ type ListReportsOutput struct { // token that is returned, until no more next tokens are returned. NextToken *string - // The list of returned ARNs for the reports in the current AWS account. + // The list of returned ARNs for the reports in the current Amazon Web Services + // account. Reports []string // Metadata pertaining to the operation's result. diff --git a/service/codebuild/api_op_ListSharedProjects.go b/service/codebuild/api_op_ListSharedProjects.go index 1015ed1afab..67da01f8f4c 100644 --- a/service/codebuild/api_op_ListSharedProjects.go +++ b/service/codebuild/api_op_ListSharedProjects.go @@ -12,7 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets a list of projects that are shared with other AWS accounts or users. +// Gets a list of projects that are shared with other Amazon Web Services accounts +// or users. func (c *Client) ListSharedProjects(ctx context.Context, params *ListSharedProjectsInput, optFns ...func(*Options)) (*ListSharedProjectsOutput, error) { if params == nil { params = &ListSharedProjectsInput{} @@ -43,14 +44,14 @@ type ListSharedProjectsInput struct { // token that is returned, until no more next tokens are returned. NextToken *string - // The criterion to be used to list build projects shared with the current AWS - // account or user. Valid values include: + // The criterion to be used to list build projects shared with the current Amazon + // Web Services account or user. Valid values include: // - // * ARN: List based on the ARN. + // * ARN: List based on the + // ARN. // - // * - // MODIFIED_TIME: List based on when information about the shared project was last - // changed. + // * MODIFIED_TIME: List based on when information about the shared project + // was last changed. SortBy types.SharedResourceSortByType // The order in which to list shared build projects. Valid values include: @@ -74,8 +75,8 @@ type ListSharedProjectsOutput struct { // token that is returned, until no more next tokens are returned. NextToken *string - // The list of ARNs for the build projects shared with the current AWS account or - // user. + // The list of ARNs for the build projects shared with the current Amazon Web + // Services account or user. Projects []string // Metadata pertaining to the operation's result. diff --git a/service/codebuild/api_op_ListSharedReportGroups.go b/service/codebuild/api_op_ListSharedReportGroups.go index 269e558491b..cfda106d3db 100644 --- a/service/codebuild/api_op_ListSharedReportGroups.go +++ b/service/codebuild/api_op_ListSharedReportGroups.go @@ -12,7 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets a list of report groups that are shared with other AWS accounts or users. +// Gets a list of report groups that are shared with other Amazon Web Services +// accounts or users. func (c *Client) ListSharedReportGroups(ctx context.Context, params *ListSharedReportGroupsInput, optFns ...func(*Options)) (*ListSharedReportGroupsOutput, error) { if params == nil { params = &ListSharedReportGroupsInput{} @@ -43,14 +44,14 @@ type ListSharedReportGroupsInput struct { // token that is returned, until no more next tokens are returned. NextToken *string - // The criterion to be used to list report groups shared with the current AWS - // account or user. Valid values include: + // The criterion to be used to list report groups shared with the current Amazon + // Web Services account or user. Valid values include: // - // * ARN: List based on the ARN. + // * ARN: List based on the + // ARN. // - // * - // MODIFIED_TIME: List based on when information about the shared report group was - // last changed. + // * MODIFIED_TIME: List based on when information about the shared report + // group was last changed. SortBy types.SharedResourceSortByType // The order in which to list shared report groups. Valid values include: @@ -74,8 +75,8 @@ type ListSharedReportGroupsOutput struct { // token that is returned, until no more next tokens are returned. NextToken *string - // The list of ARNs for the report groups shared with the current AWS account or - // user. + // The list of ARNs for the report groups shared with the current Amazon Web + // Services account or user. ReportGroups []string // Metadata pertaining to the operation's result. diff --git a/service/codebuild/api_op_PutResourcePolicy.go b/service/codebuild/api_op_PutResourcePolicy.go index eae33a56061..076cb21b8ea 100644 --- a/service/codebuild/api_op_PutResourcePolicy.go +++ b/service/codebuild/api_op_PutResourcePolicy.go @@ -32,7 +32,7 @@ type PutResourcePolicyInput struct { // (https://docs.aws.amazon.com/codebuild/latest/userguide/project-sharing.html#project-sharing-share) // and Sharing a Report Group // (https://docs.aws.amazon.com/codebuild/latest/userguide/report-groups-sharing.html#report-groups-sharing-share) - // in the AWS CodeBuild User Guide. + // in the CodeBuild User Guide. // // This member is required. Policy *string diff --git a/service/codebuild/api_op_RetryBuild.go b/service/codebuild/api_op_RetryBuild.go index a7adc0cf976..364f8ccdd43 100644 --- a/service/codebuild/api_op_RetryBuild.go +++ b/service/codebuild/api_op_RetryBuild.go @@ -35,7 +35,7 @@ type RetryBuildInput struct { // A unique, case sensitive identifier you provide to ensure the idempotency of the // RetryBuild request. The token is included in the RetryBuild request and is valid // for five minutes. If you repeat the RetryBuild request with the same token, but - // change a parameter, AWS CodeBuild returns a parameter mismatch error. + // change a parameter, CodeBuild returns a parameter mismatch error. IdempotencyToken *string noSmithyDocumentSerde diff --git a/service/codebuild/api_op_RetryBuildBatch.go b/service/codebuild/api_op_RetryBuildBatch.go index 47a638340e1..f1d77ef4091 100644 --- a/service/codebuild/api_op_RetryBuildBatch.go +++ b/service/codebuild/api_op_RetryBuildBatch.go @@ -36,8 +36,8 @@ type RetryBuildBatchInput struct { // A unique, case sensitive identifier you provide to ensure the idempotency of the // RetryBuildBatch request. The token is included in the RetryBuildBatch request // and is valid for five minutes. If you repeat the RetryBuildBatch request with - // the same token, but change a parameter, AWS CodeBuild returns a parameter - // mismatch error. + // the same token, but change a parameter, CodeBuild returns a parameter mismatch + // error. IdempotencyToken *string // Specifies the type of retry to perform. diff --git a/service/codebuild/api_op_StartBuild.go b/service/codebuild/api_op_StartBuild.go index 955a1a6e208..60ffd2b68b3 100644 --- a/service/codebuild/api_op_StartBuild.go +++ b/service/codebuild/api_op_StartBuild.go @@ -29,7 +29,7 @@ func (c *Client) StartBuild(ctx context.Context, params *StartBuildInput, optFns type StartBuildInput struct { - // The name of the AWS CodeBuild build project to start running a build. + // The name of the CodeBuild build project to start running a build. // // This member is required. ProjectName *string @@ -47,8 +47,8 @@ type StartBuildInput struct { // already defined in the build project. If this value is set, it can be either an // inline buildspec definition, the path to an alternate buildspec file relative to // the value of the built-in CODEBUILD_SRC_DIR environment variable, or the path to - // an S3 bucket. The bucket must be in the same AWS Region as the build project. - // Specify the buildspec file using its ARN (for example, + // an S3 bucket. The bucket must be in the same Amazon Web Services Region as the + // build project. Specify the buildspec file using its ARN (for example, // arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not provided // or is set to an empty string, the source code must contain a buildspec file in // its root directory. For more information, see Buildspec File Name and Storage @@ -73,12 +73,12 @@ type StartBuildInput struct { // (https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html). DebugSessionEnabled *bool - // The AWS Key Management Service (AWS KMS) customer master key (CMK) that - // overrides the one specified in the build project. The CMK key encrypts the build - // output artifacts. You can use a cross-account KMS key to encrypt the build - // output artifacts if your service role has permission to that key. You can - // specify either the Amazon Resource Name (ARN) of the CMK or, if available, the - // CMK's alias (using the format alias/). + // The Key Management Service customer master key (CMK) that overrides the one + // specified in the build project. The CMK key encrypts the build output artifacts. + // You can use a cross-account KMS key to encrypt the build output artifacts if + // your service role has permission to that key. You can specify either the Amazon + // Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the + // format alias/). EncryptionKeyOverride *string // A container type for this build that overrides the one specified in the build @@ -93,27 +93,27 @@ type StartBuildInput struct { // for this build only, any previous depth of history defined in the build project. GitCloneDepthOverride *int32 - // Information about the Git submodules configuration for this build of an AWS + // Information about the Git submodules configuration for this build of an // CodeBuild build project. GitSubmodulesConfigOverride *types.GitSubmodulesConfig // A unique, case sensitive identifier you provide to ensure the idempotency of the // StartBuild request. The token is included in the StartBuild request and is valid // for 5 minutes. If you repeat the StartBuild request with the same token, but - // change a parameter, AWS CodeBuild returns a parameter mismatch error. + // change a parameter, CodeBuild returns a parameter mismatch error. IdempotencyToken *string // The name of an image for this build that overrides the one specified in the // build project. ImageOverride *string - // The type of credentials AWS CodeBuild uses to pull images in your build. There - // are two valid values: CODEBUILD Specifies that AWS CodeBuild uses its own - // credentials. This requires that you modify your ECR repository policy to trust - // AWS CodeBuild's service principal. SERVICE_ROLE Specifies that AWS CodeBuild - // uses your build project's service role. When using a cross-account or private - // registry image, you must use SERVICE_ROLE credentials. When using an AWS - // CodeBuild curated image, you must use CODEBUILD credentials. + // The type of credentials CodeBuild uses to pull images in your build. There are + // two valid values: CODEBUILD Specifies that CodeBuild uses its own credentials. + // This requires that you modify your ECR repository policy to trust CodeBuild's + // service principal. SERVICE_ROLE Specifies that CodeBuild uses your build + // project's service role. When using a cross-account or private registry image, + // you must use SERVICE_ROLE credentials. When using an CodeBuild curated image, + // you must use CODEBUILD credentials. ImagePullCredentialsTypeOverride types.ImagePullCredentialsType // Enable this flag to override the insecure SSL setting that is specified in the @@ -143,8 +143,8 @@ type StartBuildInput struct { // write access, the build status cannot be updated. For more information, see // Source provider access // (https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens.html) in - // the AWS CodeBuild User Guide. The status of a build triggered by a webhook is - // always reported to your source provider. + // the CodeBuild User Guide. The status of a build triggered by a webhook is always + // reported to your source provider. ReportBuildStatusOverride *bool // An array of ProjectArtifacts objects. @@ -176,8 +176,8 @@ type StartBuildInput struct { // The version of the build input to be built, for this build only. If not // specified, the latest version is used. If specified, the contents depends on the - // source provider: AWS CodeCommit The commit ID, branch, or Git tag to use. GitHub - // The commit ID, pull request ID, branch name, or tag name that corresponds to the + // source provider: CodeCommit The commit ID, branch, or Git tag to use. GitHub The + // commit ID, pull request ID, branch name, or tag name that corresponds to the // version of the source code you want to build. If a pull request ID is specified, // it must use the format pr/pull-request-ID (for example pr/25). If a branch name // is specified, the branch's HEAD commit ID is used. If not specified, the default @@ -189,7 +189,7 @@ type StartBuildInput struct { // specified at the project level, then this sourceVersion (at the build level) // takes precedence. For more information, see Source Version Sample with CodeBuild // (https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html) - // in the AWS CodeBuild User Guide. + // in the CodeBuild User Guide. SourceVersion *string // The number of build timeout minutes, from 5 to 480 (8 hours), that overrides, diff --git a/service/codebuild/api_op_StartBuildBatch.go b/service/codebuild/api_op_StartBuildBatch.go index 4f6afc1b77a..08455d4f0cb 100644 --- a/service/codebuild/api_op_StartBuildBatch.go +++ b/service/codebuild/api_op_StartBuildBatch.go @@ -49,8 +49,8 @@ type StartBuildBatchInput struct { // already defined in the build project. If this value is set, it can be either an // inline buildspec definition, the path to an alternate buildspec file relative to // the value of the built-in CODEBUILD_SRC_DIR environment variable, or the path to - // an S3 bucket. The bucket must be in the same AWS Region as the build project. - // Specify the buildspec file using its ARN (for example, + // an S3 bucket. The bucket must be in the same Amazon Web Services Region as the + // build project. Specify the buildspec file using its ARN (for example, // arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not provided // or is set to an empty string, the source code must contain a buildspec file in // its root directory. For more information, see Buildspec File Name and Storage @@ -75,12 +75,12 @@ type StartBuildBatchInput struct { // Batch session debugging is not supported for matrix batch builds. DebugSessionEnabled *bool - // The AWS Key Management Service (AWS KMS) customer master key (CMK) that - // overrides the one specified in the batch build project. The CMK key encrypts the - // build output artifacts. You can use a cross-account KMS key to encrypt the build - // output artifacts if your service role has permission to that key. You can - // specify either the Amazon Resource Name (ARN) of the CMK or, if available, the - // CMK's alias (using the format alias/). + // The Key Management Service customer master key (CMK) that overrides the one + // specified in the batch build project. The CMK key encrypts the build output + // artifacts. You can use a cross-account KMS key to encrypt the build output + // artifacts if your service role has permission to that key. You can specify + // either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's + // alias (using the format alias/). EncryptionKeyOverride *string // A container type for this batch build that overrides the one specified in the @@ -103,21 +103,21 @@ type StartBuildBatchInput struct { // A unique, case sensitive identifier you provide to ensure the idempotency of the // StartBuildBatch request. The token is included in the StartBuildBatch request // and is valid for five minutes. If you repeat the StartBuildBatch request with - // the same token, but change a parameter, AWS CodeBuild returns a parameter - // mismatch error. + // the same token, but change a parameter, CodeBuild returns a parameter mismatch + // error. IdempotencyToken *string // The name of an image for this batch build that overrides the one specified in // the batch build project. ImageOverride *string - // The type of credentials AWS CodeBuild uses to pull images in your batch build. - // There are two valid values: CODEBUILD Specifies that AWS CodeBuild uses its own + // The type of credentials CodeBuild uses to pull images in your batch build. There + // are two valid values: CODEBUILD Specifies that CodeBuild uses its own // credentials. This requires that you modify your ECR repository policy to trust - // AWS CodeBuild's service principal. SERVICE_ROLE Specifies that AWS CodeBuild - // uses your build project's service role. When using a cross-account or private - // registry image, you must use SERVICE_ROLE credentials. When using an AWS - // CodeBuild curated image, you must use CODEBUILD credentials. + // CodeBuild's service principal. SERVICE_ROLE Specifies that CodeBuild uses your + // build project's service role. When using a cross-account or private registry + // image, you must use SERVICE_ROLE credentials. When using an CodeBuild curated + // image, you must use CODEBUILD credentials. ImagePullCredentialsTypeOverride types.ImagePullCredentialsType // Enable this flag to override the insecure SSL setting that is specified in the @@ -177,8 +177,8 @@ type StartBuildBatchInput struct { // The version of the batch build input to be built, for this build only. If not // specified, the latest version is used. If specified, the contents depends on the - // source provider: AWS CodeCommit The commit ID, branch, or Git tag to use. GitHub - // The commit ID, pull request ID, branch name, or tag name that corresponds to the + // source provider: CodeCommit The commit ID, branch, or Git tag to use. GitHub The + // commit ID, pull request ID, branch name, or tag name that corresponds to the // version of the source code you want to build. If a pull request ID is specified, // it must use the format pr/pull-request-ID (for example pr/25). If a branch name // is specified, the branch's HEAD commit ID is used. If not specified, the default @@ -190,7 +190,7 @@ type StartBuildBatchInput struct { // specified at the project level, then this sourceVersion (at the build level) // takes precedence. For more information, see Source Version Sample with CodeBuild // (https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html) - // in the AWS CodeBuild User Guide. + // in the CodeBuild User Guide. SourceVersion *string noSmithyDocumentSerde diff --git a/service/codebuild/api_op_UpdateProject.go b/service/codebuild/api_op_UpdateProject.go index 206eaa608ed..bfa344cb88f 100644 --- a/service/codebuild/api_op_UpdateProject.go +++ b/service/codebuild/api_op_UpdateProject.go @@ -58,11 +58,11 @@ type UpdateProjectInput struct { // A new or replacement description of the build project. Description *string - // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used - // for encrypting the build output artifacts. You can use a cross-account KMS key - // to encrypt the build output artifacts if your service role has permission to - // that key. You can specify either the Amazon Resource Name (ARN) of the CMK or, - // if available, the CMK's alias (using the format alias/). + // The Key Management Service customer master key (CMK) to be used for encrypting + // the build output artifacts. You can use a cross-account KMS key to encrypt the + // build output artifacts if your service role has permission to that key. You can + // specify either the Amazon Resource Name (ARN) of the CMK or, if available, the + // CMK's alias (using the format alias/). EncryptionKey *string // Information to be changed about the build environment for the build project. @@ -75,7 +75,7 @@ type UpdateProjectInput struct { FileSystemLocations []types.ProjectFileSystemLocation // Information about logs for the build project. A project can create logs in - // Amazon CloudWatch Logs, logs in an S3 bucket, or both. + // CloudWatch Logs, logs in an S3 bucket, or both. LogsConfig *types.LogsConfig // The number of minutes a build is allowed to be queued before it times out. @@ -92,9 +92,9 @@ type UpdateProjectInput struct { // An array of ProjectSource objects. SecondarySources []types.ProjectSource - // The replacement ARN of the AWS Identity and Access Management (IAM) role that - // enables AWS CodeBuild to interact with dependent AWS services on behalf of the - // AWS account. + // The replacement ARN of the IAM role that enables CodeBuild to interact with + // dependent Amazon Web Services services on behalf of the Amazon Web Services + // account. ServiceRole *string // Information to be changed about the build input source code for the build @@ -104,42 +104,42 @@ type UpdateProjectInput struct { // A version of the build input to be built for this project. If not specified, the // latest version is used. If specified, it must be one of: // - // * For AWS CodeCommit: - // the commit ID, branch, or Git tag to use. + // * For CodeCommit: the + // commit ID, branch, or Git tag to use. // - // * For GitHub: the commit ID, pull - // request ID, branch name, or tag name that corresponds to the version of the - // source code you want to build. If a pull request ID is specified, it must use - // the format pr/pull-request-ID (for example pr/25). If a branch name is - // specified, the branch's HEAD commit ID is used. If not specified, the default - // branch's HEAD commit ID is used. + // * For GitHub: the commit ID, pull request + // ID, branch name, or tag name that corresponds to the version of the source code + // you want to build. If a pull request ID is specified, it must use the format + // pr/pull-request-ID (for example pr/25). If a branch name is specified, the + // branch's HEAD commit ID is used. If not specified, the default branch's HEAD + // commit ID is used. // - // * For Bitbucket: the commit ID, branch name, - // or tag name that corresponds to the version of the source code you want to - // build. If a branch name is specified, the branch's HEAD commit ID is used. If - // not specified, the default branch's HEAD commit ID is used. + // * For Bitbucket: the commit ID, branch name, or tag name + // that corresponds to the version of the source code you want to build. If a + // branch name is specified, the branch's HEAD commit ID is used. If not specified, + // the default branch's HEAD commit ID is used. // - // * For Amazon S3: - // the version ID of the object that represents the build input ZIP file to - // use. + // * For Amazon S3: the version ID of + // the object that represents the build input ZIP file to use. // - // If sourceVersion is specified at the build level, then that version takes - // precedence over this sourceVersion (at the project level). For more information, - // see Source Version Sample with CodeBuild + // If sourceVersion is + // specified at the build level, then that version takes precedence over this + // sourceVersion (at the project level). For more information, see Source Version + // Sample with CodeBuild // (https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html) - // in the AWS CodeBuild User Guide. + // in the CodeBuild User Guide. SourceVersion *string // An updated list of tag key and value pairs associated with this build project. - // These tags are available for use by AWS services that support AWS CodeBuild - // build project tags. + // These tags are available for use by Amazon Web Services services that support + // CodeBuild build project tags. Tags []types.Tag - // The replacement value in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to - // wait before timing out any related build that did not get marked as completed. + // The replacement value in minutes, from 5 to 480 (8 hours), for CodeBuild to wait + // before timing out any related build that did not get marked as completed. TimeoutInMinutes *int32 - // VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC. + // VpcConfig enables CodeBuild to access resources in an Amazon VPC. VpcConfig *types.VpcConfig noSmithyDocumentSerde diff --git a/service/codebuild/api_op_UpdateProjectVisibility.go b/service/codebuild/api_op_UpdateProjectVisibility.go new file mode 100644 index 00000000000..9903de4f6c3 --- /dev/null +++ b/service/codebuild/api_op_UpdateProjectVisibility.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +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/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Changes the public visibility for a project. The project's build results, logs, +// and artifacts are available to the general public. For more information, see +// Public build projects +// (https://docs.aws.amazon.com/codebuild/latest/userguide/public-builds.html) in +// the CodeBuild User Guide. The following should be kept in mind when making your +// projects public: +// +// * All of a project's build results, logs, and artifacts, +// including builds that were run when the project was private, are available to +// the general public. +// +// * All build logs and artifacts are available to the public. +// Environment variables, source code, and other sensitive information may have +// been output to the build logs and artifacts. You must be careful about what +// information is output to the build logs. Some best practice are: +// +// * Do not store +// sensitive values, especially Amazon Web Services access key IDs and secret +// access keys, in environment variables. We recommend that you use an Amazon EC2 +// Systems Manager Parameter Store or Secrets Manager to store sensitive values. +// +// * +// Follow Best practices for using webhooks +// (https://docs.aws.amazon.com/codebuild/latest/userguide/webhooks.html#webhook-best-practices) +// in the CodeBuild User Guide to limit which entities can trigger a build, and do +// not store the buildspec in the project itself, to ensure that your webhooks are +// as secure as possible. +// +// * A malicious user can use public builds to distribute +// malicious artifacts. We recommend that you review all pull requests to verify +// that the pull request is a legitimate change. We also recommend that you +// validate any artifacts with their checksums to make sure that the correct +// artifacts are being downloaded. +func (c *Client) UpdateProjectVisibility(ctx context.Context, params *UpdateProjectVisibilityInput, optFns ...func(*Options)) (*UpdateProjectVisibilityOutput, error) { + if params == nil { + params = &UpdateProjectVisibilityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateProjectVisibility", params, optFns, c.addOperationUpdateProjectVisibilityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateProjectVisibilityOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateProjectVisibilityInput struct { + + // The Amazon Resource Name (ARN) of the build project. + // + // This member is required. + ProjectArn *string + + // Specifies the visibility of the project's builds. Possible values are: + // PUBLIC_READ The project builds are visible to the public. PRIVATE The project + // builds are not visible to the public. + // + // This member is required. + ProjectVisibility types.ProjectVisibilityType + + // The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and + // Amazon S3 artifacts for the project's builds. + ResourceAccessRole *string + + noSmithyDocumentSerde +} + +type UpdateProjectVisibilityOutput struct { + + // The Amazon Resource Name (ARN) of the build project. + ProjectArn *string + + // Specifies the visibility of the project's builds. Possible values are: + // PUBLIC_READ The project builds are visible to the public. PRIVATE The project + // builds are not visible to the public. + ProjectVisibility types.ProjectVisibilityType + + // Contains the project identifier used with the public build APIs. + PublicProjectAlias *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateProjectVisibilityMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateProjectVisibility{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateProjectVisibility{}, 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 = addOpUpdateProjectVisibilityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProjectVisibility(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_opUpdateProjectVisibility(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "codebuild", + OperationName: "UpdateProjectVisibility", + } +} diff --git a/service/codebuild/api_op_UpdateReportGroup.go b/service/codebuild/api_op_UpdateReportGroup.go index b9cfe6b15db..c775189657e 100644 --- a/service/codebuild/api_op_UpdateReportGroup.go +++ b/service/codebuild/api_op_UpdateReportGroup.go @@ -44,8 +44,8 @@ type UpdateReportGroupInput struct { ExportConfig *types.ReportExportConfig // An updated list of tag key and value pairs associated with this report group. - // These tags are available for use by AWS services that support AWS CodeBuild - // report group tags. + // These tags are available for use by Amazon Web Services services that support + // CodeBuild report group tags. Tags []types.Tag noSmithyDocumentSerde diff --git a/service/codebuild/api_op_UpdateWebhook.go b/service/codebuild/api_op_UpdateWebhook.go index bbe46072729..96e15a201c8 100644 --- a/service/codebuild/api_op_UpdateWebhook.go +++ b/service/codebuild/api_op_UpdateWebhook.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the webhook associated with an AWS CodeBuild build project. If you use +// Updates the webhook associated with an CodeBuild build project. If you use // Bitbucket for your repository, rotateSecret is ignored. func (c *Client) UpdateWebhook(ctx context.Context, params *UpdateWebhookInput, optFns ...func(*Options)) (*UpdateWebhookOutput, error) { if params == nil { @@ -30,7 +30,7 @@ func (c *Client) UpdateWebhook(ctx context.Context, params *UpdateWebhookInput, type UpdateWebhookInput struct { - // The name of the AWS CodeBuild project. + // The name of the CodeBuild project. // // This member is required. ProjectName *string @@ -60,7 +60,7 @@ type UpdateWebhookInput struct { type UpdateWebhookOutput struct { // Information about a repository's webhook that is associated with a project in - // AWS CodeBuild. + // CodeBuild. Webhook *types.Webhook // Metadata pertaining to the operation's result. diff --git a/service/codebuild/deserializers.go b/service/codebuild/deserializers.go index deee75ff9a4..9aa25c2e383 100644 --- a/service/codebuild/deserializers.go +++ b/service/codebuild/deserializers.go @@ -4766,6 +4766,120 @@ func awsAwsjson11_deserializeOpErrorUpdateProject(response *smithyhttp.Response, } } +type awsAwsjson11_deserializeOpUpdateProjectVisibility struct { +} + +func (*awsAwsjson11_deserializeOpUpdateProjectVisibility) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateProjectVisibility) 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_deserializeOpErrorUpdateProjectVisibility(response, &metadata) + } + output := &UpdateProjectVisibilityOutput{} + 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_deserializeOpDocumentUpdateProjectVisibilityOutput(&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_deserializeOpErrorUpdateProjectVisibility(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("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpUpdateReportGroup struct { } @@ -8337,6 +8451,24 @@ func awsAwsjson11_deserializeDocumentProject(v **types.Project, value interface{ sv.Name = ptr.String(jtv) } + case "projectVisibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectVisibilityType to be of type string, got %T instead", value) + } + sv.ProjectVisibility = types.ProjectVisibilityType(jtv) + } + + case "publicProjectAlias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.PublicProjectAlias = ptr.String(jtv) + } + case "queuedTimeoutInMinutes": if value != nil { jtv, ok := value.(json.Number) @@ -8350,6 +8482,15 @@ func awsAwsjson11_deserializeDocumentProject(v **types.Project, value interface{ sv.QueuedTimeoutInMinutes = ptr.Int32(int32(i64)) } + case "resourceAccessRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ResourceAccessRole = ptr.String(jtv) + } + case "secondaryArtifacts": if err := awsAwsjson11_deserializeDocumentProjectArtifactsList(&sv.SecondaryArtifacts, value); err != nil { return err @@ -12682,6 +12823,64 @@ func awsAwsjson11_deserializeOpDocumentUpdateProjectOutput(v **UpdateProjectOutp return nil } +func awsAwsjson11_deserializeOpDocumentUpdateProjectVisibilityOutput(v **UpdateProjectVisibilityOutput, 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 *UpdateProjectVisibilityOutput + if *v == nil { + sv = &UpdateProjectVisibilityOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "projectArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ProjectArn = ptr.String(jtv) + } + + case "projectVisibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectVisibilityType to be of type string, got %T instead", value) + } + sv.ProjectVisibility = types.ProjectVisibilityType(jtv) + } + + case "publicProjectAlias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.PublicProjectAlias = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentUpdateReportGroupOutput(v **UpdateReportGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/codebuild/doc.go b/service/codebuild/doc.go index d7be2975260..b8205c22115 100644 --- a/service/codebuild/doc.go +++ b/service/codebuild/doc.go @@ -3,14 +3,14 @@ // Package codebuild provides the API client, operations, and parameter types for // AWS CodeBuild. // -// AWS CodeBuild AWS CodeBuild is a fully managed build service in the cloud. AWS -// CodeBuild compiles your source code, runs unit tests, and produces artifacts -// that are ready to deploy. AWS CodeBuild eliminates the need to provision, -// manage, and scale your own build servers. It provides prepackaged build -// environments for the most popular programming languages and build tools, such as -// Apache Maven, Gradle, and more. You can also fully customize build environments -// in AWS CodeBuild to use your own build tools. AWS CodeBuild scales automatically -// to meet peak build requests. You pay only for the build time you consume. For -// more information about AWS CodeBuild, see the AWS CodeBuild User Guide +// CodeBuild CodeBuild is a fully managed build service in the cloud. CodeBuild +// compiles your source code, runs unit tests, and produces artifacts that are +// ready to deploy. CodeBuild eliminates the need to provision, manage, and scale +// your own build servers. It provides prepackaged build environments for the most +// popular programming languages and build tools, such as Apache Maven, Gradle, and +// more. You can also fully customize build environments in CodeBuild to use your +// own build tools. CodeBuild scales automatically to meet peak build requests. You +// pay only for the build time you consume. For more information about CodeBuild, +// see the CodeBuild User Guide // (https://docs.aws.amazon.com/codebuild/latest/userguide/welcome.html). package codebuild diff --git a/service/codebuild/generated.json b/service/codebuild/generated.json index 7460301b047..5222eef9cdb 100644 --- a/service/codebuild/generated.json +++ b/service/codebuild/generated.json @@ -47,6 +47,7 @@ "api_op_StopBuild.go", "api_op_StopBuildBatch.go", "api_op_UpdateProject.go", + "api_op_UpdateProjectVisibility.go", "api_op_UpdateReportGroup.go", "api_op_UpdateWebhook.go", "deserializers.go", diff --git a/service/codebuild/serializers.go b/service/codebuild/serializers.go index 1b2f4d776c6..3fec2c88fd2 100644 --- a/service/codebuild/serializers.go +++ b/service/codebuild/serializers.go @@ -1989,6 +1989,53 @@ func (m *awsAwsjson11_serializeOpUpdateProject) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpUpdateProjectVisibility struct { +} + +func (*awsAwsjson11_serializeOpUpdateProjectVisibility) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateProjectVisibility) 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.(*UpdateProjectVisibilityInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("CodeBuild_20161006.UpdateProjectVisibility") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateProjectVisibilityInput(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_serializeOpUpdateReportGroup struct { } @@ -4307,6 +4354,28 @@ func awsAwsjson11_serializeOpDocumentUpdateProjectInput(v *UpdateProjectInput, v return nil } +func awsAwsjson11_serializeOpDocumentUpdateProjectVisibilityInput(v *UpdateProjectVisibilityInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ProjectArn != nil { + ok := object.Key("projectArn") + ok.String(*v.ProjectArn) + } + + if len(v.ProjectVisibility) > 0 { + ok := object.Key("projectVisibility") + ok.String(string(v.ProjectVisibility)) + } + + if v.ResourceAccessRole != nil { + ok := object.Key("resourceAccessRole") + ok.String(*v.ResourceAccessRole) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentUpdateReportGroupInput(v *UpdateReportGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/codebuild/types/enums.go b/service/codebuild/types/enums.go index 0c7901e0202..c73cb32aeba 100644 --- a/service/codebuild/types/enums.go +++ b/service/codebuild/types/enums.go @@ -412,6 +412,24 @@ func (ProjectSortByType) Values() []ProjectSortByType { } } +type ProjectVisibilityType string + +// Enum values for ProjectVisibilityType +const ( + ProjectVisibilityTypePublicRead ProjectVisibilityType = "PUBLIC_READ" + ProjectVisibilityTypePrivate ProjectVisibilityType = "PRIVATE" +) + +// Values returns all known values for ProjectVisibilityType. 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 (ProjectVisibilityType) Values() []ProjectVisibilityType { + return []ProjectVisibilityType{ + "PUBLIC_READ", + "PRIVATE", + } +} + type ReportCodeCoverageSortByType string // Enum values for ReportCodeCoverageSortByType diff --git a/service/codebuild/types/errors.go b/service/codebuild/types/errors.go index d9f62b1774c..906da671c36 100644 --- a/service/codebuild/types/errors.go +++ b/service/codebuild/types/errors.go @@ -7,7 +7,8 @@ import ( smithy "github.com/aws/smithy-go" ) -// An AWS service limit was exceeded for the calling AWS account. +// An Amazon Web Services service limit was exceeded for the calling Amazon Web +// Services account. type AccountLimitExceededException struct { Message *string @@ -64,8 +65,8 @@ func (e *OAuthProviderException) ErrorMessage() string { func (e *OAuthProviderException) ErrorCode() string { return "OAuthProviderException" } func (e *OAuthProviderException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The specified AWS resource cannot be created, because an AWS resource with the -// same settings already exists. +// The specified Amazon Web Services resource cannot be created, because an Amazon +// Web Services resource with the same settings already exists. type ResourceAlreadyExistsException struct { Message *string @@ -84,7 +85,7 @@ func (e *ResourceAlreadyExistsException) ErrorMessage() string { func (e *ResourceAlreadyExistsException) ErrorCode() string { return "ResourceAlreadyExistsException" } func (e *ResourceAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The specified AWS resource cannot be found. +// The specified Amazon Web Services resource cannot be found. type ResourceNotFoundException struct { Message *string diff --git a/service/codebuild/types/types.go b/service/codebuild/types/types.go index b85cd3faadc..b6a3883a306 100644 --- a/service/codebuild/types/types.go +++ b/service/codebuild/types/types.go @@ -13,7 +13,7 @@ type BatchRestrictions struct { // An array of strings that specify the compute types that are allowed for the // batch build. See Build environment compute types // (https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html) - // in the AWS CodeBuild User Guide for these values. + // in the CodeBuild User Guide for these values. ComputeTypesAllowed []string // Specifies the maximum number of builds allowed. @@ -69,11 +69,11 @@ type Build struct { // Contains information about the debug session for this build. DebugSession *DebugSession - // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used - // for encrypting the build output artifacts. You can use a cross-account KMS key - // to encrypt the build output artifacts if your service role has permission to - // that key. You can specify either the Amazon Resource Name (ARN) of the CMK or, - // if available, the CMK's alias (using the format alias/). + // The Key Management Service customer master key (CMK) to be used for encrypting + // the build output artifacts. You can use a cross-account KMS key to encrypt the + // build output artifacts if your service role has permission to that key. You can + // specify either the Amazon Resource Name (ARN) of the CMK or, if available, the + // CMK's alias (using the format alias/). EncryptionKey *string // When the build process ended, expressed in Unix time format. @@ -83,11 +83,11 @@ type Build struct { Environment *ProjectEnvironment // A list of exported environment variables for this build. Exported environment - // variables are used in conjunction with AWS CodePipeline to export environment + // variables are used in conjunction with CodePipeline to export environment // variables from the current build stage to subsequent stages in the pipeline. For // more information, see Working with variables // (https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-variables.html) - // in the AWS CodePipeline User Guide. + // in the CodePipeline User Guide. ExportedEnvironmentVariables []ExportedEnvironmentVariable // An array of ProjectFileSystemLocation objects for a CodeBuild build project. A @@ -101,19 +101,18 @@ type Build struct { // The entity that started the build. Valid values include: // - // * If AWS CodePipeline + // * If CodePipeline // started the build, the pipeline's name (for example, // codepipeline/my-demo-pipeline). // - // * If an AWS Identity and Access Management - // (IAM) user started the build, the user's name (for example, MyUserName). + // * If an IAM user started the build, the user's + // name (for example, MyUserName). // - // * If - // the Jenkins plugin for AWS CodeBuild started the build, the string - // CodeBuild-Jenkins-Plugin. + // * If the Jenkins plugin for CodeBuild started + // the build, the string CodeBuild-Jenkins-Plugin. Initiator *string - // Information about the build's logs in Amazon CloudWatch Logs. + // Information about the build's logs in CloudWatch Logs. Logs *LogsLocation // Describes a network interface. @@ -123,7 +122,7 @@ type Build struct { // about any current build phase that is not yet complete. Phases []BuildPhase - // The name of the AWS CodeBuild project. + // The name of the CodeBuild project. ProjectName *string // The number of minutes a build is allowed to be queued before it times out. @@ -134,14 +133,14 @@ type Build struct { // An identifier for the version of this build's source code. // - // * For AWS - // CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. + // * For CodeCommit, + // GitHub, GitHub Enterprise, and BitBucket, the commit ID. // - // * For AWS - // CodePipeline, the source revision provided by AWS CodePipeline. + // * For CodePipeline, + // the source revision provided by CodePipeline. // - // * For Amazon - // S3, this does not apply. + // * For Amazon S3, this does not + // apply. ResolvedSourceVersion *string // An array of ProjectArtifacts objects. @@ -150,23 +149,22 @@ type Build struct { // An array of ProjectSourceVersion objects. Each ProjectSourceVersion must be one // of: // - // * For AWS CodeCommit: the commit ID, branch, or Git tag to use. + // * For CodeCommit: the commit ID, branch, or Git tag to use. // - // * For - // GitHub: the commit ID, pull request ID, branch name, or tag name that - // corresponds to the version of the source code you want to build. If a pull - // request ID is specified, it must use the format pr/pull-request-ID (for example, - // pr/25). If a branch name is specified, the branch's HEAD commit ID is used. If - // not specified, the default branch's HEAD commit ID is used. + // * For GitHub: + // the commit ID, pull request ID, branch name, or tag name that corresponds to the + // version of the source code you want to build. If a pull request ID is specified, + // it must use the format pr/pull-request-ID (for example, pr/25). If a branch name + // is specified, the branch's HEAD commit ID is used. If not specified, the default + // branch's HEAD commit ID is used. // - // * For Bitbucket: - // the commit ID, branch name, or tag name that corresponds to the version of the - // source code you want to build. If a branch name is specified, the branch's HEAD - // commit ID is used. If not specified, the default branch's HEAD commit ID is - // used. + // * For Bitbucket: the commit ID, branch name, + // or tag name that corresponds to the version of the source code you want to + // build. If a branch name is specified, the branch's HEAD commit ID is used. If + // not specified, the default branch's HEAD commit ID is used. // - // * For Amazon S3: the version ID of the object that represents the build - // input ZIP file to use. + // * For Amazon S3: + // the version ID of the object that represents the build input ZIP file to use. SecondarySourceVersions []ProjectSourceVersion // An array of ProjectSource objects. @@ -183,18 +181,18 @@ type Build struct { // build level) takes precedence. For more information, see Source Version Sample // with CodeBuild // (https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html) - // in the AWS CodeBuild User Guide. + // in the CodeBuild User Guide. SourceVersion *string // When the build process started, expressed in Unix time format. StartTime *time.Time - // How long, in minutes, for AWS CodeBuild to wait before timing out this build if - // it does not get marked as completed. + // How long, in minutes, for CodeBuild to wait before timing out this build if it + // does not get marked as completed. TimeoutInMinutes *int32 - // If your AWS CodeBuild project accesses resources in an Amazon VPC, you provide - // this parameter that identifies the VPC ID and the list of security group IDs and + // If your CodeBuild project accesses resources in an Amazon VPC, you provide this + // parameter that identifies the VPC ID and the list of security group IDs and // subnet IDs. The security groups and subnets must belong to the same VPC. You // must provide at least one security group and one subnet ID. VpcConfig *VpcConfig @@ -208,25 +206,28 @@ type BuildArtifacts struct { // An identifier for this artifact definition. ArtifactIdentifier *string - // Specifies the access for objects that are uploaded to an Amazon S3 bucket that - // is owned by another account. By default, only the account that uploads the - // objects to the bucket has access to these objects. This property allows you to - // give the bucket owner access to these objects. NONE The bucket owner does not - // have access to the objects. This is the default. READ_ONLY The bucket owner has - // read only access to the objects. The uploading account retains ownership of the - // objects. FULL The bucket owner has full access to the objects. Object ownership - // is determined by the following criteria: - // - // * If the bucket is configured with the - // Bucket owner preferred setting, the bucket owner owns the objects. The uploading - // account will have object access as specified by the bucket's policy. - // - // * - // Otherwise, the uploading account retains ownership of the objects. - // - // For more - // information about Amazon S3 object ownership, see Controlling ownership of - // uploaded objects using S3 Object Ownership + // Specifies the bucket owner's access for objects that another account uploads to + // their Amazon S3 bucket. By default, only the account that uploads the objects to + // the bucket has access to these objects. This property allows you to give the + // bucket owner access to these objects. To use this property, your CodeBuild + // service role must have the s3:PutBucketAcl permission. This permission allows + // CodeBuild to modify the access control list for the bucket. This property can be + // one of the following values: NONE The bucket owner does not have access to the + // objects. This is the default. READ_ONLY The bucket owner has read-only access to + // the objects. The uploading account retains ownership of the objects. FULL The + // bucket owner has full access to the objects. Object ownership is determined by + // the following criteria: + // + // * If the bucket is configured with the Bucket owner + // preferred setting, the bucket owner owns the objects. The uploading account will + // have object access as specified by the bucket's policy. + // + // * Otherwise, the + // uploading account retains ownership of the objects. + // + // For more information about + // Amazon S3 object ownership, see Controlling ownership of uploaded objects using + // S3 Object Ownership // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) // in the Amazon Simple Storage Service User Guide. BucketOwnerAccess BucketOwnerAccess @@ -299,11 +300,11 @@ type BuildBatch struct { // Batch session debugging is not supported for matrix batch builds. DebugSessionEnabled *bool - // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used - // for encrypting the batch build output artifacts. You can use a cross-account KMS - // key to encrypt the build output artifacts if your service role has permission to - // that key. You can specify either the Amazon Resource Name (ARN) of the CMK or, - // if available, the CMK's alias (using the format alias/). + // The Key Management Service customer master key (CMK) to be used for encrypting + // the batch build output artifacts. You can use a cross-account KMS key to encrypt + // the build output artifacts if your service role has permission to that key. You + // can specify either the Amazon Resource Name (ARN) of the CMK or, if available, + // the CMK's alias (using the format alias/). EncryptionKey *string // The date and time that the batch build ended. @@ -323,19 +324,19 @@ type BuildBatch struct { // The entity that started the batch build. Valid values include: // - // * If AWS + // * If // CodePipeline started the build, the pipeline's name (for example, // codepipeline/my-demo-pipeline). // - // * If an AWS Identity and Access Management - // (IAM) user started the build, the user's name. + // * If an IAM user started the build, the user's + // name. // - // * If the Jenkins plugin for AWS - // CodeBuild started the build, the string CodeBuild-Jenkins-Plugin. + // * If the Jenkins plugin for CodeBuild started the build, the string + // CodeBuild-Jenkins-Plugin. Initiator *string - // Information about logs for a build project. These can be logs in Amazon - // CloudWatch Logs, built in a specified S3 bucket, or both. + // Information about logs for a build project. These can be logs in CloudWatch + // Logs, built in a specified S3 bucket, or both. LogConfig *LogsConfig // An array of BuildBatchPhase objects the specify the phases of the batch build. @@ -351,13 +352,13 @@ type BuildBatch struct { // The identifier of the resolved version of this batch build's source code. // // * For - // AWS CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. + // CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. // // * For - // AWS CodePipeline, the source revision provided by AWS CodePipeline. + // CodePipeline, the source revision provided by CodePipeline. // - // * For - // Amazon S3, this does not apply. + // * For Amazon S3, + // this does not apply. ResolvedSourceVersion *string // An array of BuildArtifacts objects the define the build artifacts for this batch @@ -367,23 +368,22 @@ type BuildBatch struct { // An array of ProjectSourceVersion objects. Each ProjectSourceVersion must be one // of: // - // * For AWS CodeCommit: the commit ID, branch, or Git tag to use. + // * For CodeCommit: the commit ID, branch, or Git tag to use. // - // * For - // GitHub: the commit ID, pull request ID, branch name, or tag name that - // corresponds to the version of the source code you want to build. If a pull - // request ID is specified, it must use the format pr/pull-request-ID (for example, - // pr/25). If a branch name is specified, the branch's HEAD commit ID is used. If - // not specified, the default branch's HEAD commit ID is used. + // * For GitHub: + // the commit ID, pull request ID, branch name, or tag name that corresponds to the + // version of the source code you want to build. If a pull request ID is specified, + // it must use the format pr/pull-request-ID (for example, pr/25). If a branch name + // is specified, the branch's HEAD commit ID is used. If not specified, the default + // branch's HEAD commit ID is used. // - // * For Bitbucket: - // the commit ID, branch name, or tag name that corresponds to the version of the - // source code you want to build. If a branch name is specified, the branch's HEAD - // commit ID is used. If not specified, the default branch's HEAD commit ID is - // used. + // * For Bitbucket: the commit ID, branch name, + // or tag name that corresponds to the version of the source code you want to + // build. If a branch name is specified, the branch's HEAD commit ID is used. If + // not specified, the default branch's HEAD commit ID is used. // - // * For Amazon S3: the version ID of the object that represents the build - // input ZIP file to use. + // * For Amazon S3: + // the version ID of the object that represents the build input ZIP file to use. SecondarySourceVersions []ProjectSourceVersion // An array of ProjectSource objects that define the sources for the batch build. @@ -401,7 +401,7 @@ type BuildBatch struct { // The date and time that the batch build started. StartTime *time.Time - // Information about the VPC configuration that AWS CodeBuild accesses. + // Information about the VPC configuration that CodeBuild accesses. VpcConfig *VpcConfig noSmithyDocumentSerde @@ -551,8 +551,8 @@ type BuildPhase struct { noSmithyDocumentSerde } -// Contains information that defines how the AWS CodeBuild build project reports -// the build status to the source provider. +// Contains information that defines how the CodeBuild build project reports the +// build status to the source provider. type BuildStatusConfig struct { // Specifies the context of the build status CodeBuild sends to the source @@ -608,28 +608,27 @@ type BuildSummary struct { noSmithyDocumentSerde } -// Information about Amazon CloudWatch Logs for a build project. +// Information about CloudWatch Logs for a build project. type CloudWatchLogsConfig struct { - // The current status of the logs in Amazon CloudWatch Logs for a build project. - // Valid values are: + // The current status of the logs in CloudWatch Logs for a build project. Valid + // values are: // - // * ENABLED: Amazon CloudWatch Logs are enabled for this build - // project. + // * ENABLED: CloudWatch Logs are enabled for this build project. // - // * DISABLED: Amazon CloudWatch Logs are not enabled for this build - // project. + // * + // DISABLED: CloudWatch Logs are not enabled for this build project. // // This member is required. Status LogsConfigStatusType - // The group name of the logs in Amazon CloudWatch Logs. For more information, see - // Working with Log Groups and Log Streams + // The group name of the logs in CloudWatch Logs. For more information, see Working + // with Log Groups and Log Streams // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html). GroupName *string - // The prefix of the stream name of the Amazon CloudWatch Logs. For more - // information, see Working with Log Groups and Log Streams + // The prefix of the stream name of the CloudWatch Logs. For more information, see + // Working with Log Groups and Log Streams // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html). StreamName *string @@ -718,7 +717,7 @@ type DebugSession struct { noSmithyDocumentSerde } -// Information about a Docker image that is managed by AWS CodeBuild. +// Information about a Docker image that is managed by CodeBuild. type EnvironmentImage struct { // The description of the Docker image. @@ -734,7 +733,7 @@ type EnvironmentImage struct { } // A set of Docker images that are related by programming language and are managed -// by AWS CodeBuild. +// by CodeBuild. type EnvironmentLanguage struct { // The list of Docker images that are related by the specified programming @@ -747,7 +746,7 @@ type EnvironmentLanguage struct { noSmithyDocumentSerde } -// A set of Docker images that are related by platform and are managed by AWS +// A set of Docker images that are related by platform and are managed by // CodeBuild. type EnvironmentPlatform struct { @@ -769,11 +768,11 @@ type EnvironmentVariable struct { Name *string // The value of the environment variable. We strongly discourage the use of - // PLAINTEXT environment variables to store sensitive values, especially AWS secret - // key IDs and secret access keys. PLAINTEXT environment variables can be displayed - // in plain text using the AWS CodeBuild console and the AWS Command Line Interface - // (AWS CLI). For sensitive values, we recommend you use an environment variable of - // type PARAMETER_STORE or SECRETS_MANAGER. + // PLAINTEXT environment variables to store sensitive values, especially Amazon Web + // Services secret key IDs and secret access keys. PLAINTEXT environment variables + // can be displayed in plain text using the CodeBuild console and the CLI. For + // sensitive values, we recommend you use an environment variable of type + // PARAMETER_STORE or SECRETS_MANAGER. // // This member is required. Value *string @@ -781,31 +780,30 @@ type EnvironmentVariable struct { // The type of environment variable. Valid values include: // // * PARAMETER_STORE: An - // environment variable stored in Amazon EC2 Systems Manager Parameter Store. To - // learn how to specify a parameter store environment variable, see - // env/parameter-store + // environment variable stored in Systems Manager Parameter Store. To learn how to + // specify a parameter store environment variable, see env/parameter-store // (https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.env.parameter-store) - // in the AWS CodeBuild User Guide. + // in the CodeBuild User Guide. // - // * PLAINTEXT: An environment variable in plain - // text format. This is the default value. + // * PLAINTEXT: An environment variable in plain text + // format. This is the default value. // - // * SECRETS_MANAGER: An environment - // variable stored in AWS Secrets Manager. To learn how to specify a secrets - // manager environment variable, see env/secrets-manager + // * SECRETS_MANAGER: An environment variable + // stored in Secrets Manager. To learn how to specify a secrets manager environment + // variable, see env/secrets-manager // (https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.env.secrets-manager) - // in the AWS CodeBuild User Guide. + // in the CodeBuild User Guide. Type EnvironmentVariableType noSmithyDocumentSerde } // Contains information about an exported environment variable. Exported -// environment variables are used in conjunction with AWS CodePipeline to export +// environment variables are used in conjunction with CodePipeline to export // environment variables from the current build stage to subsequent stages in the // pipeline. For more information, see Working with variables // (https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-variables.html) -// in the AWS CodePipeline User Guide. During a build, the value of a variable is +// in the CodePipeline User Guide. During a build, the value of a variable is // available starting with the install phase. It can be updated between the start // of the install phase and the end of the post_build phase. After the post_build // phase ends, the value of exported variables cannot change. @@ -820,11 +818,11 @@ type ExportedEnvironmentVariable struct { noSmithyDocumentSerde } -// Information about the Git submodules configuration for an AWS CodeBuild build +// Information about the Git submodules configuration for an CodeBuild build // project. type GitSubmodulesConfig struct { - // Set to true to fetch Git submodules for your AWS CodeBuild build project. + // Set to true to fetch Git submodules for your CodeBuild build project. // // This member is required. FetchSubmodules *bool @@ -832,12 +830,12 @@ type GitSubmodulesConfig struct { noSmithyDocumentSerde } -// Information about logs for a build project. These can be logs in Amazon -// CloudWatch Logs, built in a specified S3 bucket, or both. +// Information about logs for a build project. These can be logs in CloudWatch +// Logs, built in a specified S3 bucket, or both. type LogsConfig struct { - // Information about Amazon CloudWatch Logs for a build project. Amazon CloudWatch - // Logs are enabled by default. + // Information about CloudWatch Logs for a build project. CloudWatch Logs are + // enabled by default. CloudWatchLogs *CloudWatchLogsConfig // Information about logs built to an S3 bucket for a build project. S3 logs are @@ -847,22 +845,22 @@ type LogsConfig struct { noSmithyDocumentSerde } -// Information about build logs in Amazon CloudWatch Logs. +// Information about build logs in CloudWatch Logs. type LogsLocation struct { - // Information about Amazon CloudWatch Logs for a build project. + // Information about CloudWatch Logs for a build project. CloudWatchLogs *CloudWatchLogsConfig - // The ARN of Amazon CloudWatch Logs for a build project. Its format is + // The ARN of CloudWatch Logs for a build project. Its format is // arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}. - // For more information, see Resources Defined by Amazon CloudWatch Logs + // For more information, see Resources Defined by CloudWatch Logs // (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatchlogs.html#amazoncloudwatchlogs-resources-for-iam-policies). CloudWatchLogsArn *string - // The URL to an individual build log in Amazon CloudWatch Logs. + // The URL to an individual build log in CloudWatch Logs. DeepLink *string - // The name of the Amazon CloudWatch Logs group for the build logs. + // The name of the CloudWatch Logs group for the build logs. GroupName *string // The URL to a build log in an S3 bucket. @@ -877,7 +875,7 @@ type LogsLocation struct { // (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html#amazons3-resources-for-iam-policies). S3LogsArn *string - // The name of the Amazon CloudWatch Logs stream for the build logs. + // The name of the CloudWatch Logs stream for the build logs. StreamName *string noSmithyDocumentSerde @@ -940,11 +938,12 @@ type Project struct { // A description that makes the build project easy to identify. Description *string - // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used - // for encrypting the build output artifacts. You can use a cross-account KMS key - // to encrypt the build output artifacts if your service role has permission to - // that key. You can specify either the Amazon Resource Name (ARN) of the CMK or, - // if available, the CMK's alias (using the format alias/). + // The Key Management Service customer master key (CMK) to be used for encrypting + // the build output artifacts. You can use a cross-account KMS key to encrypt the + // build output artifacts if your service role has permission to that key. You can + // specify either the Amazon Resource Name (ARN) of the CMK or, if available, the + // CMK's alias (using the format alias/). If you don't specify a value, CodeBuild + // uses the managed CMK for Amazon Simple Storage Service (Amazon S3). EncryptionKey *string // Information about the build environment for this build project. @@ -961,15 +960,27 @@ type Project struct { LastModified *time.Time // Information about logs for the build project. A project can create logs in - // Amazon CloudWatch Logs, an S3 bucket, or both. + // CloudWatch Logs, an S3 bucket, or both. LogsConfig *LogsConfig // The name of the build project. Name *string + // Specifies the visibility of the project's builds. Possible values are: + // PUBLIC_READ The project builds are visible to the public. PRIVATE The project + // builds are not visible to the public. + ProjectVisibility ProjectVisibilityType + + // Contains the project identifier used with the public build APIs. + PublicProjectAlias *string + // The number of minutes a build is allowed to be queued before it times out. QueuedTimeoutInMinutes *int32 + // The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and + // Amazon S3 artifacts for the project's builds. + ResourceAccessRole *string + // An array of ProjectArtifacts objects. SecondaryArtifacts []ProjectArtifacts @@ -981,8 +992,8 @@ type Project struct { // An array of ProjectSource objects. SecondarySources []ProjectSource - // The ARN of the AWS Identity and Access Management (IAM) role that enables AWS - // CodeBuild to interact with dependent AWS services on behalf of the AWS account. + // The ARN of the IAM role that enables CodeBuild to interact with dependent Amazon + // Web Services services on behalf of the Amazon Web Services account. ServiceRole *string // Information about the build input source code for this build project. @@ -991,47 +1002,47 @@ type Project struct { // A version of the build input to be built for this project. If not specified, the // latest version is used. If specified, it must be one of: // - // * For AWS CodeCommit: - // the commit ID, branch, or Git tag to use. + // * For CodeCommit: the + // commit ID, branch, or Git tag to use. // - // * For GitHub: the commit ID, pull - // request ID, branch name, or tag name that corresponds to the version of the - // source code you want to build. If a pull request ID is specified, it must use - // the format pr/pull-request-ID (for example pr/25). If a branch name is - // specified, the branch's HEAD commit ID is used. If not specified, the default - // branch's HEAD commit ID is used. + // * For GitHub: the commit ID, pull request + // ID, branch name, or tag name that corresponds to the version of the source code + // you want to build. If a pull request ID is specified, it must use the format + // pr/pull-request-ID (for example pr/25). If a branch name is specified, the + // branch's HEAD commit ID is used. If not specified, the default branch's HEAD + // commit ID is used. // - // * For Bitbucket: the commit ID, branch name, - // or tag name that corresponds to the version of the source code you want to - // build. If a branch name is specified, the branch's HEAD commit ID is used. If - // not specified, the default branch's HEAD commit ID is used. + // * For Bitbucket: the commit ID, branch name, or tag name + // that corresponds to the version of the source code you want to build. If a + // branch name is specified, the branch's HEAD commit ID is used. If not specified, + // the default branch's HEAD commit ID is used. // - // * For Amazon S3: - // the version ID of the object that represents the build input ZIP file to - // use. + // * For Amazon S3: the version ID of + // the object that represents the build input ZIP file to use. // - // If sourceVersion is specified at the build level, then that version takes - // precedence over this sourceVersion (at the project level). For more information, - // see Source Version Sample with CodeBuild + // If sourceVersion is + // specified at the build level, then that version takes precedence over this + // sourceVersion (at the project level). For more information, see Source Version + // Sample with CodeBuild // (https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html) - // in the AWS CodeBuild User Guide. + // in the CodeBuild User Guide. SourceVersion *string // A list of tag key and value pairs associated with this build project. These tags - // are available for use by AWS services that support AWS CodeBuild build project - // tags. + // are available for use by Amazon Web Services services that support CodeBuild + // build project tags. Tags []Tag - // How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before + // How long, in minutes, from 5 to 480 (8 hours), for CodeBuild to wait before // timing out any related build that did not get marked as completed. The default // is 60 minutes. TimeoutInMinutes *int32 - // Information about the VPC configuration that AWS CodeBuild accesses. + // Information about the VPC configuration that CodeBuild accesses. VpcConfig *VpcConfig // Information about a webhook that connects repository events to a build project - // in AWS CodeBuild. + // in CodeBuild. Webhook *Webhook noSmithyDocumentSerde @@ -1043,14 +1054,14 @@ type ProjectArtifacts struct { // The type of build output artifact. Valid values include: // // * CODEPIPELINE: The - // build project has build output generated through AWS CodePipeline. The - // CODEPIPELINE type is not supported for secondaryArtifacts. + // build project has build output generated through CodePipeline. The CODEPIPELINE + // type is not supported for secondaryArtifacts. // - // * NO_ARTIFACTS: The - // build project does not produce any build output. + // * NO_ARTIFACTS: The build project + // does not produce any build output. // - // * S3: The build project stores - // build output in Amazon S3. + // * S3: The build project stores build output + // in Amazon S3. // // This member is required. Type ArtifactsType @@ -1058,25 +1069,28 @@ type ProjectArtifacts struct { // An identifier for this artifact definition. ArtifactIdentifier *string - // Specifies the access for objects that are uploaded to an Amazon S3 bucket that - // is owned by another account. By default, only the account that uploads the - // objects to the bucket has access to these objects. This property allows you to - // give the bucket owner access to these objects. NONE The bucket owner does not - // have access to the objects. This is the default. READ_ONLY The bucket owner has - // read only access to the objects. The uploading account retains ownership of the - // objects. FULL The bucket owner has full access to the objects. Object ownership - // is determined by the following criteria: - // - // * If the bucket is configured with the - // Bucket owner preferred setting, the bucket owner owns the objects. The uploading - // account will have object access as specified by the bucket's policy. - // - // * - // Otherwise, the uploading account retains ownership of the objects. - // - // For more - // information about Amazon S3 object ownership, see Controlling ownership of - // uploaded objects using S3 Object Ownership + // Specifies the bucket owner's access for objects that another account uploads to + // their Amazon S3 bucket. By default, only the account that uploads the objects to + // the bucket has access to these objects. This property allows you to give the + // bucket owner access to these objects. To use this property, your CodeBuild + // service role must have the s3:PutBucketAcl permission. This permission allows + // CodeBuild to modify the access control list for the bucket. This property can be + // one of the following values: NONE The bucket owner does not have access to the + // objects. This is the default. READ_ONLY The bucket owner has read-only access to + // the objects. The uploading account retains ownership of the objects. FULL The + // bucket owner has full access to the objects. Object ownership is determined by + // the following criteria: + // + // * If the bucket is configured with the Bucket owner + // preferred setting, the bucket owner owns the objects. The uploading account will + // have object access as specified by the bucket's policy. + // + // * Otherwise, the + // uploading account retains ownership of the objects. + // + // For more information about + // Amazon S3 object ownership, see Controlling ownership of uploaded objects using + // S3 Object Ownership // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) // in the Amazon Simple Storage Service User Guide. BucketOwnerAccess BucketOwnerAccess @@ -1089,65 +1103,64 @@ type ProjectArtifacts struct { // Information about the build output artifact location: // // * If type is set to - // CODEPIPELINE, AWS CodePipeline ignores this value if specified. This is because - // AWS CodePipeline manages its build output locations instead of AWS CodeBuild. + // CODEPIPELINE, CodePipeline ignores this value if specified. This is because + // CodePipeline manages its build output locations instead of CodeBuild. // - // * - // If type is set to NO_ARTIFACTS, this value is ignored if specified, because no - // build output is produced. + // * If type + // is set to NO_ARTIFACTS, this value is ignored if specified, because no build + // output is produced. // - // * If type is set to S3, this is the name of the - // output bucket. + // * If type is set to S3, this is the name of the output + // bucket. Location *string - // Along with path and namespaceType, the pattern that AWS CodeBuild uses to name - // and store the output artifact: + // Along with path and namespaceType, the pattern that CodeBuild uses to name and + // store the output artifact: // - // * If type is set to CODEPIPELINE, AWS - // CodePipeline ignores this value if specified. This is because AWS CodePipeline - // manages its build output names instead of AWS CodeBuild. + // * If type is set to CODEPIPELINE, CodePipeline + // ignores this value if specified. This is because CodePipeline manages its build + // output names instead of CodeBuild. // - // * If type is set to - // NO_ARTIFACTS, this value is ignored if specified, because no build output is - // produced. + // * If type is set to NO_ARTIFACTS, this value + // is ignored if specified, because no build output is produced. // - // * If type is set to S3, this is the name of the output artifact - // object. If you set the name to be a forward slash ("/"), the artifact is stored - // in the root of the output bucket. + // * If type is set + // to S3, this is the name of the output artifact object. If you set the name to be + // a forward slash ("/"), the artifact is stored in the root of the output + // bucket. // // For example: // - // * If path is set to - // MyArtifacts, namespaceType is set to BUILD_ID, and name is set to - // MyArtifact.zip, then the output artifact is stored in - // MyArtifacts//MyArtifact.zip. + // * If path is set to MyArtifacts, namespaceType is set to + // BUILD_ID, and name is set to MyArtifact.zip, then the output artifact is stored + // in MyArtifacts//MyArtifact.zip. // - // * If path is empty, namespaceType is set to NONE, - // and name is set to "/", the output artifact is stored in the root of the output - // bucket. + // * If path is empty, namespaceType is set to + // NONE, and name is set to "/", the output artifact is stored in the root of the + // output bucket. // - // * If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and - // name is set to "/", the output artifact is stored in MyArtifacts/. + // * If path is set to MyArtifacts, namespaceType is set to + // BUILD_ID, and name is set to "/", the output artifact is stored in MyArtifacts/. Name *string - // Along with path and name, the pattern that AWS CodeBuild uses to determine the - // name and location to store the output artifact: + // Along with path and name, the pattern that CodeBuild uses to determine the name + // and location to store the output artifact: // - // * If type is set to - // CODEPIPELINE, AWS CodePipeline ignores this value if specified. This is because - // AWS CodePipeline manages its build output names instead of AWS CodeBuild. + // * If type is set to CODEPIPELINE, + // CodePipeline ignores this value if specified. This is because CodePipeline + // manages its build output names instead of CodeBuild. // - // * If - // type is set to NO_ARTIFACTS, this value is ignored if specified, because no - // build output is produced. + // * If type is set to + // NO_ARTIFACTS, this value is ignored if specified, because no build output is + // produced. // // * If type is set to S3, valid values include: // - // * - // BUILD_ID: Include the build ID in the location of the build output artifact. + // * BUILD_ID: Include + // the build ID in the location of the build output artifact. // - // * - // NONE: Do not include the build ID. This is the default if namespaceType is not + // * NONE: Do not + // include the build ID. This is the default if namespaceType is not // specified. // // For example, if path is set to MyArtifacts, namespaceType is set to @@ -1164,42 +1177,40 @@ type ProjectArtifacts struct { // The type of build output artifact to create: // // * If type is set to CODEPIPELINE, - // AWS CodePipeline ignores this value if specified. This is because AWS - // CodePipeline manages its build output artifacts instead of AWS CodeBuild. + // CodePipeline ignores this value if specified. This is because CodePipeline + // manages its build output artifacts instead of CodeBuild. // - // * If - // type is set to NO_ARTIFACTS, this value is ignored if specified, because no - // build output is produced. + // * If type is set to + // NO_ARTIFACTS, this value is ignored if specified, because no build output is + // produced. // // * If type is set to S3, valid values include: // - // * - // NONE: AWS CodeBuild creates in the output bucket a folder that contains the - // build output. This is the default if packaging is not specified. + // * NONE: CodeBuild + // creates in the output bucket a folder that contains the build output. This is + // the default if packaging is not specified. // - // * ZIP: AWS - // CodeBuild creates in the output bucket a ZIP file that contains the build - // output. + // * ZIP: CodeBuild creates in the + // output bucket a ZIP file that contains the build output. Packaging ArtifactPackaging - // Along with namespaceType and name, the pattern that AWS CodeBuild uses to name - // and store the output artifact: + // Along with namespaceType and name, the pattern that CodeBuild uses to name and + // store the output artifact: // - // * If type is set to CODEPIPELINE, AWS - // CodePipeline ignores this value if specified. This is because AWS CodePipeline - // manages its build output names instead of AWS CodeBuild. + // * If type is set to CODEPIPELINE, CodePipeline + // ignores this value if specified. This is because CodePipeline manages its build + // output names instead of CodeBuild. // - // * If type is set to - // NO_ARTIFACTS, this value is ignored if specified, because no build output is - // produced. + // * If type is set to NO_ARTIFACTS, this value + // is ignored if specified, because no build output is produced. // - // * If type is set to S3, this is the path to the output artifact. If - // path is not specified, path is not used. + // * If type is set + // to S3, this is the path to the output artifact. If path is not specified, path + // is not used. // - // For example, if path is set to - // MyArtifacts, namespaceType is set to NONE, and name is set to MyArtifact.zip, - // the output artifact is stored in the output bucket at - // MyArtifacts/MyArtifact.zip. + // For example, if path is set to MyArtifacts, namespaceType is set + // to NONE, and name is set to MyArtifact.zip, the output artifact is stored in the + // output bucket at MyArtifacts/MyArtifact.zip. Path *string noSmithyDocumentSerde @@ -1340,7 +1351,7 @@ type ProjectEnvironment struct { // For more // information, see Build Environment Compute Types // (https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html) - // in the AWS CodeBuild User Guide. + // in the CodeBuild User Guide. // // This member is required. ComputeType ComputeType @@ -1357,6 +1368,11 @@ type ProjectEnvironment struct { // "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf," use // /@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf. // + // For + // more information, see Docker images provided by CodeBuild + // (https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html) + // in the CodeBuild user guide. + // // This member is required. Image *string @@ -1380,6 +1396,15 @@ type ProjectEnvironment struct { // Pacific (Tokyo), Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific // (Sydney) , China (Beijing), and China (Ningxia). // + // * The environment types + // WINDOWS_CONTAINER and WINDOWS_SERVER_2019_CONTAINER are available only in + // regions US East (N. Virginia), US East (Ohio), US West (Oregon), and EU + // (Ireland). + // + // For more information, see Build environment compute types + // (https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html) + // in the CodeBuild user guide. + // // This member is required. Type EnvironmentType @@ -1387,26 +1412,26 @@ type ProjectEnvironment struct { // PEM-encoded certificate for the build project. For more information, see // certificate // (https://docs.aws.amazon.com/codebuild/latest/userguide/create-project-cli.html#cli.environment.certificate) - // in the AWS CodeBuild User Guide. + // in the CodeBuild User Guide. Certificate *string // A set of environment variables to make available to builds for this build // project. EnvironmentVariables []EnvironmentVariable - // The type of credentials AWS CodeBuild uses to pull images in your build. There - // are two valid values: + // The type of credentials CodeBuild uses to pull images in your build. There are + // two valid values: // - // * CODEBUILD specifies that AWS CodeBuild uses its own + // * CODEBUILD specifies that CodeBuild uses its own // credentials. This requires that you modify your ECR repository policy to trust - // AWS CodeBuild's service principal. + // CodeBuild service principal. // - // * SERVICE_ROLE specifies that AWS CodeBuild - // uses your build project's service role. + // * SERVICE_ROLE specifies that CodeBuild uses your + // build project's service role. // - // When you use a cross-account or private - // registry image, you must use SERVICE_ROLE credentials. When you use an AWS - // CodeBuild curated image, you must use CODEBUILD credentials. + // When you use a cross-account or private registry + // image, you must use SERVICE_ROLE credentials. When you use an CodeBuild curated + // image, you must use CODEBUILD credentials. ImagePullCredentialsType ImagePullCredentialsType // Enables running the Docker daemon inside a Docker container. Set to true only if @@ -1445,8 +1470,8 @@ type ProjectFileSystemLocation struct { // A string that specifies the location of the file system created by Amazon EFS. // Its format is efs-dns-name:/directory-path. You can find the DNS name of file - // system when you view it in the AWS EFS console. The directory path is a path to - // a directory in the file system that CodeBuild mounts. For example, if the DNS + // system when you view it in the Amazon EFS console. The directory path is a path + // to a directory in the file system that CodeBuild mounts. For example, if the DNS // name of a file system is fs-abcd1234.efs.us-west-2.amazonaws.com, and its mount // directory is my-efs-mount-directory, then the location is // fs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory. The directory @@ -1455,7 +1480,7 @@ type ProjectFileSystemLocation struct { // the entire file system. Location *string - // The mount options for a file system created by AWS EFS. The default mount + // The mount options for a file system created by Amazon EFS. The default mount // options used by CodeBuild are // nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2. For more // information, see Recommended NFS Mount Options @@ -1480,10 +1505,10 @@ type ProjectSource struct { // * BITBUCKET: The source code is in a Bitbucket repository. // // * - // CODECOMMIT: The source code is in an AWS CodeCommit repository. + // CODECOMMIT: The source code is in an CodeCommit repository. // - // * CODEPIPELINE: - // The source code settings are specified in the source action of a pipeline in AWS + // * CODEPIPELINE: The + // source code settings are specified in the source action of a pipeline in // CodePipeline. // // * GITHUB: The source code is in a GitHub or GitHub Enterprise @@ -1500,9 +1525,9 @@ type ProjectSource struct { // This member is required. Type SourceType - // Information about the authorization settings for AWS CodeBuild to access the - // source code to be built. This information is for the AWS CodeBuild console's use - // only. Your code should not get or set this information directly. + // Information about the authorization settings for CodeBuild to access the source + // code to be built. This information is for the CodeBuild console's use only. Your + // code should not get or set this information directly. Auth *SourceAuth // Contains information that defines how the build project reports the build status @@ -1514,11 +1539,12 @@ type ProjectSource struct { // this value is set, it can be either an inline buildspec definition, the path to // an alternate buildspec file relative to the value of the built-in // CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket. The bucket - // must be in the same AWS Region as the build project. Specify the buildspec file - // using its ARN (for example, arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If - // this value is not provided or is set to an empty string, the source code must - // contain a buildspec file in its root directory. For more information, see - // Buildspec File Name and Storage Location + // must be in the same Amazon Web Services Region as the build project. Specify the + // buildspec file using its ARN (for example, + // arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not provided + // or is set to an empty string, the source code must contain a buildspec file in + // its root directory. For more information, see Buildspec File Name and Storage + // Location // (https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage). Buildspec *string @@ -1536,13 +1562,13 @@ type ProjectSource struct { // include: // // * For source code settings that are specified in the source action of - // a pipeline in AWS CodePipeline, location should not be specified. If it is - // specified, AWS CodePipeline ignores it. This is because AWS CodePipeline uses - // the settings in a pipeline's source action instead of this value. + // a pipeline in CodePipeline, location should not be specified. If it is + // specified, CodePipeline ignores it. This is because CodePipeline uses the + // settings in a pipeline's source action instead of this value. // - // * For source - // code in an AWS CodeCommit repository, the HTTPS clone URL to the repository that - // contains the source code and the buildspec file (for example, + // * For source code + // in an CodeCommit repository, the HTTPS clone URL to the repository that contains + // the source code and the buildspec file (for example, // https://git-codecommit..amazonaws.com/v1/repos/). // // * For source code in an @@ -1556,26 +1582,29 @@ type ProjectSource struct { // // * For source code in a GitHub // repository, the HTTPS clone URL to the repository that contains the source and - // the buildspec file. You must connect your AWS account to your GitHub account. - // Use the AWS CodeBuild console to start creating a build project. When you use - // the console to connect (or reconnect) with GitHub, on the GitHub Authorize - // application page, for Organization access, choose Request access next to each - // repository you want to allow AWS CodeBuild to have access to, and then choose - // Authorize application. (After you have connected to your GitHub account, you do - // not need to finish creating the build project. You can leave the AWS CodeBuild - // console.) To instruct AWS CodeBuild to use this connection, in the source + // the buildspec file. You must connect your Amazon Web Services account to your + // GitHub account. Use the CodeBuild console to start creating a build project. + // When you use the console to connect (or reconnect) with GitHub, on the GitHub + // Authorize application page, for Organization access, choose Request access next + // to each repository you want to allow CodeBuild to have access to, and then + // choose Authorize application. (After you have connected to your GitHub account, + // you do not need to finish creating the build project. You can leave the + // CodeBuild console.) To instruct CodeBuild to use this connection, in the source // object, set the auth object's type value to OAUTH. // // * For source code in a // Bitbucket repository, the HTTPS clone URL to the repository that contains the - // source and the buildspec file. You must connect your AWS account to your - // Bitbucket account. Use the AWS CodeBuild console to start creating a build + // source and the buildspec file. You must connect your Amazon Web Services account + // to your Bitbucket account. Use the CodeBuild console to start creating a build // project. When you use the console to connect (or reconnect) with Bitbucket, on // the Bitbucket Confirm access to your account page, choose Grant access. (After // you have connected to your Bitbucket account, you do not need to finish creating - // the build project. You can leave the AWS CodeBuild console.) To instruct AWS - // CodeBuild to use this connection, in the source object, set the auth object's - // type value to OAUTH. + // the build project. You can leave the CodeBuild console.) To instruct CodeBuild + // to use this connection, in the source object, set the auth object's type value + // to OAUTH. + // + // If you specify CODEPIPELINE for the Type property, don't specify this + // property. For all of the other types, you must specify Location. Location *string // Set to true to report the status of a build's start and finish to your source @@ -1586,8 +1615,8 @@ type ProjectSource struct { // have write access to the repo. If the user does not have write access, the build // status cannot be updated. For more information, see Source provider access // (https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens.html) in - // the AWS CodeBuild User Guide. The status of a build triggered by a webhook is - // always reported to your source provider. + // the CodeBuild User Guide. The status of a build triggered by a webhook is always + // reported to your source provider. ReportBuildStatus *bool // An identifier for this project source. The identifier can only contain @@ -1611,10 +1640,10 @@ type ProjectSourceVersion struct { // The source version for the corresponding source identifier. If specified, must // be one of: // - // * For AWS CodeCommit: the commit ID, branch, or Git tag to use. + // * For CodeCommit: the commit ID, branch, or Git tag to use. // - // * - // For GitHub: the commit ID, pull request ID, branch name, or tag name that + // * For + // GitHub: the commit ID, pull request ID, branch name, or tag name that // corresponds to the version of the source code you want to build. If a pull // request ID is specified, it must use the format pr/pull-request-ID (for example, // pr/25). If a branch name is specified, the branch's HEAD commit ID is used. If @@ -1632,7 +1661,7 @@ type ProjectSourceVersion struct { // For more information, see Source Version Sample with // CodeBuild // (https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html) - // in the AWS CodeBuild User Guide. + // in the CodeBuild User Guide. // // This member is required. SourceVersion *string @@ -1649,19 +1678,19 @@ type ProjectSourceVersion struct { // images cannot be curated or an Amazon ECR image. // // For more information, see -// Private Registry with AWS Secrets Manager Sample for AWS CodeBuild +// Private Registry with Secrets Manager Sample for CodeBuild // (https://docs.aws.amazon.com/codebuild/latest/userguide/sample-private-registry.html). type RegistryCredential struct { - // The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets + // The Amazon Resource Name (ARN) or name of credentials created using Secrets // Manager. The credential can use the name of the credentials only if they exist - // in your current AWS Region. + // in your current Amazon Web Services Region. // // This member is required. Credential *string // The service that created the credentials to access a private Docker registry. - // The valid value, SECRETS_MANAGER, is for AWS Secrets Manager. + // The valid value, SECRETS_MANAGER, is for Secrets Manager. // // This member is required. CredentialProvider CredentialProviderType @@ -1774,8 +1803,8 @@ type ReportGroup struct { Status ReportGroupStatusType // A list of tag key and value pairs associated with this report group. These tags - // are available for use by AWS services that support AWS CodeBuild report group - // tags. + // are available for use by Amazon Web Services services that support CodeBuild + // report group tags. Tags []Tag // The type of the ReportGroup. This can be one of the following values: @@ -1814,7 +1843,7 @@ type ReportWithRawData struct { noSmithyDocumentSerde } -// Represents a resolved build artifact. A resolve artifact is an artifact that is +// Represents a resolved build artifact. A resolved artifact is an artifact that is // built and deployed to the destination, such as Amazon S3. type ResolvedArtifact struct { @@ -1844,25 +1873,28 @@ type S3LogsConfig struct { // This member is required. Status LogsConfigStatusType - // Specifies the access for objects that are uploaded to an Amazon S3 bucket that - // is owned by another account. By default, only the account that uploads the - // objects to the bucket has access to these objects. This property allows you to - // give the bucket owner access to these objects. NONE The bucket owner does not - // have access to the objects. This is the default. READ_ONLY The bucket owner has - // read only access to the objects. The uploading account retains ownership of the - // objects. FULL The bucket owner has full access to the objects. Object ownership - // is determined by the following criteria: - // - // * If the bucket is configured with the - // Bucket owner preferred setting, the bucket owner owns the objects. The uploading - // account will have object access as specified by the bucket's policy. - // - // * - // Otherwise, the uploading account retains ownership of the objects. - // - // For more - // information about Amazon S3 object ownership, see Controlling ownership of - // uploaded objects using S3 Object Ownership + // Specifies the bucket owner's access for objects that another account uploads to + // their Amazon S3 bucket. By default, only the account that uploads the objects to + // the bucket has access to these objects. This property allows you to give the + // bucket owner access to these objects. To use this property, your CodeBuild + // service role must have the s3:PutBucketAcl permission. This permission allows + // CodeBuild to modify the access control list for the bucket. This property can be + // one of the following values: NONE The bucket owner does not have access to the + // objects. This is the default. READ_ONLY The bucket owner has read-only access to + // the objects. The uploading account retains ownership of the objects. FULL The + // bucket owner has full access to the objects. Object ownership is determined by + // the following criteria: + // + // * If the bucket is configured with the Bucket owner + // preferred setting, the bucket owner owns the objects. The uploading account will + // have object access as specified by the bucket's policy. + // + // * Otherwise, the + // uploading account retains ownership of the objects. + // + // For more information about + // Amazon S3 object ownership, see Controlling ownership of uploaded objects using + // S3 Object Ownership // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) // in the Amazon Simple Storage Service User Guide. BucketOwnerAccess BucketOwnerAccess @@ -1885,9 +1917,9 @@ type S3ReportExportConfig struct { // The name of the S3 bucket where the raw data of a report are exported. Bucket *string - // The AWS account identifier of the owner of the Amazon S3 bucket. This allows - // report data to be exported to an Amazon S3 bucket that is owned by an account - // other than the account running the build. + // The Amazon Web Services account identifier of the owner of the Amazon S3 bucket. + // This allows report data to be exported to an Amazon S3 bucket that is owned by + // an account other than the account running the build. BucketOwner *string // A boolean value that specifies if the results of a report are encrypted. @@ -1898,12 +1930,12 @@ type S3ReportExportConfig struct { // The type of build output artifact to create. Valid values include: // - // * NONE: AWS + // * NONE: // CodeBuild creates the raw data in the output bucket. This is the default if // packaging is not specified. // - // * ZIP: AWS CodeBuild creates a ZIP file with the - // raw data in the output bucket. + // * ZIP: CodeBuild creates a ZIP file with the raw + // data in the output bucket. Packaging ReportPackagingType // The path to the exported report's raw data results. @@ -1912,9 +1944,9 @@ type S3ReportExportConfig struct { noSmithyDocumentSerde } -// Information about the authorization settings for AWS CodeBuild to access the -// source code to be built. This information is for the AWS CodeBuild console's use -// only. Your code should not get or set this information directly. +// Information about the authorization settings for CodeBuild to access the source +// code to be built. This information is for the CodeBuild console's use only. Your +// code should not get or set this information directly. type SourceAuth struct { // This data type is deprecated and is no longer accurate or used. The @@ -1948,8 +1980,8 @@ type SourceCredentialsInfo struct { noSmithyDocumentSerde } -// A tag, consisting of a key and a value. This tag is available for use by AWS -// services that support tags in AWS CodeBuild. +// A tag, consisting of a key and a value. This tag is available for use by Amazon +// Web Services services that support tags in CodeBuild. type Tag struct { // The tag's key. @@ -2045,7 +2077,7 @@ type TestReportSummary struct { noSmithyDocumentSerde } -// Information about the VPC configuration that AWS CodeBuild accesses. +// Information about the VPC configuration that CodeBuild accesses. type VpcConfig struct { // A list of one or more security groups IDs in your Amazon VPC. @@ -2061,7 +2093,7 @@ type VpcConfig struct { } // Information about a webhook that connects repository events to a build project -// in AWS CodeBuild. +// in CodeBuild. type Webhook struct { // A regular expression used to determine which repository branches are built when @@ -2083,7 +2115,7 @@ type Webhook struct { // modified. LastModifiedSecret *time.Time - // The AWS CodeBuild endpoint where webhook events are sent. + // The CodeBuild endpoint where webhook events are sent. PayloadUrl *string // The secret token of the associated repository. A Bitbucket webhook does not diff --git a/service/codebuild/validators.go b/service/codebuild/validators.go index 63f71609dde..ab76aa5d549 100644 --- a/service/codebuild/validators.go +++ b/service/codebuild/validators.go @@ -610,6 +610,26 @@ func (m *validateOpUpdateProject) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateProjectVisibility struct { +} + +func (*validateOpUpdateProjectVisibility) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateProjectVisibility) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateProjectVisibilityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateProjectVisibilityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateReportGroup struct { } @@ -770,6 +790,10 @@ func addOpUpdateProjectValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateProject{}, middleware.After) } +func addOpUpdateProjectVisibilityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateProjectVisibility{}, middleware.After) +} + func addOpUpdateReportGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateReportGroup{}, middleware.After) } @@ -1782,6 +1806,24 @@ func validateOpUpdateProjectInput(v *UpdateProjectInput) error { } } +func validateOpUpdateProjectVisibilityInput(v *UpdateProjectVisibilityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateProjectVisibilityInput"} + if v.ProjectArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProjectArn")) + } + if len(v.ProjectVisibility) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ProjectVisibility")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateReportGroupInput(v *UpdateReportGroupInput) error { if v == nil { return nil diff --git a/service/connect/api_op_CreateAgentStatus.go b/service/connect/api_op_CreateAgentStatus.go new file mode 100644 index 00000000000..bdbcf2f2601 --- /dev/null +++ b/service/connect/api_op_CreateAgentStatus.go @@ -0,0 +1,145 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +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/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This API is in preview release for Amazon Connect and is subject to change. +// Creates an agent status for the specified Amazon Connect instance. +func (c *Client) CreateAgentStatus(ctx context.Context, params *CreateAgentStatusInput, optFns ...func(*Options)) (*CreateAgentStatusOutput, error) { + if params == nil { + params = &CreateAgentStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAgentStatus", params, optFns, c.addOperationCreateAgentStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAgentStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAgentStatusInput struct { + + // 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 name of the status. + // + // This member is required. + Name *string + + // The state of the status. + // + // This member is required. + State types.AgentStatusState + + // The description of the status. + Description *string + + // The display order of the status. + DisplayOrder *int32 + + // One or more tags. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateAgentStatusOutput struct { + + // The Amazon Resource Name (ARN) of the agent status. + AgentStatusARN *string + + // The identifier of the agent status. + AgentStatusId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAgentStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAgentStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAgentStatus{}, 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 = addOpCreateAgentStatusValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAgentStatus(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_opCreateAgentStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "CreateAgentStatus", + } +} diff --git a/service/connect/api_op_CreateHoursOfOperation.go b/service/connect/api_op_CreateHoursOfOperation.go new file mode 100644 index 00000000000..d60d481085f --- /dev/null +++ b/service/connect/api_op_CreateHoursOfOperation.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +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/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This API is in preview release for Amazon Connect and is subject to change. +// Creates hours of operation. +func (c *Client) CreateHoursOfOperation(ctx context.Context, params *CreateHoursOfOperationInput, optFns ...func(*Options)) (*CreateHoursOfOperationOutput, error) { + if params == nil { + params = &CreateHoursOfOperationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateHoursOfOperation", params, optFns, c.addOperationCreateHoursOfOperationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateHoursOfOperationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateHoursOfOperationInput struct { + + // Configuration information for the hours of operation: day, start time, and end + // time. + // + // This member is required. + Config []types.HoursOfOperationConfig + + // 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 name of the hours of operation. + // + // This member is required. + Name *string + + // The time zone of the hours of operation. + // + // This member is required. + TimeZone *string + + // The description of the hours of operation. + Description *string + + // One or more tags. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateHoursOfOperationOutput struct { + + // The Amazon Resource Name (ARN) for the hours of operation. + HoursOfOperationArn *string + + // The identifier for the hours of operation. + HoursOfOperationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateHoursOfOperationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateHoursOfOperation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateHoursOfOperation{}, 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 = addOpCreateHoursOfOperationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateHoursOfOperation(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_opCreateHoursOfOperation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "CreateHoursOfOperation", + } +} diff --git a/service/connect/api_op_DeleteHoursOfOperation.go b/service/connect/api_op_DeleteHoursOfOperation.go new file mode 100644 index 00000000000..211141fff9d --- /dev/null +++ b/service/connect/api_op_DeleteHoursOfOperation.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +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" +) + +// This API is in preview release for Amazon Connect and is subject to change. +// Deletes an hours of operation. +func (c *Client) DeleteHoursOfOperation(ctx context.Context, params *DeleteHoursOfOperationInput, optFns ...func(*Options)) (*DeleteHoursOfOperationOutput, error) { + if params == nil { + params = &DeleteHoursOfOperationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteHoursOfOperation", params, optFns, c.addOperationDeleteHoursOfOperationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteHoursOfOperationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteHoursOfOperationInput struct { + + // The identifier for the hours of operation. + // + // This member is required. + HoursOfOperationId *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 + + noSmithyDocumentSerde +} + +type DeleteHoursOfOperationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteHoursOfOperationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteHoursOfOperation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteHoursOfOperation{}, 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 = addOpDeleteHoursOfOperationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteHoursOfOperation(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_opDeleteHoursOfOperation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "DeleteHoursOfOperation", + } +} diff --git a/service/connect/api_op_DescribeAgentStatus.go b/service/connect/api_op_DescribeAgentStatus.go new file mode 100644 index 00000000000..2a6853ab1bf --- /dev/null +++ b/service/connect/api_op_DescribeAgentStatus.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +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/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This API is in preview release for Amazon Connect and is subject to change. +// Describes an agent status. +func (c *Client) DescribeAgentStatus(ctx context.Context, params *DescribeAgentStatusInput, optFns ...func(*Options)) (*DescribeAgentStatusOutput, error) { + if params == nil { + params = &DescribeAgentStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAgentStatus", params, optFns, c.addOperationDescribeAgentStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAgentStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAgentStatusInput struct { + + // The identifier for the agent status. + // + // This member is required. + AgentStatusId *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 + + noSmithyDocumentSerde +} + +type DescribeAgentStatusOutput struct { + + // The agent status. + AgentStatus *types.AgentStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAgentStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAgentStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAgentStatus{}, 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 = addOpDescribeAgentStatusValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAgentStatus(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_opDescribeAgentStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "DescribeAgentStatus", + } +} diff --git a/service/connect/api_op_ListAgentStatuses.go b/service/connect/api_op_ListAgentStatuses.go new file mode 100644 index 00000000000..41bb1074f1c --- /dev/null +++ b/service/connect/api_op_ListAgentStatuses.go @@ -0,0 +1,219 @@ +// 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" +) + +// This API is in preview release for Amazon Connect and is subject to change. +// Lists agent statuses. +func (c *Client) ListAgentStatuses(ctx context.Context, params *ListAgentStatusesInput, optFns ...func(*Options)) (*ListAgentStatusesOutput, error) { + if params == nil { + params = &ListAgentStatusesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAgentStatuses", params, optFns, c.addOperationListAgentStatusesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAgentStatusesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAgentStatusesInput struct { + + // The identifier of the Amazon Connect instance. You can find the instanceId in + // the ARN of the instance. + // + // This member is required. + InstanceId *string + + // Available agent status types. + AgentStatusTypes []types.AgentStatusType + + // The maximum number of results to return per page. + MaxResults int32 + + // The token for the next set of results. Use the value returned in the previous + // response in the next request to retrieve the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListAgentStatusesOutput struct { + + // A summary of agent statuses. + AgentStatusSummaryList []types.AgentStatusSummary + + // If there are additional results, this is the token for the next set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAgentStatusesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAgentStatuses{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAgentStatuses{}, 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 = addOpListAgentStatusesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAgentStatuses(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 +} + +// ListAgentStatusesAPIClient is a client that implements the ListAgentStatuses +// operation. +type ListAgentStatusesAPIClient interface { + ListAgentStatuses(context.Context, *ListAgentStatusesInput, ...func(*Options)) (*ListAgentStatusesOutput, error) +} + +var _ ListAgentStatusesAPIClient = (*Client)(nil) + +// ListAgentStatusesPaginatorOptions is the paginator options for ListAgentStatuses +type ListAgentStatusesPaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAgentStatusesPaginator is a paginator for ListAgentStatuses +type ListAgentStatusesPaginator struct { + options ListAgentStatusesPaginatorOptions + client ListAgentStatusesAPIClient + params *ListAgentStatusesInput + nextToken *string + firstPage bool +} + +// NewListAgentStatusesPaginator returns a new ListAgentStatusesPaginator +func NewListAgentStatusesPaginator(client ListAgentStatusesAPIClient, params *ListAgentStatusesInput, optFns ...func(*ListAgentStatusesPaginatorOptions)) *ListAgentStatusesPaginator { + if params == nil { + params = &ListAgentStatusesInput{} + } + + options := ListAgentStatusesPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAgentStatusesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAgentStatusesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListAgentStatuses page. +func (p *ListAgentStatusesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAgentStatusesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListAgentStatuses(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_opListAgentStatuses(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "ListAgentStatuses", + } +} diff --git a/service/connect/api_op_TagResource.go b/service/connect/api_op_TagResource.go index 3e82fb8e484..1ffcea86484 100644 --- a/service/connect/api_op_TagResource.go +++ b/service/connect/api_op_TagResource.go @@ -11,8 +11,9 @@ import ( ) // Adds the specified tags to the specified resource. The supported resource types -// are users, routing profiles, queues, quick connects, and contact flows. For -// sample policies that use tags, see Amazon Connect Identity-Based Policy Examples +// are users, routing profiles, queues, quick connects, contact flows, agent +// status, and hours of operation. For sample policies that use tags, see Amazon +// Connect Identity-Based Policy Examples // (https://docs.aws.amazon.com/connect/latest/adminguide/security_iam_id-based-policy-examples.html) // in the Amazon Connect Administrator Guide. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { diff --git a/service/connect/api_op_UpdateAgentStatus.go b/service/connect/api_op_UpdateAgentStatus.go new file mode 100644 index 00000000000..ea6b074cce5 --- /dev/null +++ b/service/connect/api_op_UpdateAgentStatus.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +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/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This API is in preview release for Amazon Connect and is subject to change. +// Updates agent status. +func (c *Client) UpdateAgentStatus(ctx context.Context, params *UpdateAgentStatusInput, optFns ...func(*Options)) (*UpdateAgentStatusOutput, error) { + if params == nil { + params = &UpdateAgentStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAgentStatus", params, optFns, c.addOperationUpdateAgentStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAgentStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAgentStatusInput struct { + + // The identifier of the agent status. + // + // This member is required. + AgentStatusId *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 description of the agent status. + Description *string + + // The display order of the agent status. + DisplayOrder *int32 + + // The name of the agent status. + Name *string + + // A number indicating the reset order of the agent status. + ResetOrderNumber bool + + // The state of the agent status. + State types.AgentStatusState + + noSmithyDocumentSerde +} + +type UpdateAgentStatusOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAgentStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAgentStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAgentStatus{}, 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 = addOpUpdateAgentStatusValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAgentStatus(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_opUpdateAgentStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "UpdateAgentStatus", + } +} diff --git a/service/connect/api_op_UpdateHoursOfOperation.go b/service/connect/api_op_UpdateHoursOfOperation.go new file mode 100644 index 00000000000..3c0ee729038 --- /dev/null +++ b/service/connect/api_op_UpdateHoursOfOperation.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +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/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This API is in preview release for Amazon Connect and is subject to change. +// Updates the hours of operation. +func (c *Client) UpdateHoursOfOperation(ctx context.Context, params *UpdateHoursOfOperationInput, optFns ...func(*Options)) (*UpdateHoursOfOperationOutput, error) { + if params == nil { + params = &UpdateHoursOfOperationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateHoursOfOperation", params, optFns, c.addOperationUpdateHoursOfOperationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateHoursOfOperationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateHoursOfOperationInput struct { + + // The identifier of the hours of operation. + // + // This member is required. + HoursOfOperationId *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 + + // Configuration information of the hours of operation. + Config []types.HoursOfOperationConfig + + // The description of the hours of operation. + Description *string + + // The name of the hours of operation. + Name *string + + // The time zone of the hours of operation. + TimeZone *string + + noSmithyDocumentSerde +} + +type UpdateHoursOfOperationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateHoursOfOperationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateHoursOfOperation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateHoursOfOperation{}, 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 = addOpUpdateHoursOfOperationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateHoursOfOperation(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_opUpdateHoursOfOperation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "UpdateHoursOfOperation", + } +} diff --git a/service/connect/deserializers.go b/service/connect/deserializers.go index 07a492412c3..3c780374e94 100644 --- a/service/connect/deserializers.go +++ b/service/connect/deserializers.go @@ -989,14 +989,373 @@ func awsRestjson1_deserializeOpDocumentAssociateSecurityKeyOutput(v **AssociateS return nil } +type awsRestjson1_deserializeOpCreateAgentStatus struct { +} + +func (*awsRestjson1_deserializeOpCreateAgentStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateAgentStatus) 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_deserializeOpErrorCreateAgentStatus(response, &metadata) + } + output := &CreateAgentStatusOutput{} + 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_deserializeOpDocumentCreateAgentStatusOutput(&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_deserializeOpErrorCreateAgentStatus(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("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateAgentStatusOutput(v **CreateAgentStatusOutput, 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 *CreateAgentStatusOutput + if *v == nil { + sv = &CreateAgentStatusOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AgentStatusARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.AgentStatusARN = ptr.String(jtv) + } + + case "AgentStatusId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusId to be of type string, got %T instead", value) + } + sv.AgentStatusId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateContactFlow struct { } -func (*awsRestjson1_deserializeOpCreateContactFlow) ID() string { +func (*awsRestjson1_deserializeOpCreateContactFlow) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateContactFlow) 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_deserializeOpErrorCreateContactFlow(response, &metadata) + } + output := &CreateContactFlowOutput{} + 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_deserializeOpDocumentCreateContactFlowOutput(&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_deserializeOpErrorCreateContactFlow(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("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidContactFlowException", errorCode): + return awsRestjson1_deserializeErrorInvalidContactFlowException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateContactFlowOutput(v **CreateContactFlowOutput, 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 *CreateContactFlowOutput + if *v == nil { + sv = &CreateContactFlowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactFlowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.ContactFlowArn = ptr.String(jtv) + } + + case "ContactFlowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactFlowId to be of type string, got %T instead", value) + } + sv.ContactFlowId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateHoursOfOperation struct { +} + +func (*awsRestjson1_deserializeOpCreateHoursOfOperation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateContactFlow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateHoursOfOperation) 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) @@ -1010,9 +1369,9 @@ func (m *awsRestjson1_deserializeOpCreateContactFlow) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateContactFlow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateHoursOfOperation(response, &metadata) } - output := &CreateContactFlowOutput{} + output := &CreateHoursOfOperationOutput{} out.Result = output var buff [1024]byte @@ -1033,7 +1392,7 @@ func (m *awsRestjson1_deserializeOpCreateContactFlow) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateContactFlowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateHoursOfOperationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1046,7 +1405,7 @@ func (m *awsRestjson1_deserializeOpCreateContactFlow) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateContactFlow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateHoursOfOperation(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)} @@ -1093,9 +1452,6 @@ func awsRestjson1_deserializeOpErrorCreateContactFlow(response *smithyhttp.Respo case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidContactFlowException", errorCode): - return awsRestjson1_deserializeErrorInvalidContactFlowException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) @@ -1121,7 +1477,7 @@ func awsRestjson1_deserializeOpErrorCreateContactFlow(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentCreateContactFlowOutput(v **CreateContactFlowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateHoursOfOperationOutput(v **CreateHoursOfOperationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1134,31 +1490,31 @@ func awsRestjson1_deserializeOpDocumentCreateContactFlowOutput(v **CreateContact return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateContactFlowOutput + var sv *CreateHoursOfOperationOutput if *v == nil { - sv = &CreateContactFlowOutput{} + sv = &CreateHoursOfOperationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ContactFlowArn": + case "HoursOfOperationArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } - sv.ContactFlowArn = ptr.String(jtv) + sv.HoursOfOperationArn = ptr.String(jtv) } - case "ContactFlowId": + case "HoursOfOperationId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ContactFlowId to be of type string, got %T instead", value) + return fmt.Errorf("expected HoursOfOperationId to be of type string, got %T instead", value) } - sv.ContactFlowId = ptr.String(jtv) + sv.HoursOfOperationId = ptr.String(jtv) } default: @@ -2576,6 +2932,107 @@ func awsRestjson1_deserializeOpDocumentCreateUserHierarchyGroupOutput(v **Create return nil } +type awsRestjson1_deserializeOpDeleteHoursOfOperation struct { +} + +func (*awsRestjson1_deserializeOpDeleteHoursOfOperation) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteHoursOfOperation) 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_deserializeOpErrorDeleteHoursOfOperation(response, &metadata) + } + output := &DeleteHoursOfOperationOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteHoursOfOperation(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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpDeleteInstance struct { } @@ -2870,14 +3327,112 @@ func awsRestjson1_deserializeOpErrorDeleteQuickConnect(response *smithyhttp.Resp } } -type awsRestjson1_deserializeOpDeleteUseCase struct { +type awsRestjson1_deserializeOpDeleteUseCase struct { +} + +func (*awsRestjson1_deserializeOpDeleteUseCase) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteUseCase) 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_deserializeOpErrorDeleteUseCase(response, &metadata) + } + output := &DeleteUseCaseOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteUseCase(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("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("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteUser struct { } -func (*awsRestjson1_deserializeOpDeleteUseCase) ID() string { +func (*awsRestjson1_deserializeOpDeleteUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteUseCase) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteUser) 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) @@ -2891,9 +3446,9 @@ func (m *awsRestjson1_deserializeOpDeleteUseCase) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteUseCase(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteUser(response, &metadata) } - output := &DeleteUseCaseOutput{} + output := &DeleteUserOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -2905,7 +3460,7 @@ func (m *awsRestjson1_deserializeOpDeleteUseCase) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteUseCase(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteUser(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)} @@ -2949,6 +3504,9 @@ func awsRestjson1_deserializeOpErrorDeleteUseCase(response *smithyhttp.Response, case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) @@ -2968,14 +3526,14 @@ func awsRestjson1_deserializeOpErrorDeleteUseCase(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpDeleteUser struct { +type awsRestjson1_deserializeOpDeleteUserHierarchyGroup struct { } -func (*awsRestjson1_deserializeOpDeleteUser) ID() string { +func (*awsRestjson1_deserializeOpDeleteUserHierarchyGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteUserHierarchyGroup) 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) @@ -2989,9 +3547,9 @@ func (m *awsRestjson1_deserializeOpDeleteUser) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteUserHierarchyGroup(response, &metadata) } - output := &DeleteUserOutput{} + output := &DeleteUserHierarchyGroupOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -3003,7 +3561,7 @@ func (m *awsRestjson1_deserializeOpDeleteUser) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteUserHierarchyGroup(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)} @@ -3053,6 +3611,9 @@ func awsRestjson1_deserializeOpErrorDeleteUser(response *smithyhttp.Response, me case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -3069,14 +3630,14 @@ func awsRestjson1_deserializeOpErrorDeleteUser(response *smithyhttp.Response, me } } -type awsRestjson1_deserializeOpDeleteUserHierarchyGroup struct { +type awsRestjson1_deserializeOpDescribeAgentStatus struct { } -func (*awsRestjson1_deserializeOpDeleteUserHierarchyGroup) ID() string { +func (*awsRestjson1_deserializeOpDescribeAgentStatus) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteUserHierarchyGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeAgentStatus) 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) @@ -3090,21 +3651,43 @@ func (m *awsRestjson1_deserializeOpDeleteUserHierarchyGroup) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteUserHierarchyGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeAgentStatus(response, &metadata) } - output := &DeleteUserHierarchyGroupOutput{} + output := &DescribeAgentStatusOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + 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_deserializeOpDocumentDescribeAgentStatusOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteUserHierarchyGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeAgentStatus(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)} @@ -3154,9 +3737,6 @@ func awsRestjson1_deserializeOpErrorDeleteUserHierarchyGroup(response *smithyhtt case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -3173,6 +3753,42 @@ func awsRestjson1_deserializeOpErrorDeleteUserHierarchyGroup(response *smithyhtt } } +func awsRestjson1_deserializeOpDocumentDescribeAgentStatusOutput(v **DescribeAgentStatusOutput, 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 *DescribeAgentStatusOutput + if *v == nil { + sv = &DescribeAgentStatusOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AgentStatus": + if err := awsRestjson1_deserializeDocumentAgentStatus(&sv.AgentStatus, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpDescribeContactFlow struct { } @@ -6061,14 +6677,176 @@ func awsRestjson1_deserializeOpDocumentGetCurrentMetricDataOutput(v **GetCurrent return nil } -type awsRestjson1_deserializeOpGetFederationToken struct { +type awsRestjson1_deserializeOpGetFederationToken struct { +} + +func (*awsRestjson1_deserializeOpGetFederationToken) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetFederationToken) 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_deserializeOpErrorGetFederationToken(response, &metadata) + } + output := &GetFederationTokenOutput{} + 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_deserializeOpDocumentGetFederationTokenOutput(&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_deserializeOpErrorGetFederationToken(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("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UserNotFoundException", errorCode): + return awsRestjson1_deserializeErrorUserNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetFederationTokenOutput(v **GetFederationTokenOutput, 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 *GetFederationTokenOutput + if *v == nil { + sv = &GetFederationTokenOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Credentials": + if err := awsRestjson1_deserializeDocumentCredentials(&sv.Credentials, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetMetricData struct { } -func (*awsRestjson1_deserializeOpGetFederationToken) ID() string { +func (*awsRestjson1_deserializeOpGetMetricData) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetFederationToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetMetricData) 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) @@ -6082,9 +6860,9 @@ func (m *awsRestjson1_deserializeOpGetFederationToken) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetFederationToken(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetMetricData(response, &metadata) } - output := &GetFederationTokenOutput{} + output := &GetMetricDataOutput{} out.Result = output var buff [1024]byte @@ -6105,7 +6883,7 @@ func (m *awsRestjson1_deserializeOpGetFederationToken) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetFederationTokenOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetMetricDataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6118,7 +6896,7 @@ func (m *awsRestjson1_deserializeOpGetFederationToken) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetFederationToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetMetricData(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)} @@ -6159,9 +6937,6 @@ func awsRestjson1_deserializeOpErrorGetFederationToken(response *smithyhttp.Resp } switch { - case strings.EqualFold("DuplicateResourceException", errorCode): - return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -6174,8 +6949,8 @@ func awsRestjson1_deserializeOpErrorGetFederationToken(response *smithyhttp.Resp case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("UserNotFoundException", errorCode): - return awsRestjson1_deserializeErrorUserNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -6187,7 +6962,7 @@ func awsRestjson1_deserializeOpErrorGetFederationToken(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentGetFederationTokenOutput(v **GetFederationTokenOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetMetricDataOutput(v **GetMetricDataOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6200,20 +6975,29 @@ func awsRestjson1_deserializeOpDocumentGetFederationTokenOutput(v **GetFederatio return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetFederationTokenOutput + var sv *GetMetricDataOutput if *v == nil { - sv = &GetFederationTokenOutput{} + sv = &GetMetricDataOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Credentials": - if err := awsRestjson1_deserializeDocumentCredentials(&sv.Credentials, value); err != nil { + case "MetricResults": + if err := awsRestjson1_deserializeDocumentHistoricalMetricResults(&sv.MetricResults, 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) + } + default: _, _ = key, value @@ -6223,14 +7007,14 @@ func awsRestjson1_deserializeOpDocumentGetFederationTokenOutput(v **GetFederatio return nil } -type awsRestjson1_deserializeOpGetMetricData struct { +type awsRestjson1_deserializeOpListAgentStatuses struct { } -func (*awsRestjson1_deserializeOpGetMetricData) ID() string { +func (*awsRestjson1_deserializeOpListAgentStatuses) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetMetricData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAgentStatuses) 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) @@ -6244,9 +7028,9 @@ func (m *awsRestjson1_deserializeOpGetMetricData) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetMetricData(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAgentStatuses(response, &metadata) } - output := &GetMetricDataOutput{} + output := &ListAgentStatusesOutput{} out.Result = output var buff [1024]byte @@ -6267,7 +7051,7 @@ func (m *awsRestjson1_deserializeOpGetMetricData) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetMetricDataOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAgentStatusesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6280,7 +7064,7 @@ func (m *awsRestjson1_deserializeOpGetMetricData) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetMetricData(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAgentStatuses(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)} @@ -6346,7 +7130,7 @@ func awsRestjson1_deserializeOpErrorGetMetricData(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentGetMetricDataOutput(v **GetMetricDataOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAgentStatusesOutput(v **ListAgentStatusesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6359,17 +7143,17 @@ func awsRestjson1_deserializeOpDocumentGetMetricDataOutput(v **GetMetricDataOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetMetricDataOutput + var sv *ListAgentStatusesOutput if *v == nil { - sv = &GetMetricDataOutput{} + sv = &ListAgentStatusesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "MetricResults": - if err := awsRestjson1_deserializeDocumentHistoricalMetricResults(&sv.MetricResults, value); err != nil { + case "AgentStatusSummaryList": + if err := awsRestjson1_deserializeDocumentAgentStatusSummaryList(&sv.AgentStatusSummaryList, value); err != nil { return err } @@ -11198,14 +11982,216 @@ func awsRestjson1_deserializeOpErrorSuspendContactRecording(response *smithyhttp } } -type awsRestjson1_deserializeOpTagResource struct { +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 + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +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 + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + 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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateAgentStatus struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpUpdateAgentStatus) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAgentStatus) 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) @@ -11219,9 +12205,9 @@ 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_deserializeOpErrorUpdateAgentStatus(response, &metadata) } - output := &TagResourceOutput{} + output := &UpdateAgentStatusOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -11233,7 +12219,7 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAgentStatus(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)} @@ -11274,6 +12260,9 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } switch { + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -11283,6 +12272,9 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -11299,14 +12291,14 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpUntagResource struct { +type awsRestjson1_deserializeOpUpdateContactAttributes struct { } -func (*awsRestjson1_deserializeOpUntagResource) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactAttributes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactAttributes) 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) @@ -11320,21 +12312,15 @@ 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_deserializeOpErrorUpdateContactAttributes(response, &metadata) } - output := &UntagResourceOutput{} + output := &UpdateContactAttributesOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - return out, metadata, err } -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactAttributes(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)} @@ -11387,9 +12373,6 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11400,14 +12383,14 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpUpdateContactAttributes struct { +type awsRestjson1_deserializeOpUpdateContactFlowContent struct { } -func (*awsRestjson1_deserializeOpUpdateContactAttributes) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactFlowContent) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactFlowContent) 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) @@ -11421,15 +12404,21 @@ func (m *awsRestjson1_deserializeOpUpdateContactAttributes) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactAttributes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowContent(response, &metadata) } - output := &UpdateContactAttributesOutput{} + output := &UpdateContactFlowContentOutput{} out.Result = output + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateContactAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactFlowContent(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)} @@ -11473,6 +12462,9 @@ func awsRestjson1_deserializeOpErrorUpdateContactAttributes(response *smithyhttp case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidContactFlowException", errorCode): + return awsRestjson1_deserializeErrorInvalidContactFlowException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) @@ -11482,6 +12474,9 @@ func awsRestjson1_deserializeOpErrorUpdateContactAttributes(response *smithyhttp case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11492,14 +12487,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactAttributes(response *smithyhttp } } -type awsRestjson1_deserializeOpUpdateContactFlowContent struct { +type awsRestjson1_deserializeOpUpdateContactFlowName struct { } -func (*awsRestjson1_deserializeOpUpdateContactFlowContent) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactFlowName) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactFlowContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactFlowName) 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) @@ -11513,9 +12508,9 @@ func (m *awsRestjson1_deserializeOpUpdateContactFlowContent) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowContent(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowName(response, &metadata) } - output := &UpdateContactFlowContentOutput{} + output := &UpdateContactFlowNameOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -11527,7 +12522,7 @@ func (m *awsRestjson1_deserializeOpUpdateContactFlowContent) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateContactFlowContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactFlowName(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)} @@ -11568,12 +12563,12 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowContent(response *smithyhtt } switch { + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidContactFlowException", errorCode): - return awsRestjson1_deserializeErrorInvalidContactFlowException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) @@ -11596,14 +12591,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowContent(response *smithyhtt } } -type awsRestjson1_deserializeOpUpdateContactFlowName struct { +type awsRestjson1_deserializeOpUpdateHoursOfOperation struct { } -func (*awsRestjson1_deserializeOpUpdateContactFlowName) ID() string { +func (*awsRestjson1_deserializeOpUpdateHoursOfOperation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactFlowName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateHoursOfOperation) 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) @@ -11617,9 +12612,9 @@ func (m *awsRestjson1_deserializeOpUpdateContactFlowName) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateHoursOfOperation(response, &metadata) } - output := &UpdateContactFlowNameOutput{} + output := &UpdateHoursOfOperationOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -11631,7 +12626,7 @@ func (m *awsRestjson1_deserializeOpUpdateContactFlowName) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateContactFlowName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateHoursOfOperation(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)} @@ -14308,6 +15303,210 @@ func awsRestjson1_deserializeErrorUserNotFoundException(response *smithyhttp.Res return output } +func awsRestjson1_deserializeDocumentAgentStatus(v **types.AgentStatus, 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.AgentStatus + if *v == nil { + sv = &types.AgentStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AgentStatusARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.AgentStatusARN = ptr.String(jtv) + } + + case "AgentStatusId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusId to be of type string, got %T instead", value) + } + sv.AgentStatusId = ptr.String(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "DisplayOrder": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected AgentStatusOrderNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DisplayOrder = ptr.Int32(int32(i64)) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusState to be of type string, got %T instead", value) + } + sv.State = types.AgentStatusState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusType to be of type string, got %T instead", value) + } + sv.Type = types.AgentStatusType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAgentStatusSummary(v **types.AgentStatusSummary, 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.AgentStatusSummary + if *v == nil { + sv = &types.AgentStatusSummary{} + } 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 ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusName 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 AgentStatusType to be of type string, got %T instead", value) + } + sv.Type = types.AgentStatusType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAgentStatusSummaryList(v *[]types.AgentStatusSummary, 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.AgentStatusSummary + if *v == nil { + cv = []types.AgentStatusSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AgentStatusSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentAgentStatusSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentAttribute(v **types.Attribute, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15824,7 +17023,7 @@ func awsRestjson1_deserializeDocumentHoursOfOperation(v **types.HoursOfOperation if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CommonDescriptionLength250 to be of type string, got %T instead", value) + return fmt.Errorf("expected HoursOfOperationDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } diff --git a/service/connect/generated.json b/service/connect/generated.json index 9934b569052..bb2937a6018 100644 --- a/service/connect/generated.json +++ b/service/connect/generated.json @@ -13,7 +13,9 @@ "api_op_AssociateQueueQuickConnects.go", "api_op_AssociateRoutingProfileQueues.go", "api_op_AssociateSecurityKey.go", + "api_op_CreateAgentStatus.go", "api_op_CreateContactFlow.go", + "api_op_CreateHoursOfOperation.go", "api_op_CreateInstance.go", "api_op_CreateIntegrationAssociation.go", "api_op_CreateQueue.go", @@ -22,12 +24,14 @@ "api_op_CreateUseCase.go", "api_op_CreateUser.go", "api_op_CreateUserHierarchyGroup.go", + "api_op_DeleteHoursOfOperation.go", "api_op_DeleteInstance.go", "api_op_DeleteIntegrationAssociation.go", "api_op_DeleteQuickConnect.go", "api_op_DeleteUseCase.go", "api_op_DeleteUser.go", "api_op_DeleteUserHierarchyGroup.go", + "api_op_DescribeAgentStatus.go", "api_op_DescribeContactFlow.go", "api_op_DescribeHoursOfOperation.go", "api_op_DescribeInstance.go", @@ -51,6 +55,7 @@ "api_op_GetCurrentMetricData.go", "api_op_GetFederationToken.go", "api_op_GetMetricData.go", + "api_op_ListAgentStatuses.go", "api_op_ListApprovedOrigins.go", "api_op_ListBots.go", "api_op_ListContactFlows.go", @@ -84,9 +89,11 @@ "api_op_SuspendContactRecording.go", "api_op_TagResource.go", "api_op_UntagResource.go", + "api_op_UpdateAgentStatus.go", "api_op_UpdateContactAttributes.go", "api_op_UpdateContactFlowContent.go", "api_op_UpdateContactFlowName.go", + "api_op_UpdateHoursOfOperation.go", "api_op_UpdateInstanceAttribute.go", "api_op_UpdateInstanceStorageConfig.go", "api_op_UpdateQueueHoursOfOperation.go", diff --git a/service/connect/serializers.go b/service/connect/serializers.go index c1de8f2bdcf..911b974fccc 100644 --- a/service/connect/serializers.go +++ b/service/connect/serializers.go @@ -704,6 +704,109 @@ func awsRestjson1_serializeOpDocumentAssociateSecurityKeyInput(v *AssociateSecur return nil } +type awsRestjson1_serializeOpCreateAgentStatus struct { +} + +func (*awsRestjson1_serializeOpCreateAgentStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateAgentStatus) 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.(*CreateAgentStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/agent-status/{InstanceId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateAgentStatusInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateAgentStatusInput(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_serializeOpHttpBindingsCreateAgentStatusInput(v *CreateAgentStatusInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateAgentStatusInput(v *CreateAgentStatusInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.DisplayOrder != nil { + ok := object.Key("DisplayOrder") + ok.Integer(*v.DisplayOrder) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if len(v.State) > 0 { + ok := object.Key("State") + ok.String(string(v.State)) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateContactFlow struct { } @@ -807,6 +910,111 @@ func awsRestjson1_serializeOpDocumentCreateContactFlowInput(v *CreateContactFlow return nil } +type awsRestjson1_serializeOpCreateHoursOfOperation struct { +} + +func (*awsRestjson1_serializeOpCreateHoursOfOperation) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateHoursOfOperation) 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.(*CreateHoursOfOperationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/hours-of-operations/{InstanceId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateHoursOfOperationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateHoursOfOperationInput(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_serializeOpHttpBindingsCreateHoursOfOperationInput(v *CreateHoursOfOperationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateHoursOfOperationInput(v *CreateHoursOfOperationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Config != nil { + ok := object.Key("Config") + if err := awsRestjson1_serializeDocumentHoursOfOperationConfigList(v.Config, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + if v.TimeZone != nil { + ok := object.Key("TimeZone") + ok.String(*v.TimeZone) + } + + return nil +} + type awsRestjson1_serializeOpCreateInstance struct { } @@ -1649,6 +1857,73 @@ func awsRestjson1_serializeOpDocumentCreateUserHierarchyGroupInput(v *CreateUser return nil } +type awsRestjson1_serializeOpDeleteHoursOfOperation struct { +} + +func (*awsRestjson1_serializeOpDeleteHoursOfOperation) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteHoursOfOperation) 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.(*DeleteHoursOfOperationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/hours-of-operations/{InstanceId}/{HoursOfOperationId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteHoursOfOperationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteHoursOfOperationInput(v *DeleteHoursOfOperationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HoursOfOperationId == nil || len(*v.HoursOfOperationId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HoursOfOperationId must not be empty")} + } + if v.HoursOfOperationId != nil { + if err := encoder.SetURI("HoursOfOperationId").String(*v.HoursOfOperationId); err != nil { + return err + } + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteInstance struct { } @@ -2051,6 +2326,73 @@ func awsRestjson1_serializeOpHttpBindingsDeleteUserHierarchyGroupInput(v *Delete return nil } +type awsRestjson1_serializeOpDescribeAgentStatus struct { +} + +func (*awsRestjson1_serializeOpDescribeAgentStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeAgentStatus) 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.(*DescribeAgentStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/agent-status/{InstanceId}/{AgentStatusId}") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeAgentStatusInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeAgentStatusInput(v *DescribeAgentStatusInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AgentStatusId == nil || len(*v.AgentStatusId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AgentStatusId must not be empty")} + } + if v.AgentStatusId != nil { + if err := encoder.SetURI("AgentStatusId").String(*v.AgentStatusId); err != nil { + return err + } + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDescribeContactFlow struct { } @@ -3686,40 +4028,112 @@ func awsRestjson1_serializeOpDocumentGetMetricDataInput(v *GetMetricDataInput, v ok.Double(smithytime.FormatEpochSeconds(*v.EndTime)) } - if v.Filters != nil { - ok := object.Key("Filters") - if err := awsRestjson1_serializeDocumentFilters(v.Filters, ok); err != nil { - return err - } + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentFilters(v.Filters, ok); err != nil { + return err + } + } + + if v.Groupings != nil { + ok := object.Key("Groupings") + if err := awsRestjson1_serializeDocumentGroupings(v.Groupings, ok); err != nil { + return err + } + } + + if v.HistoricalMetrics != nil { + ok := object.Key("HistoricalMetrics") + if err := awsRestjson1_serializeDocumentHistoricalMetrics(v.HistoricalMetrics, ok); err != nil { + return err + } + } + + if v.MaxResults != 0 { + ok := object.Key("MaxResults") + ok.Integer(v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.StartTime != nil { + ok := object.Key("StartTime") + ok.Double(smithytime.FormatEpochSeconds(*v.StartTime)) + } + + return nil +} + +type awsRestjson1_serializeOpListAgentStatuses struct { +} + +func (*awsRestjson1_serializeOpListAgentStatuses) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListAgentStatuses) 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.(*ListAgentStatusesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/agent-status/{InstanceId}") + 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 err := awsRestjson1_serializeOpHttpBindingsListAgentStatusesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListAgentStatusesInput(v *ListAgentStatusesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Groupings != nil { - ok := object.Key("Groupings") - if err := awsRestjson1_serializeDocumentGroupings(v.Groupings, ok); err != nil { - return err + if v.AgentStatusTypes != nil { + for i := range v.AgentStatusTypes { + encoder.AddQuery("AgentStatusTypes").String(string(v.AgentStatusTypes[i])) } } - if v.HistoricalMetrics != nil { - ok := object.Key("HistoricalMetrics") - if err := awsRestjson1_serializeDocumentHistoricalMetrics(v.HistoricalMetrics, ok); err != nil { + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { return err } } if v.MaxResults != 0 { - ok := object.Key("MaxResults") - ok.Integer(v.MaxResults) + encoder.SetQuery("maxResults").Integer(v.MaxResults) } if v.NextToken != nil { - ok := object.Key("NextToken") - ok.String(*v.NextToken) - } - - if v.StartTime != nil { - ok := object.Key("StartTime") - ok.Double(smithytime.FormatEpochSeconds(*v.StartTime)) + encoder.SetQuery("nextToken").String(*v.NextToken) } return nil @@ -6136,6 +6550,116 @@ func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInpu return nil } +type awsRestjson1_serializeOpUpdateAgentStatus struct { +} + +func (*awsRestjson1_serializeOpUpdateAgentStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateAgentStatus) 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.(*UpdateAgentStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/agent-status/{InstanceId}/{AgentStatusId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateAgentStatusInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateAgentStatusInput(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_serializeOpHttpBindingsUpdateAgentStatusInput(v *UpdateAgentStatusInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AgentStatusId == nil || len(*v.AgentStatusId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AgentStatusId must not be empty")} + } + if v.AgentStatusId != nil { + if err := encoder.SetURI("AgentStatusId").String(*v.AgentStatusId); err != nil { + return err + } + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateAgentStatusInput(v *UpdateAgentStatusInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.DisplayOrder != nil { + ok := object.Key("DisplayOrder") + ok.Integer(*v.DisplayOrder) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.ResetOrderNumber { + ok := object.Key("ResetOrderNumber") + ok.Boolean(v.ResetOrderNumber) + } + + if len(v.State) > 0 { + ok := object.Key("State") + ok.String(string(v.State)) + } + + return nil +} + type awsRestjson1_serializeOpUpdateContactAttributes struct { } @@ -6401,6 +6925,113 @@ func awsRestjson1_serializeOpDocumentUpdateContactFlowNameInput(v *UpdateContact return nil } +type awsRestjson1_serializeOpUpdateHoursOfOperation struct { +} + +func (*awsRestjson1_serializeOpUpdateHoursOfOperation) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateHoursOfOperation) 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.(*UpdateHoursOfOperationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/hours-of-operations/{InstanceId}/{HoursOfOperationId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateHoursOfOperationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateHoursOfOperationInput(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_serializeOpHttpBindingsUpdateHoursOfOperationInput(v *UpdateHoursOfOperationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HoursOfOperationId == nil || len(*v.HoursOfOperationId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HoursOfOperationId must not be empty")} + } + if v.HoursOfOperationId != nil { + if err := encoder.SetURI("HoursOfOperationId").String(*v.HoursOfOperationId); err != nil { + return err + } + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateHoursOfOperationInput(v *UpdateHoursOfOperationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Config != nil { + ok := object.Key("Config") + if err := awsRestjson1_serializeDocumentHoursOfOperationConfigList(v.Config, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.TimeZone != nil { + ok := object.Key("TimeZone") + ok.String(*v.TimeZone) + } + + return nil +} + type awsRestjson1_serializeOpUpdateInstanceAttribute struct { } @@ -8457,6 +9088,62 @@ func awsRestjson1_serializeDocumentHistoricalMetrics(v []types.HistoricalMetric, return nil } +func awsRestjson1_serializeDocumentHoursOfOperationConfig(v *types.HoursOfOperationConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Day) > 0 { + ok := object.Key("Day") + ok.String(string(v.Day)) + } + + if v.EndTime != nil { + ok := object.Key("EndTime") + if err := awsRestjson1_serializeDocumentHoursOfOperationTimeSlice(v.EndTime, ok); err != nil { + return err + } + } + + if v.StartTime != nil { + ok := object.Key("StartTime") + if err := awsRestjson1_serializeDocumentHoursOfOperationTimeSlice(v.StartTime, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentHoursOfOperationConfigList(v []types.HoursOfOperationConfig, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentHoursOfOperationConfig(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentHoursOfOperationTimeSlice(v *types.HoursOfOperationTimeSlice, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("Hours") + ok.Integer(v.Hours) + } + + { + ok := object.Key("Minutes") + ok.Integer(v.Minutes) + } + + return nil +} + func awsRestjson1_serializeDocumentInstanceStorageConfig(v *types.InstanceStorageConfig, 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 70b1bbd401c..b4bdacca9bc 100644 --- a/service/connect/types/enums.go +++ b/service/connect/types/enums.go @@ -2,6 +2,44 @@ package types +type AgentStatusState string + +// Enum values for AgentStatusState +const ( + AgentStatusStateEnabled AgentStatusState = "ENABLED" + AgentStatusStateDisabled AgentStatusState = "DISABLED" +) + +// Values returns all known values for AgentStatusState. 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 (AgentStatusState) Values() []AgentStatusState { + return []AgentStatusState{ + "ENABLED", + "DISABLED", + } +} + +type AgentStatusType string + +// Enum values for AgentStatusType +const ( + AgentStatusTypeRoutable AgentStatusType = "ROUTABLE" + AgentStatusTypeCustom AgentStatusType = "CUSTOM" + AgentStatusTypeOffline AgentStatusType = "OFFLINE" +) + +// Values returns all known values for AgentStatusType. 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 (AgentStatusType) Values() []AgentStatusType { + return []AgentStatusType{ + "ROUTABLE", + "CUSTOM", + "OFFLINE", + } +} + type Channel string // Enum values for Channel diff --git a/service/connect/types/types.go b/service/connect/types/types.go index 70002ef2cce..8bc8cbf1d07 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -7,6 +7,54 @@ import ( "time" ) +// Contains information about an agent status. +type AgentStatus struct { + + // The Amazon Resource Name (ARN) of the agent status. + AgentStatusARN *string + + // The identifier of the agent status. + AgentStatusId *string + + // The description of the agent status. + Description *string + + // The display order of the agent status. + DisplayOrder *int32 + + // The name of the agent status. + Name *string + + // The state of the agent status. + State AgentStatusState + + // One or more tags. + Tags map[string]string + + // The type of agent status. + Type AgentStatusType + + noSmithyDocumentSerde +} + +// Summary information for an agent status. +type AgentStatusSummary struct { + + // The Amazon Resource Name (ARN) for the agent status. + Arn *string + + // The identifier for an agent status. + Id *string + + // The name of the agent status. + Name *string + + // The type of the agent status. + Type AgentStatusType + + noSmithyDocumentSerde +} + // A toggle for an individual feature at the instance level. type Attribute struct { @@ -385,12 +433,18 @@ type HoursOfOperation struct { type HoursOfOperationConfig struct { // The day that the hours of operation applies to. + // + // This member is required. Day HoursOfOperationDays // The end time that your contact center is closes. + // + // This member is required. EndTime *HoursOfOperationTimeSlice // The start time that your contact center is open. + // + // This member is required. StartTime *HoursOfOperationTimeSlice noSmithyDocumentSerde @@ -415,9 +469,13 @@ type HoursOfOperationSummary struct { type HoursOfOperationTimeSlice struct { // The hours. + // + // This member is required. Hours int32 // The minutes. + // + // This member is required. Minutes int32 noSmithyDocumentSerde diff --git a/service/connect/validators.go b/service/connect/validators.go index 1050b84ff82..8799dcc6462 100644 --- a/service/connect/validators.go +++ b/service/connect/validators.go @@ -170,6 +170,26 @@ func (m *validateOpAssociateSecurityKey) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpCreateAgentStatus struct { +} + +func (*validateOpCreateAgentStatus) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAgentStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAgentStatusInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAgentStatusInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateContactFlow struct { } @@ -190,6 +210,26 @@ func (m *validateOpCreateContactFlow) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpCreateHoursOfOperation struct { +} + +func (*validateOpCreateHoursOfOperation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateHoursOfOperation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateHoursOfOperationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateHoursOfOperationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateInstance struct { } @@ -350,6 +390,26 @@ func (m *validateOpCreateUser) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpDeleteHoursOfOperation struct { +} + +func (*validateOpDeleteHoursOfOperation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteHoursOfOperation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteHoursOfOperationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteHoursOfOperationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteInstance struct { } @@ -470,6 +530,26 @@ func (m *validateOpDeleteUser) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpDescribeAgentStatus struct { +} + +func (*validateOpDescribeAgentStatus) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeAgentStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeAgentStatusInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeAgentStatusInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeContactFlow struct { } @@ -930,6 +1010,26 @@ func (m *validateOpGetMetricData) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpListAgentStatuses struct { +} + +func (*validateOpListAgentStatuses) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAgentStatuses) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAgentStatusesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAgentStatusesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListApprovedOrigins struct { } @@ -1570,6 +1670,26 @@ func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateAgentStatus struct { +} + +func (*validateOpUpdateAgentStatus) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAgentStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAgentStatusInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAgentStatusInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateContactAttributes struct { } @@ -1630,6 +1750,26 @@ func (m *validateOpUpdateContactFlowName) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpUpdateHoursOfOperation struct { +} + +func (*validateOpUpdateHoursOfOperation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateHoursOfOperation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateHoursOfOperationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateHoursOfOperationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateInstanceAttribute struct { } @@ -2062,10 +2202,18 @@ func addOpAssociateSecurityKeyValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpAssociateSecurityKey{}, middleware.After) } +func addOpCreateAgentStatusValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAgentStatus{}, middleware.After) +} + func addOpCreateContactFlowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateContactFlow{}, middleware.After) } +func addOpCreateHoursOfOperationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateHoursOfOperation{}, middleware.After) +} + func addOpCreateInstanceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateInstance{}, middleware.After) } @@ -2098,6 +2246,10 @@ func addOpCreateUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateUser{}, middleware.After) } +func addOpDeleteHoursOfOperationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteHoursOfOperation{}, middleware.After) +} + func addOpDeleteInstanceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteInstance{}, middleware.After) } @@ -2122,6 +2274,10 @@ func addOpDeleteUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteUser{}, middleware.After) } +func addOpDescribeAgentStatusValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeAgentStatus{}, middleware.After) +} + func addOpDescribeContactFlowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeContactFlow{}, middleware.After) } @@ -2214,6 +2370,10 @@ func addOpGetMetricDataValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetMetricData{}, middleware.After) } +func addOpListAgentStatusesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAgentStatuses{}, middleware.After) +} + func addOpListApprovedOriginsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListApprovedOrigins{}, middleware.After) } @@ -2342,6 +2502,10 @@ func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } +func addOpUpdateAgentStatusValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAgentStatus{}, middleware.After) +} + func addOpUpdateContactAttributesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateContactAttributes{}, middleware.After) } @@ -2354,6 +2518,10 @@ func addOpUpdateContactFlowNameValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpUpdateContactFlowName{}, middleware.After) } +func addOpUpdateHoursOfOperationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateHoursOfOperation{}, middleware.After) +} + func addOpUpdateInstanceAttributeValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateInstanceAttribute{}, middleware.After) } @@ -2540,6 +2708,64 @@ func validateHierarchyStructureUpdate(v *types.HierarchyStructureUpdate) error { } } +func validateHoursOfOperationConfig(v *types.HoursOfOperationConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "HoursOfOperationConfig"} + if len(v.Day) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Day")) + } + if v.StartTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("StartTime")) + } else if v.StartTime != nil { + if err := validateHoursOfOperationTimeSlice(v.StartTime); err != nil { + invalidParams.AddNested("StartTime", err.(smithy.InvalidParamsError)) + } + } + if v.EndTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("EndTime")) + } else if v.EndTime != nil { + if err := validateHoursOfOperationTimeSlice(v.EndTime); err != nil { + invalidParams.AddNested("EndTime", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateHoursOfOperationConfigList(v []types.HoursOfOperationConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "HoursOfOperationConfigList"} + for i := range v { + if err := validateHoursOfOperationConfig(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateHoursOfOperationTimeSlice(v *types.HoursOfOperationTimeSlice) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "HoursOfOperationTimeSlice"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateInstanceStorageConfig(v *types.InstanceStorageConfig) error { if v == nil { return nil @@ -3040,6 +3266,27 @@ func validateOpAssociateSecurityKeyInput(v *AssociateSecurityKeyInput) error { } } +func validateOpCreateAgentStatusInput(v *CreateAgentStatusInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAgentStatusInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.State) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("State")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateContactFlowInput(v *CreateContactFlowInput) error { if v == nil { return nil @@ -3064,6 +3311,34 @@ func validateOpCreateContactFlowInput(v *CreateContactFlowInput) error { } } +func validateOpCreateHoursOfOperationInput(v *CreateHoursOfOperationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateHoursOfOperationInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.TimeZone == nil { + invalidParams.Add(smithy.NewErrParamRequired("TimeZone")) + } + if v.Config == nil { + invalidParams.Add(smithy.NewErrParamRequired("Config")) + } else if v.Config != nil { + if err := validateHoursOfOperationConfigList(v.Config); err != nil { + invalidParams.AddNested("Config", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateInstanceInput(v *CreateInstanceInput) error { if v == nil { return nil @@ -3267,6 +3542,24 @@ func validateOpCreateUserInput(v *CreateUserInput) error { } } +func validateOpDeleteHoursOfOperationInput(v *DeleteHoursOfOperationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteHoursOfOperationInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.HoursOfOperationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HoursOfOperationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteInstanceInput(v *DeleteInstanceInput) error { if v == nil { return nil @@ -3375,6 +3668,24 @@ func validateOpDeleteUserInput(v *DeleteUserInput) error { } } +func validateOpDescribeAgentStatusInput(v *DescribeAgentStatusInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeAgentStatusInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.AgentStatusId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AgentStatusId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeContactFlowInput(v *DescribeContactFlowInput) error { if v == nil { return nil @@ -3808,6 +4119,21 @@ func validateOpGetMetricDataInput(v *GetMetricDataInput) error { } } +func validateOpListAgentStatusesInput(v *ListAgentStatusesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAgentStatusesInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListApprovedOriginsInput(v *ListApprovedOriginsInput) error { if v == nil { return nil @@ -4371,6 +4697,24 @@ func validateOpUntagResourceInput(v *UntagResourceInput) error { } } +func validateOpUpdateAgentStatusInput(v *UpdateAgentStatusInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAgentStatusInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.AgentStatusId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AgentStatusId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateContactAttributesInput(v *UpdateContactAttributesInput) error { if v == nil { return nil @@ -4431,6 +4775,29 @@ func validateOpUpdateContactFlowNameInput(v *UpdateContactFlowNameInput) error { } } +func validateOpUpdateHoursOfOperationInput(v *UpdateHoursOfOperationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateHoursOfOperationInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.HoursOfOperationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HoursOfOperationId")) + } + if v.Config != nil { + if err := validateHoursOfOperationConfigList(v.Config); err != nil { + invalidParams.AddNested("Config", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateInstanceAttributeInput(v *UpdateInstanceAttributeInput) error { if v == nil { return nil diff --git a/service/ebs/api_op_ListChangedBlocks.go b/service/ebs/api_op_ListChangedBlocks.go index aa146e602d4..1edd48d4022 100644 --- a/service/ebs/api_op_ListChangedBlocks.go +++ b/service/ebs/api_op_ListChangedBlocks.go @@ -59,7 +59,7 @@ type ListChangedBlocksInput struct { type ListChangedBlocksOutput struct { - // The size of the block. + // The size of the blocks in the snapshot, in bytes. BlockSize *int32 // An array of objects containing information about the changed blocks. diff --git a/service/ebs/api_op_ListSnapshotBlocks.go b/service/ebs/api_op_ListSnapshotBlocks.go index dca8eb7b184..df709853c26 100644 --- a/service/ebs/api_op_ListSnapshotBlocks.go +++ b/service/ebs/api_op_ListSnapshotBlocks.go @@ -51,7 +51,7 @@ type ListSnapshotBlocksInput struct { type ListSnapshotBlocksOutput struct { - // The size of the block. + // The size of the blocks in the snapshot, in bytes. BlockSize *int32 // An array of objects containing information about the blocks. diff --git a/service/ebs/api_op_PutSnapshotBlock.go b/service/ebs/api_op_PutSnapshotBlock.go index b90736bfdc3..81c8fc7aa02 100644 --- a/service/ebs/api_op_PutSnapshotBlock.go +++ b/service/ebs/api_op_PutSnapshotBlock.go @@ -14,7 +14,7 @@ import ( // Writes a block of data to a snapshot. If the specified block contains data, the // existing data is overwritten. The target snapshot must be in the pending state. -// Data written to a snapshot must be aligned with 512-byte sectors. +// Data written to a snapshot must be aligned with 512-KiB sectors. func (c *Client) PutSnapshotBlock(ctx context.Context, params *PutSnapshotBlockInput, optFns ...func(*Options)) (*PutSnapshotBlockOutput, error) { if params == nil { params = &PutSnapshotBlockInput{} @@ -68,7 +68,7 @@ type PutSnapshotBlockInput struct { ChecksumAlgorithm types.ChecksumAlgorithm // The size of the data to write to the block, in bytes. Currently, the only - // supported size is 524288. Valid values: 524288 + // supported size is 524288 bytes. Valid values: 524288 // // This member is required. DataLength *int32 diff --git a/service/ebs/api_op_StartSnapshot.go b/service/ebs/api_op_StartSnapshot.go index efe5775bf33..a847115c22b 100644 --- a/service/ebs/api_op_StartSnapshot.go +++ b/service/ebs/api_op_StartSnapshot.go @@ -44,8 +44,8 @@ type StartSnapshotInput struct { // With an idempotent request, if the original request completes successfully. The // subsequent retries with the same client token return the result from the // original successful request and they have no additional effect. If you do not - // specify a client token, one is automatically generated by the AWS SDK. For more - // information, see Idempotency for StartSnapshot API + // specify a client token, one is automatically generated by the Amazon Web + // Services SDK. For more information, see Idempotency for StartSnapshot API // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-direct-api-idempotency.html) // in the Amazon Elastic Compute Cloud User Guide. ClientToken *string @@ -56,10 +56,11 @@ type StartSnapshotInput struct { // Indicates whether to encrypt the snapshot. To create an encrypted snapshot, // specify true. To create an unencrypted snapshot, omit this parameter. If you // specify a value for ParentSnapshotId, omit this parameter. If you specify true, - // the snapshot is encrypted using the CMK specified using the KmsKeyArn parameter. - // If no value is specified for KmsKeyArn, the default CMK for your account is - // used. If no default CMK has been specified for your account, the AWS managed CMK - // is used. To set a default CMK for your account, use ModifyEbsDefaultKmsKeyId + // the snapshot is encrypted using the KMS key specified using the KmsKeyArn + // parameter. If no value is specified for KmsKeyArn, the default KMS key for your + // account is used. If no default KMS key has been specified for your account, the + // Amazon Web Services managed KMS key is used. To set a default KMS key for your + // account, use ModifyEbsDefaultKmsKeyId // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyEbsDefaultKmsKeyId.html). // If your account is enabled for encryption by default, you cannot set this // parameter to false. In this case, you can omit this parameter. For more @@ -68,12 +69,12 @@ type StartSnapshotInput struct { // in the Amazon Elastic Compute Cloud User Guide. Encrypted *bool - // The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) to be used to encrypt the snapshot. If you do not - // specify a CMK, the default AWS managed CMK is used. If you specify a - // ParentSnapshotId, omit this parameter; the snapshot will be encrypted using the - // same CMK that was used to encrypt the parent snapshot. If Encrypted is set to - // true, you must specify a CMK ARN. + // The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be + // used to encrypt the snapshot. If you do not specify a KMS key, the default + // Amazon Web Services managed KMS key is used. If you specify a ParentSnapshotId, + // omit this parameter; the snapshot will be encrypted using the same KMS key that + // was used to encrypt the parent snapshot. If Encrypted is set to true, you must + // specify a KMS key ARN. KmsKeyArn *string // The ID of the parent snapshot. If there is no parent snapshot, or if you are @@ -110,11 +111,11 @@ type StartSnapshotOutput struct { // The description of the snapshot. Description *string - // The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) used to encrypt the snapshot. + // The Amazon Resource Name (ARN) of the Key Management Service (KMS) key used to + // encrypt the snapshot. KmsKeyArn *string - // The AWS account ID of the snapshot owner. + // The Amazon Web Services account ID of the snapshot owner. OwnerId *string // The ID of the parent snapshot. diff --git a/service/ebs/doc.go b/service/ebs/doc.go index 58c24433d41..7e04d8b18bc 100644 --- a/service/ebs/doc.go +++ b/service/ebs/doc.go @@ -4,27 +4,27 @@ // Elastic Block Store. // // You can use the Amazon Elastic Block Store (Amazon EBS) direct APIs to create -// EBS snapshots, write data directly to your snapshots, read data on your +// Amazon EBS snapshots, write data directly to your snapshots, read data on your // snapshots, and identify the differences or changes between two snapshots. If // you’re an independent software vendor (ISV) who offers backup services for // Amazon EBS, the EBS direct APIs make it more efficient and cost-effective to -// track incremental changes on your EBS volumes through snapshots. This can be -// done without having to create new volumes from snapshots, and then use Amazon +// track incremental changes on your Amazon EBS volumes through snapshots. This can +// be done without having to create new volumes from snapshots, and then use Amazon // Elastic Compute Cloud (Amazon EC2) instances to compare the differences. You can -// create incremental snapshots directly from data on-premises into EBS volumes and -// the cloud to use for quick disaster recovery. With the ability to write and read -// snapshots, you can write your on-premises data to an EBS snapshot during a -// disaster. Then after recovery, you can restore it back to AWS or on-premises -// from the snapshot. You no longer need to build and maintain complex mechanisms -// to copy data to and from Amazon EBS. This API reference provides detailed -// information about the actions, data types, parameters, and errors of the EBS -// direct APIs. For more information about the elements that make up the EBS direct -// APIs, and examples of how to use them effectively, see Accessing the Contents of -// an EBS Snapshot +// create incremental snapshots directly from data on-premises into volumes and the +// cloud to use for quick disaster recovery. With the ability to write and read +// snapshots, you can write your on-premises data to an snapshot during a disaster. +// Then after recovery, you can restore it back to Amazon Web Services or +// on-premises from the snapshot. You no longer need to build and maintain complex +// mechanisms to copy data to and from Amazon EBS. This API reference provides +// detailed information about the actions, data types, parameters, and errors of +// the EBS direct APIs. For more information about the elements that make up the +// EBS direct APIs, and examples of how to use them effectively, see Accessing the +// Contents of an Amazon EBS Snapshot // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html) // in the Amazon Elastic Compute Cloud User Guide. For more information about the -// supported AWS Regions, endpoints, and service quotas for the EBS direct APIs, -// see Amazon Elastic Block Store Endpoints and Quotas -// (https://docs.aws.amazon.com/general/latest/gr/ebs-service.html) in the AWS -// General Reference. +// supported Amazon Web Services Regions, endpoints, and service quotas for the EBS +// direct APIs, see Amazon Elastic Block Store Endpoints and Quotas +// (https://docs.aws.amazon.com/general/latest/gr/ebs-service.html) in the Amazon +// Web Services General Reference. package ebs diff --git a/service/ecs/api_op_CreateCluster.go b/service/ecs/api_op_CreateCluster.go index d7ad82a589b..cf4d9aaea17 100644 --- a/service/ecs/api_op_CreateCluster.go +++ b/service/ecs/api_op_CreateCluster.go @@ -64,7 +64,7 @@ type CreateClusterInput struct { // The capacity provider strategy to set as the default for the cluster. When a // default capacity provider strategy is set for a cluster, when calling the - // RunTask or CreateService APIs wtih no capacity provider strategy or launch type + // RunTask or CreateService APIs with no capacity provider strategy or launch type // specified, the default capacity provider strategy for the cluster is used. If a // default capacity provider strategy is not defined for a cluster during creation, // it can be defined later with the PutClusterCapacityProviders API operation. diff --git a/service/ecs/api_op_CreateService.go b/service/ecs/api_op_CreateService.go index 001643b4281..2fe9b7dbff5 100644 --- a/service/ecs/api_op_CreateService.go +++ b/service/ecs/api_op_CreateService.go @@ -138,7 +138,8 @@ type CreateServiceInput struct { // The capacity provider strategy to use for the service. If a // capacityProviderStrategy is specified, the launchType parameter must be omitted. // If no capacityProviderStrategy or launchType is specified, the - // defaultCapacityProviderStrategy for the cluster is used. + // defaultCapacityProviderStrategy for the cluster is used. A capacity provider + // strategy may contain a maximum of 6 capacity providers. CapacityProviderStrategy []types.CapacityProviderStrategyItem // Unique, case-sensitive identifier that you provide to ensure the idempotency of @@ -259,7 +260,7 @@ type CreateServiceInput struct { PlacementConstraints []types.PlacementConstraint // The placement strategy objects to use for tasks in your service. You can specify - // a maximum of five strategy rules per service. + // a maximum of 5 strategy rules per service. PlacementStrategy []types.PlacementStrategy // The platform version that your tasks in the service are running on. A platform diff --git a/service/ecs/api_op_DeregisterContainerInstance.go b/service/ecs/api_op_DeregisterContainerInstance.go index 2e045e57505..64f64e5c79e 100644 --- a/service/ecs/api_op_DeregisterContainerInstance.go +++ b/service/ecs/api_op_DeregisterContainerInstance.go @@ -41,8 +41,9 @@ type DeregisterContainerInstanceInput struct { // The container instance ID or full ARN of the container instance to deregister. // The ARN contains the arn:aws:ecs namespace, followed by the Region of the - // container instance, the account ID of the container instance owner, the - // container-instance namespace, and then the container instance ID. For example, + // container instance, the Amazon Web Services account ID of the container instance + // owner, the container-instance namespace, and then the container instance ID. For + // example, // arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID. // // This member is required. diff --git a/service/ecs/api_op_DescribeClusters.go b/service/ecs/api_op_DescribeClusters.go index e3fddd70edd..47af106a756 100644 --- a/service/ecs/api_op_DescribeClusters.go +++ b/service/ecs/api_op_DescribeClusters.go @@ -37,6 +37,7 @@ type DescribeClustersInput struct { // this field is omitted, this information isn't included. If ATTACHMENTS is // specified, the attachments for the container instances or tasks within the // cluster are included. If SETTINGS is specified, the settings for the cluster are + // included. If CONFIGURATIONS is specified, the configuration for the cluster is // included. If STATISTICS is specified, the task and service count is included, // separated by launch type. If TAGS is specified, the metadata tags associated // with the cluster are included. diff --git a/service/ecs/api_op_DiscoverPollEndpoint.go b/service/ecs/api_op_DiscoverPollEndpoint.go index c51e75b4dcf..2ea89bb7e3b 100644 --- a/service/ecs/api_op_DiscoverPollEndpoint.go +++ b/service/ecs/api_op_DiscoverPollEndpoint.go @@ -36,8 +36,9 @@ type DiscoverPollEndpointInput struct { // The container instance ID or full ARN of the container instance. The ARN // contains the arn:aws:ecs namespace, followed by the Region of the container - // instance, the account ID of the container instance owner, the container-instance - // namespace, and then the container instance ID. For example, + // instance, the Amazon Web Services account ID of the container instance owner, + // the container-instance namespace, and then the container instance ID. For + // example, // arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID. ContainerInstance *string diff --git a/service/ecs/api_op_RunTask.go b/service/ecs/api_op_RunTask.go index 6abb2f988d0..461ed85d23a 100644 --- a/service/ecs/api_op_RunTask.go +++ b/service/ecs/api_op_RunTask.go @@ -64,7 +64,8 @@ type RunTaskInput struct { // capacityProviderStrategy is specified, the launchType parameter must be omitted. // If no capacityProviderStrategy or launchType is specified, the // defaultCapacityProviderStrategy for the cluster is used. When you use cluster - // auto scaling, you must specify capacityProviderStrategy and not launchType. + // auto scaling, you must specify capacityProviderStrategy and not launchType. A + // capacity provider strategy may contain a maximum of 6 capacity providers. CapacityProviderStrategy []types.CapacityProviderStrategyItem // The short name or full Amazon Resource Name (ARN) of the cluster on which to run @@ -110,7 +111,7 @@ type RunTaskInput struct { // The network configuration for the task. This parameter is required for task // definitions that use the awsvpc network mode to receive their own elastic // network interface, and it is not supported for other network modes. For more - // information, see Task Networking + // information, see Task networking // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) // in the Amazon Elastic Container Service Developer Guide. NetworkConfiguration *types.NetworkConfiguration @@ -131,13 +132,12 @@ type RunTaskInput struct { PlacementConstraints []types.PlacementConstraint // The placement strategy objects to use for the task. You can specify a maximum of - // five strategy rules per task. + // 5 strategy rules per task. PlacementStrategy []types.PlacementStrategy - // The platform version the task should run. A platform version is only specified - // for tasks using the Fargate launch type. If one is not specified, the LATEST - // platform version is used by default. For more information, see Fargate Platform - // Versions + // The platform version the task should use. A platform version is only specified + // for tasks hosted on Fargate. If one is not specified, the LATEST platform + // version is used by default. For more information, see Fargate platform versions // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) // in the Amazon Elastic Container Service Developer Guide. PlatformVersion *string @@ -149,7 +149,8 @@ type RunTaskInput struct { // option when running a task. PropagateTags types.PropagateTags - // The reference ID to use for the task. + // The reference ID to use for the task. The reference ID can have a maximum length + // of 1024 characters. ReferenceId *string // An optional tag specified when a task is started. For example, if you diff --git a/service/ecs/types/types.go b/service/ecs/types/types.go index 30c8aeaa224..8c9a2c1bd66 100644 --- a/service/ecs/types/types.go +++ b/service/ecs/types/types.go @@ -225,6 +225,7 @@ type CapacityProvider struct { // Fargate capacity provider, specify either the FARGATE or FARGATE_SPOT capacity // providers. The Fargate capacity providers are available to all accounts and only // need to be associated with a cluster to be used in a capacity provider strategy. +// A capacity provider strategy may contain a maximum of 6 capacity providers. type CapacityProviderStrategyItem struct { // The short name of the capacity provider. @@ -284,9 +285,9 @@ type Cluster struct { CapacityProviders []string // The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains the - // arn:aws:ecs namespace, followed by the Region of the cluster, the account ID of - // the cluster owner, the cluster namespace, and then the cluster name. For - // example, arn:aws:ecs:region:012345678910:cluster/test. + // arn:aws:ecs namespace, followed by the Region of the cluster, the Amazon Web + // Services account ID of the cluster owner, the cluster namespace, and then the + // cluster name. For example, arn:aws:ecs:region:012345678910:cluster/test. ClusterArn *string // A user-generated string that you use to identify your cluster. @@ -1135,8 +1136,8 @@ type ContainerInstance struct { // The Amazon Resource Name (ARN) of the container instance. The ARN contains the // arn:aws:ecs namespace, followed by the Region of the container instance, the - // account ID of the container instance owner, the container-instance namespace, - // and then the container instance ID. For example, + // Amazon Web Services account ID of the container instance owner, the + // container-instance namespace, and then the container instance ID. For example, // arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID. ContainerInstanceArn *string @@ -1889,9 +1890,13 @@ type HealthCheck struct { // A string array representing the command that the container runs to determine if // it is healthy. The string array must start with CMD to execute the command // arguments directly, or CMD-SHELL to run the command with the container's default - // shell. For example: [ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ] An - // exit code of 0 indicates success, and non-zero exit code indicates failure. For - // more information, see HealthCheck in the Create a container + // shell. When you use the Amazon Web Services Management Console JSON panel, the + // Command Line Interface, or the APIs, you should enclose the list of commands in + // brackets, as shown below. [ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ] + // You do not need to include the brackets when you use the Amazon Web Services + // Management Consoleas shown below. "CMD-SHELL", "curl -f http://localhost/ || + // exit 1" An exit code of 0 indicates success, and non-zero exit code indicates + // failure. For more information, see HealthCheck in the Create a container // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/). // @@ -2391,9 +2396,10 @@ type NetworkInterface struct { // Fargate launch type, task placement constraints are not supported. type PlacementConstraint struct { - // A cluster query language expression to apply to the constraint. You cannot - // specify an expression if the constraint type is distinctInstance. For more - // information, see Cluster Query Language + // A cluster query language expression to apply to the constraint. The expression + // can have a maximum length of 2000 characters. You can't specify an expression if + // the constraint type is distinctInstance. For more information, see Cluster query + // language // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) // in the Amazon Elastic Container Service Developer Guide. Expression *string @@ -2794,8 +2800,8 @@ type Service struct { SchedulingStrategy SchedulingStrategy // The ARN that identifies the service. The ARN contains the arn:aws:ecs namespace, - // followed by the Region of the service, the account ID of the service owner, the - // service namespace, and then the service name. For example, + // followed by the Region of the service, the Amazon Web Services account ID of the + // service owner, the service namespace, and then the service name. For example, // arn:aws:ecs:region:012345678910:service/my-service. ServiceArn *string diff --git a/service/lexmodelsv2/deserializers.go b/service/lexmodelsv2/deserializers.go index a243328ba26..9b34c83f08f 100644 --- a/service/lexmodelsv2/deserializers.go +++ b/service/lexmodelsv2/deserializers.go @@ -14223,6 +14223,15 @@ func awsRestjson1_deserializeDocumentIntentClosingSetting(v **types.IntentClosin for key, value := range shape { switch key { + case "active": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value) + } + sv.Active = ptr.Bool(jtv) + } + case "closingResponse": if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.ClosingResponse, value); err != nil { return err @@ -14259,6 +14268,15 @@ func awsRestjson1_deserializeDocumentIntentConfirmationSetting(v **types.IntentC for key, value := range shape { switch key { + case "active": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value) + } + sv.Active = ptr.Bool(jtv) + } + case "declinationResponse": if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.DeclinationResponse, value); err != nil { return err @@ -16483,6 +16501,15 @@ func awsRestjson1_deserializeDocumentWaitAndContinueSpecification(v **types.Wait for key, value := range shape { switch key { + case "active": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value) + } + sv.Active = ptr.Bool(jtv) + } + case "continueResponse": if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.ContinueResponse, value); err != nil { return err diff --git a/service/lexmodelsv2/serializers.go b/service/lexmodelsv2/serializers.go index e762e2961af..52c3dd38a12 100644 --- a/service/lexmodelsv2/serializers.go +++ b/service/lexmodelsv2/serializers.go @@ -5921,6 +5921,11 @@ func awsRestjson1_serializeDocumentIntentClosingSetting(v *types.IntentClosingSe object := value.Object() defer object.Close() + if v.Active != nil { + ok := object.Key("active") + ok.Boolean(*v.Active) + } + if v.ClosingResponse != nil { ok := object.Key("closingResponse") if err := awsRestjson1_serializeDocumentResponseSpecification(v.ClosingResponse, ok); err != nil { @@ -5935,6 +5940,11 @@ func awsRestjson1_serializeDocumentIntentConfirmationSetting(v *types.IntentConf object := value.Object() defer object.Close() + if v.Active != nil { + ok := object.Key("active") + ok.Boolean(*v.Active) + } + if v.DeclinationResponse != nil { ok := object.Key("declinationResponse") if err := awsRestjson1_serializeDocumentResponseSpecification(v.DeclinationResponse, ok); err != nil { @@ -6762,6 +6772,11 @@ func awsRestjson1_serializeDocumentWaitAndContinueSpecification(v *types.WaitAnd object := value.Object() defer object.Close() + if v.Active != nil { + ok := object.Key("active") + ok.Boolean(*v.Active) + } + if v.ContinueResponse != nil { ok := object.Key("continueResponse") if err := awsRestjson1_serializeDocumentResponseSpecification(v.ContinueResponse, ok); err != nil { diff --git a/service/lexmodelsv2/types/types.go b/service/lexmodelsv2/types/types.go index 206550025a9..dd0f65e97e9 100644 --- a/service/lexmodelsv2/types/types.go +++ b/service/lexmodelsv2/types/types.go @@ -102,7 +102,7 @@ type BotAliasSummary struct { noSmithyDocumentSerde } -// Provided the identity of a the bot that was exported. +// Provides the identity of a the bot that was exported. type BotExportSpecification struct { // The identifier of the bot assigned by Amazon Lex. @@ -827,6 +827,11 @@ type IntentClosingSetting struct { // This member is required. ClosingResponse *ResponseSpecification + // Specifies whether an intent's closing response is used. When this field is + // false, the closing response isn't sent to the user and no closing input from the + // user is used. If the active field isn't specified, the default is true. + Active *bool + noSmithyDocumentSerde } @@ -851,6 +856,12 @@ type IntentConfirmationSetting struct { // This member is required. PromptSpecification *PromptSpecification + // Specifies whether the intent's confirmation is sent to the user. When this field + // is false, confirmation and declination responses aren't sent and processing + // continues as if the responses aren't present. If the active field isn't + // specified, the default is true. + Active *bool + noSmithyDocumentSerde } @@ -1534,6 +1545,12 @@ type WaitAndContinueSpecification struct { // This member is required. WaitingResponse *ResponseSpecification + // Specifies whether the bot will wait for a user to respond. When this field is + // false, wait and continue responses for a slot aren't used and the bot expects an + // appropriate response within the configured timeout. If the active field isn't + // specified, the default is true. + Active *bool + // A response that Amazon Lex sends periodically to the user to indicate that the // bot is still waiting for input from the user. StillWaitingResponse *StillWaitingResponseSpecification diff --git a/service/lightsail/api_op_CreateBucket.go b/service/lightsail/api_op_CreateBucket.go index 8f8867f1211..5d378395ad8 100644 --- a/service/lightsail/api_op_CreateBucket.go +++ b/service/lightsail/api_op_CreateBucket.go @@ -52,7 +52,7 @@ type CreateBucketInput struct { // A Boolean value that indicates whether to enable versioning of objects in the // bucket. For more information about versioning, see Enabling and suspending - // bucket object versioning in Amazon Lightsail + // object versioning in a bucket in Amazon Lightsail // (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-managing-bucket-object-versioning) // in the Amazon Lightsail Developer Guide. EnableObjectVersioning *bool diff --git a/service/lightsail/deserializers.go b/service/lightsail/deserializers.go index 2bc7036f69a..28ac1ad77c7 100644 --- a/service/lightsail/deserializers.go +++ b/service/lightsail/deserializers.go @@ -19867,6 +19867,11 @@ func awsAwsjson11_deserializeDocumentAccessKey(v **types.AccessKey, value interf } } + case "lastUsed": + if err := awsAwsjson11_deserializeDocumentAccessKeyLastUsed(&sv.LastUsed, value); err != nil { + return err + } + case "secretAccessKey": if value != nil { jtv, ok := value.(string) @@ -19894,6 +19899,71 @@ func awsAwsjson11_deserializeDocumentAccessKey(v **types.AccessKey, value interf return nil } +func awsAwsjson11_deserializeDocumentAccessKeyLastUsed(v **types.AccessKeyLastUsed, 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.AccessKeyLastUsed + if *v == nil { + sv = &types.AccessKeyLastUsed{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "lastUsedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUsedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected IsoDate to be a JSON Number, got %T instead", value) + + } + } + + case "region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "serviceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.ServiceName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentAccessKeyList(v *[]types.AccessKey, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/lightsail/types/types.go b/service/lightsail/types/types.go index d52aa1c4a72..3ac68acbf09 100644 --- a/service/lightsail/types/types.go +++ b/service/lightsail/types/types.go @@ -26,6 +26,12 @@ type AccessKey struct { // The timestamp when the access key was created. CreatedAt *time.Time + // An object that describes the last time the access key was used. This object does + // not include data in the response of a CreateBucketAccessKey action. If the + // access key has not been used, the region and serviceName values are N/A, and the + // lastUsedDate value is null. + LastUsed *AccessKeyLastUsed + // The secret access key used to sign requests. You should store the secret access // key in a safe location. We recommend that you delete the access key if the // secret access key is compromised. @@ -38,6 +44,25 @@ type AccessKey struct { noSmithyDocumentSerde } +// Describes the last time an access key was used. This object does not include +// data in the response of a CreateBucketAccessKey action. +type AccessKeyLastUsed struct { + + // The date and time when the access key was most recently used. This value is null + // if the access key has not been used. + LastUsedDate *time.Time + + // The AWS Region where this access key was most recently used. This value is N/A + // if the access key has not been used. + Region *string + + // The name of the AWS service with which this access key was most recently used. + // This value is N/A if the access key has not been used. + ServiceName *string + + noSmithyDocumentSerde +} + // Describes the anonymous access permissions for an Amazon Lightsail bucket and // its objects. For more information about bucket access permissions, see // Understanding bucket permissions in Amazon Lightsail diff --git a/service/nimble/api_op_CreateStreamingSession.go b/service/nimble/api_op_CreateStreamingSession.go index 92813209c00..b3f41608bea 100644 --- a/service/nimble/api_op_CreateStreamingSession.go +++ b/service/nimble/api_op_CreateStreamingSession.go @@ -52,6 +52,9 @@ type CreateStreamingSessionInput struct { // The launch profile ID. LaunchProfileId *string + // The user ID of the user that owns the streaming session. + OwnedBy *string + // The ID of the streaming image. StreamingImageId *string diff --git a/service/nimble/api_op_CreateStudio.go b/service/nimble/api_op_CreateStudio.go index 20b3d68fd8c..e73e7569eb3 100644 --- a/service/nimble/api_op_CreateStudio.go +++ b/service/nimble/api_op_CreateStudio.go @@ -20,10 +20,10 @@ import ( // policy attached for the portal to function properly. You may optionally specify // a KMS key in the StudioEncryptionConfiguration. In Nimble Studio, resource // names, descriptions, initialization scripts, and other data you provide are -// always encrypted at rest using an AWS KMS key. By default, this key is owned by -// AWS and managed on your behalf. You may provide your own AWS KMS key when -// calling CreateStudio to encrypt this data using a key you own and manage. When -// providing an AWS KMS key during studio creation, Nimble Studio creates KMS +// always encrypted at rest using an KMS key. By default, this key is owned by +// Amazon Web Services and managed on your behalf. You may provide your own KMS key +// when calling CreateStudio to encrypt this data using a key you own and manage. +// When providing an KMS key during studio creation, Nimble Studio creates KMS // grants in your account to provide your studio user and admin roles access to // these KMS keys. If you delete this grant, the studio will no longer be // accessible to your portal users. If you delete the studio KMS key, your studio diff --git a/service/nimble/api_op_ListStreamingImages.go b/service/nimble/api_op_ListStreamingImages.go index 430e067d217..1636f410122 100644 --- a/service/nimble/api_op_ListStreamingImages.go +++ b/service/nimble/api_op_ListStreamingImages.go @@ -12,8 +12,8 @@ import ( ) // List the streaming image resources available to this studio. This list will -// contain both images provided by AWS, as well as streaming images that you have -// created in your studio. +// contain both images provided by Amazon Web Services, as well as streaming images +// that you have created in your studio. func (c *Client) ListStreamingImages(ctx context.Context, params *ListStreamingImagesInput, optFns ...func(*Options)) (*ListStreamingImagesOutput, error) { if params == nil { params = &ListStreamingImagesInput{} diff --git a/service/nimble/api_op_ListStreamingSessions.go b/service/nimble/api_op_ListStreamingSessions.go index 7527152afbf..75988da612e 100644 --- a/service/nimble/api_op_ListStreamingSessions.go +++ b/service/nimble/api_op_ListStreamingSessions.go @@ -34,12 +34,15 @@ type ListStreamingSessionsInput struct { // This member is required. StudioId *string - // The user ID. + // The user ID of the user that created the streaming session. CreatedBy *string // The token for the next set of results, or null if there are no more results. NextToken *string + // The user ID of the user that owns the streaming session. + OwnedBy *string + // A collection of session IDs. SessionIds *string diff --git a/service/nimble/api_op_ListStudios.go b/service/nimble/api_op_ListStudios.go index a2a9c987839..1b77df52216 100644 --- a/service/nimble/api_op_ListStudios.go +++ b/service/nimble/api_op_ListStudios.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// List studios in your AWS account in the requested AWS Region. +// List studios in your Amazon Web Services account in the requested Amazon Web +// Services Region. func (c *Client) ListStudios(ctx context.Context, params *ListStudiosInput, optFns ...func(*Options)) (*ListStudiosOutput, error) { if params == nil { params = &ListStudiosInput{} diff --git a/service/nimble/api_op_StartStudioSSOConfigurationRepair.go b/service/nimble/api_op_StartStudioSSOConfigurationRepair.go index abb425ff2c1..33589028cf0 100644 --- a/service/nimble/api_op_StartStudioSSOConfigurationRepair.go +++ b/service/nimble/api_op_StartStudioSSOConfigurationRepair.go @@ -12,13 +12,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Repairs the SSO configuration for a given studio. If the studio has a valid AWS -// SSO configuration currently associated with it, this operation will fail with a -// validation error. If the studio does not have a valid AWS SSO configuration -// currently associated with it, then a new AWS SSO application is created for the -// studio and the studio is changed to the READY state. After the AWS SSO -// application is repaired, you must use the Amazon Nimble Studio console to add -// administrators and users to your studio. +// Repairs the SSO configuration for a given studio. If the studio has a valid +// Amazon Web Services SSO configuration currently associated with it, this +// operation will fail with a validation error. If the studio does not have a valid +// Amazon Web Services SSO configuration currently associated with it, then a new +// Amazon Web Services SSO application is created for the studio and the studio is +// changed to the READY state. After the Amazon Web Services SSO application is +// repaired, you must use the Amazon Nimble Studio console to add administrators +// and users to your studio. func (c *Client) StartStudioSSOConfigurationRepair(ctx context.Context, params *StartStudioSSOConfigurationRepairInput, optFns ...func(*Options)) (*StartStudioSSOConfigurationRepairOutput, error) { if params == nil { params = &StartStudioSSOConfigurationRepairInput{} diff --git a/service/nimble/deserializers.go b/service/nimble/deserializers.go index 6c53f61469e..617881f5561 100644 --- a/service/nimble/deserializers.go +++ b/service/nimble/deserializers.go @@ -9496,11 +9496,20 @@ func awsRestjson1_deserializeDocumentStreamingSession(v **types.StreamingSession sv.LaunchProfileId = ptr.String(jtv) } + case "ownedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OwnedBy = ptr.String(jtv) + } + case "sessionId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StreamingImageSessionId to be of type string, got %T instead", value) + return fmt.Errorf("expected StreamingSessionId to be of type string, got %T instead", value) } sv.SessionId = ptr.String(jtv) } @@ -9681,6 +9690,15 @@ func awsRestjson1_deserializeDocumentStreamingSessionStream(v **types.StreamingS sv.ExpiresAt = ptr.Time(t) } + case "ownedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OwnedBy = ptr.String(jtv) + } + case "state": if value != nil { jtv, ok := value.(string) diff --git a/service/nimble/serializers.go b/service/nimble/serializers.go index 430ef198d61..ed53afb0913 100644 --- a/service/nimble/serializers.go +++ b/service/nimble/serializers.go @@ -419,6 +419,11 @@ func awsRestjson1_serializeOpDocumentCreateStreamingSessionInput(v *CreateStream ok.String(*v.LaunchProfileId) } + if v.OwnedBy != nil { + ok := object.Key("ownedBy") + ok.String(*v.OwnedBy) + } + if v.StreamingImageId != nil { ok := object.Key("streamingImageId") ok.String(*v.StreamingImageId) @@ -2424,6 +2429,10 @@ func awsRestjson1_serializeOpHttpBindingsListStreamingSessionsInput(v *ListStrea encoder.SetQuery("nextToken").String(*v.NextToken) } + if v.OwnedBy != nil { + encoder.SetQuery("ownedBy").String(*v.OwnedBy) + } + if v.SessionIds != nil { encoder.SetQuery("sessionIds").String(*v.SessionIds) } diff --git a/service/nimble/types/types.go b/service/nimble/types/types.go index a202e36c3a4..758b3b21276 100644 --- a/service/nimble/types/types.go +++ b/service/nimble/types/types.go @@ -27,8 +27,8 @@ type ActiveDirectoryConfiguration struct { // A collection of custom attributes for an Active Directory computer. ComputerAttributes []ActiveDirectoryComputerAttribute - // The directory ID of the AWS Directory Service for Microsoft AD to access using - // this studio component. + // The directory ID of the Directory Service for Microsoft Active Directory to + // access using this studio component. DirectoryId *string // The distinguished name (DN) and organizational unit (OU) of an Active Directory @@ -187,8 +187,8 @@ type LaunchProfileInitializationActiveDirectory struct { // A collection of custom attributes for an Active Directory computer. ComputerAttributes []ActiveDirectoryComputerAttribute - // The directory ID of the AWS Directory Service for Microsoft AD to access using - // this launch profile. + // The directory ID of the Directory Service for Microsoft Active Directory to + // access using this launch profile. DirectoryId *string // The directory name. @@ -440,6 +440,9 @@ type StreamingSession struct { // The ID of the launch profile used to control access from the streaming session. LaunchProfileId *string + // The user ID of the user that owns the streaming session. + OwnedBy *string + // The session ID. SessionId *string @@ -483,6 +486,9 @@ type StreamingSessionStream struct { // The Unix epoch timestamp in seconds for when the resource expires. ExpiresAt *time.Time + // The user ID of the user that owns the streaming session. + OwnedBy *string + // The current state. State StreamingSessionStreamState @@ -514,11 +520,12 @@ type Studio struct { // A friendly name for the studio. DisplayName *string - // The AWS region where the studio resource is located. + // The Amazon Web Services Region where the studio resource is located. HomeRegion *string - // The AWS SSO application client ID used to integrate with AWS SSO to enable AWS - // SSO users to log in to Nimble portal. + // The Amazon Web Services SSO application client ID used to integrate with Amazon + // Web Services SSO to enable Amazon Web Services SSO users to log in to Nimble + // portal. SsoClientId *string // The current state of the studio resource. diff --git a/service/rekognition/api_op_CreateProjectVersion.go b/service/rekognition/api_op_CreateProjectVersion.go index 08a083b51f4..c2e75d85cff 100644 --- a/service/rekognition/api_op_CreateProjectVersion.go +++ b/service/rekognition/api_op_CreateProjectVersion.go @@ -37,7 +37,9 @@ func (c *Client) CreateProjectVersion(ctx context.Context, params *CreateProject type CreateProjectVersionInput struct { - // The Amazon S3 location to store the results of training. + // The Amazon S3 bucket location to store the results of training. The S3 bucket + // can be in any AWS account as long as the caller has s3:PutObject permissions on + // the S3 bucket. // // This member is required. OutputConfig *types.OutputConfig @@ -65,12 +67,24 @@ type CreateProjectVersionInput struct { // The identifier for your AWS Key Management Service (AWS KMS) customer master key // (CMK). You can supply the Amazon Resource Name (ARN) of your CMK, the ID of your - // CMK, or an alias for your CMK. The key is used to encrypt training and test - // images copied into the service for model training. Your source images are - // unaffected. The key is also used to encrypt training results and manifest files - // written to the output Amazon S3 bucket (OutputConfig). If you don't specify a - // value for KmsKeyId, images copied into the service are encrypted using a key - // that AWS owns and manages. + // CMK, an alias for your CMK, or an alias ARN. The key is used to encrypt training + // and test images copied into the service for model training. Your source images + // are unaffected. The key is also used to encrypt training results and manifest + // files written to the output Amazon S3 bucket (OutputConfig). If you choose to + // use your own CMK, you need the following permissions on the CMK. + // + // * + // kms:CreateGrant + // + // * kms:DescribeKey + // + // * kms:GenerateDataKey + // + // * kms:Decrypt + // + // If you + // don't specify a value for KmsKeyId, images copied into the service are encrypted + // using a key that AWS owns and manages. KmsKeyId *string // A set of tags (key-value pairs) that you want to attach to the model. diff --git a/service/rekognition/api_op_DetectText.go b/service/rekognition/api_op_DetectText.go index 59b2c808c78..92e7ae5f0eb 100644 --- a/service/rekognition/api_op_DetectText.go +++ b/service/rekognition/api_op_DetectText.go @@ -20,18 +20,18 @@ import ( // array of TextDetection elements, TextDetections. Each TextDetection element // provides information about a single word or line of text that was detected in // the image. A word is one or more ISO basic latin script characters that are not -// separated by spaces. DetectText can detect up to 50 words in an image. A line is -// a string of equally spaced words. A line isn't necessarily a complete sentence. -// For example, a driver's license number is detected as a line. A line ends when -// there is no aligned text after it. Also, a line ends when there is a large gap -// between words, relative to the length of the words. This means, depending on the -// gap between words, Amazon Rekognition may detect multiple lines in text aligned -// in the same direction. Periods don't represent the end of a line. If a sentence -// spans multiple lines, the DetectText operation returns multiple lines. To -// determine whether a TextDetection element is a line of text or a word, use the -// TextDetection object Type field. To be detected, text must be within +/- 90 -// degrees orientation of the horizontal axis. For more information, see DetectText -// in the Amazon Rekognition Developer Guide. +// separated by spaces. DetectText can detect up to 100 words in an image. A line +// is a string of equally spaced words. A line isn't necessarily a complete +// sentence. For example, a driver's license number is detected as a line. A line +// ends when there is no aligned text after it. Also, a line ends when there is a +// large gap between words, relative to the length of the words. This means, +// depending on the gap between words, Amazon Rekognition may detect multiple lines +// in text aligned in the same direction. Periods don't represent the end of a +// line. If a sentence spans multiple lines, the DetectText operation returns +// multiple lines. To determine whether a TextDetection element is a line of text +// or a word, use the TextDetection object Type field. To be detected, text must be +// within +/- 90 degrees orientation of the horizontal axis. For more information, +// see DetectText in the Amazon Rekognition Developer Guide. func (c *Client) DetectText(ctx context.Context, params *DetectTextInput, optFns ...func(*Options)) (*DetectTextOutput, error) { if params == nil { params = &DetectTextInput{} diff --git a/service/rekognition/api_op_GetContentModeration.go b/service/rekognition/api_op_GetContentModeration.go index ae6b727546a..6c3a5e2b59c 100644 --- a/service/rekognition/api_op_GetContentModeration.go +++ b/service/rekognition/api_op_GetContentModeration.go @@ -12,30 +12,34 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets the unsafe content analysis results for a Amazon Rekognition Video analysis -// started by StartContentModeration. Unsafe content analysis of a video is an -// asynchronous operation. You start analysis by calling StartContentModeration -// which returns a job identifier (JobId). When analysis finishes, Amazon -// Rekognition Video publishes a completion status to the Amazon Simple -// Notification Service topic registered in the initial call to -// StartContentModeration. To get the results of the unsafe content analysis, first -// check that the status value published to the Amazon SNS topic is SUCCEEDED. If -// so, call GetContentModeration and pass the job identifier (JobId) from the -// initial call to StartContentModeration. For more information, see Working with -// Stored Videos in the Amazon Rekognition Devlopers Guide. GetContentModeration -// returns detected unsafe content labels, and the time they are detected, in an -// array, ModerationLabels, of ContentModerationDetection objects. By default, the -// moderated labels are returned sorted by time, in milliseconds from the start of -// the video. You can also sort them by moderated label by specifying NAME for the -// SortBy input parameter. Since video analysis can return a large number of -// results, use the MaxResults parameter to limit the number of labels returned in -// a single call to GetContentModeration. If there are more results than specified -// in MaxResults, the value of NextToken in the operation response contains a -// pagination token for getting the next set of results. To get the next page of -// results, call GetContentModeration and populate the NextToken request parameter -// with the value of NextToken returned from the previous call to -// GetContentModeration. For more information, see Detecting Unsafe Content in the -// Amazon Rekognition Developer Guide. +// Gets the inappropriate, unwanted, or offensive content analysis results for a +// Amazon Rekognition Video analysis started by StartContentModeration. For a list +// of moderation labels in Amazon Rekognition, see Using the image and video +// moderation APIs +// (https://docs.aws.amazon.com/rekognition/latest/dg/moderation.html#moderation-api). +// Amazon Rekognition Video inappropriate or offensive content detection in a +// stored video is an asynchronous operation. You start analysis by calling +// StartContentModeration which returns a job identifier (JobId). When analysis +// finishes, Amazon Rekognition Video publishes a completion status to the Amazon +// Simple Notification Service topic registered in the initial call to +// StartContentModeration. To get the results of the content analysis, first check +// that the status value published to the Amazon SNS topic is SUCCEEDED. If so, +// call GetContentModeration and pass the job identifier (JobId) from the initial +// call to StartContentModeration. For more information, see Working with Stored +// Videos in the Amazon Rekognition Devlopers Guide. GetContentModeration returns +// detected inappropriate, unwanted, or offensive content moderation labels, and +// the time they are detected, in an array, ModerationLabels, of +// ContentModerationDetection objects. By default, the moderated labels are +// returned sorted by time, in milliseconds from the start of the video. You can +// also sort them by moderated label by specifying NAME for the SortBy input +// parameter. Since video analysis can return a large number of results, use the +// MaxResults parameter to limit the number of labels returned in a single call to +// GetContentModeration. If there are more results than specified in MaxResults, +// the value of NextToken in the operation response contains a pagination token for +// getting the next set of results. To get the next page of results, call +// GetContentModeration and populate the NextToken request parameter with the value +// of NextToken returned from the previous call to GetContentModeration. For more +// information, see Content moderation in the Amazon Rekognition Developer Guide. func (c *Client) GetContentModeration(ctx context.Context, params *GetContentModerationInput, optFns ...func(*Options)) (*GetContentModerationOutput, error) { if params == nil { params = &GetContentModerationInput{} @@ -53,8 +57,8 @@ func (c *Client) GetContentModeration(ctx context.Context, params *GetContentMod type GetContentModerationInput struct { - // The identifier for the unsafe content job. Use JobId to identify the job in a - // subsequent call to GetContentModeration. + // The identifier for the inappropriate, unwanted, or offensive content moderation + // job. Use JobId to identify the job in a subsequent call to GetContentModeration. // // This member is required. JobId *string @@ -66,7 +70,8 @@ type GetContentModerationInput struct { // If the previous response was incomplete (because there is more data to // retrieve), Amazon Rekognition returns a pagination token in the response. You - // can use this pagination token to retrieve the next set of unsafe content labels. + // can use this pagination token to retrieve the next set of content moderation + // labels. NextToken *string // Sort to use for elements in the ModerationLabelDetections array. Use TIMESTAMP @@ -81,19 +86,20 @@ type GetContentModerationInput struct { type GetContentModerationOutput struct { - // The current status of the unsafe content analysis job. + // The current status of the content moderation analysis job. JobStatus types.VideoJobStatus - // The detected unsafe content labels and the time(s) they were detected. + // The detected inappropriate, unwanted, or offensive content moderation labels and + // the time(s) they were detected. ModerationLabels []types.ContentModerationDetection - // Version number of the moderation detection model that was used to detect unsafe - // content. + // Version number of the moderation detection model that was used to detect + // inappropriate, unwanted, or offensive content. ModerationModelVersion *string // If the response is truncated, Amazon Rekognition Video returns this token that - // you can use in the subsequent request to retrieve the next set of unsafe content - // labels. + // you can use in the subsequent request to retrieve the next set of content + // moderation labels. NextToken *string // If the job fails, StatusMessage provides a descriptive error message. diff --git a/service/rekognition/api_op_StartCelebrityRecognition.go b/service/rekognition/api_op_StartCelebrityRecognition.go index 5b060bde9c4..082012d537f 100644 --- a/service/rekognition/api_op_StartCelebrityRecognition.go +++ b/service/rekognition/api_op_StartCelebrityRecognition.go @@ -59,7 +59,9 @@ type StartCelebrityRecognitionInput struct { JobTag *string // The Amazon SNS topic ARN that you want Amazon Rekognition Video to publish the - // completion status of the celebrity recognition analysis to. + // completion status of the celebrity recognition analysis to. The Amazon SNS topic + // must have a topic name that begins with AmazonRekognition if you are using the + // AmazonRekognitionServiceRole permissions policy. NotificationChannel *types.NotificationChannel noSmithyDocumentSerde diff --git a/service/rekognition/api_op_StartContentModeration.go b/service/rekognition/api_op_StartContentModeration.go index fc828bb800e..995d592fccc 100644 --- a/service/rekognition/api_op_StartContentModeration.go +++ b/service/rekognition/api_op_StartContentModeration.go @@ -11,18 +11,20 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Starts asynchronous detection of unsafe content in a stored video. Amazon -// Rekognition Video can moderate content in a video stored in an Amazon S3 bucket. -// Use Video to specify the bucket name and the filename of the video. +// Starts asynchronous detection of inappropriate, unwanted, or offensive content +// in a stored video. For a list of moderation labels in Amazon Rekognition, see +// Using the image and video moderation APIs +// (https://docs.aws.amazon.com/rekognition/latest/dg/moderation.html#moderation-api). +// Amazon Rekognition Video can moderate content in a video stored in an Amazon S3 +// bucket. Use Video to specify the bucket name and the filename of the video. // StartContentModeration returns a job identifier (JobId) which you use to get the -// results of the analysis. When unsafe content analysis is finished, Amazon -// Rekognition Video publishes a completion status to the Amazon Simple -// Notification Service topic that you specify in NotificationChannel. To get the -// results of the unsafe content analysis, first check that the status value -// published to the Amazon SNS topic is SUCCEEDED. If so, call GetContentModeration -// and pass the job identifier (JobId) from the initial call to -// StartContentModeration. For more information, see Detecting Unsafe Content in -// the Amazon Rekognition Developer Guide. +// results of the analysis. When content analysis is finished, Amazon Rekognition +// Video publishes a completion status to the Amazon Simple Notification Service +// topic that you specify in NotificationChannel. To get the results of the content +// analysis, first check that the status value published to the Amazon SNS topic is +// SUCCEEDED. If so, call GetContentModeration and pass the job identifier (JobId) +// from the initial call to StartContentModeration. For more information, see +// Content moderation in the Amazon Rekognition Developer Guide. func (c *Client) StartContentModeration(ctx context.Context, params *StartContentModerationInput, optFns ...func(*Options)) (*StartContentModerationOutput, error) { if params == nil { params = &StartContentModerationInput{} @@ -40,8 +42,8 @@ func (c *Client) StartContentModeration(ctx context.Context, params *StartConten type StartContentModerationInput struct { - // The video in which you want to detect unsafe content. The video must be stored - // in an Amazon S3 bucket. + // The video in which you want to detect inappropriate, unwanted, or offensive + // content. The video must be stored in an Amazon S3 bucket. // // This member is required. Video *types.Video @@ -68,7 +70,9 @@ type StartContentModerationInput struct { MinConfidence *float32 // The Amazon SNS topic ARN that you want Amazon Rekognition Video to publish the - // completion status of the unsafe content analysis to. + // completion status of the content analysis to. The Amazon SNS topic must have a + // topic name that begins with AmazonRekognition if you are using the + // AmazonRekognitionServiceRole permissions policy to access the topic. NotificationChannel *types.NotificationChannel noSmithyDocumentSerde @@ -76,8 +80,8 @@ type StartContentModerationInput struct { type StartContentModerationOutput struct { - // The identifier for the unsafe content analysis job. Use JobId to identify the - // job in a subsequent call to GetContentModeration. + // The identifier for the content analysis job. Use JobId to identify the job in a + // subsequent call to GetContentModeration. JobId *string // Metadata pertaining to the operation's result. diff --git a/service/rekognition/api_op_StartFaceDetection.go b/service/rekognition/api_op_StartFaceDetection.go index 1d58f326034..1c5fb4bde95 100644 --- a/service/rekognition/api_op_StartFaceDetection.go +++ b/service/rekognition/api_op_StartFaceDetection.go @@ -63,7 +63,9 @@ type StartFaceDetectionInput struct { JobTag *string // The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to - // publish the completion status of the face detection operation. + // publish the completion status of the face detection operation. The Amazon SNS + // topic must have a topic name that begins with AmazonRekognition if you are using + // the AmazonRekognitionServiceRole permissions policy. NotificationChannel *types.NotificationChannel noSmithyDocumentSerde diff --git a/service/rekognition/api_op_StartFaceSearch.go b/service/rekognition/api_op_StartFaceSearch.go index acb3f258e19..8c75ca3e3f9 100644 --- a/service/rekognition/api_op_StartFaceSearch.go +++ b/service/rekognition/api_op_StartFaceSearch.go @@ -67,7 +67,9 @@ type StartFaceSearchInput struct { JobTag *string // The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to - // publish the completion status of the search. + // publish the completion status of the search. The Amazon SNS topic must have a + // topic name that begins with AmazonRekognition if you are using the + // AmazonRekognitionServiceRole permissions policy to access the topic. NotificationChannel *types.NotificationChannel noSmithyDocumentSerde diff --git a/service/rekognition/api_op_StartLabelDetection.go b/service/rekognition/api_op_StartLabelDetection.go index dfb2066ac75..c2f35390615 100644 --- a/service/rekognition/api_op_StartLabelDetection.go +++ b/service/rekognition/api_op_StartLabelDetection.go @@ -70,7 +70,9 @@ type StartLabelDetectionInput struct { MinConfidence *float32 // The Amazon SNS topic ARN you want Amazon Rekognition Video to publish the - // completion status of the label detection operation to. + // completion status of the label detection operation to. The Amazon SNS topic must + // have a topic name that begins with AmazonRekognition if you are using the + // AmazonRekognitionServiceRole permissions policy. NotificationChannel *types.NotificationChannel noSmithyDocumentSerde diff --git a/service/rekognition/api_op_StartPersonTracking.go b/service/rekognition/api_op_StartPersonTracking.go index dfad0a27f83..0e427364826 100644 --- a/service/rekognition/api_op_StartPersonTracking.go +++ b/service/rekognition/api_op_StartPersonTracking.go @@ -57,7 +57,9 @@ type StartPersonTrackingInput struct { JobTag *string // The Amazon SNS topic ARN you want Amazon Rekognition Video to publish the - // completion status of the people detection operation to. + // completion status of the people detection operation to. The Amazon SNS topic + // must have a topic name that begins with AmazonRekognition if you are using the + // AmazonRekognitionServiceRole permissions policy. NotificationChannel *types.NotificationChannel noSmithyDocumentSerde diff --git a/service/rekognition/api_op_StartSegmentDetection.go b/service/rekognition/api_op_StartSegmentDetection.go index 03010e4640e..1bc0d6fd96e 100644 --- a/service/rekognition/api_op_StartSegmentDetection.go +++ b/service/rekognition/api_op_StartSegmentDetection.go @@ -73,7 +73,10 @@ type StartSegmentDetectionInput struct { JobTag *string // The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to - // publish the completion status of the segment detection operation. + // publish the completion status of the segment detection operation. Note that the + // Amazon SNS topic must have a topic name that begins with AmazonRekognition if + // you are using the AmazonRekognitionServiceRole permissions policy to access the + // topic. NotificationChannel *types.NotificationChannel noSmithyDocumentSerde diff --git a/service/rekognition/api_op_StartTextDetection.go b/service/rekognition/api_op_StartTextDetection.go index 48fe5295fd2..9ca86972232 100644 --- a/service/rekognition/api_op_StartTextDetection.go +++ b/service/rekognition/api_op_StartTextDetection.go @@ -62,7 +62,11 @@ type StartTextDetectionInput struct { // The Amazon Simple Notification Service topic to which Amazon Rekognition // publishes the completion status of a video analysis operation. For more - // information, see api-video. + // information, see api-video. Note that the Amazon SNS topic must have a topic + // name that begins with AmazonRekognition if you are using the + // AmazonRekognitionServiceRole permissions policy to access the topic. For more + // information, see Giving access to multiple Amazon SNS topics + // (https://docs.aws.amazon.com/rekognition/latest/dg/api-video-roles.html#api-video-roles-all-topics). NotificationChannel *types.NotificationChannel noSmithyDocumentSerde diff --git a/service/rekognition/deserializers.go b/service/rekognition/deserializers.go index bfa82e211a3..1026c32b79a 100644 --- a/service/rekognition/deserializers.go +++ b/service/rekognition/deserializers.go @@ -13250,6 +13250,19 @@ func awsAwsjson11_deserializeDocumentSegmentDetection(v **types.SegmentDetection for key, value := range shape { switch key { + case "DurationFrames": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ULong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DurationFrames = ptr.Int64(i64) + } + case "DurationMillis": if value != nil { jtv, ok := value.(json.Number) @@ -13272,6 +13285,19 @@ func awsAwsjson11_deserializeDocumentSegmentDetection(v **types.SegmentDetection sv.DurationSMPTE = ptr.String(jtv) } + case "EndFrameNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ULong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EndFrameNumber = ptr.Int64(i64) + } + case "EndTimecodeSMPTE": if value != nil { jtv, ok := value.(string) @@ -13299,6 +13325,19 @@ func awsAwsjson11_deserializeDocumentSegmentDetection(v **types.SegmentDetection return err } + case "StartFrameNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ULong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StartFrameNumber = ptr.Int64(i64) + } + case "StartTimecodeSMPTE": if value != nil { jtv, ok := value.(string) @@ -14722,6 +14761,15 @@ func awsAwsjson11_deserializeDocumentVideoMetadata(v **types.VideoMetadata, valu sv.Codec = ptr.String(jtv) } + case "ColorRange": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VideoColorRange to be of type string, got %T instead", value) + } + sv.ColorRange = types.VideoColorRange(jtv) + } + case "DurationMillis": if value != nil { jtv, ok := value.(json.Number) diff --git a/service/rekognition/serializers.go b/service/rekognition/serializers.go index f161964222f..631205af91f 100644 --- a/service/rekognition/serializers.go +++ b/service/rekognition/serializers.go @@ -2449,6 +2449,49 @@ func awsAwsjson11_serializeDocumentAttributes(v []types.Attribute, value smithyj return nil } +func awsAwsjson11_serializeDocumentBlackFrame(v *types.BlackFrame, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxPixelThreshold != nil { + ok := object.Key("MaxPixelThreshold") + switch { + case math.IsNaN(float64(*v.MaxPixelThreshold)): + ok.String("NaN") + + case math.IsInf(float64(*v.MaxPixelThreshold), 1): + ok.String("Infinity") + + case math.IsInf(float64(*v.MaxPixelThreshold), -1): + ok.String("-Infinity") + + default: + ok.Float(*v.MaxPixelThreshold) + + } + } + + if v.MinCoveragePercentage != nil { + ok := object.Key("MinCoveragePercentage") + switch { + case math.IsNaN(float64(*v.MinCoveragePercentage)): + ok.String("NaN") + + case math.IsInf(float64(*v.MinCoveragePercentage), 1): + ok.String("Infinity") + + case math.IsInf(float64(*v.MinCoveragePercentage), -1): + ok.String("-Infinity") + + default: + ok.Float(*v.MinCoveragePercentage) + + } + } + + return nil +} + func awsAwsjson11_serializeDocumentBoundingBox(v *types.BoundingBox, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2944,6 +2987,13 @@ func awsAwsjson11_serializeDocumentStartTechnicalCueDetectionFilter(v *types.Sta object := value.Object() defer object.Close() + if v.BlackFrame != nil { + ok := object.Key("BlackFrame") + if err := awsAwsjson11_serializeDocumentBlackFrame(v.BlackFrame, ok); err != nil { + return err + } + } + if v.MinSegmentConfidence != nil { ok := object.Key("MinSegmentConfidence") switch { diff --git a/service/rekognition/types/enums.go b/service/rekognition/types/enums.go index eeb7febb3a0..4f4078adc96 100644 --- a/service/rekognition/types/enums.go +++ b/service/rekognition/types/enums.go @@ -484,9 +484,13 @@ type TechnicalCueType string // Enum values for TechnicalCueType const ( - TechnicalCueTypeColorBars TechnicalCueType = "ColorBars" - TechnicalCueTypeEndCredits TechnicalCueType = "EndCredits" - TechnicalCueTypeBlackFrames TechnicalCueType = "BlackFrames" + TechnicalCueTypeColorBars TechnicalCueType = "ColorBars" + TechnicalCueTypeEndCredits TechnicalCueType = "EndCredits" + TechnicalCueTypeBlackFrames TechnicalCueType = "BlackFrames" + TechnicalCueTypeOpeningCredits TechnicalCueType = "OpeningCredits" + TechnicalCueTypeStudioLogo TechnicalCueType = "StudioLogo" + TechnicalCueTypeSlate TechnicalCueType = "Slate" + TechnicalCueTypeContent TechnicalCueType = "Content" ) // Values returns all known values for TechnicalCueType. Note that this can be @@ -497,6 +501,10 @@ func (TechnicalCueType) Values() []TechnicalCueType { "ColorBars", "EndCredits", "BlackFrames", + "OpeningCredits", + "StudioLogo", + "Slate", + "Content", } } @@ -518,6 +526,24 @@ func (TextTypes) Values() []TextTypes { } } +type VideoColorRange string + +// Enum values for VideoColorRange +const ( + VideoColorRangeFull VideoColorRange = "FULL" + VideoColorRangeLimited VideoColorRange = "LIMITED" +) + +// Values returns all known values for VideoColorRange. 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 (VideoColorRange) Values() []VideoColorRange { + return []VideoColorRange{ + "FULL", + "LIMITED", + } +} + type VideoJobStatus string // Enum values for VideoJobStatus diff --git a/service/rekognition/types/types.go b/service/rekognition/types/types.go index 6b5c4216829..fc94ac6233d 100644 --- a/service/rekognition/types/types.go +++ b/service/rekognition/types/types.go @@ -68,6 +68,35 @@ type Beard struct { noSmithyDocumentSerde } +// A filter that allows you to control the black frame detection by specifying the +// black levels and pixel coverage of black pixels in a frame. As videos can come +// from multiple sources, formats, and time periods, they may contain different +// standards and varying noise levels for black frames that need to be accounted +// for. For more information, see StartSegmentDetection. +type BlackFrame struct { + + // A threshold used to determine the maximum luminance value for a pixel to be + // considered black. In a full color range video, luminance values range from + // 0-255. A pixel value of 0 is pure black, and the most strict filter. The maximum + // black pixel value is computed as follows: max_black_pixel_value = + // minimum_luminance + MaxPixelThreshold *luminance_range. For example, for a full + // range video with BlackPixelThreshold = 0.1, max_black_pixel_value is 0 + 0.1 * + // (255-0) = 25.5. The default value of MaxPixelThreshold is 0.2, which maps to a + // max_black_pixel_value of 51 for a full range video. You can lower this threshold + // to be more strict on black levels. + MaxPixelThreshold *float32 + + // The minimum percentage of pixels in a frame that need to have a luminance below + // the max_black_pixel_value for a frame to be considered a black frame. Luminance + // is calculated using the BT.709 matrix. The default value is 99, which means at + // least 99% of all pixels in the frame are black pixels as per the + // MaxPixelThreshold set. You can reduce this value to allow more noise on the + // black frame. + MinCoveragePercentage *float32 + + noSmithyDocumentSerde +} + // Identifies the bounding box around the label, face, text or personal protective // equipment. The left (x-coordinate) and top (y-coordinate) are coordinates // representing the top and left sides of the bounding box. Note that the @@ -218,14 +247,15 @@ type CompareFacesMatch struct { noSmithyDocumentSerde } -// Information about an unsafe content label detection in a stored video. +// Information about an inappropriate, unwanted, or offensive content label +// detection in a stored video. type ContentModerationDetection struct { - // The unsafe content label detected by in the stored video. + // The content moderation label detected by in the stored video. ModerationLabel *ModerationLabel - // Time, in milliseconds from the beginning of the video, that the unsafe content - // label was detected. + // Time, in milliseconds from the beginning of the video, that the content + // moderation label was detected. Timestamp int64 noSmithyDocumentSerde @@ -778,10 +808,10 @@ type Landmark struct { noSmithyDocumentSerde } -// Provides information about a single type of unsafe content found in an image or -// video. Each type of moderated content has a label within a hierarchical -// taxonomy. For more information, see Detecting Unsafe Content in the Amazon -// Rekognition Developer Guide. +// Provides information about a single type of inappropriate, unwanted, or +// offensive content found in an image or video. Each type of moderated content has +// a label within a hierarchical taxonomy. For more information, see Content +// moderation in the Amazon Rekognition Developer Guide. type ModerationLabel struct { // Specifies the confidence that Amazon Rekognition has that the label has been @@ -828,7 +858,11 @@ type Mustache struct { // The Amazon Simple Notification Service topic to which Amazon Rekognition // publishes the completion status of a video analysis operation. For more -// information, see api-video. +// information, see api-video. Note that the Amazon SNS topic must have a topic +// name that begins with AmazonRekognition if you are using the +// AmazonRekognitionServiceRole permissions policy to access the topic. For more +// information, see Giving access to multiple Amazon SNS topics +// (https://docs.aws.amazon.com/rekognition/latest/dg/api-video-roles.html#api-video-roles-all-topics). type NotificationChannel struct { // The ARN of an IAM role that gives Amazon Rekognition publishing permissions to @@ -1164,12 +1198,19 @@ type S3Object struct { // returned by GetSegmentDetection. type SegmentDetection struct { + // The duration of a video segment, expressed in frames. + DurationFrames *int64 + // The duration of the detected segment in milliseconds. DurationMillis *int64 // The duration of the timecode for the detected segment in SMPTE format. DurationSMPTE *string + // The frame number at the end of a video segment, using a frame index that starts + // with 0. + EndFrameNumber *int64 + // The frame-accurate SMPTE timecode, from the start of a video, for the end of a // detected segment. EndTimecode is in HH:MM:SS:fr format (and ;fr for drop // frame-rates). @@ -1183,6 +1224,10 @@ type SegmentDetection struct { // detection. ShotSegment *ShotSegment + // The frame number of the start of a video segment, using a frame index that + // starts with 0. + StartFrameNumber *int64 + // The frame-accurate SMPTE timecode, from the start of a video, for the start of a // detected segment. StartTimecode is in HH:MM:SS:fr format (and ;fr for drop // frame-rates). @@ -1276,6 +1321,12 @@ type StartShotDetectionFilter struct { // information, see StartSegmentDetectionFilters. type StartTechnicalCueDetectionFilter struct { + // A filter that allows you to control the black frame detection by specifying the + // black levels and pixel coverage of black pixels in a frame. Videos can come from + // multiple sources, formats, and time periods, with different standards and + // varying noise levels for black frames that need to be accounted for. + BlackFrame *BlackFrame + // Specifies the minimum confidence that Amazon Rekognition Video must have in // order to return a detected segment. Confidence represents how certain Amazon // Rekognition is that a segment is correctly identified. 0 is the lowest @@ -1576,6 +1627,10 @@ type VideoMetadata struct { // Type of compression used in the analyzed video. Codec *string + // A description of the range of luminance values in a video, either LIMITED (16 to + // 235) or FULL (0 to 255). + ColorRange VideoColorRange + // Length of the video in milliseconds. DurationMillis *int64 diff --git a/service/route53/api_op_AssociateVPCWithHostedZone.go b/service/route53/api_op_AssociateVPCWithHostedZone.go index a3be3a5bc04..0886ab60205 100644 --- a/service/route53/api_op_AssociateVPCWithHostedZone.go +++ b/service/route53/api_op_AssociateVPCWithHostedZone.go @@ -14,11 +14,11 @@ import ( // Associates an Amazon VPC with a private hosted zone. To perform the association, // the VPC and the private hosted zone must already exist. You can't convert a // public hosted zone into a private hosted zone. If you want to associate a VPC -// that was created by using one account with a private hosted zone that was -// created by using a different account, the account that created the private -// hosted zone must first submit a CreateVPCAssociationAuthorization request. Then -// the account that created the VPC must submit an AssociateVPCWithHostedZone -// request. +// that was created by using one Amazon Web Services account with a private hosted +// zone that was created by using a different account, the Amazon Web Services +// account that created the private hosted zone must first submit a +// CreateVPCAssociationAuthorization request. Then the account that created the VPC +// must submit an AssociateVPCWithHostedZone request. func (c *Client) AssociateVPCWithHostedZone(ctx context.Context, params *AssociateVPCWithHostedZoneInput, optFns ...func(*Options)) (*AssociateVPCWithHostedZoneOutput, error) { if params == nil { params = &AssociateVPCWithHostedZoneInput{} diff --git a/service/route53/api_op_CreateQueryLoggingConfig.go b/service/route53/api_op_CreateQueryLoggingConfig.go index cc9cb5f278a..0ccedc4b81e 100644 --- a/service/route53/api_op_CreateQueryLoggingConfig.go +++ b/service/route53/api_op_CreateQueryLoggingConfig.go @@ -39,26 +39,27 @@ import ( // * You must create the log group in the // us-east-1 region. // -// * You must use the same account to create the log group and -// the hosted zone that you want to configure query logging for. +// * You must use the same Amazon Web Services account to create +// the log group and the hosted zone that you want to configure query logging +// for. // -// * When you create -// log groups for query logging, we recommend that you use a consistent prefix, for -// example: /aws/route53/hosted zone name In the next step, you'll create a -// resource policy, which controls access to one or more log groups and the -// associated Amazon Web Services resources, such as Route 53 hosted zones. There's -// a limit on the number of resource policies that you can create, so we recommend -// that you use a consistent prefix so you can use the same resource policy for all -// the log groups that you create for query logging. +// * When you create log groups for query logging, we recommend that you use +// a consistent prefix, for example: /aws/route53/hosted zone name In the next +// step, you'll create a resource policy, which controls access to one or more log +// groups and the associated Amazon Web Services resources, such as Route 53 hosted +// zones. There's a limit on the number of resource policies that you can create, +// so we recommend that you use a consistent prefix so you can use the same +// resource policy for all the log groups that you create for query logging. // -// * Create a CloudWatch Logs -// resource policy, and give it the permissions that Route 53 needs to create log -// streams and to send query logs to log streams. For the value of Resource, -// specify the ARN for the log group that you created in the previous step. To use -// the same resource policy for all the CloudWatch Logs log groups that you created -// for query logging configurations, replace the hosted zone name with , for -// example: arn:aws:logs:us-east-1:123412341234:log-group:/aws/route53/ You can't -// use the CloudWatch console to create or edit a resource policy. You must use the +// * +// Create a CloudWatch Logs resource policy, and give it the permissions that Route +// 53 needs to create log streams and to send query logs to log streams. For the +// value of Resource, specify the ARN for the log group that you created in the +// previous step. To use the same resource policy for all the CloudWatch Logs log +// groups that you created for query logging configurations, replace the hosted +// zone name with , for example: +// arn:aws:logs:us-east-1:123412341234:log-group:/aws/route53/ You can't use the +// CloudWatch console to create or edit a resource policy. You must use the // CloudWatch API, one of the Amazon Web Services SDKs, or the CLI. // // Log Streams diff --git a/service/route53/api_op_CreateReusableDelegationSet.go b/service/route53/api_op_CreateReusableDelegationSet.go index db2cb86dc6a..5f02166d08d 100644 --- a/service/route53/api_op_CreateReusableDelegationSet.go +++ b/service/route53/api_op_CreateReusableDelegationSet.go @@ -12,13 +12,13 @@ import ( ) // Creates a delegation set (a group of four name servers) that can be reused by -// multiple hosted zones that were created by the same account. You can also create -// a reusable delegation set that uses the four name servers that are associated -// with an existing hosted zone. Specify the hosted zone ID in the -// CreateReusableDelegationSet request. You can't associate a reusable delegation -// set with a private hosted zone. For information about using a reusable -// delegation set to configure white label name servers, see Configuring White -// Label Name Servers +// multiple hosted zones that were created by the same Amazon Web Services account. +// You can also create a reusable delegation set that uses the four name servers +// that are associated with an existing hosted zone. Specify the hosted zone ID in +// the CreateReusableDelegationSet request. You can't associate a reusable +// delegation set with a private hosted zone. For information about using a +// reusable delegation set to configure white label name servers, see Configuring +// White Label Name Servers // (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/white-label-name-servers.html). // The process for migrating existing hosted zones to use a reusable delegation set // is comparable to the process for configuring white label name servers. You need diff --git a/service/route53/api_op_CreateVPCAssociationAuthorization.go b/service/route53/api_op_CreateVPCAssociationAuthorization.go index 80331bbb663..d33bed54abc 100644 --- a/service/route53/api_op_CreateVPCAssociationAuthorization.go +++ b/service/route53/api_op_CreateVPCAssociationAuthorization.go @@ -11,9 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Authorizes the account that created a specified VPC to submit an -// AssociateVPCWithHostedZone request to associate the VPC with a specified hosted -// zone that was created by a different account. To submit a +// Authorizes the Amazon Web Services account that created a specified VPC to +// submit an AssociateVPCWithHostedZone request to associate the VPC with a +// specified hosted zone that was created by a different account. To submit a // CreateVPCAssociationAuthorization request, you must use the account that created // the hosted zone. After you authorize the association, use the account that // created the VPC to submit an AssociateVPCWithHostedZone request. If you want to diff --git a/service/route53/api_op_DeleteHostedZone.go b/service/route53/api_op_DeleteHostedZone.go index cb98d8ee78d..2f128ebcec6 100644 --- a/service/route53/api_op_DeleteHostedZone.go +++ b/service/route53/api_op_DeleteHostedZone.go @@ -50,7 +50,7 @@ import ( // // * Use // the ListHostedZones action to get a list of the hosted zones associated with the -// current account. +// current Amazon Web Services account. func (c *Client) DeleteHostedZone(ctx context.Context, params *DeleteHostedZoneInput, optFns ...func(*Options)) (*DeleteHostedZoneOutput, error) { if params == nil { params = &DeleteHostedZoneInput{} diff --git a/service/route53/api_op_DeleteVPCAssociationAuthorization.go b/service/route53/api_op_DeleteVPCAssociationAuthorization.go index 9ec4de1ed39..81c8a0673a0 100644 --- a/service/route53/api_op_DeleteVPCAssociationAuthorization.go +++ b/service/route53/api_op_DeleteVPCAssociationAuthorization.go @@ -15,11 +15,11 @@ import ( // associate a specified VPC with a hosted zone that was created by a different // account. You must use the account that created the hosted zone to submit a // DeleteVPCAssociationAuthorization request. Sending this request only prevents -// the account that created the VPC from associating the VPC with the Amazon Route -// 53 hosted zone in the future. If the VPC is already associated with the hosted -// zone, DeleteVPCAssociationAuthorization won't disassociate the VPC from the -// hosted zone. If you want to delete an existing association, use -// DisassociateVPCFromHostedZone. +// the Amazon Web Services account that created the VPC from associating the VPC +// with the Amazon Route 53 hosted zone in the future. If the VPC is already +// associated with the hosted zone, DeleteVPCAssociationAuthorization won't +// disassociate the VPC from the hosted zone. If you want to delete an existing +// association, use DisassociateVPCFromHostedZone. func (c *Client) DeleteVPCAssociationAuthorization(ctx context.Context, params *DeleteVPCAssociationAuthorizationInput, optFns ...func(*Options)) (*DeleteVPCAssociationAuthorizationOutput, error) { if params == nil { params = &DeleteVPCAssociationAuthorizationInput{} @@ -36,20 +36,21 @@ func (c *Client) DeleteVPCAssociationAuthorization(ctx context.Context, params * } // A complex type that contains information about the request to remove -// authorization to associate a VPC that was created by one account with a hosted -// zone that was created with a different account. +// authorization to associate a VPC that was created by one Amazon Web Services +// account with a hosted zone that was created with a different Amazon Web Services +// account. type DeleteVPCAssociationAuthorizationInput struct { - // When removing authorization to associate a VPC that was created by one account - // with a hosted zone that was created with a different account, the ID of the - // hosted zone. + // When removing authorization to associate a VPC that was created by one Amazon + // Web Services account with a hosted zone that was created with a different Amazon + // Web Services account, the ID of the hosted zone. // // This member is required. HostedZoneId *string - // When removing authorization to associate a VPC that was created by one account - // with a hosted zone that was created with a different account, a complex type - // that includes the ID and region of the VPC. + // When removing authorization to associate a VPC that was created by one Amazon + // Web Services account with a hosted zone that was created with a different Amazon + // Web Services account, a complex type that includes the ID and region of the VPC. // // This member is required. VPC *types.VPC diff --git a/service/route53/api_op_GetAccountLimit.go b/service/route53/api_op_GetAccountLimit.go index ab9e062689c..d50c71ac534 100644 --- a/service/route53/api_op_GetAccountLimit.go +++ b/service/route53/api_op_GetAccountLimit.go @@ -18,8 +18,8 @@ import ( // in the Amazon Route 53 Developer Guide. To request a higher limit, open a case // (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53). // You can also view account limits in Amazon Web Services Trusted Advisor. Sign in -// to the Management Console and open the Trusted Advisor console at -// https://console.aws.amazon.com/trustedadvisor/ +// to the Amazon Web Services Management Console and open the Trusted Advisor +// console at https://console.aws.amazon.com/trustedadvisor/ // (https://console.aws.amazon.com/trustedadvisor). Then choose Service limits in // the navigation pane. func (c *Client) GetAccountLimit(ctx context.Context, params *GetAccountLimitInput, optFns ...func(*Options)) (*GetAccountLimitOutput, error) { diff --git a/service/route53/api_op_GetHealthCheck.go b/service/route53/api_op_GetHealthCheck.go index 9537cfeff20..cbd69991fbd 100644 --- a/service/route53/api_op_GetHealthCheck.go +++ b/service/route53/api_op_GetHealthCheck.go @@ -44,7 +44,7 @@ type GetHealthCheckInput struct { type GetHealthCheckOutput struct { // A complex type that contains information about one health check that is - // associated with the current account. + // associated with the current Amazon Web Services account. // // This member is required. HealthCheck *types.HealthCheck diff --git a/service/route53/api_op_GetHealthCheckCount.go b/service/route53/api_op_GetHealthCheckCount.go index a2a65760dad..2d8021ac77c 100644 --- a/service/route53/api_op_GetHealthCheckCount.go +++ b/service/route53/api_op_GetHealthCheckCount.go @@ -11,7 +11,7 @@ import ( ) // Retrieves the number of health checks that are associated with the current -// account. +// Amazon Web Services account. func (c *Client) GetHealthCheckCount(ctx context.Context, params *GetHealthCheckCountInput, optFns ...func(*Options)) (*GetHealthCheckCountOutput, error) { if params == nil { params = &GetHealthCheckCountInput{} @@ -28,7 +28,7 @@ func (c *Client) GetHealthCheckCount(ctx context.Context, params *GetHealthCheck } // A request for the number of health checks that are associated with the current -// account. +// Amazon Web Services account. type GetHealthCheckCountInput struct { noSmithyDocumentSerde } @@ -36,7 +36,8 @@ type GetHealthCheckCountInput struct { // A complex type that contains the response to a GetHealthCheckCount request. type GetHealthCheckCountOutput struct { - // The number of health checks associated with the current account. + // The number of health checks associated with the current Amazon Web Services + // account. // // This member is required. HealthCheckCount *int64 diff --git a/service/route53/api_op_GetHostedZoneCount.go b/service/route53/api_op_GetHostedZoneCount.go index 3ec9f8da4cb..1af1a2823f1 100644 --- a/service/route53/api_op_GetHostedZoneCount.go +++ b/service/route53/api_op_GetHostedZoneCount.go @@ -10,8 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the number of hosted zones that are associated with the current -// account. +// Retrieves the number of hosted zones that are associated with the current Amazon +// Web Services account. func (c *Client) GetHostedZoneCount(ctx context.Context, params *GetHostedZoneCountInput, optFns ...func(*Options)) (*GetHostedZoneCountOutput, error) { if params == nil { params = &GetHostedZoneCountInput{} @@ -28,7 +28,7 @@ func (c *Client) GetHostedZoneCount(ctx context.Context, params *GetHostedZoneCo } // A request to retrieve a count of all the hosted zones that are associated with -// the current account. +// the current Amazon Web Services account. type GetHostedZoneCountInput struct { noSmithyDocumentSerde } @@ -37,7 +37,7 @@ type GetHostedZoneCountInput struct { type GetHostedZoneCountOutput struct { // The total number of public and private hosted zones that are associated with the - // current account. + // current Amazon Web Services account. // // This member is required. HostedZoneCount *int64 diff --git a/service/route53/api_op_GetTrafficPolicyInstanceCount.go b/service/route53/api_op_GetTrafficPolicyInstanceCount.go index 58adee392a7..c137ffbc973 100644 --- a/service/route53/api_op_GetTrafficPolicyInstanceCount.go +++ b/service/route53/api_op_GetTrafficPolicyInstanceCount.go @@ -11,7 +11,7 @@ import ( ) // Gets the number of traffic policy instances that are associated with the current -// account. +// Amazon Web Services account. func (c *Client) GetTrafficPolicyInstanceCount(ctx context.Context, params *GetTrafficPolicyInstanceCountInput, optFns ...func(*Options)) (*GetTrafficPolicyInstanceCountOutput, error) { if params == nil { params = &GetTrafficPolicyInstanceCountInput{} @@ -28,7 +28,7 @@ func (c *Client) GetTrafficPolicyInstanceCount(ctx context.Context, params *GetT } // Request to get the number of traffic policy instances that are associated with -// the current account. +// the current Amazon Web Services account. type GetTrafficPolicyInstanceCountInput struct { noSmithyDocumentSerde } @@ -38,7 +38,7 @@ type GetTrafficPolicyInstanceCountInput struct { type GetTrafficPolicyInstanceCountOutput struct { // The number of traffic policy instances that are associated with the current - // account. + // Amazon Web Services account. // // This member is required. TrafficPolicyInstanceCount *int32 diff --git a/service/route53/api_op_ListHealthChecks.go b/service/route53/api_op_ListHealthChecks.go index 5905a3a45c6..5f34a4efa77 100644 --- a/service/route53/api_op_ListHealthChecks.go +++ b/service/route53/api_op_ListHealthChecks.go @@ -12,8 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieve a list of the health checks that are associated with the current -// account. +// Retrieve a list of the health checks that are associated with the current Amazon +// Web Services account. func (c *Client) ListHealthChecks(ctx context.Context, params *ListHealthChecksInput, optFns ...func(*Options)) (*ListHealthChecksOutput, error) { if params == nil { params = &ListHealthChecksInput{} @@ -30,7 +30,7 @@ func (c *Client) ListHealthChecks(ctx context.Context, params *ListHealthChecksI } // A request to retrieve a list of the health checks that are associated with the -// current account. +// current Amazon Web Services account. type ListHealthChecksInput struct { // If the value of IsTruncated in the previous response was true, you have more @@ -54,7 +54,7 @@ type ListHealthChecksInput struct { type ListHealthChecksOutput struct { // A complex type that contains one HealthCheck element for each health check that - // is associated with the current account. + // is associated with the current Amazon Web Services account. // // This member is required. HealthChecks []types.HealthCheck diff --git a/service/route53/api_op_ListHostedZones.go b/service/route53/api_op_ListHostedZones.go index 30cd7cabe4d..ad8f8203149 100644 --- a/service/route53/api_op_ListHostedZones.go +++ b/service/route53/api_op_ListHostedZones.go @@ -13,10 +13,10 @@ import ( ) // Retrieves a list of the public and private hosted zones that are associated with -// the current account. The response includes a HostedZones child element for each -// hosted zone. Amazon Route 53 returns a maximum of 100 items in each response. If -// you have a lot of hosted zones, you can use the maxitems parameter to list them -// in groups of up to 100. +// the current Amazon Web Services account. The response includes a HostedZones +// child element for each hosted zone. Amazon Route 53 returns a maximum of 100 +// items in each response. If you have a lot of hosted zones, you can use the +// maxitems parameter to list them in groups of up to 100. func (c *Client) ListHostedZones(ctx context.Context, params *ListHostedZonesInput, optFns ...func(*Options)) (*ListHostedZonesOutput, error) { if params == nil { params = &ListHostedZonesInput{} @@ -33,7 +33,7 @@ func (c *Client) ListHostedZones(ctx context.Context, params *ListHostedZonesInp } // A request to retrieve a list of the public and private hosted zones that are -// associated with the current account. +// associated with the current Amazon Web Services account. type ListHostedZonesInput struct { // If you're using reusable delegation sets and you want to list all of the hosted diff --git a/service/route53/api_op_ListHostedZonesByName.go b/service/route53/api_op_ListHostedZonesByName.go index 26f8122358d..10b62576e26 100644 --- a/service/route53/api_op_ListHostedZonesByName.go +++ b/service/route53/api_op_ListHostedZonesByName.go @@ -13,16 +13,17 @@ import ( // Retrieves a list of your hosted zones in lexicographic order. The response // includes a HostedZones child element for each hosted zone created by the current -// account. ListHostedZonesByName sorts hosted zones by name with the labels -// reversed. For example: com.example.www. Note the trailing dot, which can change -// the sort order in some circumstances. If the domain name includes escape -// characters or Punycode, ListHostedZonesByName alphabetizes the domain name using -// the escaped or Punycoded value, which is the format that Amazon Route 53 saves -// in its database. For example, to create a hosted zone for exämple.com, you -// specify ex\344mple.com for the domain name. ListHostedZonesByName alphabetizes -// it as: com.ex\344mple. The labels are reversed and alphabetized using the -// escaped value. For more information about valid domain name formats, including -// internationalized domain names, see DNS Domain Name Format +// Amazon Web Services account. ListHostedZonesByName sorts hosted zones by name +// with the labels reversed. For example: com.example.www. Note the trailing dot, +// which can change the sort order in some circumstances. If the domain name +// includes escape characters or Punycode, ListHostedZonesByName alphabetizes the +// domain name using the escaped or Punycoded value, which is the format that +// Amazon Route 53 saves in its database. For example, to create a hosted zone for +// exämple.com, you specify ex\344mple.com for the domain name. +// ListHostedZonesByName alphabetizes it as: com.ex\344mple. The labels are +// reversed and alphabetized using the escaped value. For more information about +// valid domain name formats, including internationalized domain names, see DNS +// Domain Name Format // (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html) // in the Amazon Route 53 Developer Guide. Route 53 returns up to 100 items in each // response. If you have a lot of hosted zones, use the MaxItems parameter to list @@ -39,17 +40,17 @@ import ( // current response. // // * If the value of IsTruncated in the response is true, there -// are more hosted zones associated with the current account. If IsTruncated is -// false, this response includes the last hosted zone that is associated with the -// current account. The NextDNSName element and NextHostedZoneId elements are -// omitted from the response. +// are more hosted zones associated with the current Amazon Web Services account. +// If IsTruncated is false, this response includes the last hosted zone that is +// associated with the current account. The NextDNSName element and +// NextHostedZoneId elements are omitted from the response. // -// * The NextDNSName and NextHostedZoneId elements in -// the response contain the domain name and the hosted zone ID of the next hosted -// zone that is associated with the current account. If you want to list more -// hosted zones, make another call to ListHostedZonesByName, and specify the value -// of NextDNSName and NextHostedZoneId in the dnsname and hostedzoneid parameters, -// respectively. +// * The NextDNSName and +// NextHostedZoneId elements in the response contain the domain name and the hosted +// zone ID of the next hosted zone that is associated with the current Amazon Web +// Services account. If you want to list more hosted zones, make another call to +// ListHostedZonesByName, and specify the value of NextDNSName and NextHostedZoneId +// in the dnsname and hostedzoneid parameters, respectively. func (c *Client) ListHostedZonesByName(ctx context.Context, params *ListHostedZonesByNameInput, optFns ...func(*Options)) (*ListHostedZonesByNameOutput, error) { if params == nil { params = &ListHostedZonesByNameInput{} @@ -66,16 +67,16 @@ func (c *Client) ListHostedZonesByName(ctx context.Context, params *ListHostedZo } // Retrieves a list of the public and private hosted zones that are associated with -// the current account in ASCII order by domain name. +// the current Amazon Web Services account in ASCII order by domain name. type ListHostedZonesByNameInput struct { // (Optional) For your first request to ListHostedZonesByName, include the dnsname // parameter only if you want to specify the name of the first hosted zone in the // response. If you don't include the dnsname parameter, Amazon Route 53 returns - // all of the hosted zones that were created by the current account, in ASCII - // order. For subsequent requests, include both dnsname and hostedzoneid - // parameters. For dnsname, specify the value of NextDNSName from the previous - // response. + // all of the hosted zones that were created by the current Amazon Web Services + // account, in ASCII order. For subsequent requests, include both dnsname and + // hostedzoneid parameters. For dnsname, specify the value of NextDNSName from the + // previous response. DNSName *string // (Optional) For your first request to ListHostedZonesByName, do not include the diff --git a/service/route53/api_op_ListHostedZonesByVPC.go b/service/route53/api_op_ListHostedZonesByVPC.go index 383def4a111..681d28d81e0 100644 --- a/service/route53/api_op_ListHostedZonesByVPC.go +++ b/service/route53/api_op_ListHostedZonesByVPC.go @@ -12,18 +12,19 @@ import ( ) // Lists all the private hosted zones that a specified VPC is associated with, -// regardless of which account or Amazon Web Services service owns the hosted -// zones. The HostedZoneOwner structure in the response contains one of the -// following values: +// regardless of which Amazon Web Services account or Amazon Web Services service +// owns the hosted zones. The HostedZoneOwner structure in the response contains +// one of the following values: // -// * An OwningAccount element, which contains the account number -// of either the current account or another account. Some services, such as Cloud -// Map, create hosted zones using the current account. +// * An OwningAccount element, which contains the +// account number of either the current Amazon Web Services account or another +// Amazon Web Services account. Some services, such as Cloud Map, create hosted +// zones using the current account. // -// * An OwningService element, -// which identifies the Amazon Web Services service that created and owns the -// hosted zone. For example, if a hosted zone was created by Amazon Elastic File -// System (Amazon EFS), the value of Owner is efs.amazonaws.com. +// * An OwningService element, which identifies +// the Amazon Web Services service that created and owns the hosted zone. For +// example, if a hosted zone was created by Amazon Elastic File System (Amazon +// EFS), the value of Owner is efs.amazonaws.com. func (c *Client) ListHostedZonesByVPC(ctx context.Context, params *ListHostedZonesByVPCInput, optFns ...func(*Options)) (*ListHostedZonesByVPCOutput, error) { if params == nil { params = &ListHostedZonesByVPCInput{} @@ -40,7 +41,7 @@ func (c *Client) ListHostedZonesByVPC(ctx context.Context, params *ListHostedZon } // Lists all the private hosted zones that a specified VPC is associated with, -// regardless of which account created the hosted zones. +// regardless of which Amazon Web Services account created the hosted zones. type ListHostedZonesByVPCInput struct { // The ID of the Amazon VPC that you want to list hosted zones for. diff --git a/service/route53/api_op_ListQueryLoggingConfigs.go b/service/route53/api_op_ListQueryLoggingConfigs.go index c1907e89a02..728ab1a6773 100644 --- a/service/route53/api_op_ListQueryLoggingConfigs.go +++ b/service/route53/api_op_ListQueryLoggingConfigs.go @@ -13,8 +13,9 @@ import ( ) // Lists the configurations for DNS query logging that are associated with the -// current account or the configuration that is associated with a specified hosted -// zone. For more information about DNS query logs, see CreateQueryLoggingConfig +// current Amazon Web Services account or the configuration that is associated with +// a specified hosted zone. For more information about DNS query logs, see +// CreateQueryLoggingConfig // (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html). // Additional information, including the format of DNS query logs, appears in // Logging DNS Queries @@ -40,22 +41,23 @@ type ListQueryLoggingConfigsInput struct { // (Optional) If you want to list the query logging configuration that is // associated with a hosted zone, specify the ID in HostedZoneId. If you don't // specify a hosted zone ID, ListQueryLoggingConfigs returns all of the - // configurations that are associated with the current account. + // configurations that are associated with the current Amazon Web Services account. HostedZoneId *string // (Optional) The maximum number of query logging configurations that you want // Amazon Route 53 to return in response to the current request. If the current - // account has more than MaxResults configurations, use the value of NextToken + // Amazon Web Services account has more than MaxResults configurations, use the + // value of NextToken // (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListQueryLoggingConfigs.html#API_ListQueryLoggingConfigs_RequestSyntax) // in the response to get the next page of results. If you don't specify a value // for MaxResults, Route 53 returns up to 100 configurations. MaxResults *int32 - // (Optional) If the current account has more than MaxResults query logging - // configurations, use NextToken to get the second and subsequent pages of results. - // For the first ListQueryLoggingConfigs request, omit this value. For the second - // and subsequent requests, get the value of NextToken from the previous response - // and specify that value for NextToken in the request. + // (Optional) If the current Amazon Web Services account has more than MaxResults + // query logging configurations, use NextToken to get the second and subsequent + // pages of results. For the first ListQueryLoggingConfigs request, omit this + // value. For the second and subsequent requests, get the value of NextToken from + // the previous response and specify that value for NextToken in the request. NextToken *string noSmithyDocumentSerde @@ -66,15 +68,16 @@ type ListQueryLoggingConfigsOutput struct { // An array that contains one QueryLoggingConfig // (https://docs.aws.amazon.com/Route53/latest/APIReference/API_QueryLoggingConfig.html) // element for each configuration for DNS query logging that is associated with the - // current account. + // current Amazon Web Services account. // // This member is required. QueryLoggingConfigs []types.QueryLoggingConfig // If a response includes the last of the query logging configurations that are - // associated with the current account, NextToken doesn't appear in the response. - // If a response doesn't include the last of the configurations, you can get more - // configurations by submitting another ListQueryLoggingConfigs + // associated with the current Amazon Web Services account, NextToken doesn't + // appear in the response. If a response doesn't include the last of the + // configurations, you can get more configurations by submitting another + // ListQueryLoggingConfigs // (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListQueryLoggingConfigs.html) // request. Get the value of NextToken that Amazon Route 53 returned in the // previous response and include it in NextToken in the next request. @@ -162,7 +165,8 @@ var _ ListQueryLoggingConfigsAPIClient = (*Client)(nil) type ListQueryLoggingConfigsPaginatorOptions struct { // (Optional) The maximum number of query logging configurations that you want // Amazon Route 53 to return in response to the current request. If the current - // account has more than MaxResults configurations, use the value of NextToken + // Amazon Web Services account has more than MaxResults configurations, use the + // value of NextToken // (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListQueryLoggingConfigs.html#API_ListQueryLoggingConfigs_RequestSyntax) // in the response to get the next page of results. If you don't specify a value // for MaxResults, Route 53 returns up to 100 configurations. diff --git a/service/route53/api_op_ListReusableDelegationSets.go b/service/route53/api_op_ListReusableDelegationSets.go index 4db0015b505..772645b8c42 100644 --- a/service/route53/api_op_ListReusableDelegationSets.go +++ b/service/route53/api_op_ListReusableDelegationSets.go @@ -12,7 +12,7 @@ import ( ) // Retrieves a list of the reusable delegation sets that are associated with the -// current account. +// current Amazon Web Services account. func (c *Client) ListReusableDelegationSets(ctx context.Context, params *ListReusableDelegationSetsInput, optFns ...func(*Options)) (*ListReusableDelegationSetsOutput, error) { if params == nil { params = &ListReusableDelegationSetsInput{} @@ -29,7 +29,7 @@ func (c *Client) ListReusableDelegationSets(ctx context.Context, params *ListReu } // A request to get a list of the reusable delegation sets that are associated with -// the current account. +// the current Amazon Web Services account. type ListReusableDelegationSetsInput struct { // If the value of IsTruncated in the previous response was true, you have more @@ -50,11 +50,11 @@ type ListReusableDelegationSetsInput struct { } // A complex type that contains information about the reusable delegation sets that -// are associated with the current account. +// are associated with the current Amazon Web Services account. type ListReusableDelegationSetsOutput struct { // A complex type that contains one DelegationSet element for each reusable - // delegation set that was created by the current account. + // delegation set that was created by the current Amazon Web Services account. // // This member is required. DelegationSets []types.DelegationSet diff --git a/service/route53/api_op_ListTrafficPolicies.go b/service/route53/api_op_ListTrafficPolicies.go index 3b013258213..c2ab7dddbd8 100644 --- a/service/route53/api_op_ListTrafficPolicies.go +++ b/service/route53/api_op_ListTrafficPolicies.go @@ -12,9 +12,10 @@ import ( ) // Gets information about the latest version for every traffic policy that is -// associated with the current account. Policies are listed in the order that they -// were created in. For information about how of deleting a traffic policy affects -// the response from ListTrafficPolicies, see DeleteTrafficPolicy +// associated with the current Amazon Web Services account. Policies are listed in +// the order that they were created in. For information about how of deleting a +// traffic policy affects the response from ListTrafficPolicies, see +// DeleteTrafficPolicy // (https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicy.html). func (c *Client) ListTrafficPolicies(ctx context.Context, params *ListTrafficPoliciesInput, optFns ...func(*Options)) (*ListTrafficPoliciesOutput, error) { if params == nil { @@ -32,7 +33,8 @@ func (c *Client) ListTrafficPolicies(ctx context.Context, params *ListTrafficPol } // A complex type that contains the information about the request to list the -// traffic policies that are associated with the current account. +// traffic policies that are associated with the current Amazon Web Services +// account. type ListTrafficPoliciesInput struct { // (Optional) The maximum number of traffic policies that you want Amazon Route 53 @@ -77,7 +79,7 @@ type ListTrafficPoliciesOutput struct { TrafficPolicyIdMarker *string // A list that contains one TrafficPolicySummary element for each traffic policy - // that was created by the current account. + // that was created by the current Amazon Web Services account. // // This member is required. TrafficPolicySummaries []types.TrafficPolicySummary diff --git a/service/route53/api_op_ListTrafficPolicyInstances.go b/service/route53/api_op_ListTrafficPolicyInstances.go index 8e2de19fcde..cf48de03c20 100644 --- a/service/route53/api_op_ListTrafficPolicyInstances.go +++ b/service/route53/api_op_ListTrafficPolicyInstances.go @@ -12,12 +12,13 @@ import ( ) // Gets information about the traffic policy instances that you created by using -// the current account. After you submit an UpdateTrafficPolicyInstance request, -// there's a brief delay while Amazon Route 53 creates the resource record sets -// that are specified in the traffic policy definition. For more information, see -// the State response element. Route 53 returns a maximum of 100 items in each -// response. If you have a lot of traffic policy instances, you can use the -// MaxItems parameter to list them in groups of up to 100. +// the current Amazon Web Services account. After you submit an +// UpdateTrafficPolicyInstance request, there's a brief delay while Amazon Route 53 +// creates the resource record sets that are specified in the traffic policy +// definition. For more information, see the State response element. Route 53 +// returns a maximum of 100 items in each response. If you have a lot of traffic +// policy instances, you can use the MaxItems parameter to list them in groups of +// up to 100. func (c *Client) ListTrafficPolicyInstances(ctx context.Context, params *ListTrafficPolicyInstancesInput, optFns ...func(*Options)) (*ListTrafficPolicyInstancesOutput, error) { if params == nil { params = &ListTrafficPolicyInstancesInput{} @@ -34,7 +35,7 @@ func (c *Client) ListTrafficPolicyInstances(ctx context.Context, params *ListTra } // A request to get information about the traffic policy instances that you created -// by using the current account. +// by using the current Amazon Web Services account. type ListTrafficPolicyInstancesInput struct { // If the value of IsTruncated in the previous response was true, you have more diff --git a/service/route53/types/errors.go b/service/route53/types/errors.go index 4e7dfffef41..520b6b24948 100644 --- a/service/route53/types/errors.go +++ b/service/route53/types/errors.go @@ -1087,9 +1087,9 @@ func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.Fau // (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html). // To request a higher limit, create a case (http://aws.amazon.com/route53-request) // with the Amazon Web Services Support Center. You have reached the maximum number -// of active health checks for an account. To request a higher limit, create a case -// (http://aws.amazon.com/route53-request) with the Amazon Web Services Support -// Center. +// of active health checks for an Amazon Web Services account. To request a higher +// limit, create a case (http://aws.amazon.com/route53-request) with the Amazon Web +// Services Support Center. type TooManyHealthChecks struct { Message *string diff --git a/service/route53/types/types.go b/service/route53/types/types.go index cf876f09193..2e73527e43a 100644 --- a/service/route53/types/types.go +++ b/service/route53/types/types.go @@ -145,9 +145,9 @@ type AliasTarget struct { // attribute for the environment. You can use the following methods to get the // value of the CNAME attribute: // - // * Management Console: For information about how - // to get the value by using the console, see Using Custom Domains with Elastic - // Beanstalk + // * Amazon Web Services Management Console: For + // information about how to get the value by using the console, see Using Custom + // Domains with Elastic Beanstalk // (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customdomains.html) in // the Elastic Beanstalk Developer Guide. // @@ -164,21 +164,22 @@ type AliasTarget struct { // in the CLI Command Reference. // // ELB load balancer Specify the DNS name that is - // associated with the load balancer. Get the DNS name by using the Management - // Console, the ELB API, or the CLI. + // associated with the load balancer. Get the DNS name by using the Amazon Web + // Services Management Console, the ELB API, or the CLI. // - // * Management Console: Go to the EC2 page, - // choose Load Balancers in the navigation pane, choose the load balancer, choose - // the Description tab, and get the value of the DNS name field. If you're routing - // traffic to a Classic Load Balancer, get the value that begins with dualstack. If - // you're routing traffic to another type of load balancer, get the value that - // applies to the record type, A or AAAA. + // * Amazon Web Services + // Management Console: Go to the EC2 page, choose Load Balancers in the navigation + // pane, choose the load balancer, choose the Description tab, and get the value of + // the DNS name field. If you're routing traffic to a Classic Load Balancer, get + // the value that begins with dualstack. If you're routing traffic to another type + // of load balancer, get the value that applies to the record type, A or AAAA. // - // * Elastic Load Balancing API: Use - // DescribeLoadBalancers to get the value of DNSName. For more information, see the - // applicable guide: + // * + // Elastic Load Balancing API: Use DescribeLoadBalancers to get the value of + // DNSName. For more information, see the applicable guide: // - // * Classic Load Balancers: DescribeLoadBalancers + // * Classic Load + // Balancers: DescribeLoadBalancers // (https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html) // // * @@ -321,10 +322,10 @@ type AliasTarget struct { // you created your load balancer in. Note that there are separate columns for // Application and Classic Load Balancers and for Network Load Balancers. // - // * - // Management Console: Go to the Amazon EC2 page, choose Load Balancers in the - // navigation pane, select the load balancer, and get the value of the Hosted zone - // field on the Description tab. + // * Amazon + // Web Services Management Console: Go to the Amazon EC2 page, choose Load + // Balancers in the navigation pane, select the load balancer, and get the value of + // the Hosted zone field on the Description tab. // // * Elastic Load Balancing API: Use // DescribeLoadBalancers to get the applicable value. For more information, see the @@ -955,8 +956,10 @@ type HealthCheckConfig struct { // parameters, for example, /welcome.html?language=jp&login=y. ResourcePath *string - // The Amazon Resource Name (ARN) for Route53 Application Recovery Controller - // routing control. + // The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller + // routing control. For more information about Route 53 Application Recovery + // Controller, see Route 53 Application Recovery Controller Developer Guide. + // (https://docs.aws.amazon.com/r53recovery/latest/dg/what-is-route-53-recovery.html). RoutingControlArn *string // If the value of Type is HTTP_STR_MATCH or HTTPS_STR_MATCH, the string that you @@ -1070,11 +1073,11 @@ type HostedZoneLimit struct { // OwningAccount, there is no value for OwningService, and vice versa. type HostedZoneOwner struct { - // If the hosted zone was created by an account, or was created by an Amazon Web - // Services service that creates hosted zones using the current account, - // OwningAccount contains the account ID of that account. For example, when you use - // Cloud Map to create a hosted zone, Cloud Map creates the hosted zone using the - // current account. + // If the hosted zone was created by an Amazon Web Services account, or was created + // by an Amazon Web Services service that creates hosted zones using the current + // account, OwningAccount contains the account ID of that account. For example, + // when you use Cloud Map to create a hosted zone, Cloud Map creates the hosted + // zone using the current Amazon Web Services account. OwningAccount *string // If an Amazon Web Services service uses its own account to create a hosted zone @@ -1105,7 +1108,8 @@ type HostedZoneSummary struct { Name *string // The owner of a private hosted zone that the specified VPC is associated with. - // The owner can be either an account or an Amazon Web Services service. + // The owner can be either an Amazon Web Services account or an Amazon Web Services + // service. // // This member is required. Owner *HostedZoneOwner @@ -1909,7 +1913,7 @@ type TrafficPolicyInstance struct { } // A complex type that contains information about the latest version of one traffic -// policy that is associated with the current account. +// policy that is associated with the current Amazon Web Services account. type TrafficPolicySummary struct { // The ID that Amazon Route 53 assigned to the traffic policy when you created it. @@ -1927,7 +1931,8 @@ type TrafficPolicySummary struct { // This member is required. Name *string - // The number of traffic policies that are associated with the current account. + // The number of traffic policies that are associated with the current Amazon Web + // Services account. // // This member is required. TrafficPolicyCount *int32 diff --git a/service/snowdevicemanagement/LICENSE.txt b/service/snowdevicemanagement/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/snowdevicemanagement/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/service/snowdevicemanagement/api_client.go b/service/snowdevicemanagement/api_client.go new file mode 100644 index 00000000000..56b35d69d2f --- /dev/null +++ b/service/snowdevicemanagement/api_client.go @@ -0,0 +1,262 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "time" +) + +const ServiceID = "Snow Device Management" +const ServiceAPIVersion = "2021-08-04" + +// Client provides the API client to make operations call for AWS Snow Device +// Management. +type Client struct { + options Options +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveDefaultEndpointConfiguration(&options) + + for _, fn := range optFns { + fn(&options) + } + + client := &Client{ + options: options, + } + + return client +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + EndpointResolver EndpointResolver + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. + Retryer aws.Retryer + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// WithEndpointResolver returns a functional option for setting the Client's +// EndpointResolver option. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + return to +} +func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { + ctx = middleware.ClearStackValues(ctx) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + for _, fn := range optFns { + fn(&options) + } + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + if o.HTTPClient != nil { + return + } + o.HTTPClient = awshttp.NewBuildableClient() +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + o.Retryer = retry.NewStandard() +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "snowdevicemanagement", goModuleVersion)(stack) +} + +func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { + mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ + CredentialsProvider: o.Credentials, + Signer: o.HTTPSignerV4, + LogSigning: o.ClientLogMode.IsSigning(), + }) + return stack.Finalize.Add(mw, middleware.After) +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func addRetryMiddlewares(stack *middleware.Stack, o Options) error { + mo := retry.AddRetryMiddlewaresOptions{ + Retryer: o.Retryer, + LogRetryAttempts: o.ClientLogMode.IsRetries(), + } + return retry.AddRetryMiddlewares(stack, mo) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return awshttp.AddResponseErrorMiddleware(stack) +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} diff --git a/service/snowdevicemanagement/api_op_CancelTask.go b/service/snowdevicemanagement/api_op_CancelTask.go new file mode 100644 index 00000000000..2d9897a52ff --- /dev/null +++ b/service/snowdevicemanagement/api_op_CancelTask.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +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" +) + +// Sends a cancel request for a specified task. You can cancel a task only if it's +// still in a QUEUED state. Tasks that are already running can't be cancelled. A +// task might still run if it's processed from the queue before the CancelTask +// operation changes the task's state. +func (c *Client) CancelTask(ctx context.Context, params *CancelTaskInput, optFns ...func(*Options)) (*CancelTaskOutput, error) { + if params == nil { + params = &CancelTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CancelTask", params, optFns, c.addOperationCancelTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CancelTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CancelTaskInput struct { + + // The ID of the task that you are attempting to cancel. You can retrieve a task ID + // by using the ListTasks operation. + // + // This member is required. + TaskId *string + + noSmithyDocumentSerde +} + +type CancelTaskOutput struct { + + // The ID of the task that you are attempting to cancel. + TaskId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCancelTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCancelTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCancelTask{}, 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 = addOpCancelTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelTask(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_opCancelTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "snow-device-management", + OperationName: "CancelTask", + } +} diff --git a/service/snowdevicemanagement/api_op_CreateTask.go b/service/snowdevicemanagement/api_op_CreateTask.go new file mode 100644 index 00000000000..57dbf5f5c45 --- /dev/null +++ b/service/snowdevicemanagement/api_op_CreateTask.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +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/snowdevicemanagement/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Instructs one or more devices to start a task, such as unlocking or rebooting. +func (c *Client) CreateTask(ctx context.Context, params *CreateTaskInput, optFns ...func(*Options)) (*CreateTaskOutput, error) { + if params == nil { + params = &CreateTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateTask", params, optFns, c.addOperationCreateTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateTaskInput struct { + + // The task to be performed. Only one task is executed on a device at a time. + // + // This member is required. + Command types.Command + + // A list of managed device IDs. + // + // This member is required. + Targets []string + + // A token ensuring that the action is called only once with the specified details. + ClientToken *string + + // A description of the task and its targets. + Description *string + + // Optional metadata that you assign to a resource. You can use tags to categorize + // a resource in different ways, such as by purpose, owner, or environment. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateTaskOutput struct { + + // The Amazon Resource Name (ARN) of the task that you created. + TaskArn *string + + // The ID of the task that you created. + TaskId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateTask{}, 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 = addOpCreateTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTask(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_opCreateTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "snow-device-management", + OperationName: "CreateTask", + } +} diff --git a/service/snowdevicemanagement/api_op_DescribeDevice.go b/service/snowdevicemanagement/api_op_DescribeDevice.go new file mode 100644 index 00000000000..9a3b8e06501 --- /dev/null +++ b/service/snowdevicemanagement/api_op_DescribeDevice.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +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/snowdevicemanagement/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Checks device-specific information, such as the device type, software version, +// IP addresses, and lock status. +func (c *Client) DescribeDevice(ctx context.Context, params *DescribeDeviceInput, optFns ...func(*Options)) (*DescribeDeviceOutput, error) { + if params == nil { + params = &DescribeDeviceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDevice", params, optFns, c.addOperationDescribeDeviceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDeviceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeDeviceInput struct { + + // The ID of the device that you are checking the information of. + // + // This member is required. + ManagedDeviceId *string + + noSmithyDocumentSerde +} + +type DescribeDeviceOutput struct { + + // The ID of the job used when ordering the device. + AssociatedWithJob *string + + // The hardware specifications of the device. + DeviceCapacities []types.Capacity + + // The current state of the device. + DeviceState types.UnlockState + + // The type of Amazon Web Services Snow Family device. + DeviceType *string + + // When the device last contacted the Amazon Web Services Cloud. Indicates that the + // device is online. + LastReachedOutAt *time.Time + + // When the device last pushed an update to the Amazon Web Services Cloud. + // Indicates when the device cache was refreshed. + LastUpdatedAt *time.Time + + // The Amazon Resource Name (ARN) of the device. + ManagedDeviceArn *string + + // The ID of the device that you checked the information for. + ManagedDeviceId *string + + // The network interfaces available on the device. + PhysicalNetworkInterfaces []types.PhysicalNetworkInterface + + // The software installed on the device. + Software *types.SoftwareInformation + + // Optional metadata that you assign to a resource. You can use tags to categorize + // a resource in different ways, such as by purpose, owner, or environment. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDeviceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeDevice{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeDevice{}, 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 = addOpDescribeDeviceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDevice(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_opDescribeDevice(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "snow-device-management", + OperationName: "DescribeDevice", + } +} diff --git a/service/snowdevicemanagement/api_op_DescribeDeviceEc2Instances.go b/service/snowdevicemanagement/api_op_DescribeDeviceEc2Instances.go new file mode 100644 index 00000000000..11489e757c5 --- /dev/null +++ b/service/snowdevicemanagement/api_op_DescribeDeviceEc2Instances.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +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/snowdevicemanagement/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Checks the current state of the Amazon EC2 instances. The output is similar to +// describeDevice, but the results are sourced from the device cache in the Amazon +// Web Services Cloud and include a subset of the available fields. +func (c *Client) DescribeDeviceEc2Instances(ctx context.Context, params *DescribeDeviceEc2InstancesInput, optFns ...func(*Options)) (*DescribeDeviceEc2InstancesOutput, error) { + if params == nil { + params = &DescribeDeviceEc2InstancesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDeviceEc2Instances", params, optFns, c.addOperationDescribeDeviceEc2InstancesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDeviceEc2InstancesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeDeviceEc2InstancesInput struct { + + // A list of instance IDs associated with the managed device. + // + // This member is required. + InstanceIds []string + + // The ID of the managed device. + // + // This member is required. + ManagedDeviceId *string + + noSmithyDocumentSerde +} + +type DescribeDeviceEc2InstancesOutput struct { + + // A list of structures containing information about each instance. + Instances []types.InstanceSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDeviceEc2InstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeDeviceEc2Instances{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeDeviceEc2Instances{}, 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 = addOpDescribeDeviceEc2InstancesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDeviceEc2Instances(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_opDescribeDeviceEc2Instances(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "snow-device-management", + OperationName: "DescribeDeviceEc2Instances", + } +} diff --git a/service/snowdevicemanagement/api_op_DescribeExecution.go b/service/snowdevicemanagement/api_op_DescribeExecution.go new file mode 100644 index 00000000000..5d5cc26c43c --- /dev/null +++ b/service/snowdevicemanagement/api_op_DescribeExecution.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +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/snowdevicemanagement/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Checks the status of a remote task running on one or more target devices. +func (c *Client) DescribeExecution(ctx context.Context, params *DescribeExecutionInput, optFns ...func(*Options)) (*DescribeExecutionOutput, error) { + if params == nil { + params = &DescribeExecutionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeExecution", params, optFns, c.addOperationDescribeExecutionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeExecutionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeExecutionInput struct { + + // The ID of the managed device. + // + // This member is required. + ManagedDeviceId *string + + // The ID of the task that the action is describing. + // + // This member is required. + TaskId *string + + noSmithyDocumentSerde +} + +type DescribeExecutionOutput struct { + + // The ID of the execution. + ExecutionId *string + + // When the status of the execution was last updated. + LastUpdatedAt *time.Time + + // The ID of the managed device that the task is being executed on. + ManagedDeviceId *string + + // When the execution began. + StartedAt *time.Time + + // The current state of the execution. + State types.ExecutionState + + // The ID of the task being executed on the device. + TaskId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeExecution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeExecution{}, 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 = addOpDescribeExecutionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeExecution(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_opDescribeExecution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "snow-device-management", + OperationName: "DescribeExecution", + } +} diff --git a/service/snowdevicemanagement/api_op_DescribeTask.go b/service/snowdevicemanagement/api_op_DescribeTask.go new file mode 100644 index 00000000000..ee452631763 --- /dev/null +++ b/service/snowdevicemanagement/api_op_DescribeTask.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +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/snowdevicemanagement/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Checks the metadata for a given task on a device. +func (c *Client) DescribeTask(ctx context.Context, params *DescribeTaskInput, optFns ...func(*Options)) (*DescribeTaskOutput, error) { + if params == nil { + params = &DescribeTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeTask", params, optFns, c.addOperationDescribeTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeTaskInput struct { + + // The ID of the task to be described. + // + // This member is required. + TaskId *string + + noSmithyDocumentSerde +} + +type DescribeTaskOutput struct { + + // When the task was completed. + CompletedAt *time.Time + + // When the CreateTask operation was called. + CreatedAt *time.Time + + // The description provided of the task and managed devices. + Description *string + + // When the state of the task was last updated. + LastUpdatedAt *time.Time + + // The current state of the task. + State types.TaskState + + // Optional metadata that you assign to a resource. You can use tags to categorize + // a resource in different ways, such as by purpose, owner, or environment. + Tags map[string]string + + // The managed devices that the task was sent to. + Targets []string + + // The Amazon Resource Name (ARN) of the task. + TaskArn *string + + // The ID of the task. + TaskId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeTask{}, 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 = addOpDescribeTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTask(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_opDescribeTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "snow-device-management", + OperationName: "DescribeTask", + } +} diff --git a/service/snowdevicemanagement/api_op_ListDeviceResources.go b/service/snowdevicemanagement/api_op_ListDeviceResources.go new file mode 100644 index 00000000000..8b4051159ff --- /dev/null +++ b/service/snowdevicemanagement/api_op_ListDeviceResources.go @@ -0,0 +1,222 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +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/snowdevicemanagement/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of the Amazon Web Services resources available for a device. +// Currently, Amazon EC2 instances are the only supported resource type. +func (c *Client) ListDeviceResources(ctx context.Context, params *ListDeviceResourcesInput, optFns ...func(*Options)) (*ListDeviceResourcesOutput, error) { + if params == nil { + params = &ListDeviceResourcesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDeviceResources", params, optFns, c.addOperationListDeviceResourcesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDeviceResourcesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDeviceResourcesInput struct { + + // The ID of the managed device that you are listing the resources of. + // + // This member is required. + ManagedDeviceId *string + + // The maximum number of resources per page. + MaxResults *int32 + + // A pagination token to continue to the next page of results. + NextToken *string + + // A structure used to filter the results by type of resource. + Type *string + + noSmithyDocumentSerde +} + +type ListDeviceResourcesOutput struct { + + // A pagination token to continue to the next page of results. + NextToken *string + + // A structure defining the resource's type, Amazon Resource Name (ARN), and ID. + Resources []types.ResourceSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDeviceResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListDeviceResources{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListDeviceResources{}, 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 = addOpListDeviceResourcesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeviceResources(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 +} + +// ListDeviceResourcesAPIClient is a client that implements the ListDeviceResources +// operation. +type ListDeviceResourcesAPIClient interface { + ListDeviceResources(context.Context, *ListDeviceResourcesInput, ...func(*Options)) (*ListDeviceResourcesOutput, error) +} + +var _ ListDeviceResourcesAPIClient = (*Client)(nil) + +// ListDeviceResourcesPaginatorOptions is the paginator options for +// ListDeviceResources +type ListDeviceResourcesPaginatorOptions struct { + // The maximum number of resources per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListDeviceResourcesPaginator is a paginator for ListDeviceResources +type ListDeviceResourcesPaginator struct { + options ListDeviceResourcesPaginatorOptions + client ListDeviceResourcesAPIClient + params *ListDeviceResourcesInput + nextToken *string + firstPage bool +} + +// NewListDeviceResourcesPaginator returns a new ListDeviceResourcesPaginator +func NewListDeviceResourcesPaginator(client ListDeviceResourcesAPIClient, params *ListDeviceResourcesInput, optFns ...func(*ListDeviceResourcesPaginatorOptions)) *ListDeviceResourcesPaginator { + if params == nil { + params = &ListDeviceResourcesInput{} + } + + options := ListDeviceResourcesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListDeviceResourcesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListDeviceResourcesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListDeviceResources page. +func (p *ListDeviceResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDeviceResourcesOutput, 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.ListDeviceResources(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_opListDeviceResources(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "snow-device-management", + OperationName: "ListDeviceResources", + } +} diff --git a/service/snowdevicemanagement/api_op_ListDevices.go b/service/snowdevicemanagement/api_op_ListDevices.go new file mode 100644 index 00000000000..c5cc4811f33 --- /dev/null +++ b/service/snowdevicemanagement/api_op_ListDevices.go @@ -0,0 +1,213 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +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/snowdevicemanagement/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of all devices on your Amazon Web Services account that have +// Amazon Web Services Snow Device Management enabled in the Amazon Web Services +// Region where the command is run. +func (c *Client) ListDevices(ctx context.Context, params *ListDevicesInput, optFns ...func(*Options)) (*ListDevicesOutput, error) { + if params == nil { + params = &ListDevicesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDevices", params, optFns, c.addOperationListDevicesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDevicesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDevicesInput struct { + + // The ID of the job used to order the device. + JobId *string + + // The maximum number of devices to list per page. + MaxResults *int32 + + // A pagination token to continue to the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListDevicesOutput struct { + + // A list of device structures that contain information about the device. + Devices []types.DeviceSummary + + // A pagination token to continue to the next page of devices. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListDevices{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListDevices{}, 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_opListDevices(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 +} + +// ListDevicesAPIClient is a client that implements the ListDevices operation. +type ListDevicesAPIClient interface { + ListDevices(context.Context, *ListDevicesInput, ...func(*Options)) (*ListDevicesOutput, error) +} + +var _ ListDevicesAPIClient = (*Client)(nil) + +// ListDevicesPaginatorOptions is the paginator options for ListDevices +type ListDevicesPaginatorOptions struct { + // The maximum number of devices to list per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListDevicesPaginator is a paginator for ListDevices +type ListDevicesPaginator struct { + options ListDevicesPaginatorOptions + client ListDevicesAPIClient + params *ListDevicesInput + nextToken *string + firstPage bool +} + +// NewListDevicesPaginator returns a new ListDevicesPaginator +func NewListDevicesPaginator(client ListDevicesAPIClient, params *ListDevicesInput, optFns ...func(*ListDevicesPaginatorOptions)) *ListDevicesPaginator { + if params == nil { + params = &ListDevicesInput{} + } + + options := ListDevicesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListDevicesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListDevicesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListDevices page. +func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDevicesOutput, 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.ListDevices(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_opListDevices(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "snow-device-management", + OperationName: "ListDevices", + } +} diff --git a/service/snowdevicemanagement/api_op_ListExecutions.go b/service/snowdevicemanagement/api_op_ListExecutions.go new file mode 100644 index 00000000000..e08328867f6 --- /dev/null +++ b/service/snowdevicemanagement/api_op_ListExecutions.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +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/snowdevicemanagement/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the status of tasks for one or more target devices. +func (c *Client) ListExecutions(ctx context.Context, params *ListExecutionsInput, optFns ...func(*Options)) (*ListExecutionsOutput, error) { + if params == nil { + params = &ListExecutionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListExecutions", params, optFns, c.addOperationListExecutionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListExecutionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListExecutionsInput struct { + + // The ID of the task. + // + // This member is required. + TaskId *string + + // The maximum number of tasks to list per page. + MaxResults *int32 + + // A pagination token to continue to the next page of tasks. + NextToken *string + + // A structure used to filter the tasks by their current state. + State types.ExecutionState + + noSmithyDocumentSerde +} + +type ListExecutionsOutput struct { + + // A list of executions. Each execution contains the task ID, the device that the + // task is executing on, the execution ID, and the status of the execution. + Executions []types.ExecutionSummary + + // A pagination token to continue to the next page of executions. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListExecutionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListExecutions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListExecutions{}, 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 = addOpListExecutionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExecutions(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 +} + +// ListExecutionsAPIClient is a client that implements the ListExecutions +// operation. +type ListExecutionsAPIClient interface { + ListExecutions(context.Context, *ListExecutionsInput, ...func(*Options)) (*ListExecutionsOutput, error) +} + +var _ ListExecutionsAPIClient = (*Client)(nil) + +// ListExecutionsPaginatorOptions is the paginator options for ListExecutions +type ListExecutionsPaginatorOptions struct { + // The maximum number of tasks to list per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListExecutionsPaginator is a paginator for ListExecutions +type ListExecutionsPaginator struct { + options ListExecutionsPaginatorOptions + client ListExecutionsAPIClient + params *ListExecutionsInput + nextToken *string + firstPage bool +} + +// NewListExecutionsPaginator returns a new ListExecutionsPaginator +func NewListExecutionsPaginator(client ListExecutionsAPIClient, params *ListExecutionsInput, optFns ...func(*ListExecutionsPaginatorOptions)) *ListExecutionsPaginator { + if params == nil { + params = &ListExecutionsInput{} + } + + options := ListExecutionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListExecutionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListExecutionsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListExecutions page. +func (p *ListExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListExecutionsOutput, 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.ListExecutions(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_opListExecutions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "snow-device-management", + OperationName: "ListExecutions", + } +} diff --git a/service/snowdevicemanagement/api_op_ListTagsForResource.go b/service/snowdevicemanagement/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..96e40f817d3 --- /dev/null +++ b/service/snowdevicemanagement/api_op_ListTagsForResource.go @@ -0,0 +1,120 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +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" +) + +// Returns a list of tags for a managed device or task. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The Amazon Resource Name (ARN) of the device or task. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // The list of tags for the device or task. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, 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 = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(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_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "snow-device-management", + OperationName: "ListTagsForResource", + } +} diff --git a/service/snowdevicemanagement/api_op_ListTasks.go b/service/snowdevicemanagement/api_op_ListTasks.go new file mode 100644 index 00000000000..cc004e1fc15 --- /dev/null +++ b/service/snowdevicemanagement/api_op_ListTasks.go @@ -0,0 +1,211 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +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/snowdevicemanagement/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of tasks that can be filtered by state. +func (c *Client) ListTasks(ctx context.Context, params *ListTasksInput, optFns ...func(*Options)) (*ListTasksOutput, error) { + if params == nil { + params = &ListTasksInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTasks", params, optFns, c.addOperationListTasksMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTasksOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTasksInput struct { + + // The maximum number of tasks per page. + MaxResults *int32 + + // A pagination token to continue to the next page of tasks. + NextToken *string + + // A structure used to filter the list of tasks. + State types.TaskState + + noSmithyDocumentSerde +} + +type ListTasksOutput struct { + + // A pagination token to continue to the next page of tasks. + NextToken *string + + // A list of task structures containing details about each task. + Tasks []types.TaskSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTasks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTasks{}, 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_opListTasks(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 +} + +// ListTasksAPIClient is a client that implements the ListTasks operation. +type ListTasksAPIClient interface { + ListTasks(context.Context, *ListTasksInput, ...func(*Options)) (*ListTasksOutput, error) +} + +var _ ListTasksAPIClient = (*Client)(nil) + +// ListTasksPaginatorOptions is the paginator options for ListTasks +type ListTasksPaginatorOptions struct { + // The maximum number of tasks per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListTasksPaginator is a paginator for ListTasks +type ListTasksPaginator struct { + options ListTasksPaginatorOptions + client ListTasksAPIClient + params *ListTasksInput + nextToken *string + firstPage bool +} + +// NewListTasksPaginator returns a new ListTasksPaginator +func NewListTasksPaginator(client ListTasksAPIClient, params *ListTasksInput, optFns ...func(*ListTasksPaginatorOptions)) *ListTasksPaginator { + if params == nil { + params = &ListTasksInput{} + } + + options := ListTasksPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListTasksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListTasksPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListTasks page. +func (p *ListTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTasksOutput, 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.ListTasks(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_opListTasks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "snow-device-management", + OperationName: "ListTasks", + } +} diff --git a/service/snowdevicemanagement/api_op_TagResource.go b/service/snowdevicemanagement/api_op_TagResource.go new file mode 100644 index 00000000000..8432e2210be --- /dev/null +++ b/service/snowdevicemanagement/api_op_TagResource.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +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" +) + +// Adds or replaces tags on a device or task. +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The Amazon Resource Name (ARN) of the device or task. + // + // This member is required. + ResourceArn *string + + // Optional metadata that you assign to a resource. You can use tags to categorize + // a resource in different ways, such as by purpose, owner, or environment. + // + // This member is required. + Tags map[string]string + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, 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 = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(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_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "snow-device-management", + OperationName: "TagResource", + } +} diff --git a/service/snowdevicemanagement/api_op_UntagResource.go b/service/snowdevicemanagement/api_op_UntagResource.go new file mode 100644 index 00000000000..28c50899228 --- /dev/null +++ b/service/snowdevicemanagement/api_op_UntagResource.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +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" +) + +// Removes a tag from a device or task. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The Amazon Resource Name (ARN) of the device or task. + // + // This member is required. + ResourceArn *string + + // Optional metadata that you assign to a resource. You can use tags to categorize + // a resource in different ways, such as by purpose, owner, or environment. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, 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 = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(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_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "snow-device-management", + OperationName: "UntagResource", + } +} diff --git a/service/snowdevicemanagement/deserializers.go b/service/snowdevicemanagement/deserializers.go new file mode 100644 index 00000000000..c4fd62c18ff --- /dev/null +++ b/service/snowdevicemanagement/deserializers.go @@ -0,0 +1,4053 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "strings" +) + +type awsRestjson1_deserializeOpCancelTask struct { +} + +func (*awsRestjson1_deserializeOpCancelTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCancelTask) 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_deserializeOpErrorCancelTask(response, &metadata) + } + output := &CancelTaskOutput{} + 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_deserializeOpDocumentCancelTaskOutput(&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_deserializeOpErrorCancelTask(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_deserializeOpDocumentCancelTaskOutput(v **CancelTaskOutput, 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 *CancelTaskOutput + if *v == nil { + sv = &CancelTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "taskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateTask struct { +} + +func (*awsRestjson1_deserializeOpCreateTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateTask) 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_deserializeOpErrorCreateTask(response, &metadata) + } + output := &CreateTaskOutput{} + 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_deserializeOpDocumentCreateTaskOutput(&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_deserializeOpErrorCreateTask(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_deserializeOpDocumentCreateTaskOutput(v **CreateTaskOutput, 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 *CreateTaskOutput + if *v == nil { + sv = &CreateTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "taskArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TaskArn = ptr.String(jtv) + } + + case "taskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDevice struct { +} + +func (*awsRestjson1_deserializeOpDescribeDevice) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDevice) 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_deserializeOpErrorDescribeDevice(response, &metadata) + } + output := &DescribeDeviceOutput{} + 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_deserializeOpDocumentDescribeDeviceOutput(&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_deserializeOpErrorDescribeDevice(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_deserializeOpDocumentDescribeDeviceOutput(v **DescribeDeviceOutput, 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 *DescribeDeviceOutput + if *v == nil { + sv = &DescribeDeviceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "associatedWithJob": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AssociatedWithJob = ptr.String(jtv) + } + + case "deviceCapacities": + if err := awsRestjson1_deserializeDocumentCapacityList(&sv.DeviceCapacities, value); err != nil { + return err + } + + case "deviceState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UnlockState to be of type string, got %T instead", value) + } + sv.DeviceState = types.UnlockState(jtv) + } + + case "deviceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DeviceType = ptr.String(jtv) + } + + case "lastReachedOutAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastReachedOutAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "lastUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "managedDeviceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ManagedDeviceArn = ptr.String(jtv) + } + + case "managedDeviceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ManagedDeviceId to be of type string, got %T instead", value) + } + sv.ManagedDeviceId = ptr.String(jtv) + } + + case "physicalNetworkInterfaces": + if err := awsRestjson1_deserializeDocumentPhysicalNetworkInterfaceList(&sv.PhysicalNetworkInterfaces, value); err != nil { + return err + } + + case "software": + if err := awsRestjson1_deserializeDocumentSoftwareInformation(&sv.Software, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDeviceEc2Instances struct { +} + +func (*awsRestjson1_deserializeOpDescribeDeviceEc2Instances) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDeviceEc2Instances) 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_deserializeOpErrorDescribeDeviceEc2Instances(response, &metadata) + } + output := &DescribeDeviceEc2InstancesOutput{} + 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_deserializeOpDocumentDescribeDeviceEc2InstancesOutput(&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_deserializeOpErrorDescribeDeviceEc2Instances(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_deserializeOpDocumentDescribeDeviceEc2InstancesOutput(v **DescribeDeviceEc2InstancesOutput, 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 *DescribeDeviceEc2InstancesOutput + if *v == nil { + sv = &DescribeDeviceEc2InstancesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "instances": + if err := awsRestjson1_deserializeDocumentInstanceSummaryList(&sv.Instances, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeExecution struct { +} + +func (*awsRestjson1_deserializeOpDescribeExecution) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeExecution) 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_deserializeOpErrorDescribeExecution(response, &metadata) + } + output := &DescribeExecutionOutput{} + 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_deserializeOpDocumentDescribeExecutionOutput(&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_deserializeOpErrorDescribeExecution(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_deserializeOpDocumentDescribeExecutionOutput(v **DescribeExecutionOutput, 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 *DescribeExecutionOutput + if *v == nil { + sv = &DescribeExecutionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "executionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionId to be of type string, got %T instead", value) + } + sv.ExecutionId = ptr.String(jtv) + } + + case "lastUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "managedDeviceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ManagedDeviceId to be of type string, got %T instead", value) + } + sv.ManagedDeviceId = ptr.String(jtv) + } + + case "startedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionState to be of type string, got %T instead", value) + } + sv.State = types.ExecutionState(jtv) + } + + case "taskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskId to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeTask struct { +} + +func (*awsRestjson1_deserializeOpDescribeTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeTask) 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_deserializeOpErrorDescribeTask(response, &metadata) + } + output := &DescribeTaskOutput{} + 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_deserializeOpDocumentDescribeTaskOutput(&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_deserializeOpErrorDescribeTask(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_deserializeOpDocumentDescribeTaskOutput(v **DescribeTaskOutput, 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 *DescribeTaskOutput + if *v == nil { + sv = &DescribeTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "completedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CompletedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskDescriptionString to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "lastUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskState to be of type string, got %T instead", value) + } + sv.State = types.TaskState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "targets": + if err := awsRestjson1_deserializeDocumentTargetList(&sv.Targets, value); err != nil { + return err + } + + case "taskArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TaskArn = ptr.String(jtv) + } + + case "taskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListDeviceResources struct { +} + +func (*awsRestjson1_deserializeOpListDeviceResources) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListDeviceResources) 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_deserializeOpErrorListDeviceResources(response, &metadata) + } + output := &ListDeviceResourcesOutput{} + 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_deserializeOpDocumentListDeviceResourcesOutput(&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_deserializeOpErrorListDeviceResources(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_deserializeOpDocumentListDeviceResourcesOutput(v **ListDeviceResourcesOutput, 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 *ListDeviceResourcesOutput + if *v == nil { + sv = &ListDeviceResourcesOutput{} + } 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 NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "resources": + if err := awsRestjson1_deserializeDocumentResourceSummaryList(&sv.Resources, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListDevices struct { +} + +func (*awsRestjson1_deserializeOpListDevices) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListDevices) 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_deserializeOpErrorListDevices(response, &metadata) + } + output := &ListDevicesOutput{} + 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_deserializeOpDocumentListDevicesOutput(&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_deserializeOpErrorListDevices(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("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_deserializeOpDocumentListDevicesOutput(v **ListDevicesOutput, 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 *ListDevicesOutput + if *v == nil { + sv = &ListDevicesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "devices": + if err := awsRestjson1_deserializeDocumentDeviceSummaryList(&sv.Devices, 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListExecutions struct { +} + +func (*awsRestjson1_deserializeOpListExecutions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListExecutions) 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_deserializeOpErrorListExecutions(response, &metadata) + } + output := &ListExecutionsOutput{} + 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_deserializeOpDocumentListExecutionsOutput(&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_deserializeOpErrorListExecutions(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_deserializeOpDocumentListExecutionsOutput(v **ListExecutionsOutput, 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 *ListExecutionsOutput + if *v == nil { + sv = &ListExecutionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "executions": + if err := awsRestjson1_deserializeDocumentExecutionSummaryList(&sv.Executions, 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + 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("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTasks struct { +} + +func (*awsRestjson1_deserializeOpListTasks) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTasks) 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_deserializeOpErrorListTasks(response, &metadata) + } + output := &ListTasksOutput{} + 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_deserializeOpDocumentListTasksOutput(&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_deserializeOpErrorListTasks(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("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_deserializeOpDocumentListTasksOutput(v **ListTasksOutput, 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 *ListTasksOutput + if *v == nil { + sv = &ListTasksOutput{} + } 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 NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "tasks": + if err := awsRestjson1_deserializeDocumentTaskSummaryList(&sv.Tasks, 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 + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_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("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(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 + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + 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("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +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{} + 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_deserializeDocumentAccessDeniedException(&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_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + 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_deserializeDocumentInternalServerException(&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_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceQuotaExceededException{} + 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_deserializeDocumentServiceQuotaExceededException(&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_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + 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_deserializeDocumentThrottlingException(&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_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + 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_deserializeDocumentValidationException(&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_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, 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.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } 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 awsRestjson1_deserializeDocumentCapacity(v **types.Capacity, 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.Capacity + if *v == nil { + sv = &types.Capacity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "available": + 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.Available = ptr.Int64(i64) + } + + 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 "total": + 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.Total = ptr.Int64(i64) + } + + case "unit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Unit = ptr.String(jtv) + } + + case "used": + 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.Used = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCapacityList(v *[]types.Capacity, 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.Capacity + if *v == nil { + cv = []types.Capacity{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Capacity + destAddr := &col + if err := awsRestjson1_deserializeDocumentCapacity(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCpuOptions(v **types.CpuOptions, 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.CpuOptions + if *v == nil { + sv = &types.CpuOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "coreCount": + 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.CoreCount = ptr.Int32(int32(i64)) + } + + case "threadsPerCore": + 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.ThreadsPerCore = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDeviceSummary(v **types.DeviceSummary, 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.DeviceSummary + if *v == nil { + sv = &types.DeviceSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "associatedWithJob": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AssociatedWithJob = ptr.String(jtv) + } + + case "managedDeviceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ManagedDeviceArn = ptr.String(jtv) + } + + case "managedDeviceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ManagedDeviceId to be of type string, got %T instead", value) + } + sv.ManagedDeviceId = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDeviceSummaryList(v *[]types.DeviceSummary, 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.DeviceSummary + if *v == nil { + cv = []types.DeviceSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DeviceSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentDeviceSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEbsInstanceBlockDevice(v **types.EbsInstanceBlockDevice, 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.EbsInstanceBlockDevice + if *v == nil { + sv = &types.EbsInstanceBlockDevice{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "attachTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.AttachTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "deleteOnTermination": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.DeleteOnTermination = ptr.Bool(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentStatus to be of type string, got %T instead", value) + } + sv.Status = types.AttachmentStatus(jtv) + } + + case "volumeId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.VolumeId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExecutionSummary(v **types.ExecutionSummary, 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.ExecutionSummary + if *v == nil { + sv = &types.ExecutionSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "executionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionId to be of type string, got %T instead", value) + } + sv.ExecutionId = ptr.String(jtv) + } + + case "managedDeviceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ManagedDeviceId to be of type string, got %T instead", value) + } + sv.ManagedDeviceId = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionState to be of type string, got %T instead", value) + } + sv.State = types.ExecutionState(jtv) + } + + case "taskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskId to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExecutionSummaryList(v *[]types.ExecutionSummary, 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.ExecutionSummary + if *v == nil { + cv = []types.ExecutionSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ExecutionSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentExecutionSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInstance(v **types.Instance, 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.Instance + if *v == nil { + sv = &types.Instance{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "amiLaunchIndex": + 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.AmiLaunchIndex = ptr.Int32(int32(i64)) + } + + case "blockDeviceMappings": + if err := awsRestjson1_deserializeDocumentInstanceBlockDeviceMappingList(&sv.BlockDeviceMappings, value); err != nil { + return err + } + + case "cpuOptions": + if err := awsRestjson1_deserializeDocumentCpuOptions(&sv.CpuOptions, value); err != nil { + return err + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "imageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ImageId = ptr.String(jtv) + } + + case "instanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "instanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.InstanceType = ptr.String(jtv) + } + + case "privateIpAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PrivateIpAddress = ptr.String(jtv) + } + + case "publicIpAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PublicIpAddress = ptr.String(jtv) + } + + case "rootDeviceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RootDeviceName = ptr.String(jtv) + } + + case "securityGroups": + if err := awsRestjson1_deserializeDocumentSecurityGroupIdentifierList(&sv.SecurityGroups, value); err != nil { + return err + } + + case "state": + if err := awsRestjson1_deserializeDocumentInstanceState(&sv.State, value); err != nil { + return err + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInstanceBlockDeviceMapping(v **types.InstanceBlockDeviceMapping, 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.InstanceBlockDeviceMapping + if *v == nil { + sv = &types.InstanceBlockDeviceMapping{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deviceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DeviceName = ptr.String(jtv) + } + + case "ebs": + if err := awsRestjson1_deserializeDocumentEbsInstanceBlockDevice(&sv.Ebs, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInstanceBlockDeviceMappingList(v *[]types.InstanceBlockDeviceMapping, 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.InstanceBlockDeviceMapping + if *v == nil { + cv = []types.InstanceBlockDeviceMapping{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InstanceBlockDeviceMapping + destAddr := &col + if err := awsRestjson1_deserializeDocumentInstanceBlockDeviceMapping(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInstanceState(v **types.InstanceState, 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.InstanceState + if *v == nil { + sv = &types.InstanceState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "code": + 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.Code = ptr.Int32(int32(i64)) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceStateName to be of type string, got %T instead", value) + } + sv.Name = types.InstanceStateName(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInstanceSummary(v **types.InstanceSummary, 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.InstanceSummary + if *v == nil { + sv = &types.InstanceSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "instance": + if err := awsRestjson1_deserializeDocumentInstance(&sv.Instance, value); err != nil { + return err + } + + case "lastUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInstanceSummaryList(v *[]types.InstanceSummary, 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.InstanceSummary + if *v == nil { + cv = []types.InstanceSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InstanceSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentInstanceSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + 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) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } 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 awsRestjson1_deserializeDocumentPhysicalNetworkInterface(v **types.PhysicalNetworkInterface, 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.PhysicalNetworkInterface + if *v == nil { + sv = &types.PhysicalNetworkInterface{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "defaultGateway": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DefaultGateway = ptr.String(jtv) + } + + case "ipAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.IpAddress = ptr.String(jtv) + } + + case "ipAddressAssignment": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IpAddressAssignment to be of type string, got %T instead", value) + } + sv.IpAddressAssignment = types.IpAddressAssignment(jtv) + } + + case "macAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.MacAddress = ptr.String(jtv) + } + + case "netmask": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Netmask = ptr.String(jtv) + } + + case "physicalConnectorType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhysicalConnectorType to be of type string, got %T instead", value) + } + sv.PhysicalConnectorType = types.PhysicalConnectorType(jtv) + } + + case "physicalNetworkInterfaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PhysicalNetworkInterfaceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPhysicalNetworkInterfaceList(v *[]types.PhysicalNetworkInterface, 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.PhysicalNetworkInterface + if *v == nil { + cv = []types.PhysicalNetworkInterface{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PhysicalNetworkInterface + destAddr := &col + if err := awsRestjson1_deserializeDocumentPhysicalNetworkInterface(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, 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.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } 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 awsRestjson1_deserializeDocumentResourceSummary(v **types.ResourceSummary, 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.ResourceSummary + if *v == nil { + sv = &types.ResourceSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "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 "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceSummaryList(v *[]types.ResourceSummary, 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.ResourceSummary + if *v == nil { + cv = []types.ResourceSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourceSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentResourceSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSecurityGroupIdentifier(v **types.SecurityGroupIdentifier, 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.SecurityGroupIdentifier + if *v == nil { + sv = &types.SecurityGroupIdentifier{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "groupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.GroupId = ptr.String(jtv) + } + + 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_deserializeDocumentSecurityGroupIdentifierList(v *[]types.SecurityGroupIdentifier, 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.SecurityGroupIdentifier + if *v == nil { + cv = []types.SecurityGroupIdentifier{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SecurityGroupIdentifier + destAddr := &col + if err := awsRestjson1_deserializeDocumentSecurityGroupIdentifier(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, 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.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } 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 awsRestjson1_deserializeDocumentSoftwareInformation(v **types.SoftwareInformation, 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.SoftwareInformation + if *v == nil { + sv = &types.SoftwareInformation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "installedVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.InstalledVersion = ptr.String(jtv) + } + + case "installingVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.InstallingVersion = ptr.String(jtv) + } + + case "installState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.InstallState = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentTargetList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentTaskSummary(v **types.TaskSummary, 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.TaskSummary + if *v == nil { + sv = &types.TaskSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskState to be of type string, got %T instead", value) + } + sv.State = types.TaskState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "taskArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TaskArn = ptr.String(jtv) + } + + case "taskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskId to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTaskSummaryList(v *[]types.TaskSummary, 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.TaskSummary + if *v == nil { + cv = []types.TaskSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TaskSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentTaskSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, 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.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } 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 awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, 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.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/snowdevicemanagement/doc.go b/service/snowdevicemanagement/doc.go new file mode 100644 index 00000000000..c5b6d29ba6a --- /dev/null +++ b/service/snowdevicemanagement/doc.go @@ -0,0 +1,7 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package snowdevicemanagement provides the API client, operations, and parameter +// types for AWS Snow Device Management. +// +// Amazon Web Services Snow Device Management documentation. +package snowdevicemanagement diff --git a/service/snowdevicemanagement/endpoints.go b/service/snowdevicemanagement/endpoints.go new file mode 100644 index 00000000000..a8af3ddd5ac --- /dev/null +++ b/service/snowdevicemanagement/endpoints.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +func resolveDefaultEndpointConfiguration(o *Options) { + if o.EndpointResolver != nil { + return + } + o.EndpointResolver = NewDefaultEndpointResolver() +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), m.Options) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "snow-device-management" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolver + resolver EndpointResolver +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + if w.awsResolver == nil { + goto fallback + } + endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region) + if err == nil { + return endpoint, nil + } + + if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { + return endpoint, err + } + +fallback: + if w.resolver == nil { + return endpoint, fmt.Errorf("default endpoint resolver provided was nil") + } + return w.resolver.ResolveEndpoint(region, options) +} + +// withEndpointResolver returns an EndpointResolver that first delegates endpoint +// resolution to the awsResolver. If awsResolver returns aws.EndpointNotFoundError +// error, the resolver will use the the provided fallbackResolver for resolution. +// awsResolver and fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver { + return &wrappedEndpointResolver{ + awsResolver: awsResolver, + resolver: fallbackResolver, + } +} diff --git a/service/snowdevicemanagement/generated.json b/service/snowdevicemanagement/generated.json new file mode 100644 index 00000000000..d7a41413975 --- /dev/null +++ b/service/snowdevicemanagement/generated.json @@ -0,0 +1,38 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_op_CancelTask.go", + "api_op_CreateTask.go", + "api_op_DescribeDevice.go", + "api_op_DescribeDeviceEc2Instances.go", + "api_op_DescribeExecution.go", + "api_op_DescribeTask.go", + "api_op_ListDeviceResources.go", + "api_op_ListDevices.go", + "api_op_ListExecutions.go", + "api_op_ListTagsForResource.go", + "api_op_ListTasks.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "protocol_test.go", + "serializers.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "types/types_exported_test.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement", + "unstable": false +} diff --git a/service/snowdevicemanagement/go.mod b/service/snowdevicemanagement/go.mod new file mode 100644 index 00000000000..e286763a7b8 --- /dev/null +++ b/service/snowdevicemanagement/go.mod @@ -0,0 +1,10 @@ +module github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.8.0 + github.com/aws/smithy-go v1.7.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/snowdevicemanagement/go.sum b/service/snowdevicemanagement/go.sum new file mode 100644 index 00000000000..1fe5ea17219 --- /dev/null +++ b/service/snowdevicemanagement/go.sum @@ -0,0 +1,14 @@ +github.com/aws/smithy-go v1.7.0 h1:+cLHMRrDZvQ4wk+KuQ9yH6eEg6KZEJ9RI2IkDqnygCg= +github.com/aws/smithy-go v1.7.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/snowdevicemanagement/go_module_metadata.go b/service/snowdevicemanagement/go_module_metadata.go new file mode 100644 index 00000000000..c3515b1e7f6 --- /dev/null +++ b/service/snowdevicemanagement/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package snowdevicemanagement + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/snowdevicemanagement/internal/endpoints/endpoints.go b/service/snowdevicemanagement/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..cc2c705a095 --- /dev/null +++ b/service/snowdevicemanagement/internal/endpoints/endpoints.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + DisableHTTPS bool +} + +// Resolver Snow Device Management endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := endpoints.Options{ + DisableHTTPS: options.DisableHTTPS, + } + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: endpoints.Endpoint{ + Hostname: "snow-device-management.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: endpoints.Endpoint{ + Hostname: "snow-device-management.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: endpoints.Endpoint{ + Hostname: "snow-device-management.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: endpoints.Endpoint{ + Hostname: "snow-device-management.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: endpoints.Endpoint{ + Hostname: "snow-device-management.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/snowdevicemanagement/internal/endpoints/endpoints_test.go b/service/snowdevicemanagement/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/snowdevicemanagement/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/snowdevicemanagement/protocol_test.go b/service/snowdevicemanagement/protocol_test.go new file mode 100644 index 00000000000..6b0470c026d --- /dev/null +++ b/service/snowdevicemanagement/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement diff --git a/service/snowdevicemanagement/serializers.go b/service/snowdevicemanagement/serializers.go new file mode 100644 index 00000000000..89f2e82a76c --- /dev/null +++ b/service/snowdevicemanagement/serializers.go @@ -0,0 +1,966 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +type awsRestjson1_serializeOpCancelTask struct { +} + +func (*awsRestjson1_serializeOpCancelTask) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCancelTask) 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.(*CancelTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/task/{taskId}/cancel") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCancelTaskInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCancelTaskInput(v *CancelTaskInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.TaskId == nil || len(*v.TaskId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member taskId must not be empty")} + } + if v.TaskId != nil { + if err := encoder.SetURI("taskId").String(*v.TaskId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateTask struct { +} + +func (*awsRestjson1_serializeOpCreateTask) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateTask) 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.(*CreateTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/task") + 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_serializeOpDocumentCreateTaskInput(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_serializeOpHttpBindingsCreateTaskInput(v *CreateTaskInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateTaskInput(v *CreateTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Command != nil { + ok := object.Key("command") + if err := awsRestjson1_serializeDocumentCommand(v.Command, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + if v.Targets != nil { + ok := object.Key("targets") + if err := awsRestjson1_serializeDocumentTargetList(v.Targets, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeDevice struct { +} + +func (*awsRestjson1_serializeOpDescribeDevice) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeDevice) 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.(*DescribeDeviceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/managed-device/{managedDeviceId}/describe") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeDeviceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeDeviceInput(v *DescribeDeviceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ManagedDeviceId == nil || len(*v.ManagedDeviceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member managedDeviceId must not be empty")} + } + if v.ManagedDeviceId != nil { + if err := encoder.SetURI("managedDeviceId").String(*v.ManagedDeviceId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeDeviceEc2Instances struct { +} + +func (*awsRestjson1_serializeOpDescribeDeviceEc2Instances) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeDeviceEc2Instances) 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.(*DescribeDeviceEc2InstancesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/managed-device/{managedDeviceId}/resources/ec2/describe") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeDeviceEc2InstancesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDescribeDeviceEc2InstancesInput(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_serializeOpHttpBindingsDescribeDeviceEc2InstancesInput(v *DescribeDeviceEc2InstancesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ManagedDeviceId == nil || len(*v.ManagedDeviceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member managedDeviceId must not be empty")} + } + if v.ManagedDeviceId != nil { + if err := encoder.SetURI("managedDeviceId").String(*v.ManagedDeviceId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDescribeDeviceEc2InstancesInput(v *DescribeDeviceEc2InstancesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceIds != nil { + ok := object.Key("instanceIds") + if err := awsRestjson1_serializeDocumentInstanceIdsList(v.InstanceIds, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeExecution struct { +} + +func (*awsRestjson1_serializeOpDescribeExecution) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeExecution) 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.(*DescribeExecutionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/task/{taskId}/execution/{managedDeviceId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeExecutionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeExecutionInput(v *DescribeExecutionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ManagedDeviceId == nil || len(*v.ManagedDeviceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member managedDeviceId must not be empty")} + } + if v.ManagedDeviceId != nil { + if err := encoder.SetURI("managedDeviceId").String(*v.ManagedDeviceId); err != nil { + return err + } + } + + if v.TaskId == nil || len(*v.TaskId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member taskId must not be empty")} + } + if v.TaskId != nil { + if err := encoder.SetURI("taskId").String(*v.TaskId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeTask struct { +} + +func (*awsRestjson1_serializeOpDescribeTask) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeTask) 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.(*DescribeTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/task/{taskId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeTaskInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeTaskInput(v *DescribeTaskInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.TaskId == nil || len(*v.TaskId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member taskId must not be empty")} + } + if v.TaskId != nil { + if err := encoder.SetURI("taskId").String(*v.TaskId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListDeviceResources struct { +} + +func (*awsRestjson1_serializeOpListDeviceResources) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListDeviceResources) 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.(*ListDeviceResourcesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/managed-device/{managedDeviceId}/resources") + 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 err := awsRestjson1_serializeOpHttpBindingsListDeviceResourcesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListDeviceResourcesInput(v *ListDeviceResourcesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ManagedDeviceId == nil || len(*v.ManagedDeviceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member managedDeviceId must not be empty")} + } + if v.ManagedDeviceId != nil { + if err := encoder.SetURI("managedDeviceId").String(*v.ManagedDeviceId); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.Type != nil { + encoder.SetQuery("type").String(*v.Type) + } + + return nil +} + +type awsRestjson1_serializeOpListDevices struct { +} + +func (*awsRestjson1_serializeOpListDevices) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListDevices) 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.(*ListDevicesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/managed-devices") + 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 err := awsRestjson1_serializeOpHttpBindingsListDevicesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListDevicesInput(v *ListDevicesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.JobId != nil { + encoder.SetQuery("jobId").String(*v.JobId) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListExecutions struct { +} + +func (*awsRestjson1_serializeOpListExecutions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListExecutions) 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.(*ListExecutionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/executions") + 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 err := awsRestjson1_serializeOpHttpBindingsListExecutionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListExecutionsInput(v *ListExecutionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if len(v.State) > 0 { + encoder.SetQuery("state").String(string(v.State)) + } + + if v.TaskId != nil { + encoder.SetQuery("taskId").String(*v.TaskId) + } + + return nil +} + +type awsRestjson1_serializeOpListTagsForResource struct { +} + +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTagsForResource) 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.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + 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 err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListTasks struct { +} + +func (*awsRestjson1_serializeOpListTasks) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTasks) 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.(*ListTasksInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tasks") + 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 err := awsRestjson1_serializeOpHttpBindingsListTasksInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTasksInput(v *ListTasksInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if len(v.State) > 0 { + encoder.SetQuery("state").String(string(v.State)) + } + + return nil +} + +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) 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.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTagResourceInput(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_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) 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.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + +func awsRestjson1_serializeDocumentCommand(v types.Command, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.CommandMemberReboot: + av := object.Key("reboot") + if err := awsRestjson1_serializeDocumentReboot(&uv.Value, av); err != nil { + return err + } + + case *types.CommandMemberUnlock: + av := object.Key("unlock") + if err := awsRestjson1_serializeDocumentUnlock(&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_serializeDocumentInstanceIdsList(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_serializeDocumentReboot(v *types.Reboot, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + +func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentTargetList(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_serializeDocumentUnlock(v *types.Unlock, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} diff --git a/service/snowdevicemanagement/types/enums.go b/service/snowdevicemanagement/types/enums.go new file mode 100644 index 00000000000..75f6aee92bb --- /dev/null +++ b/service/snowdevicemanagement/types/enums.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type AttachmentStatus string + +// Enum values for AttachmentStatus +const ( + AttachmentStatusAttaching AttachmentStatus = "ATTACHING" + AttachmentStatusAttached AttachmentStatus = "ATTACHED" + AttachmentStatusDetaching AttachmentStatus = "DETACHING" + AttachmentStatusDetached AttachmentStatus = "DETACHED" +) + +// Values returns all known values for AttachmentStatus. 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 (AttachmentStatus) Values() []AttachmentStatus { + return []AttachmentStatus{ + "ATTACHING", + "ATTACHED", + "DETACHING", + "DETACHED", + } +} + +type ExecutionState string + +// Enum values for ExecutionState +const ( + ExecutionStateQueued ExecutionState = "QUEUED" + ExecutionStateInProgress ExecutionState = "IN_PROGRESS" + ExecutionStateCanceled ExecutionState = "CANCELED" + ExecutionStateFailed ExecutionState = "FAILED" + ExecutionStateSucceeded ExecutionState = "SUCCEEDED" + ExecutionStateRejected ExecutionState = "REJECTED" + ExecutionStateTimedOut ExecutionState = "TIMED_OUT" +) + +// Values returns all known values for ExecutionState. 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 (ExecutionState) Values() []ExecutionState { + return []ExecutionState{ + "QUEUED", + "IN_PROGRESS", + "CANCELED", + "FAILED", + "SUCCEEDED", + "REJECTED", + "TIMED_OUT", + } +} + +type InstanceStateName string + +// Enum values for InstanceStateName +const ( + InstanceStateNamePending InstanceStateName = "PENDING" + InstanceStateNameRunning InstanceStateName = "RUNNING" + InstanceStateNameShuttingDown InstanceStateName = "SHUTTING_DOWN" + InstanceStateNameTerminated InstanceStateName = "TERMINATED" + InstanceStateNameStopping InstanceStateName = "STOPPING" + InstanceStateNameStopped InstanceStateName = "STOPPED" +) + +// Values returns all known values for InstanceStateName. 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 (InstanceStateName) Values() []InstanceStateName { + return []InstanceStateName{ + "PENDING", + "RUNNING", + "SHUTTING_DOWN", + "TERMINATED", + "STOPPING", + "STOPPED", + } +} + +type IpAddressAssignment string + +// Enum values for IpAddressAssignment +const ( + IpAddressAssignmentDhcp IpAddressAssignment = "DHCP" + IpAddressAssignmentStatic IpAddressAssignment = "STATIC" +) + +// Values returns all known values for IpAddressAssignment. 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 (IpAddressAssignment) Values() []IpAddressAssignment { + return []IpAddressAssignment{ + "DHCP", + "STATIC", + } +} + +type PhysicalConnectorType string + +// Enum values for PhysicalConnectorType +const ( + PhysicalConnectorTypeRj45 PhysicalConnectorType = "RJ45" + PhysicalConnectorTypeSfpPlus PhysicalConnectorType = "SFP_PLUS" + PhysicalConnectorTypeQsfp PhysicalConnectorType = "QSFP" + PhysicalConnectorTypeRj452 PhysicalConnectorType = "RJ45_2" + PhysicalConnectorTypeWifi PhysicalConnectorType = "WIFI" +) + +// Values returns all known values for PhysicalConnectorType. 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 (PhysicalConnectorType) Values() []PhysicalConnectorType { + return []PhysicalConnectorType{ + "RJ45", + "SFP_PLUS", + "QSFP", + "RJ45_2", + "WIFI", + } +} + +type TaskState string + +// Enum values for TaskState +const ( + TaskStateInProgress TaskState = "IN_PROGRESS" + TaskStateCanceled TaskState = "CANCELED" + TaskStateCompleted TaskState = "COMPLETED" +) + +// Values returns all known values for TaskState. 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 (TaskState) Values() []TaskState { + return []TaskState{ + "IN_PROGRESS", + "CANCELED", + "COMPLETED", + } +} + +type UnlockState string + +// Enum values for UnlockState +const ( + UnlockStateUnlocked UnlockState = "UNLOCKED" + UnlockStateLocked UnlockState = "LOCKED" + UnlockStateUnlocking UnlockState = "UNLOCKING" +) + +// Values returns all known values for UnlockState. 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 (UnlockState) Values() []UnlockState { + return []UnlockState{ + "UNLOCKED", + "LOCKED", + "UNLOCKING", + } +} diff --git a/service/snowdevicemanagement/types/errors.go b/service/snowdevicemanagement/types/errors.go new file mode 100644 index 00000000000..bed0bf7c18d --- /dev/null +++ b/service/snowdevicemanagement/types/errors.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// You don't have sufficient access to perform this action. +type AccessDeniedException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An unexpected error occurred while processing the request. +type InternalServerException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The request references a resource that doesn't exist. +type ResourceNotFoundException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request would cause a service quota to be exceeded. +type ServiceQuotaExceededException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { return "ServiceQuotaExceededException" } +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was denied due to request throttling. +type ThrottlingException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { return "ThrottlingException" } +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The input fails to satisfy the constraints specified by an Amazon Web Services +// service. +type ValidationException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { return "ValidationException" } +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/snowdevicemanagement/types/types.go b/service/snowdevicemanagement/types/types.go new file mode 100644 index 00000000000..cd65b94edff --- /dev/null +++ b/service/snowdevicemanagement/types/types.go @@ -0,0 +1,346 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// The physical capacity of the Amazon Web Services Snow Family device. +type Capacity struct { + + // The amount of capacity available for use on the device. + Available *int64 + + // The name of the type of capacity, such as memory. + Name *string + + // The total capacity on the device. + Total *int64 + + // The unit of measure for the type of capacity. + Unit *string + + // The amount of capacity used on the device. + Used *int64 + + noSmithyDocumentSerde +} + +// The command given to the device to execute. +// +// The following types satisfy this interface: +// CommandMemberUnlock +// CommandMemberReboot +type Command interface { + isCommand() +} + +// Unlocks the device. +type CommandMemberUnlock struct { + Value Unlock + + noSmithyDocumentSerde +} + +func (*CommandMemberUnlock) isCommand() {} + +// Reboots the device. +type CommandMemberReboot struct { + Value Reboot + + noSmithyDocumentSerde +} + +func (*CommandMemberReboot) isCommand() {} + +// The options for how a device's CPU is configured. +type CpuOptions struct { + + // The number of cores that the CPU can use. + CoreCount *int32 + + // The number of threads per core in the CPU. + ThreadsPerCore *int32 + + noSmithyDocumentSerde +} + +// Identifying information about the device. +type DeviceSummary struct { + + // The ID of the job used to order the device. + AssociatedWithJob *string + + // The Amazon Resource Name (ARN) of the device. + ManagedDeviceArn *string + + // The ID of the device. + ManagedDeviceId *string + + // Optional metadata that you assign to a resource. You can use tags to categorize + // a resource in different ways, such as by purpose, owner, or environment. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Describes a parameter used to set up an Amazon Elastic Block Store (Amazon EBS) +// volume in a block device mapping. +type EbsInstanceBlockDevice struct { + + // When the attachment was initiated. + AttachTime *time.Time + + // A value that indicates whether the volume is deleted on instance termination. + DeleteOnTermination *bool + + // The attachment state. + Status AttachmentStatus + + // The ID of the Amazon EBS volume. + VolumeId *string + + noSmithyDocumentSerde +} + +// The summary of a task execution on a specified device. +type ExecutionSummary struct { + + // The ID of the execution. + ExecutionId *string + + // The ID of the managed device that the task is being executed on. + ManagedDeviceId *string + + // The state of the execution. + State ExecutionState + + // The ID of the task. + TaskId *string + + noSmithyDocumentSerde +} + +// The description of an instance. Currently, Amazon EC2 instances are the only +// supported instance type. +type Instance struct { + + // The Amazon Machine Image (AMI) launch index, which you can use to find this + // instance in the launch group. + AmiLaunchIndex *int32 + + // Any block device mapping entries for the instance. + BlockDeviceMappings []InstanceBlockDeviceMapping + + // The CPU options for the instance. + CpuOptions *CpuOptions + + // When the instance was created. + CreatedAt *time.Time + + // The ID of the AMI used to launch the instance. + ImageId *string + + // The ID of the instance. + InstanceId *string + + // The instance type. + InstanceType *string + + // The private IPv4 address assigned to the instance. + PrivateIpAddress *string + + // The public IPv4 address assigned to the instance. + PublicIpAddress *string + + // The device name of the root device volume (for example, /dev/sda1). + RootDeviceName *string + + // The security groups for the instance. + SecurityGroups []SecurityGroupIdentifier + + // The description of the current state of an instance. + State *InstanceState + + // When the instance was last updated. + UpdatedAt *time.Time + + noSmithyDocumentSerde +} + +// The description of a block device mapping. +type InstanceBlockDeviceMapping struct { + + // The block device name. + DeviceName *string + + // The parameters used to automatically set up Amazon Elastic Block Store (Amazon + // EBS) volumes when the instance is launched. + Ebs *EbsInstanceBlockDevice + + noSmithyDocumentSerde +} + +// The description of the current state of an instance. +type InstanceState struct { + + // The state of the instance as a 16-bit unsigned integer. The high byte is all of + // the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and + // 65,535. These numerical values are used for internal purposes and should be + // ignored. The low byte is all of the bits between 2^0 and (2^8)-1, which equals + // decimal values between 0 and 255. The valid values for the instance state code + // are all in the range of the low byte. These values are: + // + // * 0 : pending + // + // * 16 : + // running + // + // * 32 : shutting-down + // + // * 48 : terminated + // + // * 64 : stopping + // + // * 80 : + // stopped + // + // You can ignore the high byte value by zeroing out all of the bits above + // 2^8 or 256 in decimal. + Code *int32 + + // The current state of the instance. + Name InstanceStateName + + noSmithyDocumentSerde +} + +// The details about the instance. +type InstanceSummary struct { + + // A structure containing details about the instance. + Instance *Instance + + // When the instance summary was last updated. + LastUpdatedAt *time.Time + + noSmithyDocumentSerde +} + +// The details about the physical network interface for the device. +type PhysicalNetworkInterface struct { + + // The default gateway of the device. + DefaultGateway *string + + // The IP address of the device. + IpAddress *string + + // A value that describes whether the IP address is dynamic or persistent. + IpAddressAssignment IpAddressAssignment + + // The MAC address of the device. + MacAddress *string + + // The netmask used to divide the IP address into subnets. + Netmask *string + + // The physical connector type. + PhysicalConnectorType PhysicalConnectorType + + // The physical network interface ID. + PhysicalNetworkInterfaceId *string + + noSmithyDocumentSerde +} + +// A structure used to reboot the device. +type Reboot struct { + noSmithyDocumentSerde +} + +// A summary of a resource available on the device. +type ResourceSummary struct { + + // The resource type. + // + // This member is required. + ResourceType *string + + // The Amazon Resource Name (ARN) of the resource. + Arn *string + + // The ID of the resource. + Id *string + + noSmithyDocumentSerde +} + +// Information about the device's security group. +type SecurityGroupIdentifier struct { + + // The security group ID. + GroupId *string + + // The security group name. + GroupName *string + + noSmithyDocumentSerde +} + +// Information about the software on the device. +type SoftwareInformation struct { + + // The state of the software that is installed or that is being installed on the + // device. + InstallState *string + + // The version of the software currently installed on the device. + InstalledVersion *string + + // The version of the software being installed on the device. + InstallingVersion *string + + noSmithyDocumentSerde +} + +// Information about the task assigned to one or many devices. +type TaskSummary struct { + + // The task ID. + // + // This member is required. + TaskId *string + + // The state of the task assigned to one or many devices. + State TaskState + + // Optional metadata that you assign to a resource. You can use tags to categorize + // a resource in different ways, such as by purpose, owner, or environment. + Tags map[string]string + + // The Amazon Resource Name (ARN) of the task. + TaskArn *string + + noSmithyDocumentSerde +} + +// A structure used to unlock a device. +type Unlock struct { + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +// UnknownUnionMember is returned when a union member is returned over the wire, +// but has an unknown tag. +type UnknownUnionMember struct { + Tag string + Value []byte + + noSmithyDocumentSerde +} + +func (*UnknownUnionMember) isCommand() {} diff --git a/service/snowdevicemanagement/types/types_exported_test.go b/service/snowdevicemanagement/types/types_exported_test.go new file mode 100644 index 00000000000..bc5ac4a4605 --- /dev/null +++ b/service/snowdevicemanagement/types/types_exported_test.go @@ -0,0 +1,30 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement/types" +) + +func ExampleCommand_outputUsage() { + var union types.Command + // type switches can be used to check the union value + switch v := union.(type) { + case *types.CommandMemberReboot: + _ = v.Value // Value is types.Reboot + + case *types.CommandMemberUnlock: + _ = v.Value // Value is types.Unlock + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.Reboot +var _ *types.Unlock diff --git a/service/snowdevicemanagement/validators.go b/service/snowdevicemanagement/validators.go new file mode 100644 index 00000000000..9003c936ce3 --- /dev/null +++ b/service/snowdevicemanagement/validators.go @@ -0,0 +1,454 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package snowdevicemanagement + +import ( + "context" + "fmt" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpCancelTask struct { +} + +func (*validateOpCancelTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCancelTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CancelTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCancelTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateTask struct { +} + +func (*validateOpCreateTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeDeviceEc2Instances struct { +} + +func (*validateOpDescribeDeviceEc2Instances) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeDeviceEc2Instances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeDeviceEc2InstancesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeDeviceEc2InstancesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeDevice struct { +} + +func (*validateOpDescribeDevice) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeDevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeDeviceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeDeviceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeExecution struct { +} + +func (*validateOpDescribeExecution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeExecution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeExecutionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeExecutionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeTask struct { +} + +func (*validateOpDescribeTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListDeviceResources struct { +} + +func (*validateOpListDeviceResources) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDeviceResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDeviceResourcesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDeviceResourcesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListExecutions struct { +} + +func (*validateOpListExecutions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListExecutions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListExecutionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListExecutionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpCancelTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCancelTask{}, middleware.After) +} + +func addOpCreateTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateTask{}, middleware.After) +} + +func addOpDescribeDeviceEc2InstancesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeDeviceEc2Instances{}, middleware.After) +} + +func addOpDescribeDeviceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeDevice{}, middleware.After) +} + +func addOpDescribeExecutionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeExecution{}, middleware.After) +} + +func addOpDescribeTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeTask{}, middleware.After) +} + +func addOpListDeviceResourcesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDeviceResources{}, middleware.After) +} + +func addOpListExecutionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListExecutions{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + +func validateOpCancelTaskInput(v *CancelTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelTaskInput"} + if v.TaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TaskId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateTaskInput(v *CreateTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateTaskInput"} + if v.Targets == nil { + invalidParams.Add(smithy.NewErrParamRequired("Targets")) + } + if v.Command == nil { + invalidParams.Add(smithy.NewErrParamRequired("Command")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeDeviceEc2InstancesInput(v *DescribeDeviceEc2InstancesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeDeviceEc2InstancesInput"} + if v.ManagedDeviceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ManagedDeviceId")) + } + if v.InstanceIds == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceIds")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeDeviceInput(v *DescribeDeviceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeDeviceInput"} + if v.ManagedDeviceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ManagedDeviceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeExecutionInput(v *DescribeExecutionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeExecutionInput"} + if v.TaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TaskId")) + } + if v.ManagedDeviceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ManagedDeviceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeTaskInput(v *DescribeTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeTaskInput"} + if v.TaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TaskId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListDeviceResourcesInput(v *ListDeviceResourcesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDeviceResourcesInput"} + if v.ManagedDeviceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ManagedDeviceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListExecutionsInput(v *ListExecutionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListExecutionsInput"} + if v.TaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TaskId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/ssm/api_op_CreateActivation.go b/service/ssm/api_op_CreateActivation.go index 37c04b40ce7..5f4e8530c09 100644 --- a/service/ssm/api_op_CreateActivation.go +++ b/service/ssm/api_op_CreateActivation.go @@ -42,10 +42,11 @@ func (c *Client) CreateActivation(ctx context.Context, params *CreateActivationI type CreateActivationInput struct { - // The Identity and Access Management (IAM) role that you want to assign to the - // managed instance. This IAMrole 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 + // The name of the Identity and Access Management (IAM) role that you want to + // assign to the managed instance. 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. // diff --git a/service/ssm/api_op_CreateAssociation.go b/service/ssm/api_op_CreateAssociation.go index eefe4e40b0d..94b4c491e54 100644 --- a/service/ssm/api_op_CreateAssociation.go +++ b/service/ssm/api_op_CreateAssociation.go @@ -44,8 +44,8 @@ type CreateAssociationInput struct { // configuration information for the instance. You can specify Amazon Web // Services-predefined documents, documents you created, or a document that is // shared with you from another account. For Systems Manager documents (SSM - // documents) that are shared with you from other accounts, you must specify the - // complete SSM document ARN, in the following format: + // documents) that are shared with you from other Amazon Web Services accounts, you + // must specify the complete SSM document ARN, in the following format: // arn:partition:ssm:region:account-id:document/document-name For example: // arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document For Amazon Web // Services-predefined documents and SSM documents you created in your account, you @@ -137,15 +137,15 @@ type CreateAssociationInput struct { // associations use AUTO mode. SyncCompliance types.AssociationSyncCompliance - // A location is a combination of Regions and accounts where you want to run the - // association. Use this action to create an association in multiple Regions and - // multiple accounts. + // A location is a combination of Amazon Web Services Regions and Amazon Web + // Services accounts where you want to run the association. Use this action to + // create an association in multiple Regions and multiple accounts. TargetLocations []types.TargetLocation // The targets for the association. You can target instances by using tags, Amazon - // Web Services resource groups, all instances in an account, or individual - // instance IDs. For more information about choosing targets for an association, - // see Using targets and rate controls with State Manager associations + // Web Services resource groups, all instances in an Amazon Web Services account, + // or individual instance IDs. For more information about choosing targets for an + // association, see Using targets and rate controls with State Manager associations // (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html) // in the Amazon Web Services Systems Manager User Guide. Targets []types.Target diff --git a/service/ssm/api_op_CreateOpsMetadata.go b/service/ssm/api_op_CreateOpsMetadata.go index e368d73cfc6..136f4350e9f 100644 --- a/service/ssm/api_op_CreateOpsMetadata.go +++ b/service/ssm/api_op_CreateOpsMetadata.go @@ -43,12 +43,13 @@ type CreateOpsMetadataInput struct { // five tags for an OpsMetadata object. Tags enable you to categorize a resource in // different ways, such as by purpose, owner, or environment. For example, you // might want to tag an OpsMetadata object to identify an environment or target - // Region. In this case, you could specify the following key-value pairs: + // Amazon Web Services Region. In this case, you could specify the following + // key-value pairs: // - // * - // Key=Environment,Value=Production + // * Key=Environment,Value=Production // - // * Key=Region,Value=us-east-2 + // * + // Key=Region,Value=us-east-2 Tags []types.Tag noSmithyDocumentSerde diff --git a/service/ssm/api_op_CreateResourceDataSync.go b/service/ssm/api_op_CreateResourceDataSync.go index f99d092a006..9b4edcd152d 100644 --- a/service/ssm/api_op_CreateResourceDataSync.go +++ b/service/ssm/api_op_CreateResourceDataSync.go @@ -15,15 +15,17 @@ import ( // location. Amazon Web Services Systems Manager offers two types of resource data // sync: SyncToDestination and SyncFromSource. You can configure Systems Manager // Inventory to use the SyncToDestination type to synchronize Inventory data from -// multiple Regions to a single Amazon Simple Storage Service (Amazon S3) bucket. -// For more information, see Configuring resource data sync for Inventory +// multiple Amazon Web Services Regions to a single Amazon Simple Storage Service +// (Amazon S3) bucket. For more information, see Configuring resource data sync for +// Inventory // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-datasync.html) // in the Amazon Web Services Systems Manager User Guide. You can configure Systems // Manager Explorer to use the SyncFromSource type to synchronize operational work -// items (OpsItems) and operational data (OpsData) from multiple Regions to a -// single Amazon S3 bucket. This type can synchronize OpsItems and OpsData from -// multiple accounts and Regions or EntireOrganization by using Organizations. For -// more information, see Setting up Systems Manager Explorer to display data from +// items (OpsItems) and operational data (OpsData) from multiple Amazon Web +// Services Regions to a single Amazon S3 bucket. This type can synchronize +// OpsItems and OpsData from multiple Amazon Web Services accounts and Amazon Web +// Services Regions or EntireOrganization by using Organizations. For more +// information, see Setting up Systems Manager Explorer to display data from // multiple accounts and Regions // (https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html) // in the Amazon Web Services Systems Manager User Guide. A resource data sync is @@ -66,9 +68,10 @@ type CreateResourceDataSyncInput struct { // Specify SyncToDestination to create a resource data sync that synchronizes data // to an S3 bucket for Inventory. If you specify SyncToDestination, you must // provide a value for S3Destination. Specify SyncFromSource to synchronize data - // from a single account and multiple Regions, or multiple accounts and Regions, as - // listed in Organizations for Explorer. If you specify SyncFromSource, you must - // provide a value for SyncSource. The default value is SyncToDestination. + // from a single account and multiple Regions, or multiple Amazon Web Services + // accounts and Amazon Web Services Regions, as listed in Organizations for + // Explorer. If you specify SyncFromSource, you must provide a value for + // SyncSource. The default value is SyncToDestination. SyncType *string noSmithyDocumentSerde diff --git a/service/ssm/api_op_DeleteAssociation.go b/service/ssm/api_op_DeleteAssociation.go index 4a1d1723caa..95381010ce7 100644 --- a/service/ssm/api_op_DeleteAssociation.go +++ b/service/ssm/api_op_DeleteAssociation.go @@ -11,11 +11,12 @@ import ( ) // Disassociates the specified Amazon Web Services Systems Manager document (SSM -// document) from the specified instance. When you disassociate a document from an -// instance, it doesn't change the configuration of the instance. To change the -// configuration state of an instance after you disassociate a document, you must -// create a new document with the desired configuration and associate it with the -// instance. +// document) from the specified instance. If you created the association by using +// the Targets parameter, then you must delete the association by using the +// association ID. When you disassociate a document from an instance, it doesn't +// change the configuration of the instance. To change the configuration state of +// an instance after you disassociate a document, you must create a new document +// with the desired configuration and associate it with the instance. func (c *Client) DeleteAssociation(ctx context.Context, params *DeleteAssociationInput, optFns ...func(*Options)) (*DeleteAssociationOutput, error) { if params == nil { params = &DeleteAssociationInput{} @@ -36,7 +37,13 @@ type DeleteAssociationInput struct { // The association ID that you want to delete. AssociationId *string - // The ID of the instance. + // The instance ID. InstanceId has been deprecated. To specify an instance ID for + // an association, use the Targets parameter. Requests that include the parameter + // InstanceID with Systems Manager documents (SSM documents) that use schema + // version 2.0 or later will fail. In addition, if you use the parameter + // InstanceId, you can't use the parameters AssociationName, DocumentVersion, + // MaxErrors, MaxConcurrency, OutputLocation, or ScheduleExpression. To use these + // parameters, you must use the Targets parameter. InstanceId *string // The name of the SSM document. diff --git a/service/ssm/api_op_DeleteParameter.go b/service/ssm/api_op_DeleteParameter.go index fd75e29a93d..6b99ab28209 100644 --- a/service/ssm/api_op_DeleteParameter.go +++ b/service/ssm/api_op_DeleteParameter.go @@ -10,7 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Delete a parameter from the system. +// Delete a parameter from the system. After deleting a parameter, wait for at +// least 30 seconds to create a parameter with the same name. func (c *Client) DeleteParameter(ctx context.Context, params *DeleteParameterInput, optFns ...func(*Options)) (*DeleteParameterOutput, error) { if params == nil { params = &DeleteParameterInput{} diff --git a/service/ssm/api_op_DeleteParameters.go b/service/ssm/api_op_DeleteParameters.go index 2baaacebc46..eb340ba7968 100644 --- a/service/ssm/api_op_DeleteParameters.go +++ b/service/ssm/api_op_DeleteParameters.go @@ -10,7 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Delete a list of parameters. +// Delete a list of parameters. After deleting a parameter, wait for at least 30 +// seconds to create a parameter with the same name. func (c *Client) DeleteParameters(ctx context.Context, params *DeleteParametersInput, optFns ...func(*Options)) (*DeleteParametersOutput, error) { if params == nil { params = &DeleteParametersInput{} @@ -28,7 +29,8 @@ func (c *Client) DeleteParameters(ctx context.Context, params *DeleteParametersI type DeleteParametersInput struct { - // The names of the parameters to delete. + // The names of the parameters to delete. After deleting a parameter, wait for at + // least 30 seconds to create a parameter with the same name. // // This member is required. Names []string diff --git a/service/ssm/api_op_DescribeActivations.go b/service/ssm/api_op_DescribeActivations.go index 8cd639c30a6..936ac8d40f0 100644 --- a/service/ssm/api_op_DescribeActivations.go +++ b/service/ssm/api_op_DescribeActivations.go @@ -48,7 +48,7 @@ type DescribeActivationsInput struct { type DescribeActivationsOutput struct { - // A list of activations for your account. + // A list of activations for your Amazon Web Services account. ActivationList []types.Activation // The token for the next set of items to return. Use this token to get the next diff --git a/service/ssm/api_op_DescribeAssociation.go b/service/ssm/api_op_DescribeAssociation.go index 6b8d845509f..de3a686e3dc 100644 --- a/service/ssm/api_op_DescribeAssociation.go +++ b/service/ssm/api_op_DescribeAssociation.go @@ -13,10 +13,7 @@ import ( // Describes the association for the specified target or instance. If you created // the association by using the Targets parameter, then you must retrieve the -// association by using the association ID. If you created the association by -// specifying an instance ID and an Amazon Web Services Systems Manager document -// (SSM document), then you retrieve the association by specifying the document -// name and the instance ID. +// association by using the association ID. func (c *Client) DescribeAssociation(ctx context.Context, params *DescribeAssociationInput, optFns ...func(*Options)) (*DescribeAssociationOutput, error) { if params == nil { params = &DescribeAssociationInput{} diff --git a/service/ssm/api_op_DescribeDocumentPermission.go b/service/ssm/api_op_DescribeDocumentPermission.go index 02ad4406433..de2a31c90d7 100644 --- a/service/ssm/api_op_DescribeDocumentPermission.go +++ b/service/ssm/api_op_DescribeDocumentPermission.go @@ -13,8 +13,8 @@ import ( // Describes the permissions for a Amazon Web Services Systems Manager document // (SSM document). If you created the document, you are the owner. If a document is -// shared, it can either be shared privately (by specifying a user's account ID) or -// publicly (All). +// shared, it can either be shared privately (by specifying a user's Amazon Web +// Services account ID) or publicly (All). func (c *Client) DescribeDocumentPermission(ctx context.Context, params *DescribeDocumentPermissionInput, optFns ...func(*Options)) (*DescribeDocumentPermissionOutput, error) { if params == nil { params = &DescribeDocumentPermissionInput{} @@ -56,11 +56,11 @@ type DescribeDocumentPermissionInput struct { type DescribeDocumentPermissionOutput struct { // The account IDs that have permission to use this document. The ID can be either - // an account or All. + // an Amazon Web Services account or All. AccountIds []string - // A list of accounts where the current document is shared and the version shared - // with each account. + // A list of Amazon Web Services accounts where the current document is shared and + // the version shared with each account. AccountSharingInfoList []types.AccountSharingInfo // The token for the next set of items to return. Use this token to get the next diff --git a/service/ssm/api_op_DescribeMaintenanceWindows.go b/service/ssm/api_op_DescribeMaintenanceWindows.go index 42c3ca6da60..54d43d5421e 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindows.go +++ b/service/ssm/api_op_DescribeMaintenanceWindows.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the maintenance windows in an account. +// Retrieves the maintenance windows in an Amazon Web Services account. func (c *Client) DescribeMaintenanceWindows(ctx context.Context, params *DescribeMaintenanceWindowsInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowsOutput, error) { if params == nil { params = &DescribeMaintenanceWindowsInput{} diff --git a/service/ssm/api_op_DescribePatchBaselines.go b/service/ssm/api_op_DescribePatchBaselines.go index 65a817ad4c9..17ab7b1cff0 100644 --- a/service/ssm/api_op_DescribePatchBaselines.go +++ b/service/ssm/api_op_DescribePatchBaselines.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the patch baselines in your account. +// Lists the patch baselines in your Amazon Web Services account. func (c *Client) DescribePatchBaselines(ctx context.Context, params *DescribePatchBaselinesInput, optFns ...func(*Options)) (*DescribePatchBaselinesOutput, error) { if params == nil { params = &DescribePatchBaselinesInput{} diff --git a/service/ssm/api_op_GetConnectionStatus.go b/service/ssm/api_op_GetConnectionStatus.go index efd1d6c3615..326266fa27c 100644 --- a/service/ssm/api_op_GetConnectionStatus.go +++ b/service/ssm/api_op_GetConnectionStatus.go @@ -30,7 +30,7 @@ func (c *Client) GetConnectionStatus(ctx context.Context, params *GetConnectionS type GetConnectionStatusInput struct { - // The ID of the instance. + // The instance ID. // // This member is required. Target *string diff --git a/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go b/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go index 6249281831a..bc44af42984 100644 --- a/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go +++ b/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go @@ -14,12 +14,12 @@ import ( // Retrieves the current snapshot for the patch baseline the instance uses. This // API is primarily used by the AWS-RunPatchBaseline Systems Manager document (SSM // document). If you run the command locally, such as with the Command Line -// Interface (CLI), the system attempts to use your local AWS credentials and the -// operation fails. To avoid this, you can run the command in the Amazon Web -// Services Systems Manager console. Use Run Command, a capability of Amazon Web -// Services Systems Manager, with an SSM document that enables you to target an -// instance with a script or command. For example, run the command using the -// AWS-RunShellScript document or the AWS-RunPowerShellScript document. +// Interface (CLI), the system attempts to use your local Amazon Web Services +// credentials and the operation fails. To avoid this, you can run the command in +// the Amazon Web Services Systems Manager console. Use Run Command, a capability +// of Amazon Web Services Systems Manager, with an SSM document that enables you to +// target an instance with a script or command. For example, run the command using +// the AWS-RunShellScript document or the AWS-RunPowerShellScript document. func (c *Client) GetDeployablePatchSnapshotForInstance(ctx context.Context, params *GetDeployablePatchSnapshotForInstanceInput, optFns ...func(*Options)) (*GetDeployablePatchSnapshotForInstanceOutput, error) { if params == nil { params = &GetDeployablePatchSnapshotForInstanceInput{} @@ -56,7 +56,7 @@ type GetDeployablePatchSnapshotForInstanceInput struct { type GetDeployablePatchSnapshotForInstanceOutput struct { - // The ID of the instance. + // The instance ID. InstanceId *string // Returns the specific operating system (for example Windows Server 2012 or Amazon diff --git a/service/ssm/api_op_GetInventory.go b/service/ssm/api_op_GetInventory.go index 1241c9b47bf..15fea19b0b2 100644 --- a/service/ssm/api_op_GetInventory.go +++ b/service/ssm/api_op_GetInventory.go @@ -12,7 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Query inventory information. +// Query inventory information. This includes instance status, such as Stopped or +// Terminated. func (c *Client) GetInventory(ctx context.Context, params *GetInventoryInput, optFns ...func(*Options)) (*GetInventoryOutput, error) { if params == nil { params = &GetInventoryInput{} diff --git a/service/ssm/api_op_GetOpsSummary.go b/service/ssm/api_op_GetOpsSummary.go index 7cce5b11512..a3c80222b8d 100644 --- a/service/ssm/api_op_GetOpsSummary.go +++ b/service/ssm/api_op_GetOpsSummary.go @@ -59,7 +59,7 @@ type GetOpsSummaryInput struct { type GetOpsSummaryOutput struct { - // The list of aggregated and filtered OpsData. + // The list of aggregated details and filtered OpsData. Entities []types.OpsEntity // The token for the next set of items to return. Use this token to get the next diff --git a/service/ssm/api_op_GetParameter.go b/service/ssm/api_op_GetParameter.go index 49af37f63c5..c7617dcfd0e 100644 --- a/service/ssm/api_op_GetParameter.go +++ b/service/ssm/api_op_GetParameter.go @@ -11,8 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Get information about a parameter by using the parameter name. Don't confuse -// this API operation with the GetParameters API operation. +// Get information about a single parameter by specifying the parameter name. To +// get information about more than one parameter at a time, use the GetParameters +// operation. func (c *Client) GetParameter(ctx context.Context, params *GetParameterInput, optFns ...func(*Options)) (*GetParameterOutput, error) { if params == nil { params = &GetParameterInput{} @@ -30,7 +31,8 @@ func (c *Client) GetParameter(ctx context.Context, params *GetParameterInput, op type GetParameterInput struct { - // The name of the parameter you want to query. + // The name of the parameter you want to query. To query by parameter label, use + // "Name": "name:label". To query by parameter version, use "Name": "name:version". // // This member is required. Name *string diff --git a/service/ssm/api_op_GetParameters.go b/service/ssm/api_op_GetParameters.go index 455bbcccc2d..6a5a10c794b 100644 --- a/service/ssm/api_op_GetParameters.go +++ b/service/ssm/api_op_GetParameters.go @@ -11,8 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Get details of a parameter. Don't confuse this API operation with the -// GetParameter API operation. +// Get information about one or more parameters by specifying multiple parameter +// names. To get information about a single parameter, you can use the GetParameter +// operation instead. func (c *Client) GetParameters(ctx context.Context, params *GetParametersInput, optFns ...func(*Options)) (*GetParametersOutput, error) { if params == nil { params = &GetParametersInput{} @@ -30,7 +31,9 @@ func (c *Client) GetParameters(ctx context.Context, params *GetParametersInput, type GetParametersInput struct { - // Names of the parameters for which you want to query information. + // Names of the parameters for which you want to query information. To query by + // parameter label, use "Name": "name:label". To query by parameter version, use + // "Name": "name:version". // // This member is required. Names []string diff --git a/service/ssm/api_op_GetPatchBaseline.go b/service/ssm/api_op_GetPatchBaseline.go index 07744f11bc5..72c528a52af 100644 --- a/service/ssm/api_op_GetPatchBaseline.go +++ b/service/ssm/api_op_GetPatchBaseline.go @@ -30,7 +30,12 @@ func (c *Client) GetPatchBaseline(ctx context.Context, params *GetPatchBaselineI type GetPatchBaselineInput struct { - // The ID of the patch baseline to retrieve. + // The ID of the patch baseline to retrieve. To retrieve information about an + // Amazon Web Services managed patch baseline, specify the full Amazon Resource + // Name (ARN) of the baseline. For example, for the baseline + // AWS-AmazonLinuxDefaultPatchBaseline, specify + // arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0e392de35e7c563b7 instead of + // pb-0e392de35e7c563b7. // // This member is required. BaselineId *string diff --git a/service/ssm/api_op_GetServiceSetting.go b/service/ssm/api_op_GetServiceSetting.go index 9eec734d67b..17825ae9f4b 100644 --- a/service/ssm/api_op_GetServiceSetting.go +++ b/service/ssm/api_op_GetServiceSetting.go @@ -24,7 +24,7 @@ import ( // UpdateServiceSetting API operation to change the default setting. Or use the // ResetServiceSetting to change the value back to the original value defined by // the Amazon Web Services service team. Query the current service setting for the -// account. +// Amazon Web Services account. func (c *Client) GetServiceSetting(ctx context.Context, params *GetServiceSettingInput, optFns ...func(*Options)) (*GetServiceSettingOutput, error) { if params == nil { params = &GetServiceSettingInput{} diff --git a/service/ssm/api_op_ListAssociations.go b/service/ssm/api_op_ListAssociations.go index 56850b694c5..eec9f19e367 100644 --- a/service/ssm/api_op_ListAssociations.go +++ b/service/ssm/api_op_ListAssociations.go @@ -12,10 +12,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns all State Manager associations in the current account and Region. You -// can limit the results to a specific State Manager association document or -// instance by specifying a filter. State Manager is a capability of Amazon Web -// Services Systems Manager. +// Returns all State Manager associations in the current Amazon Web Services +// account and Amazon Web Services Region. You can limit the results to a specific +// State Manager association document or instance by specifying a filter. State +// Manager is a capability of Amazon Web Services Systems Manager. func (c *Client) ListAssociations(ctx context.Context, params *ListAssociationsInput, optFns ...func(*Options)) (*ListAssociationsOutput, error) { if params == nil { params = &ListAssociationsInput{} diff --git a/service/ssm/api_op_ListCommands.go b/service/ssm/api_op_ListCommands.go index a773dcfa431..f38e6f29157 100644 --- a/service/ssm/api_op_ListCommands.go +++ b/service/ssm/api_op_ListCommands.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the commands requested by users of the account. +// Lists the commands requested by users of the Amazon Web Services account. func (c *Client) ListCommands(ctx context.Context, params *ListCommandsInput, optFns ...func(*Options)) (*ListCommandsOutput, error) { if params == nil { params = &ListCommandsInput{} diff --git a/service/ssm/api_op_ListDocumentMetadataHistory.go b/service/ssm/api_op_ListDocumentMetadataHistory.go index 4578d107b34..612e348fd86 100644 --- a/service/ssm/api_op_ListDocumentMetadataHistory.go +++ b/service/ssm/api_op_ListDocumentMetadataHistory.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Information about approval reviews for a version of an SSM document. +// Information about approval reviews for a version of a change template in Change +// Manager. func (c *Client) ListDocumentMetadataHistory(ctx context.Context, params *ListDocumentMetadataHistoryInput, optFns ...func(*Options)) (*ListDocumentMetadataHistoryOutput, error) { if params == nil { params = &ListDocumentMetadataHistoryInput{} @@ -35,12 +36,12 @@ type ListDocumentMetadataHistoryInput struct { // This member is required. Metadata types.DocumentMetadataEnum - // The name of the document. + // The name of the change template. // // This member is required. Name *string - // The version of the document. + // The version of the change template. DocumentVersion *string // The maximum number of items to return for this call. The call also returns a @@ -56,16 +57,17 @@ type ListDocumentMetadataHistoryInput struct { type ListDocumentMetadataHistoryOutput struct { - // The user ID of the person in the organization who requested the document review. + // The user ID of the person in the organization who requested the review of the + // change template. Author *string - // The version of the document. + // The version of the change template. DocumentVersion *string - // Information about the response to the document approval request. + // Information about the response to the change template approval request. Metadata *types.DocumentMetadataResponseInfo - // The name of the document. + // The name of the change template. Name *string // The maximum number of items to return for this call. The call also returns a diff --git a/service/ssm/api_op_ListDocuments.go b/service/ssm/api_op_ListDocuments.go index 83cba806395..93bf6796045 100644 --- a/service/ssm/api_op_ListDocuments.go +++ b/service/ssm/api_op_ListDocuments.go @@ -12,8 +12,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns all Systems Manager (SSM) documents in the current account and Region. -// You can limit the results of this request by using a filter. +// Returns all Systems Manager (SSM) documents in the current Amazon Web Services +// account and Amazon Web Services Region. You can limit the results of this +// request by using a filter. func (c *Client) ListDocuments(ctx context.Context, params *ListDocumentsInput, optFns ...func(*Options)) (*ListDocumentsOutput, error) { if params == nil { params = &ListDocumentsInput{} diff --git a/service/ssm/api_op_ListOpsItemEvents.go b/service/ssm/api_op_ListOpsItemEvents.go index c2d0da66794..96b799513da 100644 --- a/service/ssm/api_op_ListOpsItemEvents.go +++ b/service/ssm/api_op_ListOpsItemEvents.go @@ -12,9 +12,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of all OpsItem events in the current Region and account. You can -// limit the results to events associated with specific OpsItems by specifying a -// filter. +// Returns a list of all OpsItem events in the current Amazon Web Services Region +// and Amazon Web Services account. You can limit the results to events associated +// with specific OpsItems by specifying a filter. func (c *Client) ListOpsItemEvents(ctx context.Context, params *ListOpsItemEventsInput, optFns ...func(*Options)) (*ListOpsItemEventsOutput, error) { if params == nil { params = &ListOpsItemEventsInput{} diff --git a/service/ssm/api_op_ListResourceDataSync.go b/service/ssm/api_op_ListResourceDataSync.go index 2f26eee082a..bf37d66e45b 100644 --- a/service/ssm/api_op_ListResourceDataSync.go +++ b/service/ssm/api_op_ListResourceDataSync.go @@ -48,7 +48,7 @@ type ListResourceDataSyncInput struct { // View a list of resource data syncs according to the sync type. Specify // SyncToDestination to view resource data syncs that synchronize data to an Amazon // S3 bucket. Specify SyncFromSource to view resource data syncs from Organizations - // or from multiple Regions. + // or from multiple Amazon Web Services Regions. SyncType *string noSmithyDocumentSerde diff --git a/service/ssm/api_op_PutParameter.go b/service/ssm/api_op_PutParameter.go index b97ce88829f..8d25d2853c8 100644 --- a/service/ssm/api_op_PutParameter.go +++ b/service/ssm/api_op_PutParameter.go @@ -38,24 +38,25 @@ type PutParameterInput struct { // * Parameter names are case // sensitive. // - // * A parameter name must be unique within an Region + // * A parameter name must be unique within an Amazon Web Services + // Region // - // * A parameter - // name can't be prefixed with "aws" or "ssm" (case-insensitive). + // * A parameter name can't be prefixed with "aws" or "ssm" + // (case-insensitive). // - // * Parameter - // names can include only the following symbols and letters: a-zA-Z0-9_.- In - // addition, the slash character ( / ) is used to delineate hierarchies in - // parameter names. For example: /Dev/Production/East/Project-ABC/MyParameter + // * Parameter names can include only the following symbols + // and letters: a-zA-Z0-9_.- In addition, the slash character ( / ) is used to + // delineate hierarchies in parameter names. For example: + // /Dev/Production/East/Project-ABC/MyParameter // - // * A - // parameter name can't include spaces. + // * A parameter name can't include + // spaces. // - // * Parameter hierarchies are limited to a - // maximum depth of fifteen levels. + // * Parameter hierarchies are limited to a maximum depth of fifteen + // levels. // - // For additional information about valid values - // for parameter names, see Creating Systems Manager parameters + // For additional information about valid values for parameter names, see + // Creating Systems Manager parameters // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html) // in the Amazon Web Services Systems Manager User Guide. The maximum length // constraint listed below includes capacity for additional system attributes that @@ -91,8 +92,9 @@ type PutParameterInput struct { // When you create a String parameter and // specify aws:ec2:image, Amazon Web Services Systems Manager validates the // parameter value is in the required format, such as ami-12345abcdeEXAMPLE, and - // that the specified AMI is available in your account. For more information, see - // Native parameter support for Amazon Machine Image (AMI) IDs + // that the specified AMI is available in your Amazon Web Services account. For + // more information, see Native parameter support for Amazon Machine Image (AMI) + // IDs // (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html) // in the Amazon Web Services Systems Manager User Guide. DataType *string @@ -102,17 +104,18 @@ type PutParameterInput struct { Description *string // The Key Management Service (KMS) ID that you want to use to encrypt a parameter. - // Either the default KMS key automatically assigned to your account or a custom - // key. Required for parameters that use the SecureString data type. If you don't - // specify a key ID, the system uses the default key associated with your - // account. + // Either the default KMS key automatically assigned to your Amazon Web Services + // account or a custom key. Required for parameters that use the SecureString data + // type. If you don't specify a key ID, the system uses the default key associated + // with your Amazon Web Services account. // - // * To use your default KMS key, choose the SecureString data type, and - // do not specify the Key ID when you create the parameter. The system - // automatically populates Key ID with your default KMS key. + // * To use your default KMS key, choose + // the SecureString data type, and do not specify the Key ID when you create the + // parameter. The system automatically populates Key ID with your default KMS + // key. // - // * To use a custom KMS - // key, choose the SecureString data type with the Key ID parameter. + // * To use a custom KMS key, choose the SecureString data type with the Key + // ID parameter. KeyId *string // Overwrite an existing parameter. The default value is false. @@ -158,12 +161,12 @@ type PutParameterInput struct { // The parameter tier to assign to a parameter. Parameter Store offers a standard // tier and an advanced tier for parameters. Standard parameters have a content // size limit of 4 KB and can't be configured to use parameter policies. You can - // create a maximum of 10,000 standard parameters for each Region in an account. - // Standard parameters are offered at no additional cost. Advanced parameters have - // a content size limit of 8 KB and can be configured to use parameter policies. - // You can create a maximum of 100,000 advanced parameters for each Region in an - // account. Advanced parameters incur a charge. For more information, see Standard - // and advanced parameter tiers + // create a maximum of 10,000 standard parameters for each Region in an Amazon Web + // Services account. Standard parameters are offered at no additional cost. + // Advanced parameters have a content size limit of 8 KB and can be configured to + // use parameter policies. You can create a maximum of 100,000 advanced parameters + // for each Region in an Amazon Web Services account. Advanced parameters incur a + // charge. For more information, see Standard and advanced parameter tiers // (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html) // in the Amazon Web Services Systems Manager User Guide. You can change a standard // parameter to an advanced parameter any time. But you can't revert an advanced @@ -204,10 +207,11 @@ type PutParameterInput struct { // * The parameter uses a parameter policy. // // * More than 10,000 parameters - // already exist in your account in the current Region. + // already exist in your Amazon Web Services account in the current Amazon Web + // Services Region. // - // For more information about - // configuring the default tier option, see Specifying a default parameter tier + // For more information about configuring the default tier + // option, see Specifying a default parameter tier // (https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-default-tier.html) // in the Amazon Web Services Systems Manager User Guide. Tier types.ParameterTier diff --git a/service/ssm/api_op_ResumeSession.go b/service/ssm/api_op_ResumeSession.go index 666f6aae510..3f3cd964273 100644 --- a/service/ssm/api_op_ResumeSession.go +++ b/service/ssm/api_op_ResumeSession.go @@ -47,10 +47,10 @@ type ResumeSessionOutput struct { // A URL back to SSM Agent on the instance that the Session Manager client uses to // send commands and receive output from the instance. Format: // wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output). - // region represents the Region identifier for an Region supported by Amazon Web - // Services Systems Manager, such as us-east-2 for the US East (Ohio) Region. For a - // list of supported region values, see the Region column in Systems Manager - // service endpoints + // region represents the Region identifier for an Amazon Web Services Region + // supported by Amazon Web Services Systems Manager, such as us-east-2 for the US + // East (Ohio) Region. For a list of supported region values, see the Region column + // in Systems Manager service endpoints // (https://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region) in the // Amazon Web Services General Reference. session-id represents the ID of a Session // Manager session, such as 1a2b3c4dEXAMPLE. diff --git a/service/ssm/api_op_SendCommand.go b/service/ssm/api_op_SendCommand.go index ccb3aba2280..b6533efc15b 100644 --- a/service/ssm/api_op_SendCommand.go +++ b/service/ssm/api_op_SendCommand.go @@ -103,7 +103,8 @@ type SendCommandInput struct { OutputS3KeyPrefix *string // (Deprecated) You can no longer specify this parameter. The system ignores it. - // Instead, Systems Manager automatically determines the Region of the S3 bucket. + // Instead, Systems Manager automatically determines the Amazon Web Services Region + // of the S3 bucket. OutputS3Region *string // The required and optional parameters specified in the document being run. diff --git a/service/ssm/api_op_StartAutomationExecution.go b/service/ssm/api_op_StartAutomationExecution.go index 9170947f2a3..7784a83aefd 100644 --- a/service/ssm/api_op_StartAutomationExecution.go +++ b/service/ssm/api_op_StartAutomationExecution.go @@ -88,10 +88,11 @@ type StartAutomationExecutionInput struct { // patch baseline, use the AddTagsToResource operation. Tags []types.Tag - // A location is a combination of Regions and/or accounts where you want to run the - // automation. Use this operation to start an automation in multiple Regions and - // multiple accounts. For more information, see Running Automation workflows in - // multiple Regions and accounts + // A location is a combination of Amazon Web Services Regions and/or Amazon Web + // Services accounts where you want to run the automation. Use this operation to + // start an automation in multiple Amazon Web Services Regions and multiple Amazon + // Web Services accounts. For more information, see Running Automation workflows in + // multiple Amazon Web Services Regions and Amazon Web Services accounts // (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html) // in the Amazon Web Services Systems Manager User Guide. TargetLocations []types.TargetLocation diff --git a/service/ssm/api_op_StartChangeRequestExecution.go b/service/ssm/api_op_StartChangeRequestExecution.go index 546ac791ce7..82d89306c6d 100644 --- a/service/ssm/api_op_StartChangeRequestExecution.go +++ b/service/ssm/api_op_StartChangeRequestExecution.go @@ -76,11 +76,11 @@ type StartChangeRequestExecutionInput struct { // Optional metadata that you assign to a resource. You can specify a maximum of // five tags for a change request. Tags enable you to categorize a resource in // different ways, such as by purpose, owner, or environment. For example, you - // might want to tag a change request to identify an environment or target Region. - // In this case, you could specify the following key-value pairs: + // might want to tag a change request to identify an environment or target Amazon + // Web Services Region. In this case, you could specify the following key-value + // pairs: // - // * - // Key=Environment,Value=Production + // * Key=Environment,Value=Production // // * Key=Region,Value=us-east-2 Tags []types.Tag diff --git a/service/ssm/api_op_StartSession.go b/service/ssm/api_op_StartSession.go index 2e7503f7c45..5e561c7d2cd 100644 --- a/service/ssm/api_op_StartSession.go +++ b/service/ssm/api_op_StartSession.go @@ -63,10 +63,10 @@ type StartSessionOutput struct { // A URL back to SSM Agent on the instance that the Session Manager client uses to // send commands and receive output from the instance. Format: // wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output) - // region represents the Region identifier for an Region supported by Amazon Web - // Services Systems Manager, such as us-east-2 for the US East (Ohio) Region. For a - // list of supported region values, see the Region column in Systems Manager - // service endpoints + // region represents the Region identifier for an Amazon Web Services Region + // supported by Amazon Web Services Systems Manager, such as us-east-2 for the US + // East (Ohio) Region. For a list of supported region values, see the Region column + // in Systems Manager service endpoints // (https://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region) in the // Amazon Web Services General Reference. session-id represents the ID of a Session // Manager session, such as 1a2b3c4dEXAMPLE. diff --git a/service/ssm/api_op_UpdateAssociation.go b/service/ssm/api_op_UpdateAssociation.go index f3620523d1b..8849fe170b6 100644 --- a/service/ssm/api_op_UpdateAssociation.go +++ b/service/ssm/api_op_UpdateAssociation.go @@ -107,8 +107,8 @@ type UpdateAssociationInput struct { // configuration information for the instance. You can specify Amazon Web // Services-predefined documents, documents you created, or a document that is // shared with you from another account. For Systems Manager document (SSM - // document) that are shared with you from other accounts, you must specify the - // complete SSM document ARN, in the following format: + // document) that are shared with you from other Amazon Web Services accounts, you + // must specify the complete SSM document ARN, in the following format: // arn:aws:ssm:region:account-id:document/document-name For example: // arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document For Amazon Web // Services-predefined documents and SSM documents you created in your account, you @@ -138,9 +138,9 @@ type UpdateAssociationInput struct { // PutComplianceItems API operation. By default, all associations use AUTO mode. SyncCompliance types.AssociationSyncCompliance - // A location is a combination of Regions and accounts where you want to run the - // association. Use this action to update an association in multiple Regions and - // multiple accounts. + // A location is a combination of Amazon Web Services Regions and Amazon Web + // Services accounts where you want to run the association. Use this action to + // update an association in multiple Regions and multiple accounts. TargetLocations []types.TargetLocation // The targets of the association. diff --git a/service/ssm/api_op_UpdateAssociationStatus.go b/service/ssm/api_op_UpdateAssociationStatus.go index 05124544c3f..7bd77fbe436 100644 --- a/service/ssm/api_op_UpdateAssociationStatus.go +++ b/service/ssm/api_op_UpdateAssociationStatus.go @@ -12,7 +12,10 @@ import ( ) // Updates the status of the Amazon Web Services Systems Manager document (SSM -// document) associated with the specified instance. +// document) associated with the specified instance. UpdateAssociationStatus is +// primarily used by the Amazon Web Services Systems Manager Agent (SSM Agent) to +// report status updates about your associations and is only used for associations +// created with the InstanceId legacy parameter. func (c *Client) UpdateAssociationStatus(ctx context.Context, params *UpdateAssociationStatusInput, optFns ...func(*Options)) (*UpdateAssociationStatusOutput, error) { if params == nil { params = &UpdateAssociationStatusInput{} @@ -35,7 +38,7 @@ type UpdateAssociationStatusInput struct { // This member is required. AssociationStatus *types.AssociationStatus - // The ID of the instance. + // The instance ID. // // This member is required. InstanceId *string diff --git a/service/ssm/api_op_UpdateDocumentMetadata.go b/service/ssm/api_op_UpdateDocumentMetadata.go index 3ebd7393795..c6d9b200925 100644 --- a/service/ssm/api_op_UpdateDocumentMetadata.go +++ b/service/ssm/api_op_UpdateDocumentMetadata.go @@ -12,7 +12,7 @@ import ( ) // Updates information related to approval reviews for a specific version of a -// document. +// change template in Change Manager. func (c *Client) UpdateDocumentMetadata(ctx context.Context, params *UpdateDocumentMetadataInput, optFns ...func(*Options)) (*UpdateDocumentMetadataOutput, error) { if params == nil { params = &UpdateDocumentMetadataInput{} @@ -30,17 +30,17 @@ func (c *Client) UpdateDocumentMetadata(ctx context.Context, params *UpdateDocum type UpdateDocumentMetadataInput struct { - // The document review details to update. + // The change template review details to update. // // This member is required. DocumentReviews *types.DocumentReviews - // The name of the document for which a version is to be updated. + // The name of the change template for which a version's metadata is to be updated. // // This member is required. Name *string - // The version of a document to update. + // The version of a change template in which to update approval metadata. DocumentVersion *string noSmithyDocumentSerde diff --git a/service/ssm/types/errors.go b/service/ssm/types/errors.go index 73b3117422c..2e388916b0a 100644 --- a/service/ssm/types/errors.go +++ b/service/ssm/types/errors.go @@ -1961,8 +1961,8 @@ func (e *ParameterAlreadyExists) ErrorMessage() string { func (e *ParameterAlreadyExists) ErrorCode() string { return "ParameterAlreadyExists" } func (e *ParameterAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// You have exceeded the number of parameters for this account. Delete one or more -// parameters and try again. +// You have exceeded the number of parameters for this Amazon Web Services account. +// Delete one or more parameters and try again. type ParameterLimitExceeded struct { Message *string diff --git a/service/ssm/types/types.go b/service/ssm/types/types.go index 0bbc96bdb98..02a9b92f8fd 100644 --- a/service/ssm/types/types.go +++ b/service/ssm/types/types.go @@ -7,11 +7,11 @@ import ( "time" ) -// Information includes the account ID where the current document is shared and the -// version shared with that account. +// Information includes the Amazon Web Services account ID where the current +// document is shared and the version shared with that account. type AccountSharingInfo struct { - // The account ID where the current document is shared. + // The Amazon Web Services account ID where the current document is shared. AccountId *string // The version of the current document shared with the account. @@ -78,7 +78,7 @@ type Association struct { // The version of the document used in the association. DocumentVersion *string - // The ID of the instance. + // The instance ID. InstanceId *string // The date on which the association was last run. @@ -139,7 +139,7 @@ type AssociationDescription struct { // The document version. DocumentVersion *string - // The ID of the instance. + // The instance ID. InstanceId *string // The date on which the association was last run. @@ -204,7 +204,8 @@ type AssociationDescription struct { // PutComplianceItems API operation. By default, all associations use AUTO mode. SyncCompliance AssociationSyncCompliance - // The combination of Regions and accounts where you want to run the association. + // The combination of Amazon Web Services Regions and Amazon Web Services accounts + // where you want to run the association. TargetLocations []TargetLocation // The instances targeted by the request. @@ -455,8 +456,9 @@ type AssociationVersionInfo struct { // PutComplianceItems API operation. By default, all associations use AUTO mode. SyncCompliance AssociationSyncCompliance - // The combination of Regions and accounts where you wanted to run the association - // when this association version was created. + // The combination of Amazon Web Services Regions and Amazon Web Services accounts + // where you wanted to run the association when this association version was + // created. TargetLocations []TargetLocation // The targets specified for the association when the association version was @@ -628,7 +630,8 @@ type AutomationExecution struct { // The target of the execution. Target *string - // The combination of Regions and/or accounts where you want to run the Automation. + // The combination of Amazon Web Services Regions and/or Amazon Web Services + // accounts where you want to run the Automation. TargetLocations []TargetLocation // The specified key-value mapping of document parameters to target resources. @@ -678,9 +681,10 @@ type AutomationExecutionMetadata struct { AutomationSubtype AutomationSubtype // Use this filter with DescribeAutomationExecutions. Specify either Local or - // CrossAccount. CrossAccount is an Automation that runs in multiple Regions and - // accounts. For more information, see Running Automation workflows in multiple - // Regions and accounts + // CrossAccount. CrossAccount is an Automation that runs in multiple Amazon Web + // Services Regions and Amazon Web Services accounts. For more information, see + // Running Automation workflows in multiple Amazon Web Services Regions and + // accounts // (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html) // in the Amazon Web Services Systems Manager User Guide. AutomationType AutomationType @@ -893,7 +897,8 @@ type Command struct { OutputS3KeyPrefix *string // (Deprecated) You can no longer specify this parameter. The system ignores it. - // Instead, Systems Manager automatically determines the Region of the S3 bucket. + // Instead, Systems Manager automatically determines the Amazon Web Services Region + // of the S3 bucket. OutputS3Region *string // The parameter values to be inserted in the document when running the command. @@ -1398,12 +1403,13 @@ type CreateAssociationBatchRequestEntry struct { // instance. You can specify Command or Automation runbooks. You can specify Amazon // Web Services-predefined documents, documents you created, or a document that is // shared with you from another account. For SSM documents that are shared with you - // from other accounts, you must specify the complete SSM document ARN, in the - // following format: arn:aws:ssm:region:account-id:document/document-name For - // example: arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document For - // Amazon Web Services-predefined documents and SSM documents you created in your - // account, you only need to specify the document name. For example, - // AWS-ApplyPatchBaseline or My-Document. + // from other Amazon Web Services accounts, you must specify the complete SSM + // document ARN, in the following format: + // arn:aws:ssm:region:account-id:document/document-name For example: + // arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document For Amazon Web + // Services-predefined documents and SSM documents you created in your account, you + // only need to specify the document name. For example, AWS-ApplyPatchBaseline or + // My-Document. // // This member is required. Name *string @@ -1435,7 +1441,13 @@ type CreateAssociationBatchRequestEntry struct { // The document version. DocumentVersion *string - // The ID of the instance. + // The instance ID. InstanceId has been deprecated. To specify an instance ID for + // an association, use the Targets parameter. Requests that include the parameter + // InstanceID with Systems Manager documents (SSM documents) that use schema + // version 2.0 or later will fail. In addition, if you use the parameter + // InstanceId, you can't use the parameters AssociationName, DocumentVersion, + // MaxErrors, MaxConcurrency, OutputLocation, or ScheduleExpression. To use these + // parameters, you must use the Targets parameter. InstanceId *string // The maximum number of targets allowed to run the association at the same time. @@ -2650,7 +2662,7 @@ type LoggingInfo struct { // This member is required. S3BucketName *string - // The Region where the S3 bucket is located. + // The Amazon Web Services Region where the S3 bucket is located. // // This member is required. S3Region *string @@ -3242,9 +3254,21 @@ type OpsFilter struct { } // Operations engineers and IT professionals use Amazon Web Services Systems -// Manager OpsCenter to view, investigate, and remediate operational issues -// impacting the performance and health of their Amazon Web Services resources. For -// more information, see OpsCenter +// Manager OpsCenter to view, investigate, and remediate operational work items +// (OpsItems) impacting the performance and health of their Amazon Web Services +// resources. OpsCenter is integrated with Amazon EventBridge and Amazon +// CloudWatch. This means you can configure these services to automatically create +// an OpsItem in OpsCenter when a CloudWatch alarm enters the ALARM state or when +// EventBridge processes an event from any Amazon Web Services service that +// publishes events. Configuring Amazon CloudWatch alarms and EventBridge events to +// automatically create OpsItems allows you to quickly diagnose and remediate +// issues with Amazon Web Services resources from a single console. To help you +// diagnose issues, each OpsItem includes contextually relevant information such as +// the name and ID of the Amazon Web Services resource that generated the OpsItem, +// alarm or event details, alarm history, and an alarm timeline graph. For the +// Amazon Web Services resource, OpsCenter aggregates information from Config, +// CloudTrail logs, and EventBridge, so you don't have to navigate across multiple +// console pages during your investigation. For more information, see OpsCenter // (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) in // the Amazon Web Services Systems Manager User Guide. type OpsItem struct { @@ -3261,7 +3285,7 @@ type OpsItem struct { // Recovery, Security. Category *string - // The ARN of the account that created the OpsItem. + // The ARN of the Amazon Web Services account that created the OpsItem. CreatedBy *string // The date and time the OpsItem was created. @@ -3270,7 +3294,7 @@ type OpsItem struct { // The OpsItem description. Description *string - // The ARN of the account that last updated the OpsItem. + // The ARN of the Amazon Web Services account that last updated the OpsItem. LastModifiedBy *string // The date and time the OpsItem was last updated. @@ -4164,24 +4188,27 @@ type PatchStatus struct { // execution. type ProgressCounters struct { - // The total number of steps that the system cancelled in all specified Regions and - // accounts for the current Automation execution. + // The total number of steps that the system cancelled in all specified Amazon Web + // Services Regions and Amazon Web Services accounts for the current Automation + // execution. CancelledSteps int32 - // The total number of steps that failed to run in all specified Regions and - // accounts for the current Automation execution. + // The total number of steps that failed to run in all specified Amazon Web + // Services Regions and Amazon Web Services accounts for the current Automation + // execution. FailedSteps int32 - // The total number of steps that successfully completed in all specified Regions - // and accounts for the current Automation execution. + // The total number of steps that successfully completed in all specified Amazon + // Web Services Regions and Amazon Web Services accounts for the current Automation + // execution. SuccessSteps int32 - // The total number of steps that timed out in all specified Regions and accounts - // for the current Automation execution. + // The total number of steps that timed out in all specified Amazon Web Services + // Regions and Amazon Web Services accounts for the current Automation execution. TimedOutSteps int32 - // The total number of steps run in all specified Regions and accounts for the - // current Automation execution. + // The total number of steps run in all specified Amazon Web Services Regions and + // Amazon Web Services accounts for the current Automation execution. TotalSteps int32 noSmithyDocumentSerde @@ -4246,7 +4273,7 @@ type ResourceComplianceSummaryItem struct { // Information about the AwsOrganizationsSource resource data sync source. A sync // source of this type can synchronize data from Organizations or, if an Amazon Web -// Services organization isn't present, from multiple Regions. +// Services organization isn't present, from multiple Amazon Web Services Regions. type ResourceDataSyncAwsOrganizationsSource struct { // If an Amazon Web Services organization is present, this is either @@ -4264,9 +4291,9 @@ type ResourceDataSyncAwsOrganizationsSource struct { } // Synchronize Amazon Web Services Systems Manager Inventory data from multiple -// accounts defined in Organizations to a centralized Amazon S3 bucket. Data is -// synchronized to individual key prefixes in the central bucket. Each key prefix -// represents a different account ID. +// Amazon Web Services accounts defined in Organizations to a centralized Amazon S3 +// bucket. Data is synchronized to individual key prefixes in the central bucket. +// Each key prefix represents a different Amazon Web Services account ID. type ResourceDataSyncDestinationDataSharing struct { // The sharing data type. Only Organization is supported. @@ -4309,7 +4336,7 @@ type ResourceDataSyncItem struct { // The type of resource data sync. If SyncType is SyncToDestination, then the // resource data sync synchronizes data to an S3 bucket. If the SyncType is // SyncFromSource then the resource data sync synchronizes data from Organizations - // or from multiple Regions. + // or from multiple Amazon Web Services Regions. SyncType *string noSmithyDocumentSerde @@ -4332,7 +4359,8 @@ type ResourceDataSyncS3Destination struct { // This member is required. BucketName *string - // The Region with the S3 bucket targeted by the resource data sync. + // The Amazon Web Services Region with the S3 bucket targeted by the resource data + // sync. // // This member is required. Region *string @@ -4358,7 +4386,7 @@ type ResourceDataSyncS3Destination struct { // Information about the source of the data included in the resource data sync. type ResourceDataSyncSource struct { - // The SyncSource Regions included in the resource data sync. + // The SyncSource Amazon Web Services Regions included in the resource data sync. // // This member is required. SourceRegions []string @@ -4376,15 +4404,15 @@ type ResourceDataSyncSource struct { // When you create a resource data sync, if you choose one of the Organizations // options, then Systems Manager automatically enables all OpsData sources in the - // selected Regions for all accounts in your organization (or in the selected - // organization units). For more information, see About multiple account and Region - // resource data syncs + // selected Amazon Web Services Regions for all Amazon Web Services accounts in + // your organization (or in the selected organization units). For more information, + // see About multiple account and Region resource data syncs // (https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resouce-data-sync-multiple-accounts-and-regions.html) // in the Amazon Web Services Systems Manager User Guide. EnableAllOpsDataSources bool - // Whether to automatically synchronize and aggregate data from new Regions when - // those Regions come online. + // Whether to automatically synchronize and aggregate data from new Amazon Web + // Services Regions when those Regions come online. IncludeFutureRegions bool noSmithyDocumentSerde @@ -4405,18 +4433,18 @@ type ResourceDataSyncSourceWithState struct { // When you create a resource data sync, if you choose one of the Organizations // options, then Systems Manager automatically enables all OpsData sources in the - // selected Regions for all accounts in your organization (or in the selected - // organization units). For more information, see About multiple account and Region - // resource data syncs + // selected Amazon Web Services Regions for all Amazon Web Services accounts in + // your organization (or in the selected organization units). For more information, + // see About multiple account and Region resource data syncs // (https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resouce-data-sync-multiple-accounts-and-regions.html) // in the Amazon Web Services Systems Manager User Guide. EnableAllOpsDataSources bool - // Whether to automatically synchronize and aggregate data from new Regions when - // those Regions come online. + // Whether to automatically synchronize and aggregate data from new Amazon Web + // Services Regions when those Regions come online. IncludeFutureRegions bool - // The SyncSource Regions included in the resource data sync. + // The SyncSource Amazon Web Services Regions included in the resource data sync. SourceRegions []string // The type of data source for the resource data sync. SourceType is either @@ -4490,8 +4518,8 @@ type Runbook struct { // StartChangeRequestExecution. Parameters map[string][]string - // Information about the Regions and accounts targeted by the current Runbook - // operation. + // Information about the Amazon Web Services Regions and Amazon Web Services + // accounts targeted by the current Runbook operation. TargetLocations []TargetLocation // The name of the parameter used as the target resource for the rate-controlled @@ -4791,8 +4819,8 @@ type StepExecution struct { // The execution status for this step. StepStatus AutomationExecutionStatus - // The combination of Regions and accounts targeted by the current Automation - // execution. + // The combination of Amazon Web Services Regions and Amazon Web Services accounts + // targeted by the current Automation execution. TargetLocation *TargetLocation // The targets for the step execution. @@ -4905,11 +4933,11 @@ type Tag struct { // // * State Manager // association targets only: Key=InstanceIds,Values=* This example demonstrates -// how to target all managed instances in the Region where the association was -// created. +// how to target all managed instances in the Amazon Web Services Region where the +// association was created. // -// For more information about how to send commands that target instances -// using Key,Value parameters, see Targeting multiple instances +// For more information about how to send commands that +// target instances using Key,Value parameters, see Targeting multiple instances // (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting) // in the Amazon Web Services Systems Manager User Guide. type Target struct { @@ -4928,22 +4956,22 @@ type Target struct { noSmithyDocumentSerde } -// The combination of Regions and accounts targeted by the current Automation -// execution. +// The combination of Amazon Web Services Regions and Amazon Web Services accounts +// targeted by the current Automation execution. type TargetLocation struct { - // The accounts targeted by the current Automation execution. + // The Amazon Web Services accounts targeted by the current Automation execution. Accounts []string // The Automation execution role used by the currently running Automation. If not // specified, the default value is AWS-SystemsManager-AutomationExecutionRole. ExecutionRoleName *string - // The Regions targeted by the current Automation execution. + // The Amazon Web Services Regions targeted by the current Automation execution. Regions []string - // The maximum number of Regions and accounts allowed to run the Automation - // concurrently. + // The maximum number of Amazon Web Services Regions and Amazon Web Services + // accounts allowed to run the Automation concurrently. TargetLocationMaxConcurrency *string // The maximum number of errors allowed before the system stops queueing additional diff --git a/service/synthetics/api_op_UpdateCanary.go b/service/synthetics/api_op_UpdateCanary.go index fae902c310d..4a89b844431 100644 --- a/service/synthetics/api_op_UpdateCanary.go +++ b/service/synthetics/api_op_UpdateCanary.go @@ -86,6 +86,15 @@ type UpdateCanaryInput struct { // The number of days to retain data about successful runs of this canary. SuccessRetentionPeriodInDays *int32 + // Defines the screenshots to use as the baseline for comparisons during visual + // monitoring comparisons during future runs of this canary. If you omit this + // parameter, no changes are made to any baseline screenshots that the canary might + // be using already. Visual monitoring is supported only on canaries running the + // syn-puppeteer-node-3.2 runtime or later. For more information, see Visual + // monitoring + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_SyntheticsLogger_VisualTesting.html) + // and Visual monitoring blueprint + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Blueprints_VisualTesting.html) VisualReference *types.VisualReferenceInput // If this canary is to test an endpoint in a VPC, this structure contains diff --git a/service/synthetics/types/types.go b/service/synthetics/types/types.go index b914e3d1e91..9226c5c50d6 100644 --- a/service/synthetics/types/types.go +++ b/service/synthetics/types/types.go @@ -7,11 +7,20 @@ import ( "time" ) +// A structure representing a screenshot that is used as a baseline during visual +// monitoring comparisons made by the canary. type BaseScreenshot struct { + // The name of the screenshot. This is generated the first time the canary is run + // after the UpdateCanary operation that specified for this canary to perform + // visual monitoring. + // // This member is required. ScreenshotName *string + // Coordinates that define the part of a screen to ignore during screenshot + // comparisons. To obtain the coordinates to use here, use the CloudWatch Logs + // console to draw the boundaries on the screen. For more information, see {LINK} IgnoreCoordinates []string noSmithyDocumentSerde @@ -72,6 +81,10 @@ type Canary struct { // modified, and most recently run. Timeline *CanaryTimeline + // If this canary performs visual monitoring by comparing screenshots, this + // structure contains the ID of the canary run to use as the baseline for + // screenshots, and the coordinates of any parts of the screen to ignore during the + // visual monitoring comparison. VisualReference *VisualReferenceOutput // If this canary is to test an endpoint in a VPC, this structure contains @@ -110,7 +123,7 @@ type CanaryCodeInput struct { // If you input your canary script directly into the canary instead of referring to // an S3 location, the value of this parameter is the base64-encoded contents of - // the .zip file that contains the script. It can be up to 5 MB. + // the .zip file that contains the script. It must be smaller than 256 Kb. ZipFile []byte noSmithyDocumentSerde @@ -352,19 +365,48 @@ type RuntimeVersion struct { noSmithyDocumentSerde } +// An object that specifies what screenshots to use as a baseline for visual +// monitoring by this canary, and optionally the parts of the screenshots to ignore +// during the visual monitoring comparison. Visual monitoring is supported only on +// canaries running the syn-puppeteer-node-3.2 runtime or later. For more +// information, see Visual monitoring +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_SyntheticsLogger_VisualTesting.html) +// and Visual monitoring blueprint +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Blueprints_VisualTesting.html) type VisualReferenceInput struct { + // Specifies which canary run to use the screenshots from as the baseline for + // future visual monitoring with this canary. Valid values are nextrun to use the + // screenshots from the next run after this update is made, lastrun to use the + // screenshots from the most recent run before this update was made, or the value + // of Id in the CanaryRun + // (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_CanaryRun.html) + // from any past run of this canary. + // // This member is required. BaseCanaryRunId *string + // An array of screenshots that will be used as the baseline for visual monitoring + // in future runs of this canary. If there is a screenshot that you don't want to + // be used for visual monitoring, remove it from this array. BaseScreenshots []BaseScreenshot noSmithyDocumentSerde } +// If this canary performs visual monitoring by comparing screenshots, this +// structure contains the ID of the canary run that is used as the baseline for +// screenshots, and the coordinates of any parts of those screenshots that are +// ignored during visual monitoring comparison. Visual monitoring is supported only +// on canaries running the syn-puppeteer-node-3.2 runtime or later. type VisualReferenceOutput struct { + + // The ID of the canary run that produced the screenshots that are used as the + // baseline for visual monitoring comparisons during future runs of this canary. BaseCanaryRunId *string + // An array of screenshots that are used as the baseline for comparisons during + // visual monitoring. BaseScreenshots []BaseScreenshot noSmithyDocumentSerde diff --git a/service/wafv2/api_op_CreateIPSet.go b/service/wafv2/api_op_CreateIPSet.go index 272597e1ae5..86be51a9fc1 100644 --- a/service/wafv2/api_op_CreateIPSet.go +++ b/service/wafv2/api_op_CreateIPSet.go @@ -61,7 +61,7 @@ type CreateIPSetInput struct { // This member is required. Addresses []string - // Specify IPV4 or IPV6. + // The version of the IP addresses, either IPV4 or IPV6. // // This member is required. IPAddressVersion types.IPAddressVersion diff --git a/service/wafv2/api_op_DescribeManagedRuleGroup.go b/service/wafv2/api_op_DescribeManagedRuleGroup.go index e7ddcea2de2..dd7cb4d94c7 100644 --- a/service/wafv2/api_op_DescribeManagedRuleGroup.go +++ b/service/wafv2/api_op_DescribeManagedRuleGroup.go @@ -57,6 +57,11 @@ type DescribeManagedRuleGroupInput struct { // This member is required. VendorName *string + // The version of the rule group. You can only use a version that is not scheduled + // for expiration. If you don't provide this, WAF uses the vendor's default + // version. + VersionName *string + noSmithyDocumentSerde } @@ -95,6 +100,17 @@ type DescribeManagedRuleGroupOutput struct { // Rules []types.RuleSummary + // The Amazon resource name (ARN) of the Amazon Simple Notification Service SNS + // topic that's used to record changes to the managed rule group. You can subscribe + // to the SNS topic to receive notifications when the managed rule group is + // modified, such as for new versions and for version expiration. For more + // information, see the Amazon Simple Notification Service Developer Guide + // (https://docs.aws.amazon.com/sns/latest/dg/welcome.html). + SnsTopicArn *string + + // The managed rule group's version. + VersionName *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/wafv2/api_op_GetManagedRuleSet.go b/service/wafv2/api_op_GetManagedRuleSet.go new file mode 100644 index 00000000000..5cd78709f32 --- /dev/null +++ b/service/wafv2/api_op_GetManagedRuleSet.go @@ -0,0 +1,159 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wafv2 + +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/wafv2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the specified managed rule set. This is intended for use only by +// vendors of managed rule sets. Vendors are Amazon Web Services and Marketplace +// sellers. Vendors, you can use the managed rule set APIs to provide controlled +// rollout of your versioned managed rule group offerings for your customers. The +// APIs are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and +// UpdateManagedRuleSetVersionExpiryDate. +func (c *Client) GetManagedRuleSet(ctx context.Context, params *GetManagedRuleSetInput, optFns ...func(*Options)) (*GetManagedRuleSetOutput, error) { + if params == nil { + params = &GetManagedRuleSetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetManagedRuleSet", params, optFns, c.addOperationGetManagedRuleSetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetManagedRuleSetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetManagedRuleSetInput struct { + + // A unique identifier for the managed rule set. The ID is returned in the + // responses to commands like list. You provide it to operations like get and + // update. + // + // This member is required. + Id *string + + // The name of the managed rule set. You use this, along with the rule set ID, to + // identify the rule set. This name is assigned to the corresponding managed rule + // group, which your customers can access and use. + // + // This member is required. + Name *string + + // Specifies whether this is for an Amazon CloudFront distribution or for a + // regional application. A regional application can be an Application Load Balancer + // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. To work with + // CloudFront, you must also specify the Region US East (N. Virginia) as + // follows: + // + // * CLI - Specify the Region when you use the CloudFront scope: + // --scope=CLOUDFRONT --region=us-east-1. + // + // * API and SDKs - For all calls, use the + // Region endpoint us-east-1. + // + // This member is required. + Scope types.Scope + + noSmithyDocumentSerde +} + +type GetManagedRuleSetOutput struct { + + // A token used for optimistic locking. WAF returns a token to your get and list + // requests, to mark the state of the entity at the time of the request. To make + // changes to the entity associated with the token, you provide the token to + // operations like update and delete. WAF uses the token to ensure that no changes + // have been made to the entity since you last retrieved it. If a change has been + // made, the update fails with a WAFOptimisticLockException. If this happens, + // perform another get, and use the new token returned by that operation. + LockToken *string + + // The managed rule set that you requested. + ManagedRuleSet *types.ManagedRuleSet + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetManagedRuleSetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetManagedRuleSet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetManagedRuleSet{}, 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 = addOpGetManagedRuleSetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetManagedRuleSet(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_opGetManagedRuleSet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "wafv2", + OperationName: "GetManagedRuleSet", + } +} diff --git a/service/wafv2/api_op_ListAvailableManagedRuleGroupVersions.go b/service/wafv2/api_op_ListAvailableManagedRuleGroupVersions.go new file mode 100644 index 00000000000..e93115ae94c --- /dev/null +++ b/service/wafv2/api_op_ListAvailableManagedRuleGroupVersions.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wafv2 + +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/wafv2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of the available versions for the specified managed rule group. +func (c *Client) ListAvailableManagedRuleGroupVersions(ctx context.Context, params *ListAvailableManagedRuleGroupVersionsInput, optFns ...func(*Options)) (*ListAvailableManagedRuleGroupVersionsOutput, error) { + if params == nil { + params = &ListAvailableManagedRuleGroupVersionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAvailableManagedRuleGroupVersions", params, optFns, c.addOperationListAvailableManagedRuleGroupVersionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAvailableManagedRuleGroupVersionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAvailableManagedRuleGroupVersionsInput struct { + + // The name of the managed rule group. You use this, along with the vendor name, to + // identify the rule group. + // + // This member is required. + Name *string + + // Specifies whether this is for an Amazon CloudFront distribution or for a + // regional application. A regional application can be an Application Load Balancer + // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. To work with + // CloudFront, you must also specify the Region US East (N. Virginia) as + // follows: + // + // * CLI - Specify the Region when you use the CloudFront scope: + // --scope=CLOUDFRONT --region=us-east-1. + // + // * API and SDKs - For all calls, use the + // Region endpoint us-east-1. + // + // This member is required. + Scope types.Scope + + // The name of the managed rule group vendor. You use this, along with the rule + // group name, to identify the rule group. + // + // This member is required. + VendorName *string + + // The maximum number of objects that you want WAF to return for this request. If + // more objects are available, in the response, WAF provides a NextMarker value + // that you can use in a subsequent call to get the next batch of objects. + Limit *int32 + + // When you request a list of objects with a Limit setting, if the number of + // objects that are still available for retrieval exceeds the limit, WAF returns a + // NextMarker value in the response. To retrieve the next batch of objects, provide + // the marker from the prior call in your next request. + NextMarker *string + + noSmithyDocumentSerde +} + +type ListAvailableManagedRuleGroupVersionsOutput struct { + + // When you request a list of objects with a Limit setting, if the number of + // objects that are still available for retrieval exceeds the limit, WAF returns a + // NextMarker value in the response. To retrieve the next batch of objects, provide + // the marker from the prior call in your next request. + NextMarker *string + + // The versions that are currently available for the specified managed rule group. + Versions []types.ManagedRuleGroupVersion + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAvailableManagedRuleGroupVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAvailableManagedRuleGroupVersions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAvailableManagedRuleGroupVersions{}, 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 = addOpListAvailableManagedRuleGroupVersionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAvailableManagedRuleGroupVersions(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_opListAvailableManagedRuleGroupVersions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "wafv2", + OperationName: "ListAvailableManagedRuleGroupVersions", + } +} diff --git a/service/wafv2/api_op_ListAvailableManagedRuleGroups.go b/service/wafv2/api_op_ListAvailableManagedRuleGroups.go index f980d42bd92..606ff3dc371 100644 --- a/service/wafv2/api_op_ListAvailableManagedRuleGroups.go +++ b/service/wafv2/api_op_ListAvailableManagedRuleGroups.go @@ -12,8 +12,8 @@ import ( ) // Retrieves an array of managed rule groups that are available for you to use. -// This list includes all Amazon Web Services Managed Rules rule groups and the -// Marketplace managed rule groups that you're subscribed to. +// This list includes all Amazon Web Services Managed Rules rule groups and all of +// the Marketplace managed rule groups that you're subscribed to. func (c *Client) ListAvailableManagedRuleGroups(ctx context.Context, params *ListAvailableManagedRuleGroupsInput, optFns ...func(*Options)) (*ListAvailableManagedRuleGroupsOutput, error) { if params == nil { params = &ListAvailableManagedRuleGroupsInput{} diff --git a/service/wafv2/api_op_ListManagedRuleSets.go b/service/wafv2/api_op_ListManagedRuleSets.go new file mode 100644 index 00000000000..b066002f237 --- /dev/null +++ b/service/wafv2/api_op_ListManagedRuleSets.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wafv2 + +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/wafv2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the managed rule sets that you own. This is intended for use only by +// vendors of managed rule sets. Vendors are Amazon Web Services and Marketplace +// sellers. Vendors, you can use the managed rule set APIs to provide controlled +// rollout of your versioned managed rule group offerings for your customers. The +// APIs are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and +// UpdateManagedRuleSetVersionExpiryDate. +func (c *Client) ListManagedRuleSets(ctx context.Context, params *ListManagedRuleSetsInput, optFns ...func(*Options)) (*ListManagedRuleSetsOutput, error) { + if params == nil { + params = &ListManagedRuleSetsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListManagedRuleSets", params, optFns, c.addOperationListManagedRuleSetsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListManagedRuleSetsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListManagedRuleSetsInput struct { + + // Specifies whether this is for an Amazon CloudFront distribution or for a + // regional application. A regional application can be an Application Load Balancer + // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. To work with + // CloudFront, you must also specify the Region US East (N. Virginia) as + // follows: + // + // * CLI - Specify the Region when you use the CloudFront scope: + // --scope=CLOUDFRONT --region=us-east-1. + // + // * API and SDKs - For all calls, use the + // Region endpoint us-east-1. + // + // This member is required. + Scope types.Scope + + // The maximum number of objects that you want WAF to return for this request. If + // more objects are available, in the response, WAF provides a NextMarker value + // that you can use in a subsequent call to get the next batch of objects. + Limit *int32 + + // When you request a list of objects with a Limit setting, if the number of + // objects that are still available for retrieval exceeds the limit, WAF returns a + // NextMarker value in the response. To retrieve the next batch of objects, provide + // the marker from the prior call in your next request. + NextMarker *string + + noSmithyDocumentSerde +} + +type ListManagedRuleSetsOutput struct { + + // Your managed rule sets. + ManagedRuleSets []types.ManagedRuleSetSummary + + // When you request a list of objects with a Limit setting, if the number of + // objects that are still available for retrieval exceeds the limit, WAF returns a + // NextMarker value in the response. To retrieve the next batch of objects, provide + // the marker from the prior call in your next request. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListManagedRuleSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListManagedRuleSets{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListManagedRuleSets{}, 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 = addOpListManagedRuleSetsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListManagedRuleSets(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_opListManagedRuleSets(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "wafv2", + OperationName: "ListManagedRuleSets", + } +} diff --git a/service/wafv2/api_op_PutManagedRuleSetVersions.go b/service/wafv2/api_op_PutManagedRuleSetVersions.go new file mode 100644 index 00000000000..37a93895c83 --- /dev/null +++ b/service/wafv2/api_op_PutManagedRuleSetVersions.go @@ -0,0 +1,184 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wafv2 + +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/wafv2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Defines the versions of your managed rule set that you are offering to the +// customers. Customers see your offerings as managed rule groups with versioning. +// This is intended for use only by vendors of managed rule sets. Vendors are +// Amazon Web Services and Marketplace sellers. Vendors, you can use the managed +// rule set APIs to provide controlled rollout of your versioned managed rule group +// offerings for your customers. The APIs are ListManagedRuleSets, +// GetManagedRuleSet, PutManagedRuleSetVersions, and +// UpdateManagedRuleSetVersionExpiryDate. Customers retrieve their managed rule +// group list by calling ListAvailableManagedRuleGroups. The name that you provide +// here for your managed rule set is the name the customer sees for the +// corresponding managed rule group. Customers can retrieve the available versions +// for a managed rule group by calling ListAvailableManagedRuleGroupVersions. You +// provide a rule group specification for each version. For each managed rule set, +// you must specify a version that you recommend using. To initiate the expiration +// of a managed rule group version, use UpdateManagedRuleSetVersionExpiryDate. +func (c *Client) PutManagedRuleSetVersions(ctx context.Context, params *PutManagedRuleSetVersionsInput, optFns ...func(*Options)) (*PutManagedRuleSetVersionsOutput, error) { + if params == nil { + params = &PutManagedRuleSetVersionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutManagedRuleSetVersions", params, optFns, c.addOperationPutManagedRuleSetVersionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutManagedRuleSetVersionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutManagedRuleSetVersionsInput struct { + + // A unique identifier for the managed rule set. The ID is returned in the + // responses to commands like list. You provide it to operations like get and + // update. + // + // This member is required. + Id *string + + // A token used for optimistic locking. WAF returns a token to your get and list + // requests, to mark the state of the entity at the time of the request. To make + // changes to the entity associated with the token, you provide the token to + // operations like update and delete. WAF uses the token to ensure that no changes + // have been made to the entity since you last retrieved it. If a change has been + // made, the update fails with a WAFOptimisticLockException. If this happens, + // perform another get, and use the new token returned by that operation. + // + // This member is required. + LockToken *string + + // The name of the managed rule set. You use this, along with the rule set ID, to + // identify the rule set. This name is assigned to the corresponding managed rule + // group, which your customers can access and use. + // + // This member is required. + Name *string + + // Specifies whether this is for an Amazon CloudFront distribution or for a + // regional application. A regional application can be an Application Load Balancer + // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. To work with + // CloudFront, you must also specify the Region US East (N. Virginia) as + // follows: + // + // * CLI - Specify the Region when you use the CloudFront scope: + // --scope=CLOUDFRONT --region=us-east-1. + // + // * API and SDKs - For all calls, use the + // Region endpoint us-east-1. + // + // This member is required. + Scope types.Scope + + // The version of the named managed rule group that you'd like your customers to + // choose, from among your version offerings. + RecommendedVersion *string + + // The versions of the named managed rule group that you want to offer to your + // customers. + VersionsToPublish map[string]types.VersionToPublish + + noSmithyDocumentSerde +} + +type PutManagedRuleSetVersionsOutput struct { + + // A token used for optimistic locking. WAF returns a token to your get and list + // requests, to mark the state of the entity at the time of the request. To make + // changes to the entity associated with the token, you provide the token to + // operations like update and delete. WAF uses the token to ensure that no changes + // have been made to the entity since you last retrieved it. If a change has been + // made, the update fails with a WAFOptimisticLockException. If this happens, + // perform another get, and use the new token returned by that operation. + NextLockToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutManagedRuleSetVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutManagedRuleSetVersions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutManagedRuleSetVersions{}, 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 = addOpPutManagedRuleSetVersionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutManagedRuleSetVersions(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_opPutManagedRuleSetVersions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "wafv2", + OperationName: "PutManagedRuleSetVersions", + } +} diff --git a/service/wafv2/api_op_UpdateManagedRuleSetVersionExpiryDate.go b/service/wafv2/api_op_UpdateManagedRuleSetVersionExpiryDate.go new file mode 100644 index 00000000000..4476221b1b9 --- /dev/null +++ b/service/wafv2/api_op_UpdateManagedRuleSetVersionExpiryDate.go @@ -0,0 +1,192 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wafv2 + +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/wafv2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates the expiration information for your managed rule set. Use this to +// initiate the expiration of a managed rule group version. After you initiate +// expiration for a version, WAF excludes it from the reponse to +// ListAvailableManagedRuleGroupVersions for the managed rule group. This is +// intended for use only by vendors of managed rule sets. Vendors are Amazon Web +// Services and Marketplace sellers. Vendors, you can use the managed rule set APIs +// to provide controlled rollout of your versioned managed rule group offerings for +// your customers. The APIs are ListManagedRuleSets, GetManagedRuleSet, +// PutManagedRuleSetVersions, and UpdateManagedRuleSetVersionExpiryDate. +func (c *Client) UpdateManagedRuleSetVersionExpiryDate(ctx context.Context, params *UpdateManagedRuleSetVersionExpiryDateInput, optFns ...func(*Options)) (*UpdateManagedRuleSetVersionExpiryDateOutput, error) { + if params == nil { + params = &UpdateManagedRuleSetVersionExpiryDateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateManagedRuleSetVersionExpiryDate", params, optFns, c.addOperationUpdateManagedRuleSetVersionExpiryDateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateManagedRuleSetVersionExpiryDateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateManagedRuleSetVersionExpiryDateInput struct { + + // The time that you want the version to expire. Times are in Coordinated Universal + // Time (UTC) format. UTC format includes the special designator, Z. For example, + // "2016-09-27T14:50Z". + // + // This member is required. + ExpiryTimestamp *time.Time + + // A unique identifier for the managed rule set. The ID is returned in the + // responses to commands like list. You provide it to operations like get and + // update. + // + // This member is required. + Id *string + + // A token used for optimistic locking. WAF returns a token to your get and list + // requests, to mark the state of the entity at the time of the request. To make + // changes to the entity associated with the token, you provide the token to + // operations like update and delete. WAF uses the token to ensure that no changes + // have been made to the entity since you last retrieved it. If a change has been + // made, the update fails with a WAFOptimisticLockException. If this happens, + // perform another get, and use the new token returned by that operation. + // + // This member is required. + LockToken *string + + // The name of the managed rule set. You use this, along with the rule set ID, to + // identify the rule set. This name is assigned to the corresponding managed rule + // group, which your customers can access and use. + // + // This member is required. + Name *string + + // Specifies whether this is for an Amazon CloudFront distribution or for a + // regional application. A regional application can be an Application Load Balancer + // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. To work with + // CloudFront, you must also specify the Region US East (N. Virginia) as + // follows: + // + // * CLI - Specify the Region when you use the CloudFront scope: + // --scope=CLOUDFRONT --region=us-east-1. + // + // * API and SDKs - For all calls, use the + // Region endpoint us-east-1. + // + // This member is required. + Scope types.Scope + + // The version that you want to remove from your list of offerings for the named + // managed rule group. + // + // This member is required. + VersionToExpire *string + + noSmithyDocumentSerde +} + +type UpdateManagedRuleSetVersionExpiryDateOutput struct { + + // The version that is set to expire. + ExpiringVersion *string + + // The time that the version will expire. Times are in Coordinated Universal Time + // (UTC) format. UTC format includes the special designator, Z. For example, + // "2016-09-27T14:50Z". + ExpiryTimestamp *time.Time + + // A token used for optimistic locking. WAF returns a token to your get and list + // requests, to mark the state of the entity at the time of the request. To make + // changes to the entity associated with the token, you provide the token to + // operations like update and delete. WAF uses the token to ensure that no changes + // have been made to the entity since you last retrieved it. If a change has been + // made, the update fails with a WAFOptimisticLockException. If this happens, + // perform another get, and use the new token returned by that operation. + NextLockToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateManagedRuleSetVersionExpiryDateMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateManagedRuleSetVersionExpiryDate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateManagedRuleSetVersionExpiryDate{}, 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 = addOpUpdateManagedRuleSetVersionExpiryDateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateManagedRuleSetVersionExpiryDate(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_opUpdateManagedRuleSetVersionExpiryDate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "wafv2", + OperationName: "UpdateManagedRuleSetVersionExpiryDate", + } +} diff --git a/service/wafv2/deserializers.go b/service/wafv2/deserializers.go index 7215d1e6446..d18049a799a 100644 --- a/service/wafv2/deserializers.go +++ b/service/wafv2/deserializers.go @@ -241,6 +241,9 @@ func awsAwsjson11_deserializeOpErrorCheckCapacity(response *smithyhttp.Response, } switch { + case strings.EqualFold("WAFExpiredManagedRuleGroupVersionException", errorCode): + return awsAwsjson11_deserializeErrorWAFExpiredManagedRuleGroupVersionException(response, errorBody) + case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) @@ -1810,6 +1813,9 @@ func awsAwsjson11_deserializeOpErrorDescribeManagedRuleGroup(response *smithyhtt } switch { + case strings.EqualFold("WAFExpiredManagedRuleGroupVersionException", errorCode): + return awsAwsjson11_deserializeErrorWAFExpiredManagedRuleGroupVersionException(response, errorBody) + case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) @@ -2195,6 +2201,126 @@ func awsAwsjson11_deserializeOpErrorGetLoggingConfiguration(response *smithyhttp } } +type awsAwsjson11_deserializeOpGetManagedRuleSet struct { +} + +func (*awsAwsjson11_deserializeOpGetManagedRuleSet) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetManagedRuleSet) 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_deserializeOpErrorGetManagedRuleSet(response, &metadata) + } + output := &GetManagedRuleSetOutput{} + 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_deserializeOpDocumentGetManagedRuleSetOutput(&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_deserializeOpErrorGetManagedRuleSet(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("WAFInternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) + + case strings.EqualFold("WAFInvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) + + case strings.EqualFold("WAFInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) + + case strings.EqualFold("WAFNonexistentItemException", errorCode): + return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpGetPermissionPolicy struct { } @@ -3149,14 +3275,14 @@ func awsAwsjson11_deserializeOpErrorListAvailableManagedRuleGroups(response *smi } } -type awsAwsjson11_deserializeOpListIPSets struct { +type awsAwsjson11_deserializeOpListAvailableManagedRuleGroupVersions struct { } -func (*awsAwsjson11_deserializeOpListIPSets) ID() string { +func (*awsAwsjson11_deserializeOpListAvailableManagedRuleGroupVersions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListIPSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListAvailableManagedRuleGroupVersions) 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) @@ -3170,9 +3296,9 @@ func (m *awsAwsjson11_deserializeOpListIPSets) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListIPSets(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListAvailableManagedRuleGroupVersions(response, &metadata) } - output := &ListIPSetsOutput{} + output := &ListAvailableManagedRuleGroupVersionsOutput{} out.Result = output var buff [1024]byte @@ -3192,7 +3318,7 @@ func (m *awsAwsjson11_deserializeOpListIPSets) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListIPSetsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListAvailableManagedRuleGroupVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3206,7 +3332,7 @@ func (m *awsAwsjson11_deserializeOpListIPSets) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListIPSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListAvailableManagedRuleGroupVersions(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)} @@ -3266,14 +3392,14 @@ func awsAwsjson11_deserializeOpErrorListIPSets(response *smithyhttp.Response, me } } -type awsAwsjson11_deserializeOpListLoggingConfigurations struct { +type awsAwsjson11_deserializeOpListIPSets struct { } -func (*awsAwsjson11_deserializeOpListLoggingConfigurations) ID() string { +func (*awsAwsjson11_deserializeOpListIPSets) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListLoggingConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListIPSets) 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) @@ -3287,9 +3413,9 @@ func (m *awsAwsjson11_deserializeOpListLoggingConfigurations) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListLoggingConfigurations(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListIPSets(response, &metadata) } - output := &ListLoggingConfigurationsOutput{} + output := &ListIPSetsOutput{} out.Result = output var buff [1024]byte @@ -3309,7 +3435,7 @@ func (m *awsAwsjson11_deserializeOpListLoggingConfigurations) HandleDeserialize( return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListLoggingConfigurationsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListIPSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3323,7 +3449,7 @@ func (m *awsAwsjson11_deserializeOpListLoggingConfigurations) HandleDeserialize( return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListLoggingConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListIPSets(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)} @@ -3383,14 +3509,14 @@ func awsAwsjson11_deserializeOpErrorListLoggingConfigurations(response *smithyht } } -type awsAwsjson11_deserializeOpListRegexPatternSets struct { +type awsAwsjson11_deserializeOpListLoggingConfigurations struct { } -func (*awsAwsjson11_deserializeOpListRegexPatternSets) ID() string { +func (*awsAwsjson11_deserializeOpListLoggingConfigurations) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListRegexPatternSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListLoggingConfigurations) 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) @@ -3404,9 +3530,9 @@ func (m *awsAwsjson11_deserializeOpListRegexPatternSets) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListRegexPatternSets(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListLoggingConfigurations(response, &metadata) } - output := &ListRegexPatternSetsOutput{} + output := &ListLoggingConfigurationsOutput{} out.Result = output var buff [1024]byte @@ -3426,7 +3552,7 @@ func (m *awsAwsjson11_deserializeOpListRegexPatternSets) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListRegexPatternSetsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListLoggingConfigurationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3440,7 +3566,7 @@ func (m *awsAwsjson11_deserializeOpListRegexPatternSets) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListRegexPatternSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListLoggingConfigurations(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)} @@ -3500,14 +3626,14 @@ func awsAwsjson11_deserializeOpErrorListRegexPatternSets(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpListResourcesForWebACL struct { +type awsAwsjson11_deserializeOpListManagedRuleSets struct { } -func (*awsAwsjson11_deserializeOpListResourcesForWebACL) ID() string { +func (*awsAwsjson11_deserializeOpListManagedRuleSets) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListResourcesForWebACL) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListManagedRuleSets) 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) @@ -3521,9 +3647,9 @@ func (m *awsAwsjson11_deserializeOpListResourcesForWebACL) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListResourcesForWebACL(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListManagedRuleSets(response, &metadata) } - output := &ListResourcesForWebACLOutput{} + output := &ListManagedRuleSetsOutput{} out.Result = output var buff [1024]byte @@ -3543,7 +3669,7 @@ func (m *awsAwsjson11_deserializeOpListResourcesForWebACL) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListResourcesForWebACLOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListManagedRuleSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3557,7 +3683,7 @@ func (m *awsAwsjson11_deserializeOpListResourcesForWebACL) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListResourcesForWebACL(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListManagedRuleSets(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)} @@ -3607,9 +3733,6 @@ func awsAwsjson11_deserializeOpErrorListResourcesForWebACL(response *smithyhttp. case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) - case strings.EqualFold("WAFNonexistentItemException", errorCode): - return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3620,14 +3743,14 @@ func awsAwsjson11_deserializeOpErrorListResourcesForWebACL(response *smithyhttp. } } -type awsAwsjson11_deserializeOpListRuleGroups struct { +type awsAwsjson11_deserializeOpListRegexPatternSets struct { } -func (*awsAwsjson11_deserializeOpListRuleGroups) ID() string { +func (*awsAwsjson11_deserializeOpListRegexPatternSets) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListRuleGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListRegexPatternSets) 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) @@ -3641,9 +3764,9 @@ func (m *awsAwsjson11_deserializeOpListRuleGroups) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListRuleGroups(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListRegexPatternSets(response, &metadata) } - output := &ListRuleGroupsOutput{} + output := &ListRegexPatternSetsOutput{} out.Result = output var buff [1024]byte @@ -3663,7 +3786,7 @@ func (m *awsAwsjson11_deserializeOpListRuleGroups) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListRuleGroupsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListRegexPatternSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3677,7 +3800,7 @@ func (m *awsAwsjson11_deserializeOpListRuleGroups) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListRuleGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListRegexPatternSets(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)} @@ -3737,14 +3860,14 @@ func awsAwsjson11_deserializeOpErrorListRuleGroups(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpListTagsForResource struct { +type awsAwsjson11_deserializeOpListResourcesForWebACL struct { } -func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson11_deserializeOpListResourcesForWebACL) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListResourcesForWebACL) 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) @@ -3758,9 +3881,9 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListResourcesForWebACL(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListResourcesForWebACLOutput{} out.Result = output var buff [1024]byte @@ -3780,7 +3903,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListResourcesForWebACLOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3794,7 +3917,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListResourcesForWebACL(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)} @@ -3847,12 +3970,6 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) - case strings.EqualFold("WAFTagOperationException", errorCode): - return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody) - - case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode): - return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3863,14 +3980,14 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpListWebACLs struct { +type awsAwsjson11_deserializeOpListRuleGroups struct { } -func (*awsAwsjson11_deserializeOpListWebACLs) ID() string { +func (*awsAwsjson11_deserializeOpListRuleGroups) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListWebACLs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListRuleGroups) 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) @@ -3884,9 +4001,9 @@ func (m *awsAwsjson11_deserializeOpListWebACLs) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListWebACLs(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListRuleGroups(response, &metadata) } - output := &ListWebACLsOutput{} + output := &ListRuleGroupsOutput{} out.Result = output var buff [1024]byte @@ -3906,7 +4023,7 @@ func (m *awsAwsjson11_deserializeOpListWebACLs) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListWebACLsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListRuleGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3920,7 +4037,7 @@ func (m *awsAwsjson11_deserializeOpListWebACLs) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListWebACLs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListRuleGroups(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)} @@ -3980,14 +4097,14 @@ func awsAwsjson11_deserializeOpErrorListWebACLs(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpPutLoggingConfiguration struct { +type awsAwsjson11_deserializeOpListTagsForResource struct { } -func (*awsAwsjson11_deserializeOpPutLoggingConfiguration) ID() string { +func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_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) @@ -4001,9 +4118,9 @@ func (m *awsAwsjson11_deserializeOpPutLoggingConfiguration) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutLoggingConfiguration(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &PutLoggingConfigurationOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -4023,7 +4140,7 @@ func (m *awsAwsjson11_deserializeOpPutLoggingConfiguration) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutLoggingConfigurationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4037,7 +4154,7 @@ func (m *awsAwsjson11_deserializeOpPutLoggingConfiguration) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_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)} @@ -4087,17 +4204,14 @@ func awsAwsjson11_deserializeOpErrorPutLoggingConfiguration(response *smithyhttp case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) - case strings.EqualFold("WAFLimitsExceededException", errorCode): - return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) - case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) - case strings.EqualFold("WAFOptimisticLockException", errorCode): - return awsAwsjson11_deserializeErrorWAFOptimisticLockException(response, errorBody) + case strings.EqualFold("WAFTagOperationException", errorCode): + return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody) - case strings.EqualFold("WAFServiceLinkedRoleErrorException", errorCode): - return awsAwsjson11_deserializeErrorWAFServiceLinkedRoleErrorException(response, errorBody) + case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -4109,14 +4223,14 @@ func awsAwsjson11_deserializeOpErrorPutLoggingConfiguration(response *smithyhttp } } -type awsAwsjson11_deserializeOpPutPermissionPolicy struct { +type awsAwsjson11_deserializeOpListWebACLs struct { } -func (*awsAwsjson11_deserializeOpPutPermissionPolicy) ID() string { +func (*awsAwsjson11_deserializeOpListWebACLs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutPermissionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListWebACLs) 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) @@ -4130,9 +4244,9 @@ func (m *awsAwsjson11_deserializeOpPutPermissionPolicy) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutPermissionPolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListWebACLs(response, &metadata) } - output := &PutPermissionPolicyOutput{} + output := &ListWebACLsOutput{} out.Result = output var buff [1024]byte @@ -4152,7 +4266,7 @@ func (m *awsAwsjson11_deserializeOpPutPermissionPolicy) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutPermissionPolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListWebACLsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4166,7 +4280,7 @@ func (m *awsAwsjson11_deserializeOpPutPermissionPolicy) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutPermissionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListWebACLs(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)} @@ -4210,15 +4324,384 @@ func awsAwsjson11_deserializeOpErrorPutPermissionPolicy(response *smithyhttp.Res case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) + case strings.EqualFold("WAFInvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) + case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) - case strings.EqualFold("WAFInvalidPermissionPolicyException", errorCode): - return awsAwsjson11_deserializeErrorWAFInvalidPermissionPolicyException(response, errorBody) - - case strings.EqualFold("WAFNonexistentItemException", errorCode): - return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) - + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutLoggingConfiguration struct { +} + +func (*awsAwsjson11_deserializeOpPutLoggingConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutLoggingConfiguration) 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_deserializeOpErrorPutLoggingConfiguration(response, &metadata) + } + output := &PutLoggingConfigurationOutput{} + 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_deserializeOpDocumentPutLoggingConfigurationOutput(&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_deserializeOpErrorPutLoggingConfiguration(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("WAFInternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) + + case strings.EqualFold("WAFInvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) + + case strings.EqualFold("WAFInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) + + case strings.EqualFold("WAFLimitsExceededException", errorCode): + return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) + + case strings.EqualFold("WAFNonexistentItemException", errorCode): + return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) + + case strings.EqualFold("WAFOptimisticLockException", errorCode): + return awsAwsjson11_deserializeErrorWAFOptimisticLockException(response, errorBody) + + case strings.EqualFold("WAFServiceLinkedRoleErrorException", errorCode): + return awsAwsjson11_deserializeErrorWAFServiceLinkedRoleErrorException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutManagedRuleSetVersions struct { +} + +func (*awsAwsjson11_deserializeOpPutManagedRuleSetVersions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutManagedRuleSetVersions) 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_deserializeOpErrorPutManagedRuleSetVersions(response, &metadata) + } + output := &PutManagedRuleSetVersionsOutput{} + 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_deserializeOpDocumentPutManagedRuleSetVersionsOutput(&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_deserializeOpErrorPutManagedRuleSetVersions(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("WAFInternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) + + case strings.EqualFold("WAFInvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) + + case strings.EqualFold("WAFInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) + + case strings.EqualFold("WAFNonexistentItemException", errorCode): + return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) + + case strings.EqualFold("WAFOptimisticLockException", errorCode): + return awsAwsjson11_deserializeErrorWAFOptimisticLockException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutPermissionPolicy struct { +} + +func (*awsAwsjson11_deserializeOpPutPermissionPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutPermissionPolicy) 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_deserializeOpErrorPutPermissionPolicy(response, &metadata) + } + output := &PutPermissionPolicyOutput{} + 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_deserializeOpDocumentPutPermissionPolicyOutput(&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_deserializeOpErrorPutPermissionPolicy(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("WAFInternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) + + case strings.EqualFold("WAFInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) + + case strings.EqualFold("WAFInvalidPermissionPolicyException", errorCode): + return awsAwsjson11_deserializeErrorWAFInvalidPermissionPolicyException(response, errorBody) + + case strings.EqualFold("WAFNonexistentItemException", errorCode): + return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4613,6 +5096,129 @@ func awsAwsjson11_deserializeOpErrorUpdateIPSet(response *smithyhttp.Response, m } } +type awsAwsjson11_deserializeOpUpdateManagedRuleSetVersionExpiryDate struct { +} + +func (*awsAwsjson11_deserializeOpUpdateManagedRuleSetVersionExpiryDate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateManagedRuleSetVersionExpiryDate) 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_deserializeOpErrorUpdateManagedRuleSetVersionExpiryDate(response, &metadata) + } + output := &UpdateManagedRuleSetVersionExpiryDateOutput{} + 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_deserializeOpDocumentUpdateManagedRuleSetVersionExpiryDateOutput(&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_deserializeOpErrorUpdateManagedRuleSetVersionExpiryDate(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("WAFInternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) + + case strings.EqualFold("WAFInvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) + + case strings.EqualFold("WAFInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) + + case strings.EqualFold("WAFNonexistentItemException", errorCode): + return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) + + case strings.EqualFold("WAFOptimisticLockException", errorCode): + return awsAwsjson11_deserializeErrorWAFOptimisticLockException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpUpdateRegexPatternSet struct { } @@ -4978,6 +5584,9 @@ func awsAwsjson11_deserializeOpErrorUpdateWebACL(response *smithyhttp.Response, case strings.EqualFold("WAFDuplicateItemException", errorCode): return awsAwsjson11_deserializeErrorWAFDuplicateItemException(response, errorBody) + case strings.EqualFold("WAFExpiredManagedRuleGroupVersionException", errorCode): + return awsAwsjson11_deserializeErrorWAFExpiredManagedRuleGroupVersionException(response, errorBody) + case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) @@ -5050,7 +5659,42 @@ func awsAwsjson11_deserializeErrorWAFAssociatedItemException(response *smithyhtt return output } -func awsAwsjson11_deserializeErrorWAFDuplicateItemException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorWAFDuplicateItemException(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.WAFDuplicateItemException{} + err := awsAwsjson11_deserializeDocumentWAFDuplicateItemException(&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_deserializeErrorWAFExpiredManagedRuleGroupVersionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5068,8 +5712,8 @@ func awsAwsjson11_deserializeErrorWAFDuplicateItemException(response *smithyhttp return err } - output := &types.WAFDuplicateItemException{} - err := awsAwsjson11_deserializeDocumentWAFDuplicateItemException(&output, shape) + output := &types.WAFExpiredManagedRuleGroupVersionException{} + err := awsAwsjson11_deserializeDocumentWAFExpiredManagedRuleGroupVersionException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -7813,18 +8457,299 @@ func awsAwsjson11_deserializeDocumentManagedRuleGroupStatement(v **types.Managed return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ManagedRuleGroupStatement - if *v == nil { - sv = &types.ManagedRuleGroupStatement{} - } else { - sv = *v - } + var sv *types.ManagedRuleGroupStatement + if *v == nil { + sv = &types.ManagedRuleGroupStatement{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ExcludedRules": + if err := awsAwsjson11_deserializeDocumentExcludedRules(&sv.ExcludedRules, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "ScopeDownStatement": + if err := awsAwsjson11_deserializeDocumentStatement(&sv.ScopeDownStatement, value); err != nil { + return err + } + + case "VendorName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VendorName to be of type string, got %T instead", value) + } + sv.VendorName = ptr.String(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionKeyString to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentManagedRuleGroupSummaries(v *[]types.ManagedRuleGroupSummary, 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.ManagedRuleGroupSummary + if *v == nil { + cv = []types.ManagedRuleGroupSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ManagedRuleGroupSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentManagedRuleGroupSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentManagedRuleGroupSummary(v **types.ManagedRuleGroupSummary, 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.ManagedRuleGroupSummary + if *v == nil { + sv = &types.ManagedRuleGroupSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "VendorName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VendorName to be of type string, got %T instead", value) + } + sv.VendorName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentManagedRuleGroupVersion(v **types.ManagedRuleGroupVersion, 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.ManagedRuleGroupVersion + if *v == nil { + sv = &types.ManagedRuleGroupVersion{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LastUpdateTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdateTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionKeyString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentManagedRuleGroupVersions(v *[]types.ManagedRuleGroupVersion, 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.ManagedRuleGroupVersion + if *v == nil { + cv = []types.ManagedRuleGroupVersion{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ManagedRuleGroupVersion + destAddr := &col + if err := awsAwsjson11_deserializeDocumentManagedRuleGroupVersion(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentManagedRuleSet(v **types.ManagedRuleSet, 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.ManagedRuleSet + if *v == nil { + sv = &types.ManagedRuleSet{} + } 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 ResourceArn to be of type string, got %T instead", value) + } + sv.ARN = ptr.String(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } - for key, value := range shape { - switch key { - case "ExcludedRules": - if err := awsAwsjson11_deserializeDocumentExcludedRules(&sv.ExcludedRules, value); err != nil { - return err + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "LabelNamespace": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LabelName to be of type string, got %T instead", value) + } + sv.LabelNamespace = ptr.String(jtv) } case "Name": @@ -7836,18 +8761,18 @@ func awsAwsjson11_deserializeDocumentManagedRuleGroupStatement(v **types.Managed sv.Name = ptr.String(jtv) } - case "ScopeDownStatement": - if err := awsAwsjson11_deserializeDocumentStatement(&sv.ScopeDownStatement, value); err != nil { + case "PublishedVersions": + if err := awsAwsjson11_deserializeDocumentPublishedVersions(&sv.PublishedVersions, value); err != nil { return err } - case "VendorName": + case "RecommendedVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VendorName to be of type string, got %T instead", value) + return fmt.Errorf("expected VersionKeyString to be of type string, got %T instead", value) } - sv.VendorName = ptr.String(jtv) + sv.RecommendedVersion = ptr.String(jtv) } default: @@ -7859,7 +8784,7 @@ func awsAwsjson11_deserializeDocumentManagedRuleGroupStatement(v **types.Managed return nil } -func awsAwsjson11_deserializeDocumentManagedRuleGroupSummaries(v *[]types.ManagedRuleGroupSummary, value interface{}) error { +func awsAwsjson11_deserializeDocumentManagedRuleSetSummaries(v *[]types.ManagedRuleSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7872,17 +8797,17 @@ func awsAwsjson11_deserializeDocumentManagedRuleGroupSummaries(v *[]types.Manage return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ManagedRuleGroupSummary + var cv []types.ManagedRuleSetSummary if *v == nil { - cv = []types.ManagedRuleGroupSummary{} + cv = []types.ManagedRuleSetSummary{} } else { cv = *v } for _, value := range shape { - var col types.ManagedRuleGroupSummary + var col types.ManagedRuleSetSummary destAddr := &col - if err := awsAwsjson11_deserializeDocumentManagedRuleGroupSummary(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentManagedRuleSetSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -7893,7 +8818,7 @@ func awsAwsjson11_deserializeDocumentManagedRuleGroupSummaries(v *[]types.Manage return nil } -func awsAwsjson11_deserializeDocumentManagedRuleGroupSummary(v **types.ManagedRuleGroupSummary, value interface{}) error { +func awsAwsjson11_deserializeDocumentManagedRuleSetSummary(v **types.ManagedRuleSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7906,15 +8831,24 @@ func awsAwsjson11_deserializeDocumentManagedRuleGroupSummary(v **types.ManagedRu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ManagedRuleGroupSummary + var sv *types.ManagedRuleSetSummary if *v == nil { - sv = &types.ManagedRuleGroupSummary{} + sv = &types.ManagedRuleSetSummary{} } 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 ResourceArn to be of type string, got %T instead", value) + } + sv.ARN = ptr.String(jtv) + } + case "Description": if value != nil { jtv, ok := value.(string) @@ -7924,6 +8858,33 @@ func awsAwsjson11_deserializeDocumentManagedRuleGroupSummary(v **types.ManagedRu sv.Description = ptr.String(jtv) } + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "LabelNamespace": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LabelName to be of type string, got %T instead", value) + } + sv.LabelNamespace = ptr.String(jtv) + } + + case "LockToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LockToken to be of type string, got %T instead", value) + } + sv.LockToken = ptr.String(jtv) + } + case "Name": if value != nil { jtv, ok := value.(string) @@ -7933,13 +8894,118 @@ func awsAwsjson11_deserializeDocumentManagedRuleGroupSummary(v **types.ManagedRu sv.Name = ptr.String(jtv) } - case "VendorName": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentManagedRuleSetVersion(v **types.ManagedRuleSetVersion, 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.ManagedRuleSetVersion + if *v == nil { + sv = &types.ManagedRuleSetVersion{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociatedRuleGroupArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VendorName to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.AssociatedRuleGroupArn = ptr.String(jtv) + } + + case "Capacity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected CapacityUnit to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Capacity = i64 + } + + case "ExpiryTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiryTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "ForecastedLifetime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimeWindowDay to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ForecastedLifetime = ptr.Int32(int32(i64)) + } + + case "LastUpdateTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdateTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "PublishTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.PublishTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.VendorName = ptr.String(jtv) } default: @@ -8126,6 +9192,41 @@ func awsAwsjson11_deserializeDocumentOverrideAction(v **types.OverrideAction, va return nil } +func awsAwsjson11_deserializeDocumentPublishedVersions(v *map[string]types.ManagedRuleSetVersion, 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.ManagedRuleSetVersion + if *v == nil { + mv = map[string]types.ManagedRuleSetVersion{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.ManagedRuleSetVersion + mapVar := parsedVal + destAddr := &mapVar + if err := awsAwsjson11_deserializeDocumentManagedRuleSetVersion(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsAwsjson11_deserializeDocumentQueryString(v **types.QueryString, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9946,22 +11047,62 @@ func awsAwsjson11_deserializeDocumentVisibilityConfig(v **types.VisibilityConfig sv.CloudWatchMetricsEnabled = jtv } - case "MetricName": + case "MetricName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricName to be of type string, got %T instead", value) + } + sv.MetricName = ptr.String(jtv) + } + + case "SampledRequestsEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.SampledRequestsEnabled = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentWAFAssociatedItemException(v **types.WAFAssociatedItemException, 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.WAFAssociatedItemException + if *v == nil { + sv = &types.WAFAssociatedItemException{} + } 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 MetricName to be of type string, got %T instead", value) - } - sv.MetricName = ptr.String(jtv) - } - - case "SampledRequestsEnabled": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.SampledRequestsEnabled = jtv + sv.Message = ptr.String(jtv) } default: @@ -9973,7 +11114,7 @@ func awsAwsjson11_deserializeDocumentVisibilityConfig(v **types.VisibilityConfig return nil } -func awsAwsjson11_deserializeDocumentWAFAssociatedItemException(v **types.WAFAssociatedItemException, value interface{}) error { +func awsAwsjson11_deserializeDocumentWAFDuplicateItemException(v **types.WAFDuplicateItemException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9986,9 +11127,9 @@ func awsAwsjson11_deserializeDocumentWAFAssociatedItemException(v **types.WAFAss return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.WAFAssociatedItemException + var sv *types.WAFDuplicateItemException if *v == nil { - sv = &types.WAFAssociatedItemException{} + sv = &types.WAFDuplicateItemException{} } else { sv = *v } @@ -10013,7 +11154,7 @@ func awsAwsjson11_deserializeDocumentWAFAssociatedItemException(v **types.WAFAss return nil } -func awsAwsjson11_deserializeDocumentWAFDuplicateItemException(v **types.WAFDuplicateItemException, value interface{}) error { +func awsAwsjson11_deserializeDocumentWAFExpiredManagedRuleGroupVersionException(v **types.WAFExpiredManagedRuleGroupVersionException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10026,9 +11167,9 @@ func awsAwsjson11_deserializeDocumentWAFDuplicateItemException(v **types.WAFDupl return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.WAFDuplicateItemException + var sv *types.WAFExpiredManagedRuleGroupVersionException if *v == nil { - sv = &types.WAFDuplicateItemException{} + sv = &types.WAFExpiredManagedRuleGroupVersionException{} } else { sv = *v } @@ -11383,6 +12524,24 @@ func awsAwsjson11_deserializeOpDocumentDescribeManagedRuleGroupOutput(v **Descri return err } + case "SnsTopicArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.SnsTopicArn = ptr.String(jtv) + } + + case "VersionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionKeyString to be of type string, got %T instead", value) + } + sv.VersionName = ptr.String(jtv) + } + default: _, _ = key, value @@ -11504,6 +12663,51 @@ func awsAwsjson11_deserializeOpDocumentGetLoggingConfigurationOutput(v **GetLogg return nil } +func awsAwsjson11_deserializeOpDocumentGetManagedRuleSetOutput(v **GetManagedRuleSetOutput, 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 *GetManagedRuleSetOutput + if *v == nil { + sv = &GetManagedRuleSetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LockToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LockToken to be of type string, got %T instead", value) + } + sv.LockToken = ptr.String(jtv) + } + + case "ManagedRuleSet": + if err := awsAwsjson11_deserializeDocumentManagedRuleSet(&sv.ManagedRuleSet, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentGetPermissionPolicyOutput(v **GetPermissionPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11855,6 +13059,51 @@ func awsAwsjson11_deserializeOpDocumentListAvailableManagedRuleGroupsOutput(v ** return nil } +func awsAwsjson11_deserializeOpDocumentListAvailableManagedRuleGroupVersionsOutput(v **ListAvailableManagedRuleGroupVersionsOutput, 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 *ListAvailableManagedRuleGroupVersionsOutput + if *v == nil { + sv = &ListAvailableManagedRuleGroupVersionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + case "Versions": + if err := awsAwsjson11_deserializeDocumentManagedRuleGroupVersions(&sv.Versions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListIPSetsOutput(v **ListIPSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11945,6 +13194,51 @@ func awsAwsjson11_deserializeOpDocumentListLoggingConfigurationsOutput(v **ListL return nil } +func awsAwsjson11_deserializeOpDocumentListManagedRuleSetsOutput(v **ListManagedRuleSetsOutput, 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 *ListManagedRuleSetsOutput + if *v == nil { + sv = &ListManagedRuleSetsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ManagedRuleSets": + if err := awsAwsjson11_deserializeDocumentManagedRuleSetSummaries(&sv.ManagedRuleSets, value); err != nil { + return err + } + + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListRegexPatternSetsOutput(v **ListRegexPatternSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12197,6 +13491,46 @@ func awsAwsjson11_deserializeOpDocumentPutLoggingConfigurationOutput(v **PutLogg return nil } +func awsAwsjson11_deserializeOpDocumentPutManagedRuleSetVersionsOutput(v **PutManagedRuleSetVersionsOutput, 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 *PutManagedRuleSetVersionsOutput + if *v == nil { + sv = &PutManagedRuleSetVersionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextLockToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LockToken to be of type string, got %T instead", value) + } + sv.NextLockToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentPutPermissionPolicyOutput(v **PutPermissionPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12330,6 +13664,71 @@ func awsAwsjson11_deserializeOpDocumentUpdateIPSetOutput(v **UpdateIPSetOutput, return nil } +func awsAwsjson11_deserializeOpDocumentUpdateManagedRuleSetVersionExpiryDateOutput(v **UpdateManagedRuleSetVersionExpiryDateOutput, 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 *UpdateManagedRuleSetVersionExpiryDateOutput + if *v == nil { + sv = &UpdateManagedRuleSetVersionExpiryDateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ExpiringVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionKeyString to be of type string, got %T instead", value) + } + sv.ExpiringVersion = ptr.String(jtv) + } + + case "ExpiryTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiryTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "NextLockToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LockToken to be of type string, got %T instead", value) + } + sv.NextLockToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentUpdateRegexPatternSetOutput(v **UpdateRegexPatternSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/wafv2/doc.go b/service/wafv2/doc.go index 4531c990e17..585a324d462 100644 --- a/service/wafv2/doc.go +++ b/service/wafv2/doc.go @@ -26,12 +26,12 @@ // This API guide is for developers who need detailed information about WAF API // actions, data types, and errors. For detailed information about WAF features and // an overview of how to use WAF, see the WAF Developer Guide -// (https://docs.aws.amazon.com/waf/latest/developerguide/). You can make calls -// using the endpoints listed in Amazon Web Services Service Endpoints for WAF -// (https://docs.aws.amazon.com/general/latest/gr/rande.html#waf_region). +// (https://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html). +// You can make calls using the endpoints listed in WAF endpoints and quotas +// (https://docs.aws.amazon.com/general/latest/gr/waf.html). // -// * For -// regional applications, you can use any of the endpoints in the list. A regional +// * For regional +// applications, you can use any of the endpoints in the list. A regional // application can be an Application Load Balancer (ALB), an Amazon API Gateway // REST API, or an AppSync GraphQL API. // diff --git a/service/wafv2/generated.json b/service/wafv2/generated.json index b2a582e3416..f51902c80c7 100644 --- a/service/wafv2/generated.json +++ b/service/wafv2/generated.json @@ -22,6 +22,7 @@ "api_op_DisassociateWebACL.go", "api_op_GetIPSet.go", "api_op_GetLoggingConfiguration.go", + "api_op_GetManagedRuleSet.go", "api_op_GetPermissionPolicy.go", "api_op_GetRateBasedStatementManagedKeys.go", "api_op_GetRegexPatternSet.go", @@ -29,19 +30,23 @@ "api_op_GetSampledRequests.go", "api_op_GetWebACL.go", "api_op_GetWebACLForResource.go", + "api_op_ListAvailableManagedRuleGroupVersions.go", "api_op_ListAvailableManagedRuleGroups.go", "api_op_ListIPSets.go", "api_op_ListLoggingConfigurations.go", + "api_op_ListManagedRuleSets.go", "api_op_ListRegexPatternSets.go", "api_op_ListResourcesForWebACL.go", "api_op_ListRuleGroups.go", "api_op_ListTagsForResource.go", "api_op_ListWebACLs.go", "api_op_PutLoggingConfiguration.go", + "api_op_PutManagedRuleSetVersions.go", "api_op_PutPermissionPolicy.go", "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateIPSet.go", + "api_op_UpdateManagedRuleSetVersionExpiryDate.go", "api_op_UpdateRegexPatternSet.go", "api_op_UpdateRuleGroup.go", "api_op_UpdateWebACL.go", diff --git a/service/wafv2/serializers.go b/service/wafv2/serializers.go index 035942f37f8..ead2799c954 100644 --- a/service/wafv2/serializers.go +++ b/service/wafv2/serializers.go @@ -814,6 +814,53 @@ func (m *awsAwsjson11_serializeOpGetLoggingConfiguration) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetManagedRuleSet struct { +} + +func (*awsAwsjson11_serializeOpGetManagedRuleSet) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetManagedRuleSet) 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.(*GetManagedRuleSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSWAF_20190729.GetManagedRuleSet") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetManagedRuleSetInput(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_serializeOpGetPermissionPolicy struct { } @@ -1190,6 +1237,53 @@ func (m *awsAwsjson11_serializeOpListAvailableManagedRuleGroups) HandleSerialize return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListAvailableManagedRuleGroupVersions struct { +} + +func (*awsAwsjson11_serializeOpListAvailableManagedRuleGroupVersions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListAvailableManagedRuleGroupVersions) 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.(*ListAvailableManagedRuleGroupVersionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSWAF_20190729.ListAvailableManagedRuleGroupVersions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListAvailableManagedRuleGroupVersionsInput(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_serializeOpListIPSets struct { } @@ -1284,6 +1378,53 @@ func (m *awsAwsjson11_serializeOpListLoggingConfigurations) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListManagedRuleSets struct { +} + +func (*awsAwsjson11_serializeOpListManagedRuleSets) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListManagedRuleSets) 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.(*ListManagedRuleSetsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSWAF_20190729.ListManagedRuleSets") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListManagedRuleSetsInput(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_serializeOpListRegexPatternSets struct { } @@ -1566,6 +1707,53 @@ func (m *awsAwsjson11_serializeOpPutLoggingConfiguration) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpPutManagedRuleSetVersions struct { +} + +func (*awsAwsjson11_serializeOpPutManagedRuleSetVersions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutManagedRuleSetVersions) 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.(*PutManagedRuleSetVersionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSWAF_20190729.PutManagedRuleSetVersions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutManagedRuleSetVersionsInput(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_serializeOpPutPermissionPolicy struct { } @@ -1754,6 +1942,53 @@ func (m *awsAwsjson11_serializeOpUpdateIPSet) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpUpdateManagedRuleSetVersionExpiryDate struct { +} + +func (*awsAwsjson11_serializeOpUpdateManagedRuleSetVersionExpiryDate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateManagedRuleSetVersionExpiryDate) 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.(*UpdateManagedRuleSetVersionExpiryDateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSWAF_20190729.UpdateManagedRuleSetVersionExpiryDate") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateManagedRuleSetVersionExpiryDateInput(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_serializeOpUpdateRegexPatternSet struct { } @@ -2600,6 +2835,11 @@ func awsAwsjson11_serializeDocumentManagedRuleGroupStatement(v *types.ManagedRul ok.String(*v.VendorName) } + if v.Version != nil { + ok := object.Key("Version") + ok.String(*v.Version) + } + return nil } @@ -3169,6 +3409,37 @@ func awsAwsjson11_serializeDocumentUriPath(v *types.UriPath, value smithyjson.Va return nil } +func awsAwsjson11_serializeDocumentVersionsToPublish(v map[string]types.VersionToPublish, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsAwsjson11_serializeDocumentVersionToPublish(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentVersionToPublish(v *types.VersionToPublish, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociatedRuleGroupArn != nil { + ok := object.Key("AssociatedRuleGroupArn") + ok.String(*v.AssociatedRuleGroupArn) + } + + if v.ForecastedLifetime != nil { + ok := object.Key("ForecastedLifetime") + ok.Integer(*v.ForecastedLifetime) + } + + return nil +} + func awsAwsjson11_serializeDocumentVisibilityConfig(v *types.VisibilityConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3605,6 +3876,11 @@ func awsAwsjson11_serializeOpDocumentDescribeManagedRuleGroupInput(v *DescribeMa ok.String(*v.VendorName) } + if v.VersionName != nil { + ok := object.Key("VersionName") + ok.String(*v.VersionName) + } + return nil } @@ -3654,6 +3930,28 @@ func awsAwsjson11_serializeOpDocumentGetLoggingConfigurationInput(v *GetLoggingC return nil } +func awsAwsjson11_serializeOpDocumentGetManagedRuleSetInput(v *GetManagedRuleSetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("Id") + ok.String(*v.Id) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if len(v.Scope) > 0 { + ok := object.Key("Scope") + ok.String(string(v.Scope)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentGetPermissionPolicyInput(v *GetPermissionPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3832,6 +4130,38 @@ func awsAwsjson11_serializeOpDocumentListAvailableManagedRuleGroupsInput(v *List return nil } +func awsAwsjson11_serializeOpDocumentListAvailableManagedRuleGroupVersionsInput(v *ListAvailableManagedRuleGroupVersionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Limit != nil { + ok := object.Key("Limit") + ok.Integer(*v.Limit) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.NextMarker != nil { + ok := object.Key("NextMarker") + ok.String(*v.NextMarker) + } + + if len(v.Scope) > 0 { + ok := object.Key("Scope") + ok.String(string(v.Scope)) + } + + if v.VendorName != nil { + ok := object.Key("VendorName") + ok.String(*v.VendorName) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListIPSetsInput(v *ListIPSetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3876,6 +4206,28 @@ func awsAwsjson11_serializeOpDocumentListLoggingConfigurationsInput(v *ListLoggi return nil } +func awsAwsjson11_serializeOpDocumentListManagedRuleSetsInput(v *ListManagedRuleSetsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Limit != nil { + ok := object.Key("Limit") + ok.Integer(*v.Limit) + } + + if v.NextMarker != nil { + ok := object.Key("NextMarker") + ok.String(*v.NextMarker) + } + + if len(v.Scope) > 0 { + ok := object.Key("Scope") + ok.String(string(v.Scope)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListRegexPatternSetsInput(v *ListRegexPatternSetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3995,6 +4347,45 @@ func awsAwsjson11_serializeOpDocumentPutLoggingConfigurationInput(v *PutLoggingC return nil } +func awsAwsjson11_serializeOpDocumentPutManagedRuleSetVersionsInput(v *PutManagedRuleSetVersionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("Id") + ok.String(*v.Id) + } + + if v.LockToken != nil { + ok := object.Key("LockToken") + ok.String(*v.LockToken) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.RecommendedVersion != nil { + ok := object.Key("RecommendedVersion") + ok.String(*v.RecommendedVersion) + } + + if len(v.Scope) > 0 { + ok := object.Key("Scope") + ok.String(string(v.Scope)) + } + + if v.VersionsToPublish != nil { + ok := object.Key("VersionsToPublish") + if err := awsAwsjson11_serializeDocumentVersionsToPublish(v.VersionsToPublish, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentPutPermissionPolicyInput(v *PutPermissionPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4089,6 +4480,43 @@ func awsAwsjson11_serializeOpDocumentUpdateIPSetInput(v *UpdateIPSetInput, value return nil } +func awsAwsjson11_serializeOpDocumentUpdateManagedRuleSetVersionExpiryDateInput(v *UpdateManagedRuleSetVersionExpiryDateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExpiryTimestamp != nil { + ok := object.Key("ExpiryTimestamp") + ok.Double(smithytime.FormatEpochSeconds(*v.ExpiryTimestamp)) + } + + if v.Id != nil { + ok := object.Key("Id") + ok.String(*v.Id) + } + + if v.LockToken != nil { + ok := object.Key("LockToken") + ok.String(*v.LockToken) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if len(v.Scope) > 0 { + ok := object.Key("Scope") + ok.String(string(v.Scope)) + } + + if v.VersionToExpire != nil { + ok := object.Key("VersionToExpire") + ok.String(*v.VersionToExpire) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentUpdateRegexPatternSetInput(v *UpdateRegexPatternSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/wafv2/types/errors.go b/service/wafv2/types/errors.go index be069bb39c0..aae7ebec794 100644 --- a/service/wafv2/types/errors.go +++ b/service/wafv2/types/errors.go @@ -47,6 +47,31 @@ func (e *WAFDuplicateItemException) ErrorMessage() string { func (e *WAFDuplicateItemException) ErrorCode() string { return "WAFDuplicateItemException" } func (e *WAFDuplicateItemException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The operation failed because the specified version for the managed rule group +// has expired. You can retrieve the available versions for the managed rule group +// by calling ListAvailableManagedRuleGroupVersions. +type WAFExpiredManagedRuleGroupVersionException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *WAFExpiredManagedRuleGroupVersionException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *WAFExpiredManagedRuleGroupVersionException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *WAFExpiredManagedRuleGroupVersionException) ErrorCode() string { + return "WAFExpiredManagedRuleGroupVersionException" +} +func (e *WAFExpiredManagedRuleGroupVersionException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // Your request is valid, but WAF couldn’t perform the operation because of a // system problem. Retry your request. type WAFInternalErrorException struct { @@ -187,8 +212,8 @@ func (e *WAFInvalidResourceException) ErrorCode() string { return "W func (e *WAFInvalidResourceException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // WAF couldn’t perform the operation because you exceeded your resource limit. For -// example, the maximum number of WebACL objects that you can create for an -// account. For more information, see Limits +// example, the maximum number of WebACL objects that you can create for an Amazon +// Web Services account. For more information, see WAF quotas // (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) in the WAF // Developer Guide. type WAFLimitsExceededException struct { diff --git a/service/wafv2/types/types.go b/service/wafv2/types/types.go index ff1e4955300..966069c5a64 100644 --- a/service/wafv2/types/types.go +++ b/service/wafv2/types/types.go @@ -623,7 +623,7 @@ type IPSet struct { // This member is required. Addresses []string - // Specify IPV4 or IPV6. + // The version of the IP addresses, either IPV4 or IPV6. // // This member is required. IPAddressVersion IPAddressVersion @@ -791,15 +791,15 @@ type JsonBody struct { // If you // don't provide this setting, WAF parses and evaluates the content only up to the // first parsing failure that it encounters. WAF does its best to parse the entire - // JSON body, but might be forced to stop for reasons such as characters that - // aren't valid, duplicate keys, truncation, and any content whose root node isn't - // an object or an array. WAF parses the JSON in the following examples as two - // valid key, value pairs: + // JSON body, but might be forced to stop for reasons such as invalid characters, + // duplicate keys, truncation, and any content whose root node isn't an object or + // an array. WAF parses the JSON in the following examples as two valid key, value + // pairs: // // * Missing comma: {"key1":"value1""key2":"value2"} // - // * - // Missing colon: {"key1":"value1","key2""value2"} + // * Missing colon: + // {"key1":"value1","key2""value2"} // // * Extra colons: // {"key1"::"value1","key2""value2"} @@ -1000,6 +1000,12 @@ type ManagedRuleGroupStatement struct { // as you can for a rule statement. ScopeDownStatement *Statement + // The version of the managed rule group to use. If you specify this, the version + // setting is fixed until you change it. If you don't specify this, WAF uses the + // vendor's default version, and then keeps the version at the vendor's default + // when the vendor updates the managed rule group settings. + Version *string + noSmithyDocumentSerde } @@ -1026,6 +1032,166 @@ type ManagedRuleGroupSummary struct { noSmithyDocumentSerde } +// Describes a single version of a managed rule group. +type ManagedRuleGroupVersion struct { + + // The date and time that the managed rule group owner updated the rule group + // version information. + LastUpdateTimestamp *time.Time + + // The version name. + Name *string + + noSmithyDocumentSerde +} + +// A set of rules that is managed by Amazon Web Services and Marketplace sellers to +// provide versioned managed rule groups for customers of WAF. This is intended for +// use only by vendors of managed rule sets. Vendors are Amazon Web Services and +// Marketplace sellers. Vendors, you can use the managed rule set APIs to provide +// controlled rollout of your versioned managed rule group offerings for your +// customers. The APIs are ListManagedRuleSets, GetManagedRuleSet, +// PutManagedRuleSetVersions, and UpdateManagedRuleSetVersionExpiryDate. +type ManagedRuleSet struct { + + // The Amazon Resource Name (ARN) of the entity. + // + // This member is required. + ARN *string + + // A unique identifier for the managed rule set. The ID is returned in the + // responses to commands like list. You provide it to operations like get and + // update. + // + // This member is required. + Id *string + + // The name of the managed rule set. You use this, along with the rule set ID, to + // identify the rule set. This name is assigned to the corresponding managed rule + // group, which your customers can access and use. + // + // This member is required. + Name *string + + // A description of the set that helps with identification. + Description *string + + // The label namespace prefix for the managed rule groups that are offered to + // customers from this managed rule set. All labels that are added by rules in the + // managed rule group have this prefix. + // + // * The syntax for the label namespace + // prefix for a managed rule group is the following: awswaf:managed::: + // + // * When a + // rule with a label matches a web request, WAF adds the fully qualified label to + // the request. A fully qualified label is made up of the label namespace from the + // rule group or web ACL where the rule is defined and the label from the rule, + // separated by a colon: : + LabelNamespace *string + + // The versions of this managed rule set that are available for use by customers. + PublishedVersions map[string]ManagedRuleSetVersion + + // The version that you would like your customers to use. + RecommendedVersion *string + + noSmithyDocumentSerde +} + +// High-level information for a managed rule set. This is intended for use only by +// vendors of managed rule sets. Vendors are Amazon Web Services and Marketplace +// sellers. Vendors, you can use the managed rule set APIs to provide controlled +// rollout of your versioned managed rule group offerings for your customers. The +// APIs are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and +// UpdateManagedRuleSetVersionExpiryDate. +type ManagedRuleSetSummary struct { + + // The Amazon Resource Name (ARN) of the entity. + ARN *string + + // A description of the set that helps with identification. + Description *string + + // A unique identifier for the managed rule set. The ID is returned in the + // responses to commands like list. You provide it to operations like get and + // update. + Id *string + + // The label namespace prefix for the managed rule groups that are offered to + // customers from this managed rule set. All labels that are added by rules in the + // managed rule group have this prefix. + // + // * The syntax for the label namespace + // prefix for a managed rule group is the following: awswaf:managed::: + // + // * When a + // rule with a label matches a web request, WAF adds the fully qualified label to + // the request. A fully qualified label is made up of the label namespace from the + // rule group or web ACL where the rule is defined and the label from the rule, + // separated by a colon: : + LabelNamespace *string + + // A token used for optimistic locking. WAF returns a token to your get and list + // requests, to mark the state of the entity at the time of the request. To make + // changes to the entity associated with the token, you provide the token to + // operations like update and delete. WAF uses the token to ensure that no changes + // have been made to the entity since you last retrieved it. If a change has been + // made, the update fails with a WAFOptimisticLockException. If this happens, + // perform another get, and use the new token returned by that operation. + LockToken *string + + // The name of the managed rule set. You use this, along with the rule set ID, to + // identify the rule set. This name is assigned to the corresponding managed rule + // group, which your customers can access and use. + Name *string + + noSmithyDocumentSerde +} + +// Information for a single version of a managed rule set. This is intended for use +// only by vendors of managed rule sets. Vendors are Amazon Web Services and +// Marketplace sellers. Vendors, you can use the managed rule set APIs to provide +// controlled rollout of your versioned managed rule group offerings for your +// customers. The APIs are ListManagedRuleSets, GetManagedRuleSet, +// PutManagedRuleSetVersions, and UpdateManagedRuleSetVersionExpiryDate. +type ManagedRuleSetVersion struct { + + // The Amazon Resource Name (ARN) of the vendor rule group that's used to define + // the published version of your managed rule group. + AssociatedRuleGroupArn *string + + // The web ACL capacity units (WCUs) required for this rule group. WAF uses WCUs to + // calculate and control the operating resources that are used to run your rules, + // rule groups, and web ACLs. WAF calculates capacity differently for each rule + // type, to reflect the relative cost of each rule. Simple rules that cost little + // to run use fewer WCUs than more complex rules that use more processing power. + // Rule group capacity is fixed at creation, which helps users plan their web ACL + // WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500. + Capacity int64 + + // The time that this version is set to expire. Times are in Coordinated Universal + // Time (UTC) format. UTC format includes the special designator, Z. For example, + // "2016-09-27T14:50Z". + ExpiryTimestamp *time.Time + + // The amount of time you expect this version of your managed rule group to last, + // in days. + ForecastedLifetime *int32 + + // The last time that you updated this version. Times are in Coordinated Universal + // Time (UTC) format. UTC format includes the special designator, Z. For example, + // "2016-09-27T14:50Z". + LastUpdateTimestamp *time.Time + + // The time that you first published this version. Times are in Coordinated + // Universal Time (UTC) format. UTC format includes the special designator, Z. For + // example, "2016-09-27T14:50Z". + PublishTimestamp *time.Time + + noSmithyDocumentSerde +} + // The HTTP method of a web request. The method indicates the type of operation // that the request is asking the origin to perform. This is used only to indicate // the web request component for WAF to inspect, in the FieldToMatch specification. @@ -1169,6 +1335,7 @@ type RateBasedStatementManagedKeysIPSet struct { // The IP addresses that are currently blocked. Addresses []string + // The version of the IP addresses, either IPV4 or IPV6. IPAddressVersion IPAddressVersion noSmithyDocumentSerde @@ -1957,16 +2124,14 @@ type TextTransformation struct { // consecutive occurrences are not compressed. Unterminated comments are also // replaced with a space (ASCII 0x20). However, a standalone termination of a // comment (/) is not acted upon. REPLACE_NULLS - Replace NULL bytes in the input - // with space characters (ASCII 0x20). SQL_HEX_DECODE - Decode the following ANSI C - // escape sequences: \a, \b, \f, \n, \r, \t, \v, \, ?, ', ", \xHH (hexadecimal), - // \0OOO (octal). Encodings that aren't valid remain in the output. URL_DECODE - - // Decode a URL-encoded value. URL_DECODE_UNI - Like URL_DECODE, but with support - // for Microsoft-specific %u encoding. If the code is in the full-width ASCII code - // range of FF01-FF5E, the higher byte is used to detect and adjust the lower byte. - // Otherwise, only the lower byte is used and the higher byte is zeroed. - // UTF8_TO_UNICODE - Convert all UTF-8 character sequences to Unicode. This helps - // input normalization, and minimizing false-positives and false-negatives for - // non-English languages. + // with space characters (ASCII 0x20). SQL_HEX_DECODE - Decode SQL hex data. + // Example (0x414243) will be decoded to (ABC). URL_DECODE - Decode a URL-encoded + // value. URL_DECODE_UNI - Like URL_DECODE, but with support for Microsoft-specific + // %u encoding. If the code is in the full-width ASCII code range of FF01-FF5E, the + // higher byte is used to detect and adjust the lower byte. Otherwise, only the + // lower byte is used and the higher byte is zeroed. UTF8_TO_UNICODE - Convert all + // UTF-8 character sequences to Unicode. This helps input normalization, and + // minimizing false-positives and false-negatives for non-English languages. // // This member is required. Type TextTransformationType @@ -2017,6 +2182,26 @@ type UriPath struct { noSmithyDocumentSerde } +// A version of the named managed rule group, that the rule group's vendor +// publishes for use by customers. This is intended for use only by vendors of +// managed rule sets. Vendors are Amazon Web Services and Marketplace sellers. +// Vendors, you can use the managed rule set APIs to provide controlled rollout of +// your versioned managed rule group offerings for your customers. The APIs are +// ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and +// UpdateManagedRuleSetVersionExpiryDate. +type VersionToPublish struct { + + // The Amazon Resource Name (ARN) of the vendor's rule group that's used in the + // published managed rule group version. + AssociatedRuleGroupArn *string + + // The amount of time the vendor expects this version of the managed rule group to + // last, in days. + ForecastedLifetime *int32 + + noSmithyDocumentSerde +} + // Defines and enables Amazon CloudWatch metrics and web request sample collection. type VisibilityConfig struct { diff --git a/service/wafv2/validators.go b/service/wafv2/validators.go index 556f26a951b..d8b1c9d7bb8 100644 --- a/service/wafv2/validators.go +++ b/service/wafv2/validators.go @@ -350,6 +350,26 @@ func (m *validateOpGetLoggingConfiguration) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpGetManagedRuleSet struct { +} + +func (*validateOpGetManagedRuleSet) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetManagedRuleSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetManagedRuleSetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetManagedRuleSetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetPermissionPolicy struct { } @@ -490,6 +510,26 @@ func (m *validateOpListAvailableManagedRuleGroups) HandleInitialize(ctx context. return next.HandleInitialize(ctx, in) } +type validateOpListAvailableManagedRuleGroupVersions struct { +} + +func (*validateOpListAvailableManagedRuleGroupVersions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAvailableManagedRuleGroupVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAvailableManagedRuleGroupVersionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAvailableManagedRuleGroupVersionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListIPSets struct { } @@ -510,6 +550,26 @@ func (m *validateOpListIPSets) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpListManagedRuleSets struct { +} + +func (*validateOpListManagedRuleSets) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListManagedRuleSets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListManagedRuleSetsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListManagedRuleSetsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListRegexPatternSets struct { } @@ -630,6 +690,26 @@ func (m *validateOpPutLoggingConfiguration) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpPutManagedRuleSetVersions struct { +} + +func (*validateOpPutManagedRuleSetVersions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutManagedRuleSetVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutManagedRuleSetVersionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutManagedRuleSetVersionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpPutPermissionPolicy struct { } @@ -710,6 +790,26 @@ func (m *validateOpUpdateIPSet) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpUpdateManagedRuleSetVersionExpiryDate struct { +} + +func (*validateOpUpdateManagedRuleSetVersionExpiryDate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateManagedRuleSetVersionExpiryDate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateManagedRuleSetVersionExpiryDateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateManagedRuleSetVersionExpiryDateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateRegexPatternSet struct { } @@ -838,6 +938,10 @@ func addOpGetLoggingConfigurationValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpGetLoggingConfiguration{}, middleware.After) } +func addOpGetManagedRuleSetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetManagedRuleSet{}, middleware.After) +} + func addOpGetPermissionPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetPermissionPolicy{}, middleware.After) } @@ -866,10 +970,18 @@ func addOpListAvailableManagedRuleGroupsValidationMiddleware(stack *middleware.S return stack.Initialize.Add(&validateOpListAvailableManagedRuleGroups{}, middleware.After) } +func addOpListAvailableManagedRuleGroupVersionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAvailableManagedRuleGroupVersions{}, middleware.After) +} + func addOpListIPSetsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListIPSets{}, middleware.After) } +func addOpListManagedRuleSetsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListManagedRuleSets{}, middleware.After) +} + func addOpListRegexPatternSetsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListRegexPatternSets{}, middleware.After) } @@ -894,6 +1006,10 @@ func addOpPutLoggingConfigurationValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpPutLoggingConfiguration{}, middleware.After) } +func addOpPutManagedRuleSetVersionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutManagedRuleSetVersions{}, middleware.After) +} + func addOpPutPermissionPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutPermissionPolicy{}, middleware.After) } @@ -910,6 +1026,10 @@ func addOpUpdateIPSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateIPSet{}, middleware.After) } +func addOpUpdateManagedRuleSetVersionExpiryDateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateManagedRuleSetVersionExpiryDate{}, middleware.After) +} + func addOpUpdateRegexPatternSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRegexPatternSet{}, middleware.After) } @@ -2490,6 +2610,27 @@ func validateOpGetLoggingConfigurationInput(v *GetLoggingConfigurationInput) err } } +func validateOpGetManagedRuleSetInput(v *GetManagedRuleSetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetManagedRuleSetInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.Scope) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Scope")) + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetPermissionPolicyInput(v *GetPermissionPolicyInput) error { if v == nil { return nil @@ -2629,6 +2770,27 @@ func validateOpListAvailableManagedRuleGroupsInput(v *ListAvailableManagedRuleGr } } +func validateOpListAvailableManagedRuleGroupVersionsInput(v *ListAvailableManagedRuleGroupVersionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAvailableManagedRuleGroupVersionsInput"} + if v.VendorName == nil { + invalidParams.Add(smithy.NewErrParamRequired("VendorName")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.Scope) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Scope")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListIPSetsInput(v *ListIPSetsInput) error { if v == nil { return nil @@ -2644,6 +2806,21 @@ func validateOpListIPSetsInput(v *ListIPSetsInput) error { } } +func validateOpListManagedRuleSetsInput(v *ListManagedRuleSetsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListManagedRuleSetsInput"} + if len(v.Scope) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Scope")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListRegexPatternSetsInput(v *ListRegexPatternSetsInput) error { if v == nil { return nil @@ -2738,6 +2915,30 @@ func validateOpPutLoggingConfigurationInput(v *PutLoggingConfigurationInput) err } } +func validateOpPutManagedRuleSetVersionsInput(v *PutManagedRuleSetVersionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutManagedRuleSetVersionsInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.Scope) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Scope")) + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.LockToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("LockToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpPutPermissionPolicyInput(v *PutPermissionPolicyInput) error { if v == nil { return nil @@ -2823,6 +3024,36 @@ func validateOpUpdateIPSetInput(v *UpdateIPSetInput) error { } } +func validateOpUpdateManagedRuleSetVersionExpiryDateInput(v *UpdateManagedRuleSetVersionExpiryDateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateManagedRuleSetVersionExpiryDateInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.Scope) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Scope")) + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.LockToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("LockToken")) + } + if v.VersionToExpire == nil { + invalidParams.Add(smithy.NewErrParamRequired("VersionToExpire")) + } + if v.ExpiryTimestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExpiryTimestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateRegexPatternSetInput(v *UpdateRegexPatternSetInput) error { if v == nil { return nil