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 |
Validates that the resource policy does not grant a wide range of IAM principals access to your 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. A resource-based policy is optional for secrets.
The API performs three checks when validating the secret:
- Sends a call to Zelkova, an automated reasoning engine, to ensure your Resource Policy does not allow broad access to your secret.
- Checks for correct syntax in a policy.
- Verifies the policy does not lock out a caller.
Minimum Permissions
You must have the permissions required to access the following APIs:
secretsmanager:PutResourcePolicy
secretsmanager:ValidateResourcePolicy
Synopsis
- data ValidateResourcePolicy = ValidateResourcePolicy' {
- secretId :: Maybe Text
- resourcePolicy :: Text
- newValidateResourcePolicy :: Text -> ValidateResourcePolicy
- validateResourcePolicy_secretId :: Lens' ValidateResourcePolicy (Maybe Text)
- validateResourcePolicy_resourcePolicy :: Lens' ValidateResourcePolicy Text
- data ValidateResourcePolicyResponse = ValidateResourcePolicyResponse' {}
- newValidateResourcePolicyResponse :: Int -> ValidateResourcePolicyResponse
- validateResourcePolicyResponse_validationErrors :: Lens' ValidateResourcePolicyResponse (Maybe [ValidationErrorsEntry])
- validateResourcePolicyResponse_policyValidationPassed :: Lens' ValidateResourcePolicyResponse (Maybe Bool)
- validateResourcePolicyResponse_httpStatus :: Lens' ValidateResourcePolicyResponse Int
Creating a Request
data ValidateResourcePolicy Source #
See: newValidateResourcePolicy
smart constructor.
ValidateResourcePolicy' | |
|
Instances
newValidateResourcePolicy Source #
Create a value of ValidateResourcePolicy
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:ValidateResourcePolicy'
, validateResourcePolicy_secretId
- (Optional) The identifier of the secret with the resource-based policy
you want to validate. 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.
$sel:resourcePolicy:ValidateResourcePolicy'
, validateResourcePolicy_resourcePolicy
- A JSON-formatted string constructed according to the grammar and syntax
for an Amazon Web Services resource-based policy. The policy in the
string identifies who can access or manage this secret and its versions.
For information on how to format a JSON parameter for the various
command line tool environments, see
Using JSON for Parameters
in the CLI User Guide.publi
Request Lenses
validateResourcePolicy_secretId :: Lens' ValidateResourcePolicy (Maybe Text) Source #
(Optional) The identifier of the secret with the resource-based policy you want to validate. 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.
validateResourcePolicy_resourcePolicy :: Lens' ValidateResourcePolicy Text Source #
A JSON-formatted string constructed according to the grammar and syntax for an Amazon Web Services resource-based policy. The policy in the string identifies who can access or manage this secret and its versions. For information on how to format a JSON parameter for the various command line tool environments, see Using JSON for Parameters in the CLI User Guide.publi
Destructuring the Response
data ValidateResourcePolicyResponse Source #
See: newValidateResourcePolicyResponse
smart constructor.
ValidateResourcePolicyResponse' | |
|
Instances
newValidateResourcePolicyResponse Source #
Create a value of ValidateResourcePolicyResponse
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:validationErrors:ValidateResourcePolicyResponse'
, validateResourcePolicyResponse_validationErrors
- Returns an error message if your policy doesn't pass validatation.
$sel:policyValidationPassed:ValidateResourcePolicyResponse'
, validateResourcePolicyResponse_policyValidationPassed
- Returns a message stating that your Reource Policy passed validation.
$sel:httpStatus:ValidateResourcePolicyResponse'
, validateResourcePolicyResponse_httpStatus
- The response's http status code.
Response Lenses
validateResourcePolicyResponse_validationErrors :: Lens' ValidateResourcePolicyResponse (Maybe [ValidationErrorsEntry]) Source #
Returns an error message if your policy doesn't pass validatation.
validateResourcePolicyResponse_policyValidationPassed :: Lens' ValidateResourcePolicyResponse (Maybe Bool) Source #
Returns a message stating that your Reource Policy passed validation.
validateResourcePolicyResponse_httpStatus :: Lens' ValidateResourcePolicyResponse Int Source #
The response's http status code.