Actions, resources, and condition keys for Amazon Secrets Manager
Amazon Secrets Manager (service prefix: secretsmanager) provides the following
service-specific operations, resources, actions, and condition keys for use in IAM permission
policies.
References:
-
Learn how to configure this service.
-
View a list of the API operations available for this service.
-
Learn how to secure this service and its resources by using IAM permission policies.
-
View the programmatic service authorization reference
for this service.
Topics
API operations defined by Amazon Secrets Manager
The following table maps API operations to the IAM actions they authorize. Only condition keys that have static values for the given API and action are listed; for the full set of condition keys supported by each action, see the Actions table.
| Operation | IAM action | Condition key | Possible value(s) | Access level |
|---|---|---|---|---|
|
BatchGetSecretValue |
Read |
|||
Read |
||||
List |
||||
|
CancelRotateSecret |
Write |
|||
|
CreateSecret |
Write |
|||
Write |
||||
Tagging, Write |
||||
|
DeleteResourcePolicy |
Permissions management, Write |
|||
|
DeleteSecret |
Write |
|||
|
DescribeSecret |
Read |
|||
|
GetRandomPassword |
Read |
|||
|
GetResourcePolicy |
Read |
|||
|
GetSecretValue |
Read |
|||
|
ListSecretVersionIds |
Read |
|||
|
ListSecrets |
List |
|||
|
PutResourcePolicy |
Permissions management, Write |
|||
|
PutSecretValue |
Write |
|||
|
RemoveRegionsFromReplication |
Write |
|||
|
ReplicateSecretToRegions |
Write |
|||
|
RestoreSecret |
Write |
|||
|
RotateSecret |
Write |
|||
iam:PassedToService |
secretsmanager.amazonaws.com |
Write |
||
|
StopReplicationToReplica |
Write |
|||
|
TagResource |
Tagging, Write |
|||
|
UntagResource |
Tagging, Write |
|||
|
UpdateSecret |
Write |
|||
|
UpdateSecretVersionStage |
Write |
|||
|
ValidateResourcePolicy |
Permissions management, Write |
|||
Permissions management, Write |
Actions defined by Amazon Secrets Manager
You can specify the following actions in the Action element of an IAM
policy statement. Use policies to grant permissions to perform an operation in Amazon. When
you use an action in a policy, you usually allow or deny access to the API operation or CLI
command with the same name. However, in some cases, a single action controls access to more
than one operation. Alternatively, some operations require several different actions.
| Actions | Description | Resource types (*required) | Condition keys | Access level |
|---|---|---|---|---|
Grants permission to retrieve and decrypt a list of secrets |
Read |
|||
Grants permission to cancel an in-progress secret rotation |
secretsmanager:resource/AllowRotationLambdaArn |
Write |
||
Grants permission to create a secret that stores encrypted data that can be queried and rotated |
secretsmanager:AddReplicaRegions secretsmanager:ForceOverwriteReplicaSecret secretsmanager:resource/AllowRotationLambdaArn |
Write |
||
Grants permission to delete the resource policy attached to a secret |
secretsmanager:resource/AllowRotationLambdaArn |
Permissions management, Write |
||
Grants permission to delete a secret |
secretsmanager:ForceDeleteWithoutRecovery secretsmanager:RecoveryWindowInDays secretsmanager:resource/AllowRotationLambdaArn |
Write |
||
Grants permission to retrieve the metadata about a secret, but not the encrypted data |
secretsmanager:resource/AllowRotationLambdaArn |
Read |
||
Grants permission to generate a random string for use in password creation |
Read |
|||
Grants permission to get the resource policy attached to a secret |
secretsmanager:resource/AllowRotationLambdaArn |
Read |
||
Grants permission to retrieve and decrypt the encrypted data |
secretsmanager:resource/AllowRotationLambdaArn secretsmanager:ResourceTag/tag-key |
Read |
||
Grants permission to list the available versions of a secret |
secretsmanager:resource/AllowRotationLambdaArn |
Read |
||
Grants permission to list the available secrets |
List |
|||
Grants permission to attach a resource policy to a secret |
secretsmanager:BlockPublicPolicy secretsmanager:resource/AllowRotationLambdaArn |
Permissions management, Write |
||
Grants permission to create a new version of the secret with new encrypted data |
secretsmanager:resource/AllowRotationLambdaArn |
Write |
||
Grants permission to remove regions from replication |
secretsmanager:resource/AllowRotationLambdaArn |
Write |
||
Grants permission to convert an existing secret to a multi-Region secret and begin replicating the secret to a list of new regions |
secretsmanager:AddReplicaRegions secretsmanager:ForceOverwriteReplicaSecret secretsmanager:resource/AllowRotationLambdaArn |
Write |
||
Grants permission to cancel deletion of a secret |
secretsmanager:resource/AllowRotationLambdaArn |
Write |
||
Grants permission to start rotation of a secret |
secretsmanager:ExternalSecretRotationRoleArn secretsmanager:ModifyRotationRules secretsmanager:resource/AllowRotationLambdaArn secretsmanager:ResourceTag/tag-key secretsmanager:RotateImmediately |
Write |
||
Grants permission to remove the secret from replication and promote the secret to a regional secret in the replica Region |
secretsmanager:resource/AllowRotationLambdaArn |
Write |
||
Grants permission to add tags to a secret |
secretsmanager:resource/AllowRotationLambdaArn |
Tagging, Write |
||
Grants permission to remove tags from a secret |
secretsmanager:resource/AllowRotationLambdaArn |
Tagging, Write |
||
Grants permission to update a secret with new metadata or with a new version of the encrypted data |
secretsmanager:resource/AllowRotationLambdaArn secretsmanager:ResourceTag/tag-key |
Write |
||
Grants permission to move a stage from one secret to another |
secretsmanager:resource/AllowRotationLambdaArn secretsmanager:ResourceTag/tag-key |
Write |
||
Grants permission to validate a resource policy before attaching policy |
secretsmanager:resource/AllowRotationLambdaArn |
Permissions management, Write |
Resource types defined by Amazon Secrets Manager
The following resource types are defined by this service and can be used in the
Resource element of IAM permission policy statements.
| Resource types | ARN | Condition keys |
|---|---|---|
arn:${Partition}:secretsmanager:${Region}:${Account}:secret:${SecretId} |
secretsmanager:ResourceTag/tag-key |
Condition keys for Amazon Secrets Manager
Amazon Secrets Manager defines the following condition keys that can be used in the
Condition element of an IAM policy.
| Condition keys | Description | Type |
|---|---|---|
Filters access by a key that is present in the request the user makes to the Secrets Manager service |
String |
|
Filters access by the tags associated with the resource |
String |
|
Filters access by the list of all the tag key names present in the request the user makes to the Secrets Manager service |
ArrayOfString |
|
Filters access by the list of Regions in which to replicate the secret |
ArrayOfString |
|
Filters access by whether the resource policy blocks broad Amazon Web Services account access |
Bool |
|
Filters access by the description text in the request |
String |
|
Filters access by the managed external secret rotation role ARN in the request |
ARN |
|
Filters access by whether the secret is to be deleted immediately without any recovery window |
Bool |
|
Filters access by whether to overwrite a secret with the same name in the destination Region |
Bool |
|
Filters access by the key ARN of the KMS key in the request |
ARN |
|
Filters access by the key identifier of the KMS key in the request. Deprecated: Use secretsmanager:KmsKeyArn |
String |
|
Filters access by whether the rotation rules of the secret are to be modified |
Bool |
|
Filters access by the friendly name of the secret in the request |
String |
|
Filters access by the number of days that Secrets Manager waits before it can delete the secret |
Numeric |
|
Filters access by a tag key and value pair |
String |
|
Filters access by whether the secret is to be rotated immediately |
Bool |
|
Filters access by the ARN of the rotation Lambda function in the request |
ARN |
|
Filters access by the SecretID value in the request |
ARN |
|
Filters access by primary region in which the secret is created if the secret is a multi-Region secret |
String |
|
Filters access by the managed external secret type in the request |
String |
|
Filters access by the unique identifier of the version of the secret in the request |
String |
|
Filters access by the list of version stages in the request |
String |
|
Filters access by the ARN of the rotation Lambda function associated with the secret |
ARN |
|
Filters access by the managed external secret type associated with the secret |
String |