From 925d846728f10c82f76988a0189f239f0dcaa67c Mon Sep 17 00:00:00 2001 From: aws-sdk-go-automation <43143561+aws-sdk-go-automation@users.noreply.github.com> Date: Thu, 20 May 2021 11:15:46 -0700 Subject: [PATCH] Release v1.38.44 (2021-05-20) (#3918) Release v1.38.44 (2021-05-20) === ### Service Client Updates * `service/iam`: Updates service documentation * Documentation updates for AWS Identity and Access Management (IAM). * `service/models.lex.v2`: Updates service API and documentation * `service/personalize`: Updates service API and documentation * `service/quicksight`: Updates service API and documentation * Add ARN based Row Level Security support to CreateDataSet/UpdateDataSet APIs. --- CHANGELOG.md | 11 + aws/endpoints/defaults.go | 10 + aws/version.go | 2 +- models/apis/iam/2010-05-08/docs-2.json | 2 +- .../apis/models.lex.v2/2020-08-07/api-2.json | 336 ++++ .../apis/models.lex.v2/2020-08-07/docs-2.json | 177 ++- models/apis/personalize/2018-05-22/api-2.json | 21 + .../apis/personalize/2018-05-22/docs-2.json | 11 +- models/apis/quicksight/2018-04-01/api-2.json | 10 +- models/apis/quicksight/2018-04-01/docs-2.json | 6 + models/endpoints/endpoints.json | 9 + service/iam/api.go | 8 + service/lexmodelsv2/api.go | 1360 ++++++++++++++++- .../lexmodelsv2/lexmodelsv2iface/interface.go | 24 + service/personalize/api.go | 166 +- .../personalize/personalizeiface/interface.go | 4 + service/quicksight/api.go | 30 + 17 files changed, 2143 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9e8b7b9450..e6d73e78dee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +Release v1.38.44 (2021-05-20) +=== + +### Service Client Updates +* `service/iam`: Updates service documentation + * Documentation updates for AWS Identity and Access Management (IAM). +* `service/models.lex.v2`: Updates service API and documentation +* `service/personalize`: Updates service API and documentation +* `service/quicksight`: Updates service API and documentation + * Add ARN based Row Level Security support to CreateDataSet/UpdateDataSet APIs. + Release v1.38.43 (2021-05-19) === diff --git a/aws/endpoints/defaults.go b/aws/endpoints/defaults.go index b927bd350a6..20151deee7f 100644 --- a/aws/endpoints/defaults.go +++ b/aws/endpoints/defaults.go @@ -837,6 +837,16 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "apprunner": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "appstream2": service{ Defaults: endpoint{ Protocols: []string{"https"}, diff --git a/aws/version.go b/aws/version.go index a29d39b7cda..58d5d8a91e1 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.38.43" +const SDKVersion = "1.38.44" diff --git a/models/apis/iam/2010-05-08/docs-2.json b/models/apis/iam/2010-05-08/docs-2.json index f84a4bc869e..ab54791516d 100644 --- a/models/apis/iam/2010-05-08/docs-2.json +++ b/models/apis/iam/2010-05-08/docs-2.json @@ -14,7 +14,7 @@ "CreateGroup": "

Creates a new group.

For information about the number of groups you can create, see IAM and STS quotas in the IAM User Guide.

", "CreateInstanceProfile": "

Creates a new instance profile. For information about instance profiles, see Using roles for applications on Amazon EC2 in the IAM User Guide, and Instance profiles in the Amazon EC2 User Guide.

For information about the number of instance profiles you can create, see IAM object quotas in the IAM User Guide.

", "CreateLoginProfile": "

Creates a password for the specified IAM user. A password allows an IAM user to access AWS services through the AWS Management Console.

You can use the AWS CLI, the AWS API, or the Users page in the IAM console to create a password for any IAM user. Use ChangePassword to update your own existing password in the My Security Credentials page in the AWS Management Console.

For more information about managing passwords, see Managing passwords in the IAM User Guide.

", - "CreateOpenIDConnectProvider": "

Creates an IAM entity to describe an identity provider (IdP) that supports OpenID Connect (OIDC).

The OIDC provider that you create with this operation can be used as a principal in a role's trust policy. Such a policy establishes a trust relationship between AWS and the OIDC provider.

When you create the IAM OIDC provider, you specify the following:

You get all of this information from the OIDC IdP that you want to use to access AWS.

The trust for the OIDC provider is derived from the IAM provider that this operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvider operation to highly privileged users.

", + "CreateOpenIDConnectProvider": "

Creates an IAM entity to describe an identity provider (IdP) that supports OpenID Connect (OIDC).

The OIDC provider that you create with this operation can be used as a principal in a role's trust policy. Such a policy establishes a trust relationship between AWS and the OIDC provider.

If you are using an OIDC identity provider from Google, Facebook, or Amazon Cognito, you don't need to create a separate IAM identity provider. These OIDC identity providers are already built-in to AWS and are available for your use. Instead, you can move directly to creating new roles using your identity provider. To learn more, see Creating a role for web identity or OpenID connect federation in the IAM User Guide.

When you create the IAM OIDC provider, you specify the following:

You get all of this information from the OIDC IdP that you want to use to access AWS.

The trust for the OIDC provider is derived from the IAM provider that this operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvider operation to highly privileged users.

", "CreatePolicy": "

Creates a new managed policy for your AWS account.

This operation creates a policy version with a version identifier of v1 and sets v1 as the policy's default version. For more information about policy versions, see Versioning for managed policies in the IAM User Guide.

As a best practice, you can validate your IAM policies. To learn more, see Validating IAM policies in the IAM User Guide.

For more information about managed policies in general, see Managed policies and inline policies in the IAM User Guide.

", "CreatePolicyVersion": "

Creates a new version of the specified managed policy. To update a managed policy, you create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must delete an existing version using DeletePolicyVersion before you create a new version.

Optionally, you can set the new version as the policy's default version. The default version is the version that is in effect for the IAM users, groups, and roles to which the policy is attached.

For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.

", "CreateRole": "

Creates a new role for your AWS account. For more information about roles, see IAM roles. For information about quotas for role names and the number of roles you can create, see IAM and STS quotas in the IAM User Guide.

", diff --git a/models/apis/models.lex.v2/2020-08-07/api-2.json b/models/apis/models.lex.v2/2020-08-07/api-2.json index 6f520786a63..b3462ee6921 100644 --- a/models/apis/models.lex.v2/2020-08-07/api-2.json +++ b/models/apis/models.lex.v2/2020-08-07/api-2.json @@ -139,6 +139,43 @@ {"shape":"InternalServerException"} ] }, + "CreateResourcePolicy":{ + "name":"CreateResourcePolicy", + "http":{ + "method":"POST", + "requestUri":"/policy/{resourceArn}/", + "responseCode":200 + }, + "input":{"shape":"CreateResourcePolicyRequest"}, + "output":{"shape":"CreateResourcePolicyResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"PreconditionFailedException"}, + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, + "CreateResourcePolicyStatement":{ + "name":"CreateResourcePolicyStatement", + "http":{ + "method":"POST", + "requestUri":"/policy/{resourceArn}/statements/", + "responseCode":200 + }, + "input":{"shape":"CreateResourcePolicyStatementRequest"}, + "output":{"shape":"CreateResourcePolicyStatementResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ConflictException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"PreconditionFailedException"}, + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, "CreateSlot":{ "name":"CreateSlot", "http":{ @@ -315,6 +352,38 @@ {"shape":"InternalServerException"} ] }, + "DeleteResourcePolicy":{ + "name":"DeleteResourcePolicy", + "http":{ + "method":"DELETE", + "requestUri":"/policy/{resourceArn}/", + "responseCode":204 + }, + "input":{"shape":"DeleteResourcePolicyRequest"}, + "output":{"shape":"DeleteResourcePolicyResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"PreconditionFailedException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, + "DeleteResourcePolicyStatement":{ + "name":"DeleteResourcePolicyStatement", + "http":{ + "method":"DELETE", + "requestUri":"/policy/{resourceArn}/statements/{statementId}/", + "responseCode":204 + }, + "input":{"shape":"DeleteResourcePolicyStatementRequest"}, + "output":{"shape":"DeleteResourcePolicyStatementResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"PreconditionFailedException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, "DeleteSlot":{ "name":"DeleteSlot", "http":{ @@ -466,6 +535,21 @@ {"shape":"InternalServerException"} ] }, + "DescribeResourcePolicy":{ + "name":"DescribeResourcePolicy", + "http":{ + "method":"GET", + "requestUri":"/policy/{resourceArn}/", + "responseCode":200 + }, + "input":{"shape":"DescribeResourcePolicyRequest"}, + "output":{"shape":"DescribeResourcePolicyResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, "DescribeSlot":{ "name":"DescribeSlot", "http":{ @@ -830,6 +914,24 @@ {"shape":"InternalServerException"} ] }, + "UpdateResourcePolicy":{ + "name":"UpdateResourcePolicy", + "http":{ + "method":"PUT", + "requestUri":"/policy/{resourceArn}/", + "responseCode":200 + }, + "input":{"shape":"UpdateResourcePolicyRequest"}, + "output":{"shape":"UpdateResourcePolicyResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"PreconditionFailedException"}, + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, "UpdateSlot":{ "name":"UpdateSlot", "http":{ @@ -1389,6 +1491,34 @@ "lambdaCodeHook":{"shape":"LambdaCodeHook"} } }, + "ConditionKey":{ + "type":"string", + "max":1024, + "min":1 + }, + "ConditionKeyValueMap":{ + "type":"map", + "key":{"shape":"ConditionKey"}, + "value":{"shape":"ConditionValue"}, + "max":10, + "min":0 + }, + "ConditionMap":{ + "type":"map", + "key":{"shape":"ConditionOperator"}, + "value":{"shape":"ConditionKeyValueMap"}, + "max":10, + "min":0 + }, + "ConditionOperator":{ + "type":"string", + "min":1 + }, + "ConditionValue":{ + "type":"string", + "max":1024, + "min":1 + }, "ConfidenceThreshold":{ "type":"double", "max":1, @@ -1635,6 +1765,62 @@ "creationDateTime":{"shape":"Timestamp"} } }, + "CreateResourcePolicyRequest":{ + "type":"structure", + "required":[ + "resourceArn", + "policy" + ], + "members":{ + "resourceArn":{ + "shape":"AmazonResourceName", + "location":"uri", + "locationName":"resourceArn" + }, + "policy":{"shape":"Policy"} + } + }, + "CreateResourcePolicyResponse":{ + "type":"structure", + "members":{ + "resourceArn":{"shape":"AmazonResourceName"}, + "revisionId":{"shape":"RevisionId"} + } + }, + "CreateResourcePolicyStatementRequest":{ + "type":"structure", + "required":[ + "resourceArn", + "statementId", + "effect", + "principal", + "action" + ], + "members":{ + "resourceArn":{ + "shape":"AmazonResourceName", + "location":"uri", + "locationName":"resourceArn" + }, + "statementId":{"shape":"Name"}, + "effect":{"shape":"Effect"}, + "principal":{"shape":"PrincipalList"}, + "action":{"shape":"OperationList"}, + "condition":{"shape":"ConditionMap"}, + "expectedRevisionId":{ + "shape":"RevisionId", + "location":"querystring", + "locationName":"expectedRevisionId" + } + } + }, + "CreateResourcePolicyStatementResponse":{ + "type":"structure", + "members":{ + "resourceArn":{"shape":"AmazonResourceName"}, + "revisionId":{"shape":"RevisionId"} + } + }, "CreateSlotRequest":{ "type":"structure", "required":[ @@ -1956,6 +2142,60 @@ } } }, + "DeleteResourcePolicyRequest":{ + "type":"structure", + "required":["resourceArn"], + "members":{ + "resourceArn":{ + "shape":"AmazonResourceName", + "location":"uri", + "locationName":"resourceArn" + }, + "expectedRevisionId":{ + "shape":"RevisionId", + "location":"querystring", + "locationName":"expectedRevisionId" + } + } + }, + "DeleteResourcePolicyResponse":{ + "type":"structure", + "members":{ + "resourceArn":{"shape":"AmazonResourceName"}, + "revisionId":{"shape":"RevisionId"} + } + }, + "DeleteResourcePolicyStatementRequest":{ + "type":"structure", + "required":[ + "resourceArn", + "statementId" + ], + "members":{ + "resourceArn":{ + "shape":"AmazonResourceName", + "location":"uri", + "locationName":"resourceArn" + }, + "statementId":{ + "shape":"Name", + "location":"uri", + "locationName":"statementId" + }, + "expectedRevisionId":{ + "shape":"RevisionId", + "location":"querystring", + "locationName":"expectedRevisionId" + } + } + }, + "DeleteResourcePolicyStatementResponse":{ + "type":"structure", + "members":{ + "resourceArn":{"shape":"AmazonResourceName"}, + "revisionId":{"shape":"RevisionId"} + } + }, "DeleteSlotRequest":{ "type":"structure", "required":[ @@ -2272,6 +2512,25 @@ "lastUpdatedDateTime":{"shape":"Timestamp"} } }, + "DescribeResourcePolicyRequest":{ + "type":"structure", + "required":["resourceArn"], + "members":{ + "resourceArn":{ + "shape":"AmazonResourceName", + "location":"uri", + "locationName":"resourceArn" + } + } + }, + "DescribeResourcePolicyResponse":{ + "type":"structure", + "members":{ + "resourceArn":{"shape":"AmazonResourceName"}, + "policy":{"shape":"Policy"}, + "revisionId":{"shape":"RevisionId"} + } + }, "DescribeSlotRequest":{ "type":"structure", "required":[ @@ -2391,6 +2650,13 @@ "min":5, "pattern":"^DRAFT$" }, + "Effect":{ + "type":"string", + "enum":[ + "Allow", + "Deny" + ] + }, "ExceptionMessage":{"type":"string"}, "ExportFilter":{ "type":"structure", @@ -3135,6 +3401,16 @@ "DefaultObfuscation" ] }, + "Operation":{ + "type":"string", + "max":50, + "min":5, + "pattern":"lex:[a-zA-Z*]+$" + }, + "OperationList":{ + "type":"list", + "member":{"shape":"Operation"} + }, "OutputContext":{ "type":"structure", "required":[ @@ -3166,6 +3442,10 @@ "max":1000, "min":1 }, + "Policy":{ + "type":"string", + "min":2 + }, "PreconditionFailedException":{ "type":"structure", "members":{ @@ -3179,6 +3459,23 @@ "max":1024, "min":1 }, + "Principal":{ + "type":"structure", + "members":{ + "service":{"shape":"ServicePrincipal"}, + "arn":{"shape":"PrincipalArn"} + } + }, + "PrincipalArn":{ + "type":"string", + "max":1024, + "min":30, + "pattern":"^arn:aws:iam::[0-9]{12}:(root|(user|role)/.*)$" + }, + "PrincipalList":{ + "type":"list", + "member":{"shape":"Principal"} + }, "PriorityValue":{ "type":"integer", "max":25, @@ -3229,6 +3526,12 @@ } }, "RetryAfterSeconds":{"type":"integer"}, + "RevisionId":{ + "type":"string", + "max":5, + "min":1, + "pattern":"^[0-9]+$" + }, "RoleArn":{ "type":"string", "max":2048, @@ -3290,6 +3593,12 @@ "detectSentiment":{"shape":"Boolean"} } }, + "ServicePrincipal":{ + "type":"string", + "max":1024, + "min":15, + "pattern":"^[0-9a-zA-Z_.]+$" + }, "ServiceQuotaExceededException":{ "type":"structure", "members":{ @@ -3903,6 +4212,33 @@ "lastUpdatedDateTime":{"shape":"Timestamp"} } }, + "UpdateResourcePolicyRequest":{ + "type":"structure", + "required":[ + "resourceArn", + "policy" + ], + "members":{ + "resourceArn":{ + "shape":"AmazonResourceName", + "location":"uri", + "locationName":"resourceArn" + }, + "policy":{"shape":"Policy"}, + "expectedRevisionId":{ + "shape":"RevisionId", + "location":"querystring", + "locationName":"expectedRevisionId" + } + } + }, + "UpdateResourcePolicyResponse":{ + "type":"structure", + "members":{ + "resourceArn":{"shape":"AmazonResourceName"}, + "revisionId":{"shape":"RevisionId"} + } + }, "UpdateSlotRequest":{ "type":"structure", "required":[ diff --git a/models/apis/models.lex.v2/2020-08-07/docs-2.json b/models/apis/models.lex.v2/2020-08-07/docs-2.json index 83accc5e802..5ea21b1ba13 100644 --- a/models/apis/models.lex.v2/2020-08-07/docs-2.json +++ b/models/apis/models.lex.v2/2020-08-07/docs-2.json @@ -9,6 +9,8 @@ "CreateBotVersion": "

Creates a new version of the bot based on the DRAFT version. If the DRAFT version of this resource hasn't changed since you created the last version, Amazon Lex doesn't create a new version, it returns the last created version.

When you create the first version of a bot, Amazon Lex sets the version to 1. Subsequent versions increment by 1.

", "CreateExport": "

Creates a zip archive containing the contents of a bot or a bot locale. The archive contains a directory structure that contains JSON files that define the bot.

You can create an archive that contains the complete definition of a bot, or you can specify that the archive contain only the definition of a single bot locale.

For more information about exporting bots, and about the structure of the export archive, see Importing and exporting bots

", "CreateIntent": "

Creates an intent.

To define the interaction between the user and your bot, you define one or more intents. For example, for a pizza ordering bot you would create an OrderPizza intent.

When you create an intent, you must provide a name. You can optionally provide the following:

", + "CreateResourcePolicy": "

Creates a new resource policy with the specified policy statements.

", + "CreateResourcePolicyStatement": "

Adds a new resource policy statement to a bot or bot alias. If a resource policy exists, the statement is added to the current resource policy. If a policy doesn't exist, a new policy is created.

You can create a resource policy statement that allows cross-account access.

", "CreateSlot": "

Creates a slot in an intent. A slot is a variable needed to fulfill an intent. For example, an OrderPizza intent might need slots for size, crust, and number of pizzas. For each slot, you define one or more utterances that Amazon Lex uses to elicit a response from the user.

", "CreateSlotType": "

Creates a custom slot type

To create a custom slot type, specify a name for the slot type and a set of enumeration values, the values that a slot of this type can assume.

", "CreateUploadUrl": "

Gets a pre-signed S3 write URL that you use to upload the zip archive when importing a bot or a bot locale.

", @@ -19,6 +21,8 @@ "DeleteExport": "

Removes a previous export and the associated files stored in an S3 bucket.

", "DeleteImport": "

Removes a previous import and the associated file stored in an S3 bucket.

", "DeleteIntent": "

Removes the specified intent.

Deleting an intent also deletes the slots associated with the intent.

", + "DeleteResourcePolicy": "

Removes an existing policy from a bot or bot alias. If the resource doesn't have a policy attached, Amazon Lex returns an exception.

", + "DeleteResourcePolicyStatement": "

Deletes a policy statement from a resource policy. If you delete the last statement from a policy, the policy is deleted. If you specify a statement ID that doesn't exist in the policy, or if the bot or bot alias doesn't have a policy attached, Amazon Lex returns an exception.

", "DeleteSlot": "

Deletes the specified slot from an intent.

", "DeleteSlotType": "

Deletes a slot type from a bot locale.

If a slot is using the slot type, Amazon Lex throws a ResourceInUseException exception. To avoid the exception, set the skipResourceInUseCheck parameter to true.

", "DescribeBot": "

Provides metadata information about a bot.

", @@ -28,6 +32,7 @@ "DescribeExport": "

Gets information about a specific export.

", "DescribeImport": "

Gets information about a specific import.

", "DescribeIntent": "

Returns metadata about an intent.

", + "DescribeResourcePolicy": "

Gets the resource policy and policy revision for a bot or bot alias.

", "DescribeSlot": "

Gets metadata information about a slot.

", "DescribeSlotType": "

Gets metadata information about a slot type.

", "ListBotAliases": "

Gets a list of aliases for the specified bot.

", @@ -50,6 +55,7 @@ "UpdateBotLocale": "

Updates the settings that a bot has for a specific locale.

", "UpdateExport": "

Updates the password used to encrypt an export zip archive.

", "UpdateIntent": "

Updates the settings for an intent.

", + "UpdateResourcePolicy": "

Replaces the existing resource policy for a bot or bot alias with a new one. If the policy doesn't exist, Amazon Lex returns an exception.

", "UpdateSlot": "

Updates the settings for a slot.

", "UpdateSlotType": "

Updates the configuration of an existing slot type.

" }, @@ -57,9 +63,21 @@ "AmazonResourceName": { "base": null, "refs": { + "CreateResourcePolicyRequest$resourceArn": "

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

", + "CreateResourcePolicyResponse$resourceArn": "

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy was attached to.

", + "CreateResourcePolicyStatementRequest$resourceArn": "

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

", + "CreateResourcePolicyStatementResponse$resourceArn": "

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

", + "DeleteResourcePolicyRequest$resourceArn": "

The Amazon Resource Name (ARN) of the bot or bot alias that has the resource policy attached.

", + "DeleteResourcePolicyResponse$resourceArn": "

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy was deleted from.

", + "DeleteResourcePolicyStatementRequest$resourceArn": "

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

", + "DeleteResourcePolicyStatementResponse$resourceArn": "

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy statement was removed from.

", + "DescribeResourcePolicyRequest$resourceArn": "

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

", + "DescribeResourcePolicyResponse$resourceArn": "

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

", "ListTagsForResourceRequest$resourceARN": "

The Amazon Resource Name (ARN) of the resource to get a list of tags for.

", "TagResourceRequest$resourceARN": "

The Amazon Resource Name (ARN) of the bot, bot alias, or bot channel to tag.

", - "UntagResourceRequest$resourceARN": "

The Amazon Resource Name (ARN) of the resource to remove the tags from.

" + "UntagResourceRequest$resourceARN": "

The Amazon Resource Name (ARN) of the resource to remove the tags from.

", + "UpdateResourcePolicyRequest$resourceArn": "

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

", + "UpdateResourcePolicyResponse$resourceArn": "

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

" } }, "AttachmentTitle": { @@ -537,6 +555,36 @@ "BotAliasLocaleSettings$codeHookSpecification": "

Specifies the Lambda function that should be used in the locale.

" } }, + "ConditionKey": { + "base": null, + "refs": { + "ConditionKeyValueMap$key": null + } + }, + "ConditionKeyValueMap": { + "base": null, + "refs": { + "ConditionMap$value": null + } + }, + "ConditionMap": { + "base": null, + "refs": { + "CreateResourcePolicyStatementRequest$condition": "

Specifies a condition when the policy is in effect. If the principal of the policy is a service principal, you must provide two condition blocks, one with a SourceAccount global condition key and one with a SourceArn global condition key.

For more information, see IAM JSON policy elements: Condition .

" + } + }, + "ConditionOperator": { + "base": null, + "refs": { + "ConditionMap$key": null + } + }, + "ConditionValue": { + "base": null, + "refs": { + "ConditionKeyValueMap$value": null + } + }, "ConfidenceThreshold": { "base": null, "refs": { @@ -635,6 +683,26 @@ "refs": { } }, + "CreateResourcePolicyRequest": { + "base": null, + "refs": { + } + }, + "CreateResourcePolicyResponse": { + "base": null, + "refs": { + } + }, + "CreateResourcePolicyStatementRequest": { + "base": null, + "refs": { + } + }, + "CreateResourcePolicyStatementResponse": { + "base": null, + "refs": { + } + }, "CreateSlotRequest": { "base": null, "refs": { @@ -754,6 +822,26 @@ "refs": { } }, + "DeleteResourcePolicyRequest": { + "base": null, + "refs": { + } + }, + "DeleteResourcePolicyResponse": { + "base": null, + "refs": { + } + }, + "DeleteResourcePolicyStatementRequest": { + "base": null, + "refs": { + } + }, + "DeleteResourcePolicyStatementResponse": { + "base": null, + "refs": { + } + }, "DeleteSlotRequest": { "base": null, "refs": { @@ -834,6 +922,16 @@ "refs": { } }, + "DescribeResourcePolicyRequest": { + "base": null, + "refs": { + } + }, + "DescribeResourcePolicyResponse": { + "base": null, + "refs": { + } + }, "DescribeSlotRequest": { "base": null, "refs": { @@ -943,6 +1041,12 @@ "UpdateSlotTypeResponse$botVersion": "

The version of the bot that contains the slot type. This is always DRAFT.

" } }, + "Effect": { + "base": null, + "refs": { + "CreateResourcePolicyStatementRequest$effect": "

Determines whether the statement allows or denies access to the resource.

" + } + }, "ExceptionMessage": { "base": null, "refs": { @@ -1673,10 +1777,12 @@ "CreateBotResponse$botName": "

The name specified for the bot.

", "CreateIntentRequest$intentName": "

The name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent.

", "CreateIntentResponse$intentName": "

The name specified for the intent.

", + "CreateResourcePolicyStatementRequest$statementId": "

The name of the statement. The ID is the same as the Sid IAM property. The statement name must be unique within the policy. For more information, see IAM JSON policy elements: Sid.

", "CreateSlotRequest$slotName": "

The name of the slot. Slot names must be unique within the bot that contains the slot.

", "CreateSlotResponse$slotName": "

The name specified for the slot.

", "CreateSlotTypeRequest$slotTypeName": "

The name for the slot. A slot type name must be unique within the account.

", "CreateSlotTypeResponse$slotTypeName": "

The name specified for the slot type.

", + "DeleteResourcePolicyStatementRequest$statementId": "

The name of the statement (SID) to delete from the policy.

", "DescribeBotAliasResponse$botAliasName": "

The name of the bot alias.

", "DescribeBotResponse$botName": "

The name of the bot.

", "DescribeBotVersionResponse$botName": "

The name of the bot that contains the version.

", @@ -1758,6 +1864,18 @@ "ObfuscationSetting$obfuscationSettingType": "

Value that determines whether Amazon Lex obscures slot values in conversation logs. The default is to obscure the values.

" } }, + "Operation": { + "base": null, + "refs": { + "OperationList$member": null + } + }, + "OperationList": { + "base": null, + "refs": { + "CreateResourcePolicyStatementRequest$action": "

The Amazon Lex action that this policy either allows or denies. The action must apply to the resource type of the specified ARN. For more information, see Actions, resources, and condition keys for Amazon Lex V2.

" + } + }, "OutputContext": { "base": "

Describes a session context that is activated when an intent is fulfilled.

", "refs": { @@ -1787,6 +1905,14 @@ "PlainTextMessage$value": "

The message to send to the user.

" } }, + "Policy": { + "base": null, + "refs": { + "CreateResourcePolicyRequest$policy": "

A resource policy to add to the resource. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow the IAM syntax. For more information about the contents of a JSON policy document, see IAM JSON policy reference .

If the policy isn't valid, Amazon Lex returns a validation exception.

", + "DescribeResourcePolicyResponse$policy": "

The JSON structure that contains the resource policy. For more information about the contents of a JSON policy document, see IAM JSON policy reference .

", + "UpdateResourcePolicyRequest$policy": "

A resource policy to add to the resource. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow the IAM syntax. For more information about the contents of a JSON policy document, see IAM JSON policy reference .

If the policy isn't valid, Amazon Lex returns a validation exception.

" + } + }, "PreconditionFailedException": { "base": "

", "refs": { @@ -1799,6 +1925,24 @@ "DescribeExportResponse$downloadUrl": "

A pre-signed S3 URL that points to the bot or bot locale archive. The URL is only available for 5 minutes after calling the DescribeExport operation.

" } }, + "Principal": { + "base": "

The IAM principal that you allowing or denying access to an Amazon Lex action. You must provide a service or an arn, but not both in the same statement. For more information, see AWS JSON policy elements: Principal .

", + "refs": { + "PrincipalList$member": null + } + }, + "PrincipalArn": { + "base": null, + "refs": { + "Principal$arn": "

The Amazon Resource Name (ARN) of the principal.

" + } + }, + "PrincipalList": { + "base": null, + "refs": { + "CreateResourcePolicyStatementRequest$principal": "

An IAM principal, such as an IAM users, IAM roles, or AWS services that is allowed or denied access to a resource. For more information, see AWS JSON policy elements: Principal.

" + } + }, "PriorityValue": { "base": null, "refs": { @@ -1858,6 +2002,21 @@ "ThrottlingException$retryAfterSeconds": null } }, + "RevisionId": { + "base": null, + "refs": { + "CreateResourcePolicyResponse$revisionId": "

The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.

", + "CreateResourcePolicyStatementRequest$expectedRevisionId": "

The identifier of the revision of the policy to edit. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception.

If you don't specify a revision, Amazon Lex overwrites the contents of the policy with the new values.

", + "CreateResourcePolicyStatementResponse$revisionId": "

The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.

", + "DeleteResourcePolicyRequest$expectedRevisionId": "

The identifier of the revision to edit. If this ID doesn't match the current revision number, Amazon Lex returns an exception

If you don't specify a revision ID, Amazon Lex will delete the current policy.

", + "DeleteResourcePolicyResponse$revisionId": "

The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.

", + "DeleteResourcePolicyStatementRequest$expectedRevisionId": "

The identifier of the revision of the policy to delete the statement from. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception.

If you don't specify a revision, Amazon Lex removes the current contents of the statement.

", + "DeleteResourcePolicyStatementResponse$revisionId": "

The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.

", + "DescribeResourcePolicyResponse$revisionId": "

The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.

", + "UpdateResourcePolicyRequest$expectedRevisionId": "

The identifier of the revision of the policy to update. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception.

If you don't specify a revision, Amazon Lex overwrites the contents of the policy with the new values.

", + "UpdateResourcePolicyResponse$revisionId": "

The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.

" + } + }, "RoleArn": { "base": null, "refs": { @@ -1928,6 +2087,12 @@ "UpdateBotAliasResponse$sentimentAnalysisSettings": null } }, + "ServicePrincipal": { + "base": null, + "refs": { + "Principal$service": "

The name of the AWS service that should allowed or denied access to an Amazon Lex action.

" + } + }, "ServiceQuotaExceededException": { "base": "

", "refs": { @@ -2394,6 +2559,16 @@ "refs": { } }, + "UpdateResourcePolicyRequest": { + "base": null, + "refs": { + } + }, + "UpdateResourcePolicyResponse": { + "base": null, + "refs": { + } + }, "UpdateSlotRequest": { "base": null, "refs": { diff --git a/models/apis/personalize/2018-05-22/api-2.json b/models/apis/personalize/2018-05-22/api-2.json index 7e71277e44d..ed504c75022 100644 --- a/models/apis/personalize/2018-05-22/api-2.json +++ b/models/apis/personalize/2018-05-22/api-2.json @@ -661,6 +661,20 @@ ], "idempotent":true }, + "StopSolutionVersionCreation":{ + "name":"StopSolutionVersionCreation", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"StopSolutionVersionCreationRequest"}, + "errors":[ + {"shape":"InvalidInputException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ResourceInUseException"} + ], + "idempotent":true + }, "UpdateCampaign":{ "name":"UpdateCampaign", "http":{ @@ -2151,6 +2165,13 @@ "type":"string", "max":256 }, + "StopSolutionVersionCreationRequest":{ + "type":"structure", + "required":["solutionVersionArn"], + "members":{ + "solutionVersionArn":{"shape":"Arn"} + } + }, "TrackingId":{ "type":"string", "max":256 diff --git a/models/apis/personalize/2018-05-22/docs-2.json b/models/apis/personalize/2018-05-22/docs-2.json index 0a5ee4b854e..cf5bd551124 100644 --- a/models/apis/personalize/2018-05-22/docs-2.json +++ b/models/apis/personalize/2018-05-22/docs-2.json @@ -12,7 +12,7 @@ "CreateFilter": "

Creates a recommendation filter. For more information, see filter.

", "CreateSchema": "

Creates an Amazon Personalize schema from the specified schema string. The schema you create must be in Avro JSON format.

Amazon Personalize recognizes three schema variants. Each schema is associated with a dataset type and has a set of required field and keywords. You specify a schema when you call CreateDataset.

Related APIs

", "CreateSolution": "

Creates the configuration for training a model. A trained model is known as a solution. After the configuration is created, you train the model (create a solution) by calling the CreateSolutionVersion operation. Every time you call CreateSolutionVersion, a new version of the solution is created.

After creating a solution version, you check its accuracy by calling GetSolutionMetrics. When you are satisfied with the version, you deploy it using CreateCampaign. The campaign provides recommendations to a client through the GetRecommendations API.

To train a model, Amazon Personalize requires training data and a recipe. The training data comes from the dataset group that you provide in the request. A recipe specifies the training algorithm and a feature transformation. You can specify one of the predefined recipes provided by Amazon Personalize. Alternatively, you can specify performAutoML and Amazon Personalize will analyze your data and select the optimum USER_PERSONALIZATION recipe for you.

Amazon Personalize doesn't support configuring the hpoObjective for solution hyperparameter optimization at this time.

Status

A solution can be in one of the following states:

To get the status of the solution, call DescribeSolution. Wait until the status shows as ACTIVE before calling CreateSolutionVersion.

Related APIs

", - "CreateSolutionVersion": "

Trains or retrains an active solution. A solution is created using the CreateSolution operation and must be in the ACTIVE state before calling CreateSolutionVersion. A new version of the solution is created every time you call this operation.

Status

A solution version can be in one of the following states:

To get the status of the version, call DescribeSolutionVersion. Wait until the status shows as ACTIVE before calling CreateCampaign.

If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed.

Related APIs

", + "CreateSolutionVersion": "

Trains or retrains an active solution. A solution is created using the CreateSolution operation and must be in the ACTIVE state before calling CreateSolutionVersion. A new version of the solution is created every time you call this operation.

Status

A solution version can be in one of the following states:

To get the status of the version, call DescribeSolutionVersion. Wait until the status shows as ACTIVE before calling CreateCampaign.

If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed.

Related APIs

", "DeleteCampaign": "

Removes a campaign by deleting the solution deployment. The solution that the campaign is based on is not deleted and can be redeployed when needed. A deleted campaign can no longer be specified in a GetRecommendations request. For more information on campaigns, see CreateCampaign.

", "DeleteDataset": "

Deletes a dataset. You can't delete a dataset if an associated DatasetImportJob or SolutionVersion is in the CREATE PENDING or IN PROGRESS state. For more information on datasets, see CreateDataset.

", "DeleteDatasetGroup": "

Deletes a dataset group. Before you delete a dataset group, you must delete the following:

", @@ -47,6 +47,7 @@ "ListSchemas": "

Returns the list of schemas associated with the account. The response provides the properties for each schema, including the Amazon Resource Name (ARN). For more information on schemas, see CreateSchema.

", "ListSolutionVersions": "

Returns a list of solution versions for the given solution. When a solution is not specified, all the solution versions associated with the account are listed. The response provides the properties for each solution version, including the Amazon Resource Name (ARN). For more information on solutions, see CreateSolution.

", "ListSolutions": "

Returns a list of solutions that use the given dataset group. When a dataset group is not specified, all the solutions associated with the account are listed. The response provides the properties for each solution, including the Amazon Resource Name (ARN). For more information on solutions, see CreateSolution.

", + "StopSolutionVersionCreation": "

Stops creating a solution version that is in a state of CREATE_PENDING or CREATE IN_PROGRESS.

Depending on the current state of the solution version, the solution version state changes as follows:

You are billed for all of the training completed up until you stop the solution version creation. You cannot resume creating a solution version once it has been stopped.

", "UpdateCampaign": "

Updates a campaign by either deploying a new solution or changing the value of the campaign's minProvisionedTPS parameter.

To update a campaign, the campaign status must be ACTIVE or CREATE FAILED. Check the campaign status using the DescribeCampaign API.

You must wait until the status of the updated campaign is ACTIVE before asking the campaign for recommendations.

For more information on campaigns, see CreateCampaign.

" }, "shapes": { @@ -176,6 +177,7 @@ "SolutionVersion$recipeArn": "

The ARN of the recipe used in the solution.

", "SolutionVersion$datasetGroupArn": "

The Amazon Resource Name (ARN) of the dataset group providing the training data.

", "SolutionVersionSummary$solutionVersionArn": "

The Amazon Resource Name (ARN) of the solution version.

", + "StopSolutionVersionCreationRequest$solutionVersionArn": "

The Amazon Resource Name (ARN) of the solution version you want to stop creating.

", "UpdateCampaignRequest$campaignArn": "

The Amazon Resource Name (ARN) of the campaign.

", "UpdateCampaignRequest$solutionVersionArn": "

The ARN of a new solution version to deploy.

", "UpdateCampaignResponse$campaignArn": "

The same campaign ARN as given in the request.

" @@ -1507,10 +1509,15 @@ "RecipeSummary$status": "

The status of the recipe.

", "Solution$status": "

The status of the solution.

A solution can be in one of the following states:

", "SolutionSummary$status": "

The status of the solution.

A solution can be in one of the following states:

", - "SolutionVersion$status": "

The status of the solution version.

A solution version can be in one of the following states:

", + "SolutionVersion$status": "

The status of the solution version.

A solution version can be in one of the following states:

", "SolutionVersionSummary$status": "

The status of the solution version.

A solution version can be in one of the following states:

" } }, + "StopSolutionVersionCreationRequest": { + "base": null, + "refs": { + } + }, "TrackingId": { "base": null, "refs": { diff --git a/models/apis/quicksight/2018-04-01/api-2.json b/models/apis/quicksight/2018-04-01/api-2.json index cd6502fed80..ca324495958 100644 --- a/models/apis/quicksight/2018-04-01/api-2.json +++ b/models/apis/quicksight/2018-04-01/api-2.json @@ -6371,9 +6371,17 @@ "members":{ "Namespace":{"shape":"Namespace"}, "Arn":{"shape":"Arn"}, - "PermissionPolicy":{"shape":"RowLevelPermissionPolicy"} + "PermissionPolicy":{"shape":"RowLevelPermissionPolicy"}, + "FormatVersion":{"shape":"RowLevelPermissionFormatVersion"} } }, + "RowLevelPermissionFormatVersion":{ + "type":"string", + "enum":[ + "VERSION_1", + "VERSION_2" + ] + }, "RowLevelPermissionPolicy":{ "type":"string", "enum":[ diff --git a/models/apis/quicksight/2018-04-01/docs-2.json b/models/apis/quicksight/2018-04-01/docs-2.json index 565cb5c3e20..cc350430e29 100644 --- a/models/apis/quicksight/2018-04-01/docs-2.json +++ b/models/apis/quicksight/2018-04-01/docs-2.json @@ -2853,6 +2853,12 @@ "UpdateDataSetRequest$RowLevelPermissionDataSet": "

The row-level security configuration for the data you want to create.

" } }, + "RowLevelPermissionFormatVersion": { + "base": null, + "refs": { + "RowLevelPermissionDataSet$FormatVersion": "

The user or group rules associated with the dataset that contains permissions for RLS.

By default, FormatVersion is VERSION_1. When FormatVersion is VERSION_1, UserName and GroupName are required. When FormatVersion is VERSION_2, UserARN and GroupARN are required, and Namespace must not exist.

" + } + }, "RowLevelPermissionPolicy": { "base": null, "refs": { diff --git a/models/endpoints/endpoints.json b/models/endpoints/endpoints.json index 9193f899b9d..468c7c816eb 100644 --- a/models/endpoints/endpoints.json +++ b/models/endpoints/endpoints.json @@ -723,6 +723,15 @@ "us-west-2" : { } } }, + "apprunner" : { + "endpoints" : { + "ap-northeast-1" : { }, + "eu-west-1" : { }, + "us-east-1" : { }, + "us-east-2" : { }, + "us-west-2" : { } + } + }, "appstream2" : { "defaults" : { "credentialScope" : { diff --git a/service/iam/api.go b/service/iam/api.go index bf8b8a66a12..78e594e2750 100644 --- a/service/iam/api.go +++ b/service/iam/api.go @@ -1309,6 +1309,14 @@ func (c *IAM) CreateOpenIDConnectProviderRequest(input *CreateOpenIDConnectProvi // in a role's trust policy. Such a policy establishes a trust relationship // between AWS and the OIDC provider. // +// If you are using an OIDC identity provider from Google, Facebook, or Amazon +// Cognito, you don't need to create a separate IAM identity provider. These +// OIDC identity providers are already built-in to AWS and are available for +// your use. Instead, you can move directly to creating new roles using your +// identity provider. To learn more, see Creating a role for web identity or +// OpenID connect federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_oidc.html) +// in the IAM User Guide. +// // When you create the IAM OIDC provider, you specify the following: // // * The URL of the OIDC identity provider (IdP) to trust diff --git a/service/lexmodelsv2/api.go b/service/lexmodelsv2/api.go index 7dedc954f11..c4378779d44 100644 --- a/service/lexmodelsv2/api.go +++ b/service/lexmodelsv2/api.go @@ -681,6 +681,188 @@ func (c *LexModelsV2) CreateIntentWithContext(ctx aws.Context, input *CreateInte return out, req.Send() } +const opCreateResourcePolicy = "CreateResourcePolicy" + +// CreateResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the CreateResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateResourcePolicy for more information on using the CreateResourcePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateResourcePolicyRequest method. +// req, resp := client.CreateResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/CreateResourcePolicy +func (c *LexModelsV2) CreateResourcePolicyRequest(input *CreateResourcePolicyInput) (req *request.Request, output *CreateResourcePolicyOutput) { + op := &request.Operation{ + Name: opCreateResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/policy/{resourceArn}/", + } + + if input == nil { + input = &CreateResourcePolicyInput{} + } + + output = &CreateResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateResourcePolicy API operation for Amazon Lex Model Building V2. +// +// Creates a new resource policy with the specified policy statements. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lex Model Building V2's +// API operation CreateResourcePolicy for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// +// * ServiceQuotaExceededException +// +// * PreconditionFailedException +// +// * ValidationException +// +// * InternalServerException +// +// * ThrottlingException +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/CreateResourcePolicy +func (c *LexModelsV2) CreateResourcePolicy(input *CreateResourcePolicyInput) (*CreateResourcePolicyOutput, error) { + req, out := c.CreateResourcePolicyRequest(input) + return out, req.Send() +} + +// CreateResourcePolicyWithContext is the same as CreateResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See CreateResourcePolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LexModelsV2) CreateResourcePolicyWithContext(ctx aws.Context, input *CreateResourcePolicyInput, opts ...request.Option) (*CreateResourcePolicyOutput, error) { + req, out := c.CreateResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateResourcePolicyStatement = "CreateResourcePolicyStatement" + +// CreateResourcePolicyStatementRequest generates a "aws/request.Request" representing the +// client's request for the CreateResourcePolicyStatement operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateResourcePolicyStatement for more information on using the CreateResourcePolicyStatement +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateResourcePolicyStatementRequest method. +// req, resp := client.CreateResourcePolicyStatementRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/CreateResourcePolicyStatement +func (c *LexModelsV2) CreateResourcePolicyStatementRequest(input *CreateResourcePolicyStatementInput) (req *request.Request, output *CreateResourcePolicyStatementOutput) { + op := &request.Operation{ + Name: opCreateResourcePolicyStatement, + HTTPMethod: "POST", + HTTPPath: "/policy/{resourceArn}/statements/", + } + + if input == nil { + input = &CreateResourcePolicyStatementInput{} + } + + output = &CreateResourcePolicyStatementOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateResourcePolicyStatement API operation for Amazon Lex Model Building V2. +// +// Adds a new resource policy statement to a bot or bot alias. If a resource +// policy exists, the statement is added to the current resource policy. If +// a policy doesn't exist, a new policy is created. +// +// You can create a resource policy statement that allows cross-account access. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lex Model Building V2's +// API operation CreateResourcePolicyStatement for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// +// * ConflictException +// +// * ServiceQuotaExceededException +// +// * PreconditionFailedException +// +// * ValidationException +// +// * InternalServerException +// +// * ThrottlingException +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/CreateResourcePolicyStatement +func (c *LexModelsV2) CreateResourcePolicyStatement(input *CreateResourcePolicyStatementInput) (*CreateResourcePolicyStatementOutput, error) { + req, out := c.CreateResourcePolicyStatementRequest(input) + return out, req.Send() +} + +// CreateResourcePolicyStatementWithContext is the same as CreateResourcePolicyStatement with the addition of +// the ability to pass a context and additional request options. +// +// See CreateResourcePolicyStatement for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LexModelsV2) CreateResourcePolicyStatementWithContext(ctx aws.Context, input *CreateResourcePolicyStatementInput, opts ...request.Option) (*CreateResourcePolicyStatementOutput, error) { + req, out := c.CreateResourcePolicyStatementRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateSlot = "CreateSlot" // CreateSlotRequest generates a "aws/request.Request" representing the @@ -1578,6 +1760,178 @@ func (c *LexModelsV2) DeleteIntentWithContext(ctx aws.Context, input *DeleteInte return out, req.Send() } +const opDeleteResourcePolicy = "DeleteResourcePolicy" + +// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteResourcePolicy for more information on using the DeleteResourcePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteResourcePolicyRequest method. +// req, resp := client.DeleteResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DeleteResourcePolicy +func (c *LexModelsV2) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { + op := &request.Operation{ + Name: opDeleteResourcePolicy, + HTTPMethod: "DELETE", + HTTPPath: "/policy/{resourceArn}/", + } + + if input == nil { + input = &DeleteResourcePolicyInput{} + } + + output = &DeleteResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteResourcePolicy API operation for Amazon Lex Model Building V2. +// +// Removes an existing policy from a bot or bot alias. If the resource doesn't +// have a policy attached, Amazon Lex returns an exception. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lex Model Building V2's +// API operation DeleteResourcePolicy for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// +// * PreconditionFailedException +// +// * InternalServerException +// +// * ThrottlingException +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DeleteResourcePolicy +func (c *LexModelsV2) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) + return out, req.Send() +} + +// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteResourcePolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LexModelsV2) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteResourcePolicyStatement = "DeleteResourcePolicyStatement" + +// DeleteResourcePolicyStatementRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResourcePolicyStatement operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteResourcePolicyStatement for more information on using the DeleteResourcePolicyStatement +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteResourcePolicyStatementRequest method. +// req, resp := client.DeleteResourcePolicyStatementRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DeleteResourcePolicyStatement +func (c *LexModelsV2) DeleteResourcePolicyStatementRequest(input *DeleteResourcePolicyStatementInput) (req *request.Request, output *DeleteResourcePolicyStatementOutput) { + op := &request.Operation{ + Name: opDeleteResourcePolicyStatement, + HTTPMethod: "DELETE", + HTTPPath: "/policy/{resourceArn}/statements/{statementId}/", + } + + if input == nil { + input = &DeleteResourcePolicyStatementInput{} + } + + output = &DeleteResourcePolicyStatementOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteResourcePolicyStatement API operation for Amazon Lex Model Building V2. +// +// Deletes a policy statement from a resource policy. If you delete the last +// statement from a policy, the policy is deleted. If you specify a statement +// ID that doesn't exist in the policy, or if the bot or bot alias doesn't have +// a policy attached, Amazon Lex returns an exception. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lex Model Building V2's +// API operation DeleteResourcePolicyStatement for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// +// * PreconditionFailedException +// +// * InternalServerException +// +// * ThrottlingException +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DeleteResourcePolicyStatement +func (c *LexModelsV2) DeleteResourcePolicyStatement(input *DeleteResourcePolicyStatementInput) (*DeleteResourcePolicyStatementOutput, error) { + req, out := c.DeleteResourcePolicyStatementRequest(input) + return out, req.Send() +} + +// DeleteResourcePolicyStatementWithContext is the same as DeleteResourcePolicyStatement with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteResourcePolicyStatement for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LexModelsV2) DeleteResourcePolicyStatementWithContext(ctx aws.Context, input *DeleteResourcePolicyStatementInput, opts ...request.Option) (*DeleteResourcePolicyStatementOutput, error) { + req, out := c.DeleteResourcePolicyStatementRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteSlot = "DeleteSlot" // DeleteSlotRequest generates a "aws/request.Request" representing the @@ -2232,127 +2586,209 @@ func (c *LexModelsV2) DescribeImportRequest(input *DescribeImportInput) (req *re // DescribeImport API operation for Amazon Lex Model Building V2. // -// Gets information about a specific import. +// Gets information about a specific import. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lex Model Building V2's +// API operation DescribeImport for usage and error information. +// +// Returned Error Types: +// * ThrottlingException +// +// * ValidationException +// +// * ResourceNotFoundException +// +// * InternalServerException +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeImport +func (c *LexModelsV2) DescribeImport(input *DescribeImportInput) (*DescribeImportOutput, error) { + req, out := c.DescribeImportRequest(input) + return out, req.Send() +} + +// DescribeImportWithContext is the same as DescribeImport with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeImport for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LexModelsV2) DescribeImportWithContext(ctx aws.Context, input *DescribeImportInput, opts ...request.Option) (*DescribeImportOutput, error) { + req, out := c.DescribeImportRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeIntent = "DescribeIntent" + +// DescribeIntentRequest generates a "aws/request.Request" representing the +// client's request for the DescribeIntent operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeIntent for more information on using the DescribeIntent +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeIntentRequest method. +// req, resp := client.DescribeIntentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeIntent +func (c *LexModelsV2) DescribeIntentRequest(input *DescribeIntentInput) (req *request.Request, output *DescribeIntentOutput) { + op := &request.Operation{ + Name: opDescribeIntent, + HTTPMethod: "GET", + HTTPPath: "/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/intents/{intentId}/", + } + + if input == nil { + input = &DescribeIntentInput{} + } + + output = &DescribeIntentOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeIntent API operation for Amazon Lex Model Building V2. +// +// Returns metadata about an intent. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lex Model Building V2's -// API operation DescribeImport for usage and error information. +// API operation DescribeIntent for usage and error information. // // Returned Error Types: // * ThrottlingException // +// * ServiceQuotaExceededException +// // * ValidationException // // * ResourceNotFoundException // // * InternalServerException // -// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeImport -func (c *LexModelsV2) DescribeImport(input *DescribeImportInput) (*DescribeImportOutput, error) { - req, out := c.DescribeImportRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeIntent +func (c *LexModelsV2) DescribeIntent(input *DescribeIntentInput) (*DescribeIntentOutput, error) { + req, out := c.DescribeIntentRequest(input) return out, req.Send() } -// DescribeImportWithContext is the same as DescribeImport with the addition of +// DescribeIntentWithContext is the same as DescribeIntent with the addition of // the ability to pass a context and additional request options. // -// See DescribeImport for details on how to use this API operation. +// See DescribeIntent for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *LexModelsV2) DescribeImportWithContext(ctx aws.Context, input *DescribeImportInput, opts ...request.Option) (*DescribeImportOutput, error) { - req, out := c.DescribeImportRequest(input) +func (c *LexModelsV2) DescribeIntentWithContext(ctx aws.Context, input *DescribeIntentInput, opts ...request.Option) (*DescribeIntentOutput, error) { + req, out := c.DescribeIntentRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeIntent = "DescribeIntent" +const opDescribeResourcePolicy = "DescribeResourcePolicy" -// DescribeIntentRequest generates a "aws/request.Request" representing the -// client's request for the DescribeIntent operation. The "output" return +// DescribeResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DescribeResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeIntent for more information on using the DescribeIntent +// See DescribeResourcePolicy for more information on using the DescribeResourcePolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeIntentRequest method. -// req, resp := client.DescribeIntentRequest(params) +// // Example sending a request using the DescribeResourcePolicyRequest method. +// req, resp := client.DescribeResourcePolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeIntent -func (c *LexModelsV2) DescribeIntentRequest(input *DescribeIntentInput) (req *request.Request, output *DescribeIntentOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeResourcePolicy +func (c *LexModelsV2) DescribeResourcePolicyRequest(input *DescribeResourcePolicyInput) (req *request.Request, output *DescribeResourcePolicyOutput) { op := &request.Operation{ - Name: opDescribeIntent, + Name: opDescribeResourcePolicy, HTTPMethod: "GET", - HTTPPath: "/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/intents/{intentId}/", + HTTPPath: "/policy/{resourceArn}/", } if input == nil { - input = &DescribeIntentInput{} + input = &DescribeResourcePolicyInput{} } - output = &DescribeIntentOutput{} + output = &DescribeResourcePolicyOutput{} req = c.newRequest(op, input, output) return } -// DescribeIntent API operation for Amazon Lex Model Building V2. +// DescribeResourcePolicy API operation for Amazon Lex Model Building V2. // -// Returns metadata about an intent. +// Gets the resource policy and policy revision for a bot or bot alias. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lex Model Building V2's -// API operation DescribeIntent for usage and error information. +// API operation DescribeResourcePolicy for usage and error information. // // Returned Error Types: -// * ThrottlingException -// -// * ServiceQuotaExceededException -// -// * ValidationException -// // * ResourceNotFoundException // // * InternalServerException // -// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeIntent -func (c *LexModelsV2) DescribeIntent(input *DescribeIntentInput) (*DescribeIntentOutput, error) { - req, out := c.DescribeIntentRequest(input) +// * ThrottlingException +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeResourcePolicy +func (c *LexModelsV2) DescribeResourcePolicy(input *DescribeResourcePolicyInput) (*DescribeResourcePolicyOutput, error) { + req, out := c.DescribeResourcePolicyRequest(input) return out, req.Send() } -// DescribeIntentWithContext is the same as DescribeIntent with the addition of +// DescribeResourcePolicyWithContext is the same as DescribeResourcePolicy with the addition of // the ability to pass a context and additional request options. // -// See DescribeIntent for details on how to use this API operation. +// See DescribeResourcePolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *LexModelsV2) DescribeIntentWithContext(ctx aws.Context, input *DescribeIntentInput, opts ...request.Option) (*DescribeIntentOutput, error) { - req, out := c.DescribeIntentRequest(input) +func (c *LexModelsV2) DescribeResourcePolicyWithContext(ctx aws.Context, input *DescribeResourcePolicyInput, opts ...request.Option) (*DescribeResourcePolicyOutput, error) { + req, out := c.DescribeResourcePolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() @@ -4888,6 +5324,95 @@ func (c *LexModelsV2) UpdateIntentWithContext(ctx aws.Context, input *UpdateInte return out, req.Send() } +const opUpdateResourcePolicy = "UpdateResourcePolicy" + +// UpdateResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the UpdateResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateResourcePolicy for more information on using the UpdateResourcePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateResourcePolicyRequest method. +// req, resp := client.UpdateResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/UpdateResourcePolicy +func (c *LexModelsV2) UpdateResourcePolicyRequest(input *UpdateResourcePolicyInput) (req *request.Request, output *UpdateResourcePolicyOutput) { + op := &request.Operation{ + Name: opUpdateResourcePolicy, + HTTPMethod: "PUT", + HTTPPath: "/policy/{resourceArn}/", + } + + if input == nil { + input = &UpdateResourcePolicyInput{} + } + + output = &UpdateResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateResourcePolicy API operation for Amazon Lex Model Building V2. +// +// Replaces the existing resource policy for a bot or bot alias with a new one. +// If the policy doesn't exist, Amazon Lex returns an exception. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lex Model Building V2's +// API operation UpdateResourcePolicy for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// +// * ServiceQuotaExceededException +// +// * PreconditionFailedException +// +// * ValidationException +// +// * InternalServerException +// +// * ThrottlingException +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/UpdateResourcePolicy +func (c *LexModelsV2) UpdateResourcePolicy(input *UpdateResourcePolicyInput) (*UpdateResourcePolicyOutput, error) { + req, out := c.UpdateResourcePolicyRequest(input) + return out, req.Send() +} + +// UpdateResourcePolicyWithContext is the same as UpdateResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateResourcePolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LexModelsV2) UpdateResourcePolicyWithContext(ctx aws.Context, input *UpdateResourcePolicyInput, opts ...request.Option) (*UpdateResourcePolicyOutput, error) { + req, out := c.UpdateResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateSlot = "UpdateSlot" // UpdateSlotRequest generates a "aws/request.Request" representing the @@ -8393,6 +8918,289 @@ func (s *CreateIntentOutput) SetSampleUtterances(v []*SampleUtterance) *CreateIn return s } +type CreateResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // A resource policy to add to the resource. The policy is a JSON structure + // that contains one or more statements that define the policy. The policy must + // follow the IAM syntax. For more information about the contents of a JSON + // policy document, see IAM JSON policy reference (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html). + // + // If the policy isn't valid, Amazon Lex returns a validation exception. + // + // Policy is a required field + Policy *string `locationName:"policy" min:"2" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the bot or bot alias that the resource + // policy is attached to. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateResourcePolicyInput"} + if s.Policy == nil { + invalidParams.Add(request.NewErrParamRequired("Policy")) + } + if s.Policy != nil && len(*s.Policy) < 2 { + invalidParams.Add(request.NewErrParamMinLen("Policy", 2)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicy sets the Policy field's value. +func (s *CreateResourcePolicyInput) SetPolicy(v string) *CreateResourcePolicyInput { + s.Policy = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *CreateResourcePolicyInput) SetResourceArn(v string) *CreateResourcePolicyInput { + s.ResourceArn = &v + return s +} + +type CreateResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the bot or bot alias that the resource + // policy was attached to. + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string"` + + // The current revision of the resource policy. Use the revision ID to make + // sure that you are updating the most current version of a resource policy + // when you add a policy statement to a resource, delete a resource, or update + // a resource. + RevisionId *string `locationName:"revisionId" min:"1" type:"string"` +} + +// String returns the string representation +func (s CreateResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *CreateResourcePolicyOutput) SetResourceArn(v string) *CreateResourcePolicyOutput { + s.ResourceArn = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *CreateResourcePolicyOutput) SetRevisionId(v string) *CreateResourcePolicyOutput { + s.RevisionId = &v + return s +} + +type CreateResourcePolicyStatementInput struct { + _ struct{} `type:"structure"` + + // The Amazon Lex action that this policy either allows or denies. The action + // must apply to the resource type of the specified ARN. For more information, + // see Actions, resources, and condition keys for Amazon Lex V2 (https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlexv2.html). + // + // Action is a required field + Action []*string `locationName:"action" type:"list" required:"true"` + + // Specifies a condition when the policy is in effect. If the principal of the + // policy is a service principal, you must provide two condition blocks, one + // with a SourceAccount global condition key and one with a SourceArn global + // condition key. + // + // For more information, see IAM JSON policy elements: Condition (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html). + Condition map[string]map[string]*string `locationName:"condition" type:"map"` + + // Determines whether the statement allows or denies access to the resource. + // + // Effect is a required field + Effect *string `locationName:"effect" type:"string" required:"true" enum:"Effect"` + + // The identifier of the revision of the policy to edit. If this revision ID + // doesn't match the current revision ID, Amazon Lex throws an exception. + // + // If you don't specify a revision, Amazon Lex overwrites the contents of the + // policy with the new values. + ExpectedRevisionId *string `location:"querystring" locationName:"expectedRevisionId" min:"1" type:"string"` + + // An IAM principal, such as an IAM users, IAM roles, or AWS services that is + // allowed or denied access to a resource. For more information, see AWS JSON + // policy elements: Principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html). + // + // Principal is a required field + Principal []*Principal `locationName:"principal" type:"list" required:"true"` + + // The Amazon Resource Name (ARN) of the bot or bot alias that the resource + // policy is attached to. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` + + // The name of the statement. The ID is the same as the Sid IAM property. The + // statement name must be unique within the policy. For more information, see + // IAM JSON policy elements: Sid (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html). + // + // StatementId is a required field + StatementId *string `locationName:"statementId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateResourcePolicyStatementInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResourcePolicyStatementInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateResourcePolicyStatementInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateResourcePolicyStatementInput"} + if s.Action == nil { + invalidParams.Add(request.NewErrParamRequired("Action")) + } + if s.Effect == nil { + invalidParams.Add(request.NewErrParamRequired("Effect")) + } + if s.ExpectedRevisionId != nil && len(*s.ExpectedRevisionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExpectedRevisionId", 1)) + } + if s.Principal == nil { + invalidParams.Add(request.NewErrParamRequired("Principal")) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.StatementId == nil { + invalidParams.Add(request.NewErrParamRequired("StatementId")) + } + if s.StatementId != nil && len(*s.StatementId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) + } + if s.Principal != nil { + for i, v := range s.Principal { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Principal", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAction sets the Action field's value. +func (s *CreateResourcePolicyStatementInput) SetAction(v []*string) *CreateResourcePolicyStatementInput { + s.Action = v + return s +} + +// SetCondition sets the Condition field's value. +func (s *CreateResourcePolicyStatementInput) SetCondition(v map[string]map[string]*string) *CreateResourcePolicyStatementInput { + s.Condition = v + return s +} + +// SetEffect sets the Effect field's value. +func (s *CreateResourcePolicyStatementInput) SetEffect(v string) *CreateResourcePolicyStatementInput { + s.Effect = &v + return s +} + +// SetExpectedRevisionId sets the ExpectedRevisionId field's value. +func (s *CreateResourcePolicyStatementInput) SetExpectedRevisionId(v string) *CreateResourcePolicyStatementInput { + s.ExpectedRevisionId = &v + return s +} + +// SetPrincipal sets the Principal field's value. +func (s *CreateResourcePolicyStatementInput) SetPrincipal(v []*Principal) *CreateResourcePolicyStatementInput { + s.Principal = v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *CreateResourcePolicyStatementInput) SetResourceArn(v string) *CreateResourcePolicyStatementInput { + s.ResourceArn = &v + return s +} + +// SetStatementId sets the StatementId field's value. +func (s *CreateResourcePolicyStatementInput) SetStatementId(v string) *CreateResourcePolicyStatementInput { + s.StatementId = &v + return s +} + +type CreateResourcePolicyStatementOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the bot or bot alias that the resource + // policy is attached to. + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string"` + + // The current revision of the resource policy. Use the revision ID to make + // sure that you are updating the most current version of a resource policy + // when you add a policy statement to a resource, delete a resource, or update + // a resource. + RevisionId *string `locationName:"revisionId" min:"1" type:"string"` +} + +// String returns the string representation +func (s CreateResourcePolicyStatementOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResourcePolicyStatementOutput) GoString() string { + return s.String() +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *CreateResourcePolicyStatementOutput) SetResourceArn(v string) *CreateResourcePolicyStatementOutput { + s.ResourceArn = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *CreateResourcePolicyStatementOutput) SetRevisionId(v string) *CreateResourcePolicyStatementOutput { + s.RevisionId = &v + return s +} + type CreateSlotInput struct { _ struct{} `type:"structure"` @@ -9810,6 +10618,211 @@ func (s DeleteIntentOutput) GoString() string { return s.String() } +type DeleteResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // The identifier of the revision to edit. If this ID doesn't match the current + // revision number, Amazon Lex returns an exception + // + // If you don't specify a revision ID, Amazon Lex will delete the current policy. + ExpectedRevisionId *string `location:"querystring" locationName:"expectedRevisionId" min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the bot or bot alias that has the resource + // policy attached. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteResourcePolicyInput"} + if s.ExpectedRevisionId != nil && len(*s.ExpectedRevisionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExpectedRevisionId", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExpectedRevisionId sets the ExpectedRevisionId field's value. +func (s *DeleteResourcePolicyInput) SetExpectedRevisionId(v string) *DeleteResourcePolicyInput { + s.ExpectedRevisionId = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DeleteResourcePolicyInput) SetResourceArn(v string) *DeleteResourcePolicyInput { + s.ResourceArn = &v + return s +} + +type DeleteResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the bot or bot alias that the resource + // policy was deleted from. + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string"` + + // The current revision of the resource policy. Use the revision ID to make + // sure that you are updating the most current version of a resource policy + // when you add a policy statement to a resource, delete a resource, or update + // a resource. + RevisionId *string `locationName:"revisionId" min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DeleteResourcePolicyOutput) SetResourceArn(v string) *DeleteResourcePolicyOutput { + s.ResourceArn = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *DeleteResourcePolicyOutput) SetRevisionId(v string) *DeleteResourcePolicyOutput { + s.RevisionId = &v + return s +} + +type DeleteResourcePolicyStatementInput struct { + _ struct{} `type:"structure"` + + // The identifier of the revision of the policy to delete the statement from. + // If this revision ID doesn't match the current revision ID, Amazon Lex throws + // an exception. + // + // If you don't specify a revision, Amazon Lex removes the current contents + // of the statement. + ExpectedRevisionId *string `location:"querystring" locationName:"expectedRevisionId" min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the bot or bot alias that the resource + // policy is attached to. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` + + // The name of the statement (SID) to delete from the policy. + // + // StatementId is a required field + StatementId *string `location:"uri" locationName:"statementId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteResourcePolicyStatementInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyStatementInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteResourcePolicyStatementInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteResourcePolicyStatementInput"} + if s.ExpectedRevisionId != nil && len(*s.ExpectedRevisionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExpectedRevisionId", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.StatementId == nil { + invalidParams.Add(request.NewErrParamRequired("StatementId")) + } + if s.StatementId != nil && len(*s.StatementId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExpectedRevisionId sets the ExpectedRevisionId field's value. +func (s *DeleteResourcePolicyStatementInput) SetExpectedRevisionId(v string) *DeleteResourcePolicyStatementInput { + s.ExpectedRevisionId = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DeleteResourcePolicyStatementInput) SetResourceArn(v string) *DeleteResourcePolicyStatementInput { + s.ResourceArn = &v + return s +} + +// SetStatementId sets the StatementId field's value. +func (s *DeleteResourcePolicyStatementInput) SetStatementId(v string) *DeleteResourcePolicyStatementInput { + s.StatementId = &v + return s +} + +type DeleteResourcePolicyStatementOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the bot or bot alias that the resource + // policy statement was removed from. + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string"` + + // The current revision of the resource policy. Use the revision ID to make + // sure that you are updating the most current version of a resource policy + // when you add a policy statement to a resource, delete a resource, or update + // a resource. + RevisionId *string `locationName:"revisionId" min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteResourcePolicyStatementOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyStatementOutput) GoString() string { + return s.String() +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DeleteResourcePolicyStatementOutput) SetResourceArn(v string) *DeleteResourcePolicyStatementOutput { + s.ResourceArn = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *DeleteResourcePolicyStatementOutput) SetRevisionId(v string) *DeleteResourcePolicyStatementOutput { + s.RevisionId = &v + return s +} + type DeleteSlotInput struct { _ struct{} `type:"structure"` @@ -11319,6 +12332,95 @@ func (s *DescribeIntentOutput) SetSlotPriorities(v []*SlotPriority) *DescribeInt return s } +type DescribeResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the bot or bot alias that the resource + // policy is attached to. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeResourcePolicyInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DescribeResourcePolicyInput) SetResourceArn(v string) *DescribeResourcePolicyInput { + s.ResourceArn = &v + return s +} + +type DescribeResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // The JSON structure that contains the resource policy. For more information + // about the contents of a JSON policy document, see IAM JSON policy reference + // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html). + Policy *string `locationName:"policy" min:"2" type:"string"` + + // The Amazon Resource Name (ARN) of the bot or bot alias that the resource + // policy is attached to. + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string"` + + // The current revision of the resource policy. Use the revision ID to make + // sure that you are updating the most current version of a resource policy + // when you add a policy statement to a resource, delete a resource, or update + // a resource. + RevisionId *string `locationName:"revisionId" min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetPolicy sets the Policy field's value. +func (s *DescribeResourcePolicyOutput) SetPolicy(v string) *DescribeResourcePolicyOutput { + s.Policy = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DescribeResourcePolicyOutput) SetResourceArn(v string) *DescribeResourcePolicyOutput { + s.ResourceArn = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *DescribeResourcePolicyOutput) SetRevisionId(v string) *DescribeResourcePolicyOutput { + s.RevisionId = &v + return s +} + type DescribeSlotInput struct { _ struct{} `type:"structure"` @@ -15219,6 +16321,58 @@ func (s *PreconditionFailedException) RequestID() string { return s.RespMetadata.RequestID } +// The IAM principal that you allowing or denying access to an Amazon Lex action. +// You must provide a service or an arn, but not both in the same statement. +// For more information, see AWS JSON policy elements: Principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html). +type Principal struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the principal. + Arn *string `locationName:"arn" min:"30" type:"string"` + + // The name of the AWS service that should allowed or denied access to an Amazon + // Lex action. + Service *string `locationName:"service" min:"15" type:"string"` +} + +// String returns the string representation +func (s Principal) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Principal) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Principal) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Principal"} + if s.Arn != nil && len(*s.Arn) < 30 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 30)) + } + if s.Service != nil && len(*s.Service) < 15 { + invalidParams.Add(request.NewErrParamMinLen("Service", 15)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *Principal) SetArn(v string) *Principal { + s.Arn = &v + return s +} + +// SetService sets the Service field's value. +func (s *Principal) SetService(v string) *Principal { + s.Service = &v + return s +} + // Specifies a list of message groups that Amazon Lex sends to a user to elicit // a response. type PromptSpecification struct { @@ -18406,6 +19560,122 @@ func (s *UpdateIntentOutput) SetSlotPriorities(v []*SlotPriority) *UpdateIntentO return s } +type UpdateResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // The identifier of the revision of the policy to update. If this revision + // ID doesn't match the current revision ID, Amazon Lex throws an exception. + // + // If you don't specify a revision, Amazon Lex overwrites the contents of the + // policy with the new values. + ExpectedRevisionId *string `location:"querystring" locationName:"expectedRevisionId" min:"1" type:"string"` + + // A resource policy to add to the resource. The policy is a JSON structure + // that contains one or more statements that define the policy. The policy must + // follow the IAM syntax. For more information about the contents of a JSON + // policy document, see IAM JSON policy reference (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html). + // + // If the policy isn't valid, Amazon Lex returns a validation exception. + // + // Policy is a required field + Policy *string `locationName:"policy" min:"2" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the bot or bot alias that the resource + // policy is attached to. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateResourcePolicyInput"} + if s.ExpectedRevisionId != nil && len(*s.ExpectedRevisionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExpectedRevisionId", 1)) + } + if s.Policy == nil { + invalidParams.Add(request.NewErrParamRequired("Policy")) + } + if s.Policy != nil && len(*s.Policy) < 2 { + invalidParams.Add(request.NewErrParamMinLen("Policy", 2)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExpectedRevisionId sets the ExpectedRevisionId field's value. +func (s *UpdateResourcePolicyInput) SetExpectedRevisionId(v string) *UpdateResourcePolicyInput { + s.ExpectedRevisionId = &v + return s +} + +// SetPolicy sets the Policy field's value. +func (s *UpdateResourcePolicyInput) SetPolicy(v string) *UpdateResourcePolicyInput { + s.Policy = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UpdateResourcePolicyInput) SetResourceArn(v string) *UpdateResourcePolicyInput { + s.ResourceArn = &v + return s +} + +type UpdateResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the bot or bot alias that the resource + // policy is attached to. + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string"` + + // The current revision of the resource policy. Use the revision ID to make + // sure that you are updating the most current version of a resource policy + // when you add a policy statement to a resource, delete a resource, or update + // a resource. + RevisionId *string `locationName:"revisionId" min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UpdateResourcePolicyOutput) SetResourceArn(v string) *UpdateResourcePolicyOutput { + s.ResourceArn = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *UpdateResourcePolicyOutput) SetRevisionId(v string) *UpdateResourcePolicyOutput { + s.RevisionId = &v + return s +} + type UpdateSlotInput struct { _ struct{} `type:"structure"` @@ -19399,6 +20669,22 @@ func BuiltInSlotTypeSortAttribute_Values() []string { } } +const ( + // EffectAllow is a Effect enum value + EffectAllow = "Allow" + + // EffectDeny is a Effect enum value + EffectDeny = "Deny" +) + +// Effect_Values returns all elements of the Effect enum +func Effect_Values() []string { + return []string{ + EffectAllow, + EffectDeny, + } +} + const ( // ExportFilterNameExportResourceType is a ExportFilterName enum value ExportFilterNameExportResourceType = "ExportResourceType" diff --git a/service/lexmodelsv2/lexmodelsv2iface/interface.go b/service/lexmodelsv2/lexmodelsv2iface/interface.go index ad59f388ae2..297485b96d1 100644 --- a/service/lexmodelsv2/lexmodelsv2iface/interface.go +++ b/service/lexmodelsv2/lexmodelsv2iface/interface.go @@ -88,6 +88,14 @@ type LexModelsV2API interface { CreateIntentWithContext(aws.Context, *lexmodelsv2.CreateIntentInput, ...request.Option) (*lexmodelsv2.CreateIntentOutput, error) CreateIntentRequest(*lexmodelsv2.CreateIntentInput) (*request.Request, *lexmodelsv2.CreateIntentOutput) + CreateResourcePolicy(*lexmodelsv2.CreateResourcePolicyInput) (*lexmodelsv2.CreateResourcePolicyOutput, error) + CreateResourcePolicyWithContext(aws.Context, *lexmodelsv2.CreateResourcePolicyInput, ...request.Option) (*lexmodelsv2.CreateResourcePolicyOutput, error) + CreateResourcePolicyRequest(*lexmodelsv2.CreateResourcePolicyInput) (*request.Request, *lexmodelsv2.CreateResourcePolicyOutput) + + CreateResourcePolicyStatement(*lexmodelsv2.CreateResourcePolicyStatementInput) (*lexmodelsv2.CreateResourcePolicyStatementOutput, error) + CreateResourcePolicyStatementWithContext(aws.Context, *lexmodelsv2.CreateResourcePolicyStatementInput, ...request.Option) (*lexmodelsv2.CreateResourcePolicyStatementOutput, error) + CreateResourcePolicyStatementRequest(*lexmodelsv2.CreateResourcePolicyStatementInput) (*request.Request, *lexmodelsv2.CreateResourcePolicyStatementOutput) + CreateSlot(*lexmodelsv2.CreateSlotInput) (*lexmodelsv2.CreateSlotOutput, error) CreateSlotWithContext(aws.Context, *lexmodelsv2.CreateSlotInput, ...request.Option) (*lexmodelsv2.CreateSlotOutput, error) CreateSlotRequest(*lexmodelsv2.CreateSlotInput) (*request.Request, *lexmodelsv2.CreateSlotOutput) @@ -128,6 +136,14 @@ type LexModelsV2API interface { DeleteIntentWithContext(aws.Context, *lexmodelsv2.DeleteIntentInput, ...request.Option) (*lexmodelsv2.DeleteIntentOutput, error) DeleteIntentRequest(*lexmodelsv2.DeleteIntentInput) (*request.Request, *lexmodelsv2.DeleteIntentOutput) + DeleteResourcePolicy(*lexmodelsv2.DeleteResourcePolicyInput) (*lexmodelsv2.DeleteResourcePolicyOutput, error) + DeleteResourcePolicyWithContext(aws.Context, *lexmodelsv2.DeleteResourcePolicyInput, ...request.Option) (*lexmodelsv2.DeleteResourcePolicyOutput, error) + DeleteResourcePolicyRequest(*lexmodelsv2.DeleteResourcePolicyInput) (*request.Request, *lexmodelsv2.DeleteResourcePolicyOutput) + + DeleteResourcePolicyStatement(*lexmodelsv2.DeleteResourcePolicyStatementInput) (*lexmodelsv2.DeleteResourcePolicyStatementOutput, error) + DeleteResourcePolicyStatementWithContext(aws.Context, *lexmodelsv2.DeleteResourcePolicyStatementInput, ...request.Option) (*lexmodelsv2.DeleteResourcePolicyStatementOutput, error) + DeleteResourcePolicyStatementRequest(*lexmodelsv2.DeleteResourcePolicyStatementInput) (*request.Request, *lexmodelsv2.DeleteResourcePolicyStatementOutput) + DeleteSlot(*lexmodelsv2.DeleteSlotInput) (*lexmodelsv2.DeleteSlotOutput, error) DeleteSlotWithContext(aws.Context, *lexmodelsv2.DeleteSlotInput, ...request.Option) (*lexmodelsv2.DeleteSlotOutput, error) DeleteSlotRequest(*lexmodelsv2.DeleteSlotInput) (*request.Request, *lexmodelsv2.DeleteSlotOutput) @@ -164,6 +180,10 @@ type LexModelsV2API interface { DescribeIntentWithContext(aws.Context, *lexmodelsv2.DescribeIntentInput, ...request.Option) (*lexmodelsv2.DescribeIntentOutput, error) DescribeIntentRequest(*lexmodelsv2.DescribeIntentInput) (*request.Request, *lexmodelsv2.DescribeIntentOutput) + DescribeResourcePolicy(*lexmodelsv2.DescribeResourcePolicyInput) (*lexmodelsv2.DescribeResourcePolicyOutput, error) + DescribeResourcePolicyWithContext(aws.Context, *lexmodelsv2.DescribeResourcePolicyInput, ...request.Option) (*lexmodelsv2.DescribeResourcePolicyOutput, error) + DescribeResourcePolicyRequest(*lexmodelsv2.DescribeResourcePolicyInput) (*request.Request, *lexmodelsv2.DescribeResourcePolicyOutput) + DescribeSlot(*lexmodelsv2.DescribeSlotInput) (*lexmodelsv2.DescribeSlotOutput, error) DescribeSlotWithContext(aws.Context, *lexmodelsv2.DescribeSlotInput, ...request.Option) (*lexmodelsv2.DescribeSlotOutput, error) DescribeSlotRequest(*lexmodelsv2.DescribeSlotInput) (*request.Request, *lexmodelsv2.DescribeSlotOutput) @@ -285,6 +305,10 @@ type LexModelsV2API interface { UpdateIntentWithContext(aws.Context, *lexmodelsv2.UpdateIntentInput, ...request.Option) (*lexmodelsv2.UpdateIntentOutput, error) UpdateIntentRequest(*lexmodelsv2.UpdateIntentInput) (*request.Request, *lexmodelsv2.UpdateIntentOutput) + UpdateResourcePolicy(*lexmodelsv2.UpdateResourcePolicyInput) (*lexmodelsv2.UpdateResourcePolicyOutput, error) + UpdateResourcePolicyWithContext(aws.Context, *lexmodelsv2.UpdateResourcePolicyInput, ...request.Option) (*lexmodelsv2.UpdateResourcePolicyOutput, error) + UpdateResourcePolicyRequest(*lexmodelsv2.UpdateResourcePolicyInput) (*request.Request, *lexmodelsv2.UpdateResourcePolicyOutput) + UpdateSlot(*lexmodelsv2.UpdateSlotInput) (*lexmodelsv2.UpdateSlotOutput, error) UpdateSlotWithContext(aws.Context, *lexmodelsv2.UpdateSlotInput, ...request.Option) (*lexmodelsv2.UpdateSlotOutput, error) UpdateSlotRequest(*lexmodelsv2.UpdateSlotInput) (*request.Request, *lexmodelsv2.UpdateSlotOutput) diff --git a/service/personalize/api.go b/service/personalize/api.go index aae961388ba..3246d3f67d8 100644 --- a/service/personalize/api.go +++ b/service/personalize/api.go @@ -1216,7 +1216,17 @@ func (c *Personalize) CreateSolutionVersionRequest(input *CreateSolutionVersionI // // A solution version can be in one of the following states: // -// * CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED +// * CREATE PENDING +// +// * CREATE IN_PROGRESS +// +// * ACTIVE +// +// * CREATE FAILED +// +// * CREATE STOPPING +// +// * CREATE STOPPED // // To get the status of the version, call DescribeSolutionVersion. Wait until // the status shows as ACTIVE before calling CreateCampaign. @@ -4872,6 +4882,104 @@ func (c *Personalize) ListSolutionsPagesWithContext(ctx aws.Context, input *List return p.Err() } +const opStopSolutionVersionCreation = "StopSolutionVersionCreation" + +// StopSolutionVersionCreationRequest generates a "aws/request.Request" representing the +// client's request for the StopSolutionVersionCreation operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopSolutionVersionCreation for more information on using the StopSolutionVersionCreation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopSolutionVersionCreationRequest method. +// req, resp := client.StopSolutionVersionCreationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-2018-05-22/StopSolutionVersionCreation +func (c *Personalize) StopSolutionVersionCreationRequest(input *StopSolutionVersionCreationInput) (req *request.Request, output *StopSolutionVersionCreationOutput) { + op := &request.Operation{ + Name: opStopSolutionVersionCreation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopSolutionVersionCreationInput{} + } + + output = &StopSolutionVersionCreationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopSolutionVersionCreation API operation for Amazon Personalize. +// +// Stops creating a solution version that is in a state of CREATE_PENDING or +// CREATE IN_PROGRESS. +// +// Depending on the current state of the solution version, the solution version +// state changes as follows: +// +// * CREATE_PENDING > CREATE_STOPPED or +// +// * CREATE_IN_PROGRESS > CREATE_STOPPING > CREATE_STOPPED +// +// You are billed for all of the training completed up until you stop the solution +// version creation. You cannot resume creating a solution version once it has +// been stopped. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Personalize's +// API operation StopSolutionVersionCreation for usage and error information. +// +// Returned Error Types: +// * InvalidInputException +// Provide a valid value for the field or parameter. +// +// * ResourceNotFoundException +// Could not find the specified resource. +// +// * ResourceInUseException +// The specified resource is in use. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-2018-05-22/StopSolutionVersionCreation +func (c *Personalize) StopSolutionVersionCreation(input *StopSolutionVersionCreationInput) (*StopSolutionVersionCreationOutput, error) { + req, out := c.StopSolutionVersionCreationRequest(input) + return out, req.Send() +} + +// StopSolutionVersionCreationWithContext is the same as StopSolutionVersionCreation with the addition of +// the ability to pass a context and additional request options. +// +// See StopSolutionVersionCreation for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Personalize) StopSolutionVersionCreationWithContext(ctx aws.Context, input *StopSolutionVersionCreationInput, opts ...request.Option) (*StopSolutionVersionCreationOutput, error) { + req, out := c.StopSolutionVersionCreationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateCampaign = "UpdateCampaign" // UpdateCampaignRequest generates a "aws/request.Request" representing the @@ -12199,6 +12307,10 @@ type SolutionVersion struct { // * ACTIVE // // * CREATE FAILED + // + // * CREATE STOPPING + // + // * CREATE STOPPED Status *string `locationName:"status" type:"string"` // The time used to train the model. You are billed for the time it takes to @@ -12390,6 +12502,58 @@ func (s *SolutionVersionSummary) SetStatus(v string) *SolutionVersionSummary { return s } +type StopSolutionVersionCreationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the solution version you want to stop creating. + // + // SolutionVersionArn is a required field + SolutionVersionArn *string `locationName:"solutionVersionArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopSolutionVersionCreationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopSolutionVersionCreationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopSolutionVersionCreationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopSolutionVersionCreationInput"} + if s.SolutionVersionArn == nil { + invalidParams.Add(request.NewErrParamRequired("SolutionVersionArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSolutionVersionArn sets the SolutionVersionArn field's value. +func (s *StopSolutionVersionCreationInput) SetSolutionVersionArn(v string) *StopSolutionVersionCreationInput { + s.SolutionVersionArn = &v + return s +} + +type StopSolutionVersionCreationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopSolutionVersionCreationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopSolutionVersionCreationOutput) GoString() string { + return s.String() +} + // If hyperparameter optimization (HPO) was performed, contains the hyperparameter // values of the best performing model. type TunedHPOParams struct { diff --git a/service/personalize/personalizeiface/interface.go b/service/personalize/personalizeiface/interface.go index c645720f421..a72941412b8 100644 --- a/service/personalize/personalizeiface/interface.go +++ b/service/personalize/personalizeiface/interface.go @@ -276,6 +276,10 @@ type PersonalizeAPI interface { ListSolutionsPages(*personalize.ListSolutionsInput, func(*personalize.ListSolutionsOutput, bool) bool) error ListSolutionsPagesWithContext(aws.Context, *personalize.ListSolutionsInput, func(*personalize.ListSolutionsOutput, bool) bool, ...request.Option) error + StopSolutionVersionCreation(*personalize.StopSolutionVersionCreationInput) (*personalize.StopSolutionVersionCreationOutput, error) + StopSolutionVersionCreationWithContext(aws.Context, *personalize.StopSolutionVersionCreationInput, ...request.Option) (*personalize.StopSolutionVersionCreationOutput, error) + StopSolutionVersionCreationRequest(*personalize.StopSolutionVersionCreationInput) (*request.Request, *personalize.StopSolutionVersionCreationOutput) + UpdateCampaign(*personalize.UpdateCampaignInput) (*personalize.UpdateCampaignOutput, error) UpdateCampaignWithContext(aws.Context, *personalize.UpdateCampaignInput, ...request.Option) (*personalize.UpdateCampaignOutput, error) UpdateCampaignRequest(*personalize.UpdateCampaignInput) (*request.Request, *personalize.UpdateCampaignOutput) diff --git a/service/quicksight/api.go b/service/quicksight/api.go index 151ef02a7db..f12902e44cb 100644 --- a/service/quicksight/api.go +++ b/service/quicksight/api.go @@ -27260,6 +27260,14 @@ type RowLevelPermissionDataSet struct { // Arn is a required field Arn *string `type:"string" required:"true"` + // The user or group rules associated with the dataset that contains permissions + // for RLS. + // + // By default, FormatVersion is VERSION_1. When FormatVersion is VERSION_1, + // UserName and GroupName are required. When FormatVersion is VERSION_2, UserARN + // and GroupARN are required, and Namespace must not exist. + FormatVersion *string `type:"string" enum:"RowLevelPermissionFormatVersion"` + // The namespace associated with the dataset that contains permissions for RLS. Namespace *string `type:"string"` @@ -27302,6 +27310,12 @@ func (s *RowLevelPermissionDataSet) SetArn(v string) *RowLevelPermissionDataSet return s } +// SetFormatVersion sets the FormatVersion field's value. +func (s *RowLevelPermissionDataSet) SetFormatVersion(v string) *RowLevelPermissionDataSet { + s.FormatVersion = &v + return s +} + // SetNamespace sets the Namespace field's value. func (s *RowLevelPermissionDataSet) SetNamespace(v string) *RowLevelPermissionDataSet { s.Namespace = &v @@ -34680,6 +34694,22 @@ func ResourceStatus_Values() []string { } } +const ( + // RowLevelPermissionFormatVersionVersion1 is a RowLevelPermissionFormatVersion enum value + RowLevelPermissionFormatVersionVersion1 = "VERSION_1" + + // RowLevelPermissionFormatVersionVersion2 is a RowLevelPermissionFormatVersion enum value + RowLevelPermissionFormatVersionVersion2 = "VERSION_2" +) + +// RowLevelPermissionFormatVersion_Values returns all elements of the RowLevelPermissionFormatVersion enum +func RowLevelPermissionFormatVersion_Values() []string { + return []string{ + RowLevelPermissionFormatVersionVersion1, + RowLevelPermissionFormatVersionVersion2, + } +} + const ( // RowLevelPermissionPolicyGrantAccess is a RowLevelPermissionPolicy enum value RowLevelPermissionPolicyGrantAccess = "GRANT_ACCESS"