cloudenv / server /providers /aws /secretsmanager_api.md
Vishvam10
initial space commit
b404de3
|
Raw History Blame Contribute Delete
6.78 kB
# Secrets Manager Service API
Requests use [`CloudEnvAction`](../../../models.py): `service`, `operation`, and `payload` (boto3 parameters for the operation).
Operations are enforced by IAM as `secretsmanager:<OperationName>` (see adapter).
## Operations
### CreateSecret
_Boto3 client method: `create_secret`_
**Other boto3 parameters (optional):** `AddReplicaRegions, ClientRequestToken, Description, ForceOverwriteReplicaSecret, KmsKeyId, SecretBinary, SecretString, Tags, Type`
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "CreateSecret",
"payload": {
"Name": "example-nametype"
}
}
```
---
### GetSecretValue
_Boto3 client method: `get_secret_value`_
**Other boto3 parameters (optional):** `VersionId, VersionStage`
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "GetSecretValue",
"payload": {
"SecretId": "example-secretidtype"
}
}
```
---
### ListSecrets
_Boto3 client method: `list_secrets`_
**Other boto3 parameters (optional):** `Filters, IncludePlannedDeletion, MaxResults, NextToken, SortBy, SortOrder`
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "ListSecrets",
"payload": {}
}
```
---
### DeleteSecret
_Boto3 client method: `delete_secret`_
**Other boto3 parameters (optional):** `ForceDeleteWithoutRecovery, RecoveryWindowInDays`
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "DeleteSecret",
"payload": {
"SecretId": "example-secretidtype"
}
}
```
---
### UpdateSecret
_Boto3 client method: `update_secret`_
**Other boto3 parameters (optional):** `ClientRequestToken, Description, KmsKeyId, SecretBinary, SecretString, Type`
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "UpdateSecret",
"payload": {
"SecretId": "example-secretidtype"
}
}
```
---
### DescribeSecret
_Boto3 client method: `describe_secret`_
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "DescribeSecret",
"payload": {
"SecretId": "example-secretidtype"
}
}
```
---
### PutSecretValue
_Boto3 client method: `put_secret_value`_
**Other boto3 parameters (optional):** `ClientRequestToken, RotationToken, SecretBinary, SecretString, VersionStages`
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "PutSecretValue",
"payload": {
"SecretId": "example-secretidtype"
}
}
```
---
### RestoreSecret
_Boto3 client method: `restore_secret`_
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "RestoreSecret",
"payload": {
"SecretId": "example-secretidtype"
}
}
```
---
### RotateSecret
_Boto3 client method: `rotate_secret`_
**Other boto3 parameters (optional):** `ClientRequestToken, ExternalSecretRotationMetadata, ExternalSecretRotationRoleArn, RotateImmediately, RotationLambdaARN, RotationRules`
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "RotateSecret",
"payload": {
"SecretId": "example-secretidtype"
}
}
```
---
### GetRandomPassword
_Boto3 client method: `get_random_password`_
**Other boto3 parameters (optional):** `ExcludeCharacters, ExcludeLowercase, ExcludeNumbers, ExcludePunctuation, ExcludeUppercase, IncludeSpace, PasswordLength, RequireEachIncludedType`
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "GetRandomPassword",
"payload": {}
}
```
---
### ListSecretVersionIds
_Boto3 client method: `list_secret_version_ids`_
**Other boto3 parameters (optional):** `IncludeDeprecated, MaxResults, NextToken`
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "ListSecretVersionIds",
"payload": {
"SecretId": "example-secretidtype"
}
}
```
---
### TagResource
_Boto3 client method: `tag_resource`_
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "TagResource",
"payload": {
"SecretId": "example-secretidtype",
"Tags": [
{}
]
}
}
```
---
### UntagResource
_Boto3 client method: `untag_resource`_
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "UntagResource",
"payload": {
"SecretId": "example-secretidtype",
"TagKeys": [
"example-tagkeytype"
]
}
}
```
---
### PutResourcePolicy
_Boto3 client method: `put_resource_policy`_
**Other boto3 parameters (optional):** `BlockPublicPolicy`
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "PutResourcePolicy",
"payload": {
"SecretId": "example-secretidtype",
"ResourcePolicy": "example-nonemptyresourcepolicytype"
}
}
```
---
### GetResourcePolicy
_Boto3 client method: `get_resource_policy`_
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "GetResourcePolicy",
"payload": {
"SecretId": "example-secretidtype"
}
}
```
---
### DeleteResourcePolicy
_Boto3 client method: `delete_resource_policy`_
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "DeleteResourcePolicy",
"payload": {
"SecretId": "example-secretidtype"
}
}
```
---
### ValidateResourcePolicy
_Boto3 client method: `validate_resource_policy`_
**Other boto3 parameters (optional):** `SecretId`
```bash
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "ValidateResourcePolicy",
"payload": {
"ResourcePolicy": "example-nonemptyresourcepolicytype"
}
}
```
---