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 |
Sets the resource policy to grant one or more Amazon Web Services services and accounts permissions to access X-Ray. Each resource policy will be associated with a specific Amazon Web Services account. Each Amazon Web Services account can have a maximum of 5 resource policies, and each policy name must be unique within that account. The maximum size of each resource policy is 5KB.
Synopsis
- data PutResourcePolicy = PutResourcePolicy' {}
- newPutResourcePolicy :: Text -> Text -> PutResourcePolicy
- putResourcePolicy_bypassPolicyLockoutCheck :: Lens' PutResourcePolicy (Maybe Bool)
- putResourcePolicy_policyRevisionId :: Lens' PutResourcePolicy (Maybe Text)
- putResourcePolicy_policyName :: Lens' PutResourcePolicy Text
- putResourcePolicy_policyDocument :: Lens' PutResourcePolicy Text
- data PutResourcePolicyResponse = PutResourcePolicyResponse' {}
- newPutResourcePolicyResponse :: Int -> PutResourcePolicyResponse
- putResourcePolicyResponse_resourcePolicy :: Lens' PutResourcePolicyResponse (Maybe ResourcePolicy)
- putResourcePolicyResponse_httpStatus :: Lens' PutResourcePolicyResponse Int
Creating a Request
data PutResourcePolicy Source #
See: newPutResourcePolicy
smart constructor.
PutResourcePolicy' | |
|
Instances
Create a value of PutResourcePolicy
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:bypassPolicyLockoutCheck:PutResourcePolicy'
, putResourcePolicy_bypassPolicyLockoutCheck
- A flag to indicate whether to bypass the resource policy lockout safety
check.
Setting this value to true increases the risk that the policy becomes unmanageable. Do not set this value to true indiscriminately.
Use this parameter only when you include a policy in the request and you
intend to prevent the principal that is making the request from making a
subsequent PutResourcePolicy
request.
The default value is false.
PutResourcePolicy
, putResourcePolicy_policyRevisionId
- Specifies a specific policy revision, to ensure an atomic create
operation. By default the resource policy is created if it does not
exist, or updated with an incremented revision id. The revision id is
unique to each policy in the account.
If the policy revision id does not match the latest revision id, the
operation will fail with an InvalidPolicyRevisionIdException
exception. You can also provide a PolicyRevisionId
of 0. In this case,
the operation will fail with an InvalidPolicyRevisionIdException
exception if a resource policy with the same name already exists.
PutResourcePolicy
, putResourcePolicy_policyName
- The name of the resource policy. Must be unique within a specific Amazon
Web Services account.
PutResourcePolicy
, putResourcePolicy_policyDocument
- The resource policy document, which can be up to 5kb in size.
Request Lenses
putResourcePolicy_bypassPolicyLockoutCheck :: Lens' PutResourcePolicy (Maybe Bool) Source #
A flag to indicate whether to bypass the resource policy lockout safety check.
Setting this value to true increases the risk that the policy becomes unmanageable. Do not set this value to true indiscriminately.
Use this parameter only when you include a policy in the request and you
intend to prevent the principal that is making the request from making a
subsequent PutResourcePolicy
request.
The default value is false.
putResourcePolicy_policyRevisionId :: Lens' PutResourcePolicy (Maybe Text) Source #
Specifies a specific policy revision, to ensure an atomic create operation. By default the resource policy is created if it does not exist, or updated with an incremented revision id. The revision id is unique to each policy in the account.
If the policy revision id does not match the latest revision id, the
operation will fail with an InvalidPolicyRevisionIdException
exception. You can also provide a PolicyRevisionId
of 0. In this case,
the operation will fail with an InvalidPolicyRevisionIdException
exception if a resource policy with the same name already exists.
putResourcePolicy_policyName :: Lens' PutResourcePolicy Text Source #
The name of the resource policy. Must be unique within a specific Amazon Web Services account.
putResourcePolicy_policyDocument :: Lens' PutResourcePolicy Text Source #
The resource policy document, which can be up to 5kb in size.
Destructuring the Response
data PutResourcePolicyResponse Source #
See: newPutResourcePolicyResponse
smart constructor.
PutResourcePolicyResponse' | |
|
Instances
newPutResourcePolicyResponse Source #
Create a value of PutResourcePolicyResponse
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:resourcePolicy:PutResourcePolicyResponse'
, putResourcePolicyResponse_resourcePolicy
- The resource policy document, as provided in the
PutResourcePolicyRequest
.
PutResourcePolicyResponse
, putResourcePolicyResponse_httpStatus
- The response's http status code.
Response Lenses
putResourcePolicyResponse_resourcePolicy :: Lens' PutResourcePolicyResponse (Maybe ResourcePolicy) Source #
The resource policy document, as provided in the
PutResourcePolicyRequest
.
putResourcePolicyResponse_httpStatus :: Lens' PutResourcePolicyResponse Int Source #
The response's http status code.