Secrets Manager
Overview
Provides a Command-line Interface (CLI) that supports programmatic use of IaaS/PaaS products provided by SCP.
This guide provides a brief description of Secrets Manager and how to call CLI. The output is formatted as a JSON string
Version
| Version | Status | Supported Until |
|---|
| 1.0 | CURRENT | - |
1 - CLIs
1.1 - Create Secret
1.1.1 - 1.0
scpcli secretsmanager secret create
--secret_value <value>
--name <value>
--kms_id <value>
--acl_cidr <value>
[--description <value>]
[--tags <value>]
Description
Create secret.
State
ACTIVE (CURRENT)
| Version | Supported Until |
|---|
| 1.0 | - |
Parameters
| Name | Type | Description | Example |
|---|
secret_value required | string | The value of a Secret can be entered as a JSON string in key/value format, up to 10 pairs. | {"key1":"value1","key2":"value2"} |
name required | string | Secret Name | name |
kms_id required | string | Resource ID created in the Key Management Service (KMS) product | 3265ab469f0d406d83073da3e11e7a6c |
acl_cidr required | string | Access control list of secret in CIDR | 192.168.1.1/24, 10.0.0.1/16 |
description optional | string | Description of secret | description |
tags optional | array | Tag List' | '{"key": "", "value": ""}' |
Responses
| Name | Description | Example |
|---|
| id | ID | 0fdd87aab8cb46f59b7c1f81ed03fb3e |
| account_id | Account ID | 3265ab469f0d406d83073da3e11e7a6c |
| acl_cidr | Access control list of secret in CIDR | 192.168.1.1/24, 10.0.0.1/16 |
| created_at | Created At | 2024-05-17T00:23:17Z |
| created_by | Created By | 90dddfc2b1e04edba54ba2b41539a9ac |
| deleted_at | Date of deletion | 2025-02-25 03:07:17.000 |
| description | Description of secret | description |
| kms_id | Resource ID created in the Key Management Service (KMS) product | 3265ab469f0d406d83073da3e11e7a6c |
| kms_name | Resource name of KMS key | kmsname |
| modified_at | Modified At | 2024-05-17T00:23:17Z |
| modified_by | Modified By | 90dddfc2b1e04edba54ba2b41539a9ac |
| name | Name of key | my-secret-name |
| recent_searched_at | Date of recent search | 2025-02-25 03:07:17.000 |
| state | State of key(Creating, Active, Error, Stop, To_Be_Terminated) | Active |
| type | Type of secret | General |
1.2 - Delete Secret
1.2.1 - 1.0
scpcli secretsmanager secret delete
--secret_id <value>
--waiting_time_ndays <value>
Description
Delete secret.
State
ACTIVE (CURRENT)
| Version | Supported Until |
|---|
| 1.0 | - |
Parameters
| Name | Type | Description | Example |
|---|
secret_id required | string | Secret ID | 3265ab469f0d406d83073da3e11e7a6c |
waiting_time_ndays required | integer | Days remaining until deletion | 7 |
1.3 - Generate Random Password
1.3.1 - 1.0
scpcli secretsmanager generate random password
[--exclude_characters <value>]
[--exclude_lowercase <value>]
[--exclude_numbers <value>]
[--exclude_punctuation <value>]
[--exclude_uppercase <value>]
[--include_space <value>]
[--password_length <value>]
[--require_each_included_type <value>]
Description
Generate random password.
State
ACTIVE (CURRENT)
| Version | Supported Until |
|---|
| 1.0 | - |
Parameters
| Name | Type | Description | Example |
|---|
exclude_characters optional | string | Characters to exclude when generating password | abcdefg |
exclude_lowercase optional | boolean | Option to exclude lowercase letters | false |
exclude_numbers optional | boolean | Option to exclude numbers | false |
exclude_punctuation optional | boolean | Option to exclude punctuation | false |
exclude_uppercase optional | boolean | Option to exclude uppercase letters | false |
include_space optional | boolean | Option to include spaces | false |
password_length optional | integer | Length of the password to generate | 32 |
require_each_included_type optional | boolean | Require all included character types | true |
Responses
| Name | Description | Example |
|---|
| random_password | Generate random password. | random-value |
1.4 - List Secrets
1.4.1 - 1.0
scpcli secretsmanager secret list
[--size <value>]
[--page <value>]
[--sort <value>]
[--name <value>]
[--state <value>]
Description
List secrets.
State
ACTIVE (CURRENT)
| Version | Supported Until |
|---|
| 1.0 | - |
Parameters
| Name | Type | Description | Example |
|---|
size optional | integer | size | 20 |
page optional | integer | page | 0 |
sort optional | string | sort | created_at:desc |
name optional | string | Secret Name | name |
state optional | array | Secret State | A |
Responses
| Name | Description | Example |
|---|
| id | ID | 0fdd87aab8cb46f59b7c1f81ed03fb3e |
| account_id | Account ID | 3265ab469f0d406d83073da3e11e7a6c |
| acl_cidr | Access control list of secret in CIDR | 192.168.1.1/24, 10.0.0.1/16 |
| created_at | Created At | 2024-05-17T00:23:17Z |
| created_by | Created By | 90dddfc2b1e04edba54ba2b41539a9ac |
| deleted_at | Date of deletion | 2025-02-25 03:07:17.000 |
| description | Description of secret | description |
| kms_id | Resource ID created in the Key Management Service (KMS) product | 3265ab469f0d406d83073da3e11e7a6c |
| kms_name | Resource name of KMS key | kmsname |
| modified_at | Modified At | 2024-05-17T00:23:17Z |
| modified_by | Modified By | 90dddfc2b1e04edba54ba2b41539a9ac |
| name | Name of key | my-secret-name |
| recent_searched_at | Date of recent search | 2025-02-25 03:07:17.000 |
| state | State of key(Creating, Active, Error, Stop, To_Be_Terminated) | Active |
| type | Type of secret | General |
1.5 - List Versions of Secret
1.5.1 - 1.0
scpcli secretsmanager secret list version
--secret_id <value>
Description
List versions of secrets.
State
ACTIVE (CURRENT)
| Version | Supported Until |
|---|
| 1.0 | - |
Parameters
| Name | Type | Description | Example |
|---|
secret_id required | string | Secret ID | 3265ab469f0d406d83073da3e11e7a6c |
Responses
| Name | Description | Example |
|---|
| version_list | | |
1.6 - Restore Secret
1.6.1 - 1.0
scpcli secretsmanager secret restore
--secret_id <value>
Description
Cancel process of deleting secret.
State
ACTIVE (CURRENT)
| Version | Supported Until |
|---|
| 1.0 | - |
Parameters
| Name | Type | Description | Example |
|---|
secret_id required | string | Secret ID | 3265ab469f0d406d83073da3e11e7a6c |
1.7 - Set CIDR of Secret
1.7.1 - 1.0
scpcli secretsmanager secret set cidr
--secret_id <value>
--acl_cidr <value>
Description
Edit the IP CIDR value for access control when retrieving the value of a Secret.
State
ACTIVE (CURRENT)
| Version | Supported Until |
|---|
| 1.0 | - |
Parameters
| Name | Type | Description | Example |
|---|
secret_id required | string | Secret ID | 3265ab469f0d406d83073da3e11e7a6c |
acl_cidr required | string | Access control list of secret in CIDR | 192.168.1.1/24, 10.0.0.1/16 |
1.8 - Set Description of Secret
1.8.1 - 1.0
scpcli secretsmanager secret set description
--secret_id <value>
--description <value>
Description
Set description of secret.
State
ACTIVE (CURRENT)
| Version | Supported Until |
|---|
| 1.0 | - |
Parameters
| Name | Type | Description | Example |
|---|
secret_id required | string | Secret ID | 3265ab469f0d406d83073da3e11e7a6c |
description required | string | Description of secret | description |
1.9 - Set KMS ID of Secret
1.9.1 - 1.0
scpcli secretsmanager secret set kmsid
--secret_id <value>
--kms_id <value>
Description
Modify the KMS ID used to encrypt the secret value.
State
ACTIVE (CURRENT)
| Version | Supported Until |
|---|
| 1.0 | - |
Parameters
| Name | Type | Description | Example |
|---|
secret_id required | string | Secret ID | 3265ab469f0d406d83073da3e11e7a6c |
kms_id required | string | Resource ID created in the Key Management Service (KMS) product | 3265ab469f0d406d83073da3e11e7a6c |
1.10 - Set Label of Version
1.10.1 - 1.0
scpcli secretsmanager secret update label
--secret_id <value>
--label <value>
[--move_to_version_id <value>]
[--remove_from_version_id <value>]
Description
Labels are added, moved, or removed from a version. If only the move_to_version_id value is used, the label is added. If only the remove_from_version_id value is used, the label is removed. If both values are used, the label is moved from remove_from_version_id to move_to_version_id.
State
ACTIVE (CURRENT)
| Version | Supported Until |
|---|
| 1.0 | - |
Parameters
| Name | Type | Description | Example |
|---|
secret_id required | string | Secret ID | 3265ab469f0d406d83073da3e11e7a6c |
label required | string | Label of secret version. Not allow duplication. | My Custom Label |
move_to_version_id optional | string | Secret Version ID | 3265ab469f0d406d83073da3e11e7a6c |
remove_from_version_id optional | string | Secret Version ID | 3265ab469f0d406d83073da3e11e7a6c |
1.11 - Show Secret Detail
1.11.1 - 1.0
scpcli secretsmanager secret show
--secret_id <value>
Description
Show secret detail.
State
ACTIVE (CURRENT)
| Version | Supported Until |
|---|
| 1.0 | - |
Parameters
| Name | Type | Description | Example |
|---|
secret_id required | string | Secret ID | 3265ab469f0d406d83073da3e11e7a6c |
Responses
| Name | Description | Example |
|---|
| id | ID | 0fdd87aab8cb46f59b7c1f81ed03fb3e |
| account_id | Account ID | 3265ab469f0d406d83073da3e11e7a6c |
| acl_cidr | Access control list of secret in CIDR | 192.168.1.1/24, 10.0.0.1/16 |
| created_at | Created At | 2024-05-17T00:23:17Z |
| created_by | Created By | 90dddfc2b1e04edba54ba2b41539a9ac |
| deleted_at | Date of deletion | 2025-02-25 03:07:17.000 |
| description | Description of secret | description |
| kms_id | Resource ID created in the Key Management Service (KMS) product | 3265ab469f0d406d83073da3e11e7a6c |
| kms_name | Resource name of KMS key | kmsname |
| modified_at | Modified At | 2024-05-17T00:23:17Z |
| modified_by | Modified By | 90dddfc2b1e04edba54ba2b41539a9ac |
| name | Name of key | my-secret-name |
| recent_searched_at | Date of recent search | 2025-02-25 03:07:17.000 |
| state | State of key(Creating, Active, Error, Stop, To_Be_Terminated) | Active |
| type | Type of secret | General |
1.12 - Show Secret Value
1.12.1 - 1.0
scpcli secretsmanager secret show value
--secret_id <value>
[--label <value>]
[--version_id <value>]
Description
Show secret value.
State
ACTIVE (CURRENT)
| Version | Supported Until |
|---|
| 1.0 | - |
Parameters
| Name | Type | Description | Example |
|---|
secret_id required | string | Secret ID | 3265ab469f0d406d83073da3e11e7a6c |
label optional | string | Label of secret version. Not allow duplication. | CURRENT |
version_id optional | string | Secret Version ID | e7b638507d9f4feeb6032a22b7640bf7 |
Responses
| Name | Description | Example |
|---|
| secret_value | The value of a Secret can be entered as a JSON string in key/value format, up to 10 pairs. | {“key1”:“value1”,“key2”:“value2”} |
1.13 - Update Secret Value
1.13.1 - 1.0
scpcli secretsmanager secret update value
--secret_id <value>
--secret_value <value>
Description
Update secret value.
State
ACTIVE (CURRENT)
| Version | Supported Until |
|---|
| 1.0 | - |
Parameters
| Name | Type | Description | Example |
|---|
secret_id required | string | Secret ID | 3265ab469f0d406d83073da3e11e7a6c |
secret_value required | string | The value of a Secret can be entered as a JSON string in key/value format, up to 10 pairs. | {"key1":"value1","key2":"value2"} |