Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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.
Synopsis
- data UpdateResourcePolicy = UpdateResourcePolicy' {
- expectedRevisionId :: Maybe Text
- resourceArn :: Text
- policy :: Text
- newUpdateResourcePolicy :: Text -> Text -> UpdateResourcePolicy
- updateResourcePolicy_expectedRevisionId :: Lens' UpdateResourcePolicy (Maybe Text)
- updateResourcePolicy_resourceArn :: Lens' UpdateResourcePolicy Text
- updateResourcePolicy_policy :: Lens' UpdateResourcePolicy Text
- data UpdateResourcePolicyResponse = UpdateResourcePolicyResponse' {
- resourceArn :: Maybe Text
- revisionId :: Maybe Text
- httpStatus :: Int
- newUpdateResourcePolicyResponse :: Int -> UpdateResourcePolicyResponse
- updateResourcePolicyResponse_resourceArn :: Lens' UpdateResourcePolicyResponse (Maybe Text)
- updateResourcePolicyResponse_revisionId :: Lens' UpdateResourcePolicyResponse (Maybe Text)
- updateResourcePolicyResponse_httpStatus :: Lens' UpdateResourcePolicyResponse Int
Creating a Request
data UpdateResourcePolicy Source #
See: newUpdateResourcePolicy
smart constructor.
UpdateResourcePolicy' | |
|
Instances
newUpdateResourcePolicy Source #
Create a value of UpdateResourcePolicy
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:expectedRevisionId:UpdateResourcePolicy'
, updateResourcePolicy_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.
UpdateResourcePolicy
, updateResourcePolicy_resourceArn
- The Amazon Resource Name (ARN) of the bot or bot alias that the resource
policy is attached to.
$sel:policy:UpdateResourcePolicy'
, updateResourcePolicy_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.
Request Lenses
updateResourcePolicy_expectedRevisionId :: Lens' UpdateResourcePolicy (Maybe Text) Source #
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.
updateResourcePolicy_resourceArn :: Lens' UpdateResourcePolicy Text Source #
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
updateResourcePolicy_policy :: Lens' UpdateResourcePolicy Text Source #
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.
Destructuring the Response
data UpdateResourcePolicyResponse Source #
See: newUpdateResourcePolicyResponse
smart constructor.
UpdateResourcePolicyResponse' | |
|
Instances
newUpdateResourcePolicyResponse Source #
Create a value of UpdateResourcePolicyResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
UpdateResourcePolicy
, updateResourcePolicyResponse_resourceArn
- The Amazon Resource Name (ARN) of the bot or bot alias that the resource
policy is attached to.
$sel:revisionId:UpdateResourcePolicyResponse'
, 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.
$sel:httpStatus:UpdateResourcePolicyResponse'
, updateResourcePolicyResponse_httpStatus
- The response's http status code.
Response Lenses
updateResourcePolicyResponse_resourceArn :: Lens' UpdateResourcePolicyResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
updateResourcePolicyResponse_revisionId :: Lens' UpdateResourcePolicyResponse (Maybe Text) Source #
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.
updateResourcePolicyResponse_httpStatus :: Lens' UpdateResourcePolicyResponse Int Source #
The response's http status code.