Secret

Secret #

Secret is a resource that stores and manages credentials. Secret is used to access data in other microservices.

Package : spaceone.api.secret.v1



Secret #

Secret Methods:

MethodRequestResponse
createCreateSecretRequestSecretInfo
updateUpdateSecretRequestSecretInfo
deleteSecretRequestEmpty
enableSecretRequestSecretInfo
disableSecretRequestSecretInfo
update_dataUpdateSecretDataRequestEmpty
get_dataGetSecretDataRequestSecretDataInfo
getSecretRequestSecretInfo
listSecretQuerySecretsInfo
statSecretStatQueryStruct

create #

Create a new secret. Created secret is encrypted and stored securely. It can be used to link to a trusted secret if you request it with ’trusted_secret_id’ in the parameter.

POST /secret/v1/secret/create

CreateSecretRequest

  • name (string) Required

  • data (Struct) Required

  • resource_group (ResourceGroup) Required

  • schema_id (string)

  • tags (Struct)

  • workspace_id (string)

  • project_id (string)

  • service_account_id (string)

  • trusted_secret_id (string)

{
   "name": "Cloudforet AWS Dev",
   "data": "********",
   "schema_id": "aws_access_key",
   "resource_group": "PROJECT",
   "service_account_id": "sa-123456789012",
   "project_id": "project-123456789012"
}

SecretInfo

  • secret_id (string) Required

  • name (string) Required

  • state (State) Required

  • schema_id (string) Required

  • provider (string) Required

  • tags (Struct) Required

  • resource_group (ResourceGroup) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • service_account_id (string) Required

  • trusted_secret_id (string) Required

  • created_at (string) Required

{
   "secret_id": "secret-123456789012",
   "name": "aws-dev",
   "state": "ENABLED",
   "tags": {},
   "schema_id": "aws_access_key",
   "provider": "aws",
   "service_account_id": "sa-123456789012",
   "resource_group": "PROJECT",
   "project_id": "project-123456789012",
   "workspace_id": "workspace-123456789012",
   "domain_id": "domain-123456789012",
   "created_at": "2022-01-01T06:10:14.851Z"
}

update #

Updates a specific secret’s information. You can only change the ’name’ and ’tags’, and to change the data you must use the update_data API.

POST /secret/v1/secret/update

UpdateSecretRequest

  • secret_id (string) Required

  • name (string)

  • tags (Struct)

  • project_id (string)

{
   "secret_id": "secret-123456789012",
   "name": "aws-dev2",
   "tags": { "a": "b"},
   "project_id": "project-123456789012"
}

SecretInfo

  • secret_id (string) Required

  • name (string) Required

  • state (State) Required

  • schema_id (string) Required

  • provider (string) Required

  • tags (Struct) Required

  • resource_group (ResourceGroup) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • service_account_id (string) Required

  • trusted_secret_id (string) Required

  • created_at (string) Required

{
   "secret_id": "secret-123456789012",
   "name": "aws-dev",
   "state": "ENABLED",
   "tags": {},
   "schema_id": "aws_access_key",
   "provider": "aws",
   "service_account_id": "sa-123456789012",
   "resource_group": "PROJECT",
   "project_id": "project-123456789012",
   "workspace_id": "workspace-123456789012",
   "domain_id": "domain-123456789012",
   "created_at": "2022-01-01T06:10:14.851Z"
}

delete #

Deletes a specific secret.

POST /secret/v1/secret/delete

SecretRequest

  • secret_id (string) Required
{
   "secret_id": "secret-123456789012"
}

enable #

Enables a specific secret.

POST /secret/v1/secret/enable

SecretRequest

  • secret_id (string) Required
{
   "secret_id": "secret-123456789012"
}

SecretInfo

  • secret_id (string) Required

  • name (string) Required

  • state (State) Required

  • schema_id (string) Required

  • provider (string) Required

  • tags (Struct) Required

  • resource_group (ResourceGroup) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • service_account_id (string) Required

  • trusted_secret_id (string) Required

  • created_at (string) Required

{
   "secret_id": "secret-123456789012",
   "name": "aws-dev",
   "state": "ENABLED",
   "tags": {},
   "schema_id": "aws_access_key",
   "provider": "aws",
   "service_account_id": "sa-123456789012",
   "resource_group": "PROJECT",
   "project_id": "project-123456789012",
   "workspace_id": "workspace-123456789012",
   "domain_id": "domain-123456789012",
   "created_at": "2022-01-01T06:10:14.851Z"
}

disable #

Disables a specific secret.

POST /secret/v1/secret/disable

SecretRequest

  • secret_id (string) Required
{
   "secret_id": "secret-123456789012"
}

SecretInfo

  • secret_id (string) Required

  • name (string) Required

  • state (State) Required

  • schema_id (string) Required

  • provider (string) Required

  • tags (Struct) Required

  • resource_group (ResourceGroup) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • service_account_id (string) Required

  • trusted_secret_id (string) Required

  • created_at (string) Required

{
   "secret_id": "secret-123456789012",
   "name": "aws-dev",
   "state": "ENABLED",
   "tags": {},
   "schema_id": "aws_access_key",
   "provider": "aws",
   "service_account_id": "sa-123456789012",
   "resource_group": "PROJECT",
   "project_id": "project-123456789012",
   "workspace_id": "workspace-123456789012",
   "domain_id": "domain-123456789012",
   "created_at": "2022-01-01T06:10:14.851Z"
}

update_data #

Updates a specific secret’s data. Updated secret is encrypted and stored securely.

POST /secret/v1/secret/update-data

UpdateSecretDataRequest

  • secret_id (string) Required

  • schema_id (string) Required

  • data (Struct) Required

{
   "secret_id": "secret-123456789012",
    "data": "********"
}

get_data #

Get a specific secret’s data. This API is for internal system use only.

GetSecretDataRequest

  • secret_id (string) Required

  • domain_id (string) Required

{
   "secret_id": "secret-123456789012",
   "domain_id": "domain-12345abcde"
}

get #

Get a specific secret’s information.

POST /secret/v1/secret/get

SecretRequest

  • secret_id (string) Required
{
   "secret_id": "secret-123456789012"
}

SecretInfo

  • secret_id (string) Required

  • name (string) Required

  • state (State) Required

  • schema_id (string) Required

  • provider (string) Required

  • tags (Struct) Required

  • resource_group (ResourceGroup) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • service_account_id (string) Required

  • trusted_secret_id (string) Required

  • created_at (string) Required

{
   "secret_id": "secret-123456789012",
   "name": "aws-dev",
   "state": "ENABLED",
   "tags": {},
   "schema_id": "aws_access_key",
   "provider": "aws",
   "service_account_id": "sa-123456789012",
   "resource_group": "PROJECT",
   "project_id": "project-123456789012",
   "workspace_id": "workspace-123456789012",
   "domain_id": "domain-123456789012",
   "created_at": "2022-01-01T06:10:14.851Z"
}

list #

Queries a list of secrets. You can use a query to get a filtered list of secrets.

POST /secret/v1/secret/list

SecretQuery

  • query (Query)

  • secret_id (string)

  • name (string)

  • state (State)

  • schema_id (string)

  • provider (string)

  • workspace_id (string)

  • project_id (string)

  • service_account_id (string)

  • trusted_secret_id (string)

{
   "query": {}
}

SecretsInfo

  • results (SecretInfo) Repeated Required

  • total_count (int32) Required

{
   "results": [
       {
           "secret_id": "secret-123456789012",
           "name": "aws-dev",
           "state": "ENABLED",
           "tags": {},
           "schema": "aws_access_key",
           "provider": "aws",
           "service_account_id": "sa-123456789012",
           "resource_group": "PROJECT",
           "workspace_id": "workspace-123456789012",
           "project_id": "project-123456789012",
           "domain_id": "domain-123456789012",
           "created_at": "2022-01-01T06:10:14.851Z"
       },
       {
           "secret_id": "secret-987654321098",
           "name": "plugin-credentials",
           "state": "ENABLED",
           "tags": {},
           "resource_group": "WORKSPACE",
           "workspace_id": "workspace-123456789012",
           "domain_id": "domain-123456789012",
           "created_at": "2022-01-01T02:31:01.709Z"
       }
   ],
   "total_count": 2
}

stat #

POST /secret/v1/secret/stat



Message #

CreateSecretRequest #

  • name (string) Required

  • data (Struct) Required

  • resource_group (ResourceGroup) Required

  • schema_id (string)

  • tags (Struct)

  • workspace_id (string)

  • project_id (string)

  • service_account_id (string)

  • trusted_secret_id (string)


GetSecretDataRequest #

  • secret_id (string) Required

  • domain_id (string) Required


SecretDataInfo #

  • encrypted (bool) Required

  • encrypt_options (Struct) Required

  • data (Struct) Required


SecretInfo #

  • secret_id (string) Required

  • name (string) Required

  • state (State) Required

  • schema_id (string) Required

  • provider (string) Required

  • tags (Struct) Required

  • resource_group (ResourceGroup) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • service_account_id (string) Required

  • trusted_secret_id (string) Required

  • created_at (string) Required


SecretQuery #

  • query (Query)

  • secret_id (string)

  • name (string)

  • state (State)

  • schema_id (string)

  • provider (string)

  • workspace_id (string)

  • project_id (string)

  • service_account_id (string)

  • trusted_secret_id (string)


SecretRequest #

  • secret_id (string) Required


SecretStatQuery #

  • query (StatisticsQuery) Required

  • domain_id (string) Required


SecretsInfo #

  • results (SecretInfo) Repeated Required

  • total_count (int32) Required


UpdateSecretDataRequest #

  • secret_id (string) Required

  • schema_id (string) Required

  • data (Struct) Required


UpdateSecretRequest #

  • secret_id (string) Required

  • name (string)

  • tags (Struct)

  • project_id (string)


Calendar November 4, 2024
Edit Edit this page