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 |
Attaches a resource-based permission policy to a secret. A resource-based policy is optional. For more information, see Authentication and access control for Secrets Manager
For information about attaching a policy in the console, see Attach a permissions policy to a secret.
Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.
Required permissions: secretsmanager:PutResourcePolicy
. For more
information, see
IAM policy actions for Secrets Manager
and
Authentication and access control in Secrets Manager.
Synopsis
- data PutResourcePolicy = PutResourcePolicy' {}
- newPutResourcePolicy :: Text -> Text -> PutResourcePolicy
- putResourcePolicy_blockPublicPolicy :: Lens' PutResourcePolicy (Maybe Bool)
- putResourcePolicy_secretId :: Lens' PutResourcePolicy Text
- putResourcePolicy_resourcePolicy :: Lens' PutResourcePolicy Text
- data PutResourcePolicyResponse = PutResourcePolicyResponse' {}
- newPutResourcePolicyResponse :: Int -> PutResourcePolicyResponse
- putResourcePolicyResponse_arn :: Lens' PutResourcePolicyResponse (Maybe Text)
- putResourcePolicyResponse_name :: Lens' PutResourcePolicyResponse (Maybe Text)
- putResourcePolicyResponse_httpStatus :: Lens' PutResourcePolicyResponse Int
Creating a Request
data PutResourcePolicy Source #
See: newPutResourcePolicy
smart constructor.
PutResourcePolicy' | |
|
Instances
:: Text | |
-> Text | |
-> PutResourcePolicy |
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:blockPublicPolicy:PutResourcePolicy'
, putResourcePolicy_blockPublicPolicy
- Specifies whether to block resource-based policies that allow broad
access to the secret, for example those that use a wildcard for the
principal.
$sel:secretId:PutResourcePolicy'
, putResourcePolicy_secretId
- The ARN or name of the secret to attach the resource-based policy.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See Finding a secret from a partial ARN.
$sel:resourcePolicy:PutResourcePolicy'
, putResourcePolicy_resourcePolicy
- A JSON-formatted string for an Amazon Web Services resource-based
policy. For example policies, see
Permissions policy examples.
Request Lenses
putResourcePolicy_blockPublicPolicy :: Lens' PutResourcePolicy (Maybe Bool) Source #
Specifies whether to block resource-based policies that allow broad access to the secret, for example those that use a wildcard for the principal.
putResourcePolicy_secretId :: Lens' PutResourcePolicy Text Source #
The ARN or name of the secret to attach the resource-based policy.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See Finding a secret from a partial ARN.
putResourcePolicy_resourcePolicy :: Lens' PutResourcePolicy Text Source #
A JSON-formatted string for an Amazon Web Services resource-based policy. For example policies, see Permissions policy examples.
Destructuring the Response
data PutResourcePolicyResponse Source #
See: newPutResourcePolicyResponse
smart constructor.
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:
PutResourcePolicyResponse
, putResourcePolicyResponse_arn
- The ARN of the secret.
PutResourcePolicyResponse
, putResourcePolicyResponse_name
- The name of the secret.
$sel:httpStatus:PutResourcePolicyResponse'
, putResourcePolicyResponse_httpStatus
- The response's http status code.
Response Lenses
putResourcePolicyResponse_arn :: Lens' PutResourcePolicyResponse (Maybe Text) Source #
The ARN of the secret.
putResourcePolicyResponse_name :: Lens' PutResourcePolicyResponse (Maybe Text) Source #
The name of the secret.
putResourcePolicyResponse_httpStatus :: Lens' PutResourcePolicyResponse Int Source #
The response's http status code.