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.CreateResourcePolicy

Description

Creates a new resource policy with the specified policy statements.

Synopsis

Creating a Request

data CreateResourcePolicy Source #

See: newCreateResourcePolicy smart constructor.

Constructors

CreateResourcePolicy' 

Fields

  • 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 CreateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

ToHeaders CreateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

ToPath CreateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

ToQuery CreateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

AWSRequest CreateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

Associated Types

type AWSResponse CreateResourcePolicy #

Generic CreateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

Associated Types

type Rep CreateResourcePolicy :: Type -> Type #

Read CreateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

Show CreateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

NFData CreateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

Methods

rnf :: CreateResourcePolicy -> () #

Eq CreateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

Hashable CreateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

type AWSResponse CreateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

type Rep CreateResourcePolicy Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

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

newCreateResourcePolicy Source #

Create a value of CreateResourcePolicy 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:

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

$sel:policy:CreateResourcePolicy', createResourcePolicy_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

createResourcePolicy_resourceArn :: Lens' CreateResourcePolicy Text Source #

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

createResourcePolicy_policy :: Lens' CreateResourcePolicy 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 CreateResourcePolicyResponse Source #

See: newCreateResourcePolicyResponse smart constructor.

Constructors

CreateResourcePolicyResponse' 

Fields

  • resourceArn :: Maybe Text

    The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy was 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 CreateResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

Associated Types

type Rep CreateResourcePolicyResponse :: Type -> Type #

Read CreateResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

Show CreateResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

NFData CreateResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

Eq CreateResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

type Rep CreateResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.LexV2Models.CreateResourcePolicy

type Rep CreateResourcePolicyResponse = D1 ('MetaData "CreateResourcePolicyResponse" "Amazonka.LexV2Models.CreateResourcePolicy" "amazonka-lexv2-models-2.0-5mExjJXBfuO6j0ascNcayE" 'False) (C1 ('MetaCons "CreateResourcePolicyResponse'" '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))))

newCreateResourcePolicyResponse Source #

Create a value of CreateResourcePolicyResponse 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:

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

$sel:revisionId:CreateResourcePolicyResponse', 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.

$sel:httpStatus:CreateResourcePolicyResponse', createResourcePolicyResponse_httpStatus - The response's http status code.

Response Lenses

createResourcePolicyResponse_resourceArn :: Lens' CreateResourcePolicyResponse (Maybe Text) Source #

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

createResourcePolicyResponse_revisionId :: Lens' CreateResourcePolicyResponse (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.