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 |
Creates a new resource policy with the specified policy statements.
Synopsis
- data CreateResourcePolicy = CreateResourcePolicy' {
- resourceArn :: Text
- policy :: Text
- newCreateResourcePolicy :: Text -> Text -> CreateResourcePolicy
- createResourcePolicy_resourceArn :: Lens' CreateResourcePolicy Text
- createResourcePolicy_policy :: Lens' CreateResourcePolicy Text
- data CreateResourcePolicyResponse = CreateResourcePolicyResponse' {
- resourceArn :: Maybe Text
- revisionId :: Maybe Text
- httpStatus :: Int
- newCreateResourcePolicyResponse :: Int -> CreateResourcePolicyResponse
- createResourcePolicyResponse_resourceArn :: Lens' CreateResourcePolicyResponse (Maybe Text)
- createResourcePolicyResponse_revisionId :: Lens' CreateResourcePolicyResponse (Maybe Text)
- createResourcePolicyResponse_httpStatus :: Lens' CreateResourcePolicyResponse Int
Creating a Request
data CreateResourcePolicy Source #
See: newCreateResourcePolicy
smart constructor.
CreateResourcePolicy' | |
|
Instances
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.
CreateResourcePolicyResponse' | |
|
Instances
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.
createResourcePolicyResponse_httpStatus :: Lens' CreateResourcePolicyResponse Int Source #
The response's http status code.