Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Amazonka.SecretsManager.GetResourcePolicy
Description
Retrieves the JSON text of the resource-based policy document attached to the specified secret. The JSON request string input and response output displays formatted code with white space and line breaks for better readability. Submit your input as a single line JSON string.
Minimum permissions
To run this command, you must have the following permissions:
- secretsmanager:GetResourcePolicy
Related operations
- To attach a resource policy to a secret, use PutResourcePolicy.
- To delete the resource-based policy attached to a secret, use DeleteResourcePolicy.
- To list all of the currently available secrets, use ListSecrets.
Synopsis
- data GetResourcePolicy = GetResourcePolicy' {}
- newGetResourcePolicy :: Text -> GetResourcePolicy
- getResourcePolicy_secretId :: Lens' GetResourcePolicy Text
- data GetResourcePolicyResponse = GetResourcePolicyResponse' {}
- newGetResourcePolicyResponse :: Int -> GetResourcePolicyResponse
- getResourcePolicyResponse_resourcePolicy :: Lens' GetResourcePolicyResponse (Maybe Text)
- getResourcePolicyResponse_arn :: Lens' GetResourcePolicyResponse (Maybe Text)
- getResourcePolicyResponse_name :: Lens' GetResourcePolicyResponse (Maybe Text)
- getResourcePolicyResponse_httpStatus :: Lens' GetResourcePolicyResponse Int
Creating a Request
data GetResourcePolicy Source #
See: newGetResourcePolicy
smart constructor.
Constructors
GetResourcePolicy' | |
Instances
Arguments
:: Text | |
-> GetResourcePolicy |
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
- Specifies the secret that you want to retrieve the attached
resource-based policy for. You can specify either the Amazon Resource
Name (ARN) or the friendly name of the secret.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.
Request Lenses
getResourcePolicy_secretId :: Lens' GetResourcePolicy Text Source #
Specifies the secret that you want to retrieve the attached resource-based policy for. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.
Destructuring the Response
data GetResourcePolicyResponse Source #
See: newGetResourcePolicyResponse
smart constructor.
Constructors
GetResourcePolicyResponse' | |
Fields
|
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:
$sel:resourcePolicy:GetResourcePolicyResponse'
, getResourcePolicyResponse_resourcePolicy
- A JSON-formatted string that describes the permissions that are
associated with the attached secret. These permissions are combined with
any permissions that are associated with the user or role that attempts
to access this secret. The combined permissions specify who can access
the secret and what actions they can perform. For more information, see
Authentication and Access Control for Amazon Web Services Secrets Manager
in the Amazon Web Services Secrets Manager User Guide.
$sel:arn:GetResourcePolicyResponse'
, getResourcePolicyResponse_arn
- The ARN of the secret that the resource-based policy was retrieved for.
$sel:name:GetResourcePolicyResponse'
, getResourcePolicyResponse_name
- The friendly name of the secret that the resource-based policy was
retrieved for.
$sel:httpStatus:GetResourcePolicyResponse'
, getResourcePolicyResponse_httpStatus
- The response's http status code.
Response Lenses
getResourcePolicyResponse_resourcePolicy :: Lens' GetResourcePolicyResponse (Maybe Text) Source #
A JSON-formatted string that describes the permissions that are associated with the attached secret. These permissions are combined with any permissions that are associated with the user or role that attempts to access this secret. The combined permissions specify who can access the secret and what actions they can perform. For more information, see Authentication and Access Control for Amazon Web Services Secrets Manager in the Amazon Web Services Secrets Manager User Guide.
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 friendly name of the secret that the resource-based policy was retrieved for.
getResourcePolicyResponse_httpStatus :: Lens' GetResourcePolicyResponse Int Source #
The response's http status code.