amazonka-lexv2-models-2.0: Amazon Lex Model Building V2 SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.LexV2Models.UpdateResourcePolicy

Description

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

Creating a Request

data UpdateResourcePolicy Source #

See: newUpdateResourcePolicy smart constructor.

Constructors

UpdateResourcePolicy' 

Fields

  • expectedRevisionId :: Maybe Text

    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.

  • resourceArn :: Text

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

  • policy :: Text

    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.

Instances

Instances details
ToJSON UpdateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

ToHeaders UpdateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

ToPath UpdateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

ToQuery UpdateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

AWSRequest UpdateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

Associated Types

type AWSResponse UpdateResourcePolicy #

Generic UpdateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

Associated Types

type Rep UpdateResourcePolicy :: Type -> Type #

Read UpdateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

Show UpdateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

NFData UpdateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

Methods

rnf :: UpdateResourcePolicy -> () #

Eq UpdateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

Hashable UpdateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

type AWSResponse UpdateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

type Rep UpdateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

type Rep UpdateResourcePolicy = D1 ('MetaData "UpdateResourcePolicy" "Amazonka.LexV2Models.UpdateResourcePolicy" "amazonka-lexv2-models-2.0-5mExjJXBfuO6j0ascNcayE" 'False) (C1 ('MetaCons "UpdateResourcePolicy'" 'PrefixI 'True) (S1 ('MetaSel ('Just "expectedRevisionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "resourceArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "policy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

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.

Constructors

UpdateResourcePolicyResponse' 

Fields

  • resourceArn :: Maybe Text

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

  • revisionId :: Maybe Text

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic UpdateResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

Associated Types

type Rep UpdateResourcePolicyResponse :: Type -> Type #

Read UpdateResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

Show UpdateResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

NFData UpdateResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

Eq UpdateResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

type Rep UpdateResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.LexV2Models.UpdateResourcePolicy

type Rep UpdateResourcePolicyResponse = D1 ('MetaData "UpdateResourcePolicyResponse" "Amazonka.LexV2Models.UpdateResourcePolicy" "amazonka-lexv2-models-2.0-5mExjJXBfuO6j0ascNcayE" 'False) (C1 ('MetaCons "UpdateResourcePolicyResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "resourceArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "revisionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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.