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 |
Validates that a resource policy does not grant a wide range of principals access to your secret. A resource-based policy is optional for secrets.
The API performs three checks when validating the policy:
- Sends a call to Zelkova, an automated reasoning engine, to ensure your resource policy does not allow broad access to your secret, for example policies that use a wildcard for the principal.
- Checks for correct syntax in a policy.
- Verifies the policy does not lock out a caller.
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:ValidateResourcePolicy
. For
more information, see
IAM policy actions for Secrets Manager
and
Authentication and access control in Secrets Manager.
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_policyValidationPassed :: Lens' ValidateResourcePolicyResponse (Maybe Bool)
- validateResourcePolicyResponse_validationErrors :: Lens' ValidateResourcePolicyResponse (Maybe [ValidationErrorsEntry])
- 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
- This field is reserved for internal use.
$sel:resourcePolicy:ValidateResourcePolicy'
, validateResourcePolicy_resourcePolicy
- A JSON-formatted string that contains an Amazon Web Services
resource-based policy. The policy in the string identifies who can
access or manage this secret and its versions. For example policies, see
Permissions policy examples.
Request Lenses
validateResourcePolicy_secretId :: Lens' ValidateResourcePolicy (Maybe Text) Source #
This field is reserved for internal use.
validateResourcePolicy_resourcePolicy :: Lens' ValidateResourcePolicy Text Source #
A JSON-formatted string that contains an Amazon Web Services resource-based policy. The policy in the string identifies who can access or manage this secret and its versions. For example policies, see Permissions policy examples.
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:policyValidationPassed:ValidateResourcePolicyResponse'
, validateResourcePolicyResponse_policyValidationPassed
- True if your policy passes validation, otherwise false.
$sel:validationErrors:ValidateResourcePolicyResponse'
, validateResourcePolicyResponse_validationErrors
- Validation errors if your policy didn't pass validation.
$sel:httpStatus:ValidateResourcePolicyResponse'
, validateResourcePolicyResponse_httpStatus
- The response's http status code.
Response Lenses
validateResourcePolicyResponse_policyValidationPassed :: Lens' ValidateResourcePolicyResponse (Maybe Bool) Source #
True if your policy passes validation, otherwise false.
validateResourcePolicyResponse_validationErrors :: Lens' ValidateResourcePolicyResponse (Maybe [ValidationErrorsEntry]) Source #
Validation errors if your policy didn't pass validation.
validateResourcePolicyResponse_httpStatus :: Lens' ValidateResourcePolicyResponse Int Source #
The response's http status code.