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 |
Retrieves the JSON text of the resource-based policy document attached to the secret. For more information about permissions policies attached to a secret, see Permissions policies attached 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:GetResourcePolicy
. For more
information, see
IAM policy actions for Secrets Manager
and
Authentication and access control in Secrets Manager.
Synopsis
- data GetResourcePolicy = GetResourcePolicy' {}
- newGetResourcePolicy :: Text -> GetResourcePolicy
- getResourcePolicy_secretId :: Lens' GetResourcePolicy Text
- data GetResourcePolicyResponse = GetResourcePolicyResponse' {}
- newGetResourcePolicyResponse :: Int -> GetResourcePolicyResponse
- getResourcePolicyResponse_arn :: Lens' GetResourcePolicyResponse (Maybe Text)
- getResourcePolicyResponse_name :: Lens' GetResourcePolicyResponse (Maybe Text)
- getResourcePolicyResponse_resourcePolicy :: Lens' GetResourcePolicyResponse (Maybe Text)
- getResourcePolicyResponse_httpStatus :: Lens' GetResourcePolicyResponse Int
Creating a Request
data GetResourcePolicy Source #
See: newGetResourcePolicy
smart constructor.
GetResourcePolicy' | |
|
Instances
Create a value of GetResourcePolicy
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:secretId:GetResourcePolicy'
, getResourcePolicy_secretId
- The ARN or name of the secret to retrieve the attached resource-based
policy for.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See Finding a secret from a partial ARN.
Request Lenses
getResourcePolicy_secretId :: Lens' GetResourcePolicy Text Source #
The ARN or name of the secret to retrieve the attached resource-based policy for.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See Finding a secret from a partial ARN.
Destructuring the Response
data GetResourcePolicyResponse Source #
See: newGetResourcePolicyResponse
smart constructor.
GetResourcePolicyResponse' | |
|
Instances
newGetResourcePolicyResponse Source #
Create a value of GetResourcePolicyResponse
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:
GetResourcePolicyResponse
, getResourcePolicyResponse_arn
- The ARN of the secret that the resource-based policy was retrieved for.
GetResourcePolicyResponse
, getResourcePolicyResponse_name
- The name of the secret that the resource-based policy was retrieved for.
$sel:resourcePolicy:GetResourcePolicyResponse'
, getResourcePolicyResponse_resourcePolicy
- A JSON-formatted string that contains the permissions policy attached to
the secret. For more information about permissions policies, see
Authentication and access control for Secrets Manager.
$sel:httpStatus:GetResourcePolicyResponse'
, getResourcePolicyResponse_httpStatus
- The response's http status code.
Response Lenses
getResourcePolicyResponse_arn :: Lens' GetResourcePolicyResponse (Maybe Text) Source #
The ARN of the secret that the resource-based policy was retrieved for.
getResourcePolicyResponse_name :: Lens' GetResourcePolicyResponse (Maybe Text) Source #
The name of the secret that the resource-based policy was retrieved for.
getResourcePolicyResponse_resourcePolicy :: Lens' GetResourcePolicyResponse (Maybe Text) Source #
A JSON-formatted string that contains the permissions policy attached to the secret. For more information about permissions policies, see Authentication and access control for Secrets Manager.
getResourcePolicyResponse_httpStatus :: Lens' GetResourcePolicyResponse Int Source #
The response's http status code.