Download server/providers/aws/secretsmanager_api.md from Vishvam10/cloudenv: direct link, hf CLI and curl.
- Browser
- Download file 6.78 kB
-
https://huggingface.co/spaces/Vishvam10/cloudenv/resolve/main/server/providers/aws/secretsmanager_api.md
- Command line
-
hf download hf://spaces/Vishvam10/cloudenv/server/providers/aws/secretsmanager_api.md
-
curl -L -o secretsmanager_api.md https://huggingface.co/spaces/Vishvam10/cloudenv/resolve/main/server/providers/aws/secretsmanager_api.md
Secrets Manager Service API
Requests use CloudEnvAction: 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "secretsmanager",
"operation": "ValidateResourcePolicy",
"payload": {
"ResourcePolicy": "example-nonemptyresourcepolicytype"
}
}