Introduction
With IBM Cloud® Secrets Manager, you can create, lease, and centrally manage secrets that are used in IBM Cloud services or your custom-built applications. Secrets are stored in a dedicated instance of Secrets Manager that is built on open source HashiCorp Vault.
SDKs for Java, Node, Python, and Go are available to make it easier to programmatically access the API from your code. The client libraries that are provided by the SDKs implement best practices for using the API and reduce the amount of code that you need to write. The tab for each language includes code examples that demonstrate how to use the client libraries.
For more information about using the SDKs, see the IBM Cloud SDK Common project on GitHub. For more information about getting started with Secrets Manager, check out the docs.
Installing the Java SDK
Maven
<dependency>
<groupId>com.ibm.cloud</groupId>
<artifactId>secrets-manager-sdk</artifactId>
<version>${version}</version>
</dependency>
Gradle
compile 'com.ibm.cloud:secrets-manager-sdk:${version}'
Replace {version}
in these examples with the release version.
View on GitHub
Installing the Python SDK
pip install --upgrade "ibm-secrets-manager-sdk"
View on GitHub
Installing the Go SDK
Go modules (recommended): Add the following import in your code, and then run go build
or go mod tidy
import (
sm "github.com/IBM/secrets-manager-go-sdk/v2/secretsmanagerv2"
)
Go get
go get -u github.com/IBM/secrets-manager-go-sdk/v2
View on GitHub
Installing the Node SDK
npm install @ibm-cloud/secrets-manager
View on GitHub
Endpoint URLs
Secrets Manager supports instance-specific endpoint URLs that you can use to interact with the service over public or private service endpoints. To make requests to the API, you supply the instance ID that is unique to your Secrets Manager service instance.
You can copy your endpoint URL from the Endpoints page in the Secrets Manager service dashboard.
Endpoint URLs by location
- Dallas:
https://{instance_ID}.us-south.secrets-manager.appdomain.cloud
- Frankfurt:
https://{instance_ID}.eu-de.secrets-manager.appdomain.cloud
- London:
https://{instance_ID}.eu-gb.secrets-manager.appdomain.cloud
- Madrid:
https://{instance_ID}.eu-es.secrets-manager.appdomain.cloud
- Osaka:
https://{instance_ID}.jp-osa.secrets-manager.appdomain.cloud
- Sao Paulo:
https://{instance_ID}.br-sao.secrets-manager.appdomain.cloud
- Sydney:
https://{instance_ID}.au-syd.secrets-manager.appdomain.cloud
- Tokyo:
https://{instance_ID}.jp-tok.secrets-manager.appdomain.cloud
- Toronto:
https://{instance_ID}.ca-tor.secrets-manager.appdomain.cloud
- Washington DC:
https://{instance_ID}.us-east.secrets-manager.appdomain.cloud
Secrets Manager supports instance-specific endpoint URLs that you can use to interact with the service over public or private service endpoints. To target your Secrets Manager service instance by using the Java SDK, use the setServiceUrl()
method. You can copy your endpoint URL from the Endpoints page in the Secrets Manager service dashboard.
Endpoint URLs by location
- Dallas:
https://{instance_ID}.us-south.secrets-manager.appdomain.cloud
- Frankfurt:
https://{instance_ID}.eu-de.secrets-manager.appdomain.cloud
- London:
https://{instance_ID}.eu-gb.secrets-manager.appdomain.cloud
- Madrid:
https://{instance_ID}.eu-es.secrets-manager.appdomain.cloud
- Osaka:
https://{instance_ID}.jp-osa.secrets-manager.appdomain.cloud
- Sao Paulo:
https://{instance_ID}.br-sao.secrets-manager.appdomain.cloud
- Sydney:
https://{instance_ID}.au-syd.secrets-manager.appdomain.cloud
- Tokyo:
https://{instance_ID}.jp-tok.secrets-manager.appdomain.cloud
- Toronto:
https://{instance_ID}.ca-tor.secrets-manager.appdomain.cloud
- Washington DC:
https://{instance_ID}.us-east.secrets-manager.appdomain.cloud
Secrets Manager supports instance-specific endpoint URLs that you can use to interact with the service over public or private service endpoints. To target your Secrets Manager service instance by using the Node.js SDK, use the serviceUrl
parameter. You can copy your endpoint URL from the Endpoints page in the Secrets Manager service dashboard.
Endpoint URLs by location
- Dallas:
https://{instance_ID}.us-south.secrets-manager.appdomain.cloud
- Frankfurt:
https://{instance_ID}.eu-de.secrets-manager.appdomain.cloud
- London:
https://{instance_ID}.eu-gb.secrets-manager.appdomain.cloud
- Madrid:
https://{instance_ID}.eu-es.secrets-manager.appdomain.cloud
- Osaka:
https://{instance_ID}.jp-osa.secrets-manager.appdomain.cloud
- Sao Paulo:
https://{instance_ID}.br-sao.secrets-manager.appdomain.cloud
- Sydney:
https://{instance_ID}.au-syd.secrets-manager.appdomain.cloud
- Tokyo:
https://{instance_ID}.jp-tok.secrets-manager.appdomain.cloud
- Toronto:
https://{instance_ID}.ca-tor.secrets-manager.appdomain.cloud
- Washington DC:
https://{instance_ID}.us-east.secrets-manager.appdomain.cloud
Secrets Manager supports instance-specific endpoint URLs that you can use to interact with the service over public or private service endpoints. To target your Secrets Manager service instance by using the Python SDK, use the set_service_url()
method. You can copy your endpoint URL from the Endpoints page in the Secrets Manager service dashboard.
Endpoint URLs by location
- Dallas:
https://{instance_ID}.us-south.secrets-manager.appdomain.cloud
- Frankfurt:
https://{instance_ID}.eu-de.secrets-manager.appdomain.cloud
- London:
https://{instance_ID}.eu-gb.secrets-manager.appdomain.cloud
- Madrid:
https://{instance_ID}.eu-es.secrets-manager.appdomain.cloud
- Osaka:
https://{instance_ID}.jp-osa.secrets-manager.appdomain.cloud
- Sao Paulo:
https://{instance_ID}.br-sao.secrets-manager.appdomain.cloud
- Sydney:
https://{instance_ID}.au-syd.secrets-manager.appdomain.cloud
- Tokyo:
https://{instance_ID}.jp-tok.secrets-manager.appdomain.cloud
- Toronto:
https://{instance_ID}.ca-tor.secrets-manager.appdomain.cloud
- Washington DC:
https://{instance_ID}.us-east.secrets-manager.appdomain.cloud
Secrets Manager supports instance-specific endpoint URLs that you can use to interact with the service over public or private service endpoints. To target your Secrets Manager service instance by using the Go SDK, use the URL
parameter. You can copy your endpoint URL from the Endpoints page in the Secrets Manager service dashboard.
Endpoint URLs by location
- Dallas:
https://{instance_ID}.us-south.secrets-manager.appdomain.cloud
- Frankfurt:
https://{instance_ID}.eu-de.secrets-manager.appdomain.cloud
- London:
https://{instance_ID}.eu-gb.secrets-manager.appdomain.cloud
- Madrid:
https://{instance_ID}.eu-es.secrets-manager.appdomain.cloud
- Osaka:
https://{instance_ID}.jp-osa.secrets-manager.appdomain.cloud
- Sao Paulo:
https://{instance_ID}.br-sao.secrets-manager.appdomain.cloud
- Sydney:
https://{instance_ID}.au-syd.secrets-manager.appdomain.cloud
- Tokyo:
https://{instance_ID}.jp-tok.secrets-manager.appdomain.cloud
- Toronto:
https://{instance_ID}.ca-tor.secrets-manager.appdomain.cloud
- Washington DC:
https://{instance_ID}.us-east.secrets-manager.appdomain.cloud
Base URL
https://{instance_ID}.{region}.secrets-manager.appdomain.cloud
Example for the Dallas location
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v2.SecretsManager;
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v2.model.*;
import com.ibm.cloud.sdk.core.http.Response;
import com.ibm.cloud.sdk.core.security.IamAuthenticator;
import java.util.Collections;
...
// Create an IAM authenticator
IamAuthenticator iamAuthenticator = new IamAuthenticator.Builder()
.apikey("<API_KEY>")
.build();
// Construct the service client
SecretsManager secretsManagerService = new SecretsManager("My Secrets-Manager service", iamAuthenticator);
// Set the service URL
secretsManagerService.setServiceUrl("https://{instance_ID}.us-south.secrets-manager.appdomain.cloud");
Example for the Dallas location
const IbmCloudSecretsManagerApiV2 = require('@ibm-cloud/secrets-manager/secrets-manager/v2');
const { IamAuthenticator } = require('@ibm-cloud/secrets-manager/auth');
const secretsManagerService = new SecretsManagerV2({
authenticator: new IamAuthenticator({
apikey: '<API_KEY>',
}),
serviceUrl: 'https://{instance_ID}.us-south.secrets-manager.appdomain.cloud',
});
Example for the Dallas location
from ibm_cloud_sdk_core.authenticators.iam_authenticator import IAMAuthenticator
from ibm_secrets_manager_sdk.secrets_manager_v2 import *
secrets_manager_service = SecretsManagerV2(
authenticator=IAMAuthenticator(apikey='<API_KEY>')
)
secrets_manager_service.set_service_url('https://{instance_ID}.us-south.secrets-manager.appdomain.cloud')
Example for the Dallas location
import (
"encoding/json"
"fmt"
"github.com/IBM/go-sdk-core/v5/core"
sm "github.com/IBM/secrets-manager-go-sdk/secretsmanagerv2"
)
func main() {
secretsManagerService, err := sm.NewSecretsManagerV2(&sm.SecretsManagerV2Options {
URL: "https://{instance_ID}.us-south.secrets-manager.appdomain.cloud",
Authenticator: & core.IamAuthenticator {
ApiKey: "<API_KEY>",
},
})
if err != nil {
panic(err)
}
}
Authentication
Authorization to the Secrets Manager API is enforced by using an IBM Cloud Identity and Access Management (IAM) access token. The token is used to determine the actions that a user or service ID has access to when they use the API.
To work with the API, include a valid IAM token in each outgoing request to the service. You can generate an access token by first creating an API key and then exchanging your API key for an IBM Cloud IAM token.
Don't have an API key? Try running ibmcloud iam oauth-tokens
in the IBM Cloud Shell to quickly generate a personal access token.
To generate an access token from your API key, use the following cURL command.
curl -X POST \
"https://iam.cloud.ibm.com/identity/token" \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--data-urlencode 'grant_type=urn:ibm:params:oauth:grant-type:apikey' \
--data-urlencode 'apikey=<API_KEY>'
Replace <API_KEY>
with your IBM Cloud API key.
When you use the SDK, configure an IAM authenticator with an IBM Cloud IAM API key. The authenticator automatically obtains the IAM access token for the API key and includes it with each request. You can configure an authenticator in either of two ways:
- Programmatically by constructing an IAM authenticator instance and supplying your IAM API key
- By defining the API key in external configuration properties and then using the SDK authenticator factory to construct an IAM authenticator that uses the configured IAM API key
For more information, see the Authentication section of the IBM Cloud SDK Common documentation.
Example API request
curl -X {request_method} "{base_url}/api/v2/{method_endpoint}" --header "Authorization: Bearer {IAM_token}"
Replace {IAM_token}
with your access token.
Constructing the service client
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v2.SecretsManager;
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v2.model.*;
import com.ibm.cloud.sdk.core.http.Response;
import com.ibm.cloud.sdk.core.security.IamAuthenticator;
import java.util.Collections;
...
// Create an IAM authenticator
IamAuthenticator iamAuthenticator = new IamAuthenticator.Builder()
.apikey("<API_KEY>")
.build();
// Construct the service client
SecretsManager secretsManagerService = new SecretsManager("My Secrets-Manager service", iamAuthenticator);
// Set the service URL
secretsManagerService.setServiceUrl("<URL>");
Replace <API_KEY>
with your IBM Cloud API key. Replace <URL>
with the endpoint URL for your instance. Invoke service operations by using the secretsManagerService
variable.
Constructing the service client
from ibm_cloud_sdk_core.authenticators.iam_authenticator import IAMAuthenticator
from ibm_secrets_manager_sdk.secrets_manager_v2 import *
secrets_manager_service = SecretsManagerV2(
authenticator=IAMAuthenticator(apikey='<API_KEY>')
)
secrets_manager_service.set_service_url('<URL>')
Replace <API_KEY>
with your IBM Cloud API key. Replace <URL>
with the endpoint URL for your instance.
Constructing the service client
import (
"encoding/json"
"fmt"
"github.com/IBM/go-sdk-core/v5/core"
sm "github.com/IBM/secrets-manager-go-sdk/secretsmanagerv2"
)
func main() {
secretsManagerService, err := sm.NewSecretsManagerV2(&sm.SecretsManagerV2Options {
URL: "<URL>",
Authenticator: & core.IamAuthenticator {
ApiKey: "<API_KEY>",
},
})
if err != nil {
panic(err)
}
}
Replace <API_KEY>
with your IBM Cloud API key. Replace <URL>
with the endpoint URL for your instance.
Constructing the service client
const IbmCloudSecretsManagerApiV2 = require('@ibm-cloud/secrets-manager/secrets-manager/v2');
const { IamAuthenticator } = require('@ibm-cloud/secrets-manager/auth');
const secretsManagerService = new IbmCloudSecretsManagerApiV2({
authenticator: new IamAuthenticator({
apikey: '<API_KEY>',
}),
serviceUrl: '<URL>',
});
Replace <API_KEY>
with your IBM Cloud API key. Replace <URL>
with the endpoint URL for your instance.
Auditing
You can monitor API activity within your account by using the IBM Cloud Activity Tracker service. Whenever an API method is called, an event is generated that you can then track and audit from within Activity Tracker. The specific event type is listed for each individual method.
For more information about how to track Secrets Manager activity, see Auditing events for Secrets Manager.
Error handling
The Secrets Manager APIs use standard HTTP status codes to indicate whether a method completed successfully. HTTP response codes in the 2xx
range indicate success. A response in the 4xx
range is some sort of failure, and a response in the 5xx
range usually indicates an internal system error.
Status code | Description |
---|---|
200 OK | Everything worked as expected. |
300 Multiple Choices | The request has more than one possible responses. |
400 Bad Request | The request was unsuccessful, often due to a missing required parameter. |
401 Unauthorized | Access token is missing or invalid. |
402 Payment Required | Your Trial plan is now expired. |
403 Forbidden | You are not allowed to access this resource. |
404 Not Found | The requested resource doesn't exist. |
409 Conflict | The requested resource conflicts with an already existing resource. |
410 Gone | The requested resource was deleted and no longer exists. |
429 Too Many Requests | Too many requests hit the API too quickly. |
500 Internal Server Error | Something went wrong on Secrets Manager's end. |
Example error handling
secretsManagerApi.method(params)
.catch(err => {
console.log('Error:', err);
});
Example error handling
import sm "github.com/IBM/secrets-manager-go-sdk/v2/secretsmanagerv2"
// Instantiate a service
secretsManagerApi, err := sm.NewSecretsManagerV2(&sm.SecretsManagerV2Options)
// Check for errors
if err != nil {
panic(err)
}
// Call a method
result, response, err := secretsManagerApi.MethodName(&methodOptions)
// Check for errors
if err != nil {
panic(err)
}
Pagination
Some API requests might return a large number of results. To avoid performance issues, the Secrets Manager API returns one page of results at a time, with a limited number of results on each page.
The default page size is defined differently for each operation. To use a different page size, use the limit
query parameter.
Methods
Create a new secret group
Create a secret group that you can use to organize secrets and control who can access them.
A successful request returns the ID value of the secret group, along with other properties. To learn more about secret groups, check out the docs.
Create a secret group that you can use to organize secrets and control who can access them.
A successful request returns the ID value of the secret group, along with other properties. To learn more about secret groups, check out the docs.
Create a secret group that you can use to organize secrets and control who can access them.
A successful request returns the ID value of the secret group, along with other properties. To learn more about secret groups, check out the docs.
Create a secret group that you can use to organize secrets and control who can access them.
A successful request returns the ID value of the secret group, along with other properties. To learn more about secret groups, check out the docs.
Create a secret group that you can use to organize secrets and control who can access them.
A successful request returns the ID value of the secret group, along with other properties. To learn more about secret groups, check out the docs.
POST /api/v2/secret_groups
ServiceCall<SecretGroup> createSecretGroup(CreateSecretGroupOptions createSecretGroupOptions)
createSecretGroup(params)
create_secret_group(
self,
name: str,
*,
description: Optional[str] = None,
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) CreateSecretGroup(createSecretGroupOptions *CreateSecretGroupOptions) (result *SecretGroup, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) CreateSecretGroupWithContext(ctx context.Context, createSecretGroupOptions *CreateSecretGroupOptions) (result *SecretGroup, response *core.DetailedResponse, err error)
Request
Use the CreateSecretGroupOptions.Builder
to create a CreateSecretGroupOptions
object that contains the parameter values for the createSecretGroup
method.
Instantiate the CreateSecretGroupOptions
struct and set the fields to provide parameter values for the CreateSecretGroup
method.
The request body to create a new secret group.
{
"name": "my-secret-group",
"description": "Extended description for this group."
}
The name of your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
Example:
my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
(.*?)
Example:
Extended description for this group.
The createSecretGroup options.
The name of your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
parameters
The name of your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
Examples:An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:
parameters
The name of your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
Examples:An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateSecretGroup options.
The name of your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
curl -X POST --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" --header "Content-Type: application/json" --data '{"name":"my-secret-group","description":"Extended description for this group."}' "${base_url}/api/v2/secret_groups"
CreateSecretGroupOptions createSecretGroupOptions = new CreateSecretGroupOptions.Builder() .name("my-secret-group") .build(); Response<SecretGroup> response = secretsManagerService.createSecretGroup(createSecretGroupOptions).execute(); SecretGroup secretGroup = response.getResult(); System.out.println(secretGroup);
const params = { name: 'my-secret-group', }; let res; try { res = await secretsManagerService.createSecretGroup(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
response = secrets_manager_service.create_secret_group( name='my-secret-group', ) secret_group = response.get_result() print(json.dumps(secret_group, indent=2))
createSecretGroupOptions := secretsManagerService.NewCreateSecretGroupOptions( "my-secret-group", ) secretGroup, response, err := secretsManagerService.CreateSecretGroup(createSecretGroupOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secretGroup, "", " ") fmt.Println(string(b))
Response
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$
Example:
default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
(.*?)
Example:
my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
(.*?)
Example:
Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Possible values: 0 ≤ length ≤ 35
Example:
2022-04-12T23:20:50.52Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Example:
iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Possible values: 0 ≤ length ≤ 35
Example:
2022-04-12T23:20:50.52Z
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
Status Code
The secret group was successfully created.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
InternalServerError
BadGatewayError
ServiceUnavailableError
Example of
SecretGroup
response{ "created_at": "2020-10-05T21:33:11Z", "description": "Extended description for this group.", "id": "d898bb90-82f6-4d61-b5cc-b079b66cfa76", "name": "my-secret-group", "updated_at": "2020-11-25T22:13:10Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21" }
Example of
SecretGroup
response{ "created_at": "2020-10-05T21:33:11Z", "description": "Extended description for this group.", "id": "d898bb90-82f6-4d61-b5cc-b079b66cfa76", "name": "my-secret-group", "updated_at": "2020-11-25T22:13:10Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21" }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
List secret groups
List the secret groups that are available in your Secrets Manager instance.
List the secret groups that are available in your Secrets Manager instance.
List the secret groups that are available in your Secrets Manager instance.
List the secret groups that are available in your Secrets Manager instance.
List the secret groups that are available in your Secrets Manager instance.
GET /api/v2/secret_groups
ServiceCall<SecretGroupCollection> listSecretGroups()
listSecretGroups(params)
list_secret_groups(
self,
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) ListSecretGroups(listSecretGroupsOptions *ListSecretGroupsOptions) (result *SecretGroupCollection, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) ListSecretGroupsWithContext(ctx context.Context, listSecretGroupsOptions *ListSecretGroupsOptions) (result *SecretGroupCollection, response *core.DetailedResponse, err error)
Request
No Request Parameters
No Request Parameters
No Request Parameters
No Request Parameters
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
No Request Parameters
curl -X GET --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" "${base_url}/api/v2/secret_groups"
ListSecretGroupsOptions listSecretGroupsOptions = new ListSecretGroupsOptions(); Response<SecretGroupCollection> response = secretsManagerService.listSecretGroups(listSecretGroupsOptions).execute(); SecretGroupCollection secretGroupCollection = response.getResult(); System.out.println(secretGroupCollection);
let res; try { res = await secretsManagerService.listSecretGroups({}); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
response = secrets_manager_service.list_secret_groups() secret_group_collection = response.get_result() print(json.dumps(secret_group_collection, indent=2))
listSecretGroupsOptions := secretsManagerService.NewListSecretGroupsOptions() secretGroupCollection, response, err := secretsManagerService.ListSecretGroups(listSecretGroupsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secretGroupCollection, "", " ") fmt.Println(string(b))
Response
Properties that describe a collection of secret groups.
A collection of secret groups.
Possible values: 1 ≤ number of items ≤ 201
The total number of resources in a collection.
Possible values: 0 ≤ value ≤ 10000000
Properties that describe a collection of secret groups.
A collection of secret groups.
Possible values: 1 ≤ number of items ≤ 201
- secretGroups
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The total number of resources in a collection.
Possible values: 0 ≤ value ≤ 10000000
Properties that describe a collection of secret groups.
A collection of secret groups.
Possible values: 1 ≤ number of items ≤ 201
- secret_groups
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The total number of resources in a collection.
Possible values: 0 ≤ value ≤ 10000000
Properties that describe a collection of secret groups.
A collection of secret groups.
Possible values: 1 ≤ number of items ≤ 201
- secret_groups
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The total number of resources in a collection.
Possible values: 0 ≤ value ≤ 10000000
Properties that describe a collection of secret groups.
A collection of secret groups.
Possible values: 1 ≤ number of items ≤ 201
- SecretGroups
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The total number of resources in a collection.
Possible values: 0 ≤ value ≤ 10000000
Status Code
The list of secret groups was successfully retrieved.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
InternalServerError
BadGatewayError
ServiceUnavailableError
Example
SecretGroup
collection response{ "secret_groups": [ { "created_at": "2020-09-05T21:33:11Z", "description": "Default Secret Group", "id": "ee52ebb6-1728-4580-8ede-13f6504e3ae0", "name": "default", "updated_at": "2020-09-25T22:13:10Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21" }, { "created_at": "2020-10-05T21:33:11Z", "description": "Extended description for this group.", "id": "cb52ebb6-1728-4580-8ede-13f6504e3ae0", "name": "my-secret-group", "updated_at": "2020-11-25T22:13:10Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21" }, { "created_at": "2020-10-05T22:05:15Z", "description": "Extended description for this group.", "id": "19f88b9c-4f2f-405c-b877-a09338575c3f", "name": "my-second-secret-group", "updated_at": "2020-11-25T22:13:10Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21" } ], "total_count": 3 }
Example
SecretGroup
collection response{ "secret_groups": [ { "created_at": "2020-09-05T21:33:11Z", "description": "Default Secret Group", "id": "ee52ebb6-1728-4580-8ede-13f6504e3ae0", "name": "default", "updated_at": "2020-09-25T22:13:10Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21" }, { "created_at": "2020-10-05T21:33:11Z", "description": "Extended description for this group.", "id": "cb52ebb6-1728-4580-8ede-13f6504e3ae0", "name": "my-secret-group", "updated_at": "2020-11-25T22:13:10Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21" }, { "created_at": "2020-10-05T22:05:15Z", "description": "Extended description for this group.", "id": "19f88b9c-4f2f-405c-b877-a09338575c3f", "name": "my-second-secret-group", "updated_at": "2020-11-25T22:13:10Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21" } ], "total_count": 3 }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Get a secret group
Get the properties of an existing secret group by specifying the ID of the group.
Get the properties of an existing secret group by specifying the ID of the group.
Get the properties of an existing secret group by specifying the ID of the group.
Get the properties of an existing secret group by specifying the ID of the group.
Get the properties of an existing secret group by specifying the ID of the group.
GET /api/v2/secret_groups/{id}
ServiceCall<SecretGroup> getSecretGroup(GetSecretGroupOptions getSecretGroupOptions)
getSecretGroup(params)
get_secret_group(
self,
id: str,
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) GetSecretGroup(getSecretGroupOptions *GetSecretGroupOptions) (result *SecretGroup, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) GetSecretGroupWithContext(ctx context.Context, getSecretGroupOptions *GetSecretGroupOptions) (result *SecretGroup, response *core.DetailedResponse, err error)
Request
Use the GetSecretGroupOptions.Builder
to create a GetSecretGroupOptions
object that contains the parameter values for the getSecretGroup
method.
Instantiate the GetSecretGroupOptions
struct and set the fields to provide parameter values for the GetSecretGroup
method.
Path Parameters
The UUID that uniquely identifies your secret group.
Possible values: 7 ≤ length ≤ 36, Value must match regular expression
^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$
Example:
d898bb90-82f6-4d61-b5cc-b079b66cfa76
The getSecretGroup options.
The UUID that uniquely identifies your secret group.
Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:d898bb90-82f6-4d61-b5cc-b079b66cfa76
parameters
The UUID that uniquely identifies your secret group.
Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:
parameters
The UUID that uniquely identifies your secret group.
Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetSecretGroup options.
The UUID that uniquely identifies your secret group.
Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:d898bb90-82f6-4d61-b5cc-b079b66cfa76
curl -X GET --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" "${base_url}/api/v2/secret_groups/${id}"
GetSecretGroupOptions getSecretGroupOptions = new GetSecretGroupOptions.Builder() .id(secretGroupIdForGetSecretGroupLink) .build(); Response<SecretGroup> response = secretsManagerService.getSecretGroup(getSecretGroupOptions).execute(); SecretGroup secretGroup = response.getResult(); System.out.println(secretGroup);
const params = { id: secretGroupIdForGetSecretGroupLink, }; let res; try { res = await secretsManagerService.getSecretGroup(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
response = secrets_manager_service.get_secret_group( id=secret_group_id_for_get_secret_group_link, ) secret_group = response.get_result() print(json.dumps(secret_group, indent=2))
getSecretGroupOptions := secretsManagerService.NewGetSecretGroupOptions( secretGroupIdForGetSecretGroupLink, ) secretGroup, response, err := secretsManagerService.GetSecretGroup(getSecretGroupOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secretGroup, "", " ") fmt.Println(string(b))
Response
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$
Example:
default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
(.*?)
Example:
my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
(.*?)
Example:
Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Possible values: 0 ≤ length ≤ 35
Example:
2022-04-12T23:20:50.52Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Example:
iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Possible values: 0 ≤ length ≤ 35
Example:
2022-04-12T23:20:50.52Z
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
Status Code
The secret group was successfully retrieved.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
InternalServerError
BadGatewayError
ServiceUnavailableError
Example of
SecretGroup
response{ "created_at": "2020-10-05T21:33:11Z", "description": "Extended description for this group.", "id": "d898bb90-82f6-4d61-b5cc-b079b66cfa76", "name": "my-secret-group", "updated_at": "2020-11-25T22:13:10Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21" }
Example of
SecretGroup
response{ "created_at": "2020-10-05T21:33:11Z", "description": "Extended description for this group.", "id": "d898bb90-82f6-4d61-b5cc-b079b66cfa76", "name": "my-secret-group", "updated_at": "2020-11-25T22:13:10Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21" }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Update a secret group
Update the properties of an existing secret group, such as its name or description.
Update the properties of an existing secret group, such as its name or description.
Update the properties of an existing secret group, such as its name or description.
Update the properties of an existing secret group, such as its name or description.
Update the properties of an existing secret group, such as its name or description.
PATCH /api/v2/secret_groups/{id}
ServiceCall<SecretGroup> updateSecretGroup(UpdateSecretGroupOptions updateSecretGroupOptions)
updateSecretGroup(params)
update_secret_group(
self,
id: str,
secret_group_patch: 'SecretGroupPatch',
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) UpdateSecretGroup(updateSecretGroupOptions *UpdateSecretGroupOptions) (result *SecretGroup, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) UpdateSecretGroupWithContext(ctx context.Context, updateSecretGroupOptions *UpdateSecretGroupOptions) (result *SecretGroup, response *core.DetailedResponse, err error)
Request
Use the UpdateSecretGroupOptions.Builder
to create a UpdateSecretGroupOptions
object that contains the parameter values for the updateSecretGroup
method.
Instantiate the UpdateSecretGroupOptions
struct and set the fields to provide parameter values for the UpdateSecretGroup
method.
Path Parameters
The UUID that uniquely identifies your secret group.
Possible values: length = 36, Value must match regular expression
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
Example:
d898bb90-82f6-4d61-b5cc-b079b66cfa76
The request body to update a secret group.
{
"name": "updated-secret-group-name",
"description": "Updated description for this group."
}
The name of your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
Example:
my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
(.*?)
Example:
Extended description for this group.
The updateSecretGroup options.
The UUID that uniquely identifies your secret group.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:d898bb90-82f6-4d61-b5cc-b079b66cfa76
The request body to update a secret group.
parameters
The UUID that uniquely identifies your secret group.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:The name of your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
Examples:An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:
parameters
The UUID that uniquely identifies your secret group.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:Update the name or description of your secret group.
Examples:{ "name": "updated-secret-group-name", "description": "Updated description for this group." }
- secret_group_patch
The name of your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateSecretGroup options.
The UUID that uniquely identifies your secret group.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:d898bb90-82f6-4d61-b5cc-b079b66cfa76
The request body to update a secret group.
curl -X PATCH --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" --header "Content-Type: application/merge-patch+json" --data '' "${base_url}/api/v2/secret_groups/${id}"
SecretGroupPatch secretGroupPatchModel = new SecretGroupPatch.Builder() .build(); Map<String, Object> secretGroupPatchModelAsPatch = secretGroupPatchModel.asPatch(); UpdateSecretGroupOptions updateSecretGroupOptions = new UpdateSecretGroupOptions.Builder() .id(secretGroupIdForGetSecretGroupLink) .secretGroupPatch(secretGroupPatchModelAsPatch) .build(); Response<SecretGroup> response = secretsManagerService.updateSecretGroup(updateSecretGroupOptions).execute(); SecretGroup secretGroup = response.getResult(); System.out.println(secretGroup);
const params = { id: secretGroupIdForGetSecretGroupLink, }; let res; try { res = await secretsManagerService.updateSecretGroup(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
secret_group_patch_model = { } response = secrets_manager_service.update_secret_group( id=secret_group_id_for_get_secret_group_link, secret_group_patch=secret_group_patch_model, ) secret_group = response.get_result() print(json.dumps(secret_group, indent=2))
secretGroupPatchModel := &secretsmanagerv2.SecretGroupPatch{ } secretGroupPatchModelAsPatch, asPatchErr := secretGroupPatchModel.AsPatch() Expect(asPatchErr).To(BeNil()) updateSecretGroupOptions := secretsManagerService.NewUpdateSecretGroupOptions( secretGroupIdForGetSecretGroupLink, secretGroupPatchModelAsPatch, ) secretGroup, response, err := secretsManagerService.UpdateSecretGroup(updateSecretGroupOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secretGroup, "", " ") fmt.Println(string(b))
Response
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$
Example:
default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
(.*?)
Example:
my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
(.*?)
Example:
Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Possible values: 0 ≤ length ≤ 35
Example:
2022-04-12T23:20:50.52Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Example:
iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Possible values: 0 ≤ length ≤ 35
Example:
2022-04-12T23:20:50.52Z
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
Properties that describe a secret group.
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:my-secret-group
An extended description of your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this group.
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
Status Code
The secret group was successfully updated.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
InternalServerError
BadGatewayError
ServiceUnavailableError
Example of
SecretGroup
response{ "created_at": "2020-10-05T21:33:11Z", "description": "Extended description for this group.", "id": "d898bb90-82f6-4d61-b5cc-b079b66cfa76", "name": "my-secret-group", "updated_at": "2020-11-25T22:13:10Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21" }
Example of
SecretGroup
response{ "created_at": "2020-10-05T21:33:11Z", "description": "Extended description for this group.", "id": "d898bb90-82f6-4d61-b5cc-b079b66cfa76", "name": "my-secret-group", "updated_at": "2020-11-25T22:13:10Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21" }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Delete a secret group
Delete a secret group by specifying the ID of the secret group.
Note: To delete a secret group, it must be empty. If you need to remove a secret group that contains secrets, you must first delete the secrets that are associated with the group.
Delete a secret group by specifying the ID of the secret group.
Note: To delete a secret group, it must be empty. If you need to remove a secret group that contains secrets, you must first delete the secrets that are associated with the group.
Delete a secret group by specifying the ID of the secret group.
Note: To delete a secret group, it must be empty. If you need to remove a secret group that contains secrets, you must first delete the secrets that are associated with the group.
Delete a secret group by specifying the ID of the secret group.
Note: To delete a secret group, it must be empty. If you need to remove a secret group that contains secrets, you must first delete the secrets that are associated with the group.
Delete a secret group by specifying the ID of the secret group.
Note: To delete a secret group, it must be empty. If you need to remove a secret group that contains secrets, you must first delete the secrets that are associated with the group.
DELETE /api/v2/secret_groups/{id}
ServiceCall<Void> deleteSecretGroup(DeleteSecretGroupOptions deleteSecretGroupOptions)
deleteSecretGroup(params)
delete_secret_group(
self,
id: str,
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) DeleteSecretGroup(deleteSecretGroupOptions *DeleteSecretGroupOptions) (response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) DeleteSecretGroupWithContext(ctx context.Context, deleteSecretGroupOptions *DeleteSecretGroupOptions) (response *core.DetailedResponse, err error)
Request
Use the DeleteSecretGroupOptions.Builder
to create a DeleteSecretGroupOptions
object that contains the parameter values for the deleteSecretGroup
method.
Instantiate the DeleteSecretGroupOptions
struct and set the fields to provide parameter values for the DeleteSecretGroup
method.
Path Parameters
The UUID that uniquely identifies your secret group.
Possible values: length = 36, Value must match regular expression
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
Example:
d898bb90-82f6-4d61-b5cc-b079b66cfa76
The deleteSecretGroup options.
The UUID that uniquely identifies your secret group.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:d898bb90-82f6-4d61-b5cc-b079b66cfa76
parameters
The UUID that uniquely identifies your secret group.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:
parameters
The UUID that uniquely identifies your secret group.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteSecretGroup options.
The UUID that uniquely identifies your secret group.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:d898bb90-82f6-4d61-b5cc-b079b66cfa76
curl -X DELETE --location --header "Authorization: Bearer ${iam_token}" "${base_url}/api/v2/secret_groups/${id}"
DeleteSecretGroupOptions deleteSecretGroupOptions = new DeleteSecretGroupOptions.Builder() .id(secretGroupIdForGetSecretGroupLink) .build(); Response<Void> response = secretsManagerService.deleteSecretGroup(deleteSecretGroupOptions).execute();
const params = { id: secretGroupIdForGetSecretGroupLink, }; try { await secretsManagerService.deleteSecretGroup(params); } catch (err) { console.warn(err); }
response = secrets_manager_service.delete_secret_group( id=secret_group_id_for_get_secret_group_link, )
deleteSecretGroupOptions := secretsManagerService.NewDeleteSecretGroupOptions( secretGroupIdForGetSecretGroupLink, ) response, err := secretsManagerService.DeleteSecretGroup(deleteSecretGroupOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from DeleteSecretGroup(): %d\n", response.StatusCode) }
Response
Status Code
The secret group was successfully deleted.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
Conflict
InternalServerError
BadGatewayError
ServiceUnavailableError
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Create a new secret
Create a secret or import an existing value that you can use to access or authenticate to a protected resource.
Use this operation to either generate or import an existing secret, such as a TLS certificate, that you can manage in your Secrets Manager service instance. A successful request stores the secret in your dedicated instance, based on the secret type and data that you specify. The response returns the ID value of the secret, along with other metadata.
To learn more about the types of secrets that you can create with Secrets Manager, check out the docs.
Create a secret or import an existing value that you can use to access or authenticate to a protected resource.
Use this operation to either generate or import an existing secret, such as a TLS certificate, that you can manage in your Secrets Manager service instance. A successful request stores the secret in your dedicated instance, based on the secret type and data that you specify. The response returns the ID value of the secret, along with other metadata.
To learn more about the types of secrets that you can create with Secrets Manager, check out the docs.
Create a secret or import an existing value that you can use to access or authenticate to a protected resource.
Use this operation to either generate or import an existing secret, such as a TLS certificate, that you can manage in your Secrets Manager service instance. A successful request stores the secret in your dedicated instance, based on the secret type and data that you specify. The response returns the ID value of the secret, along with other metadata.
To learn more about the types of secrets that you can create with Secrets Manager, check out the docs.
Create a secret or import an existing value that you can use to access or authenticate to a protected resource.
Use this operation to either generate or import an existing secret, such as a TLS certificate, that you can manage in your Secrets Manager service instance. A successful request stores the secret in your dedicated instance, based on the secret type and data that you specify. The response returns the ID value of the secret, along with other metadata.
To learn more about the types of secrets that you can create with Secrets Manager, check out the docs.
Create a secret or import an existing value that you can use to access or authenticate to a protected resource.
Use this operation to either generate or import an existing secret, such as a TLS certificate, that you can manage in your Secrets Manager service instance. A successful request stores the secret in your dedicated instance, based on the secret type and data that you specify. The response returns the ID value of the secret, along with other metadata.
To learn more about the types of secrets that you can create with Secrets Manager, check out the docs.
POST /api/v2/secrets
ServiceCall<Secret> createSecret(CreateSecretOptions createSecretOptions)
createSecret(params)
create_secret(
self,
secret_prototype: 'SecretPrototype',
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) CreateSecret(createSecretOptions *CreateSecretOptions) (result SecretIntf, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) CreateSecretWithContext(ctx context.Context, createSecretOptions *CreateSecretOptions) (result SecretIntf, response *core.DetailedResponse, err error)
Request
Use the CreateSecretOptions.Builder
to create a CreateSecretOptions
object that contains the parameter values for the createSecret
method.
Instantiate the CreateSecretOptions
struct and set the fields to provide parameter values for the CreateSecret
method.
Example of arbitrary secret's request body.
{
"custom_metadata": {
"metadata_custom_key": "metadata_custom_value"
},
"description": "Description of my arbitrary secret.",
"expiration_date": "2030-10-05T11:49:42Z",
"labels": [
"dev",
"us-south"
],
"name": "example-arbitrary-secret",
"payload": "secret-data",
"secret_group_id": "default",
"secret_type": "arbitrary",
"version_custom_metadata": {
"custom_version_key": "custom_version_value"
}
}
Allowable values: [
arbitrary
]
The createSecret options.
Specify the properties for your secret.
- secretPrototype
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:2033-04-12T23:20:50.520Z
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
A human-readable name to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
Examples:my-secret-example
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
The secret version metadata that a user can customize.
Examples:{ "key": "value" }
parameters
Specify the properties for your secret.
- secretPrototype
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:2033-04-12T23:20:50.520Z
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
A human-readable name to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
Examples:my-secret-example
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
The secret version metadata that a user can customize.
Examples:{ "key": "value" }
parameters
Specify the properties for your secret.
- secret_prototype
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:2033-04-12T23:20:50.520Z
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
A human-readable name to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
Examples:my-secret-example
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
The secret version metadata that a user can customize.
Examples:{ "key": "value" }
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateSecret options.
Specify the properties for your secret.
- SecretPrototype
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:2033-04-12T23:20:50.520Z
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
A human-readable name to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
Examples:my-secret-example
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
The secret version metadata that a user can customize.
Examples:{ "key": "value" }
ibmcloud secrets-manager secret-create --secret-name=example-arbitrary-secret --secret-type=arbitrary --arbitrary-payload=example-secret-data ibmcloud secrets-manager secret-create \ --secret-prototype='{"name": "example-arbitrary-secret", "secret_type": "arbitrary", "payload":"example-secret-data"}'
curl -X POST --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" --header "Content-Type: application/json" --data '{ "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my arbitrary secret.", "expiration_date": "2030-10-05T11:49:42Z", "labels": [ "dev", "us-south" ], "name": "example-arbitrary-secret", "payload": "secret-data", "secret_group_id": "default", "secret_type": "arbitrary", "version_custom_metadata": { "custom_version_key": "custom_version_value" } }' "${base_url}/api/v2/secrets"
ArbitrarySecretPrototype secretPrototypeModel = new ArbitrarySecretPrototype.Builder() .description("Description of my arbitrary secret.") .expirationDate(DateUtils.parseAsDateTime("2030-10-05T11:49:42Z")) .labels(java.util.Arrays.asList("dev", "us-south")) .name("example-arbitrary-secret") .secretGroupId("default") .secretType("arbitrary") .payload("secret-data") .build(); CreateSecretOptions createSecretOptions = new CreateSecretOptions.Builder() .secretPrototype(secretPrototypeModel) .build(); Response<Secret> response = secretsManagerService.createSecret(createSecretOptions).execute(); Secret secret = response.getResult(); System.out.println(secret);
// Request models needed by this operation. // ArbitrarySecretPrototype const secretPrototypeModel = { custom_metadata: { metadata_custom_key: 'metadata_custom_value' }, description: 'Description of my arbitrary secret.', expiration_date: '2030-10-05T11:49:42Z', labels: ['dev', 'us-south'], name: 'example-arbitrary-secret', secret_group_id: 'default', secret_type: 'arbitrary', payload: 'secret-data', version_custom_metadata: { custom_version_key: 'custom_version_value' }, }; const params = { secretPrototype: secretPrototypeModel, }; let res; try { res = await secretsManagerService.createSecret(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
secret_prototype_model = { 'custom_metadata': {'metadata_custom_key': 'metadata_custom_value'}, 'description': 'Description of my arbitrary secret.', 'expiration_date': '2030-10-05T11:49:42Z', 'labels': ['dev', 'us-south'], 'name': 'example-arbitrary-secret', 'secret_group_id': 'default', 'secret_type': 'arbitrary', 'payload': 'secret-data', 'version_custom_metadata': {'custom_version_key': 'custom_version_value'}, } response = secrets_manager_service.create_secret( secret_prototype=secret_prototype_model, ) secret = response.get_result() print(json.dumps(secret, indent=2))
secretPrototypeModel := &secretsmanagerv2.ArbitrarySecretPrototype{ Description: core.StringPtr("Description of my arbitrary secret."), Labels: []string{"dev", "us-south"}, Name: core.StringPtr("example-arbitrary-secret"), SecretGroupID: core.StringPtr("default"), SecretType: core.StringPtr("arbitrary"), Payload: core.StringPtr("secret-data"), } createSecretOptions := secretsManagerService.NewCreateSecretOptions( secretPrototypeModel, ) secret, response, err := secretsManagerService.CreateSecret(createSecretOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secret, "", " ") fmt.Println(string(b))
Response
Your secret.
Possible values: [
arbitrary
]
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
Status Code
The secret was successfully created.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
Conflict
UnprocessableEntity
InternalServerError
BadGatewayError
ServiceUnavailableError
Example of an arbitrary secret.
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my arbitrary secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-arbitrary-secret", "payload": "secret-data", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "arbitrary", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of an arbitrary secret.
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my arbitrary secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-arbitrary-secret", "payload": "secret-data", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "arbitrary", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example create IAM Credentials using Service ID
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": false, "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-iam-credentials-secret", "reuse_api_key": false, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be", "service_id_is_static": false, "state": 1, "state_description": "active", "ttl": "1800", "updated_at": "2020-10-05T21:33:11Z", "versions_total": 1 }
Example create IAM Credentials using Service ID
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": false, "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-iam-credentials-secret", "reuse_api_key": false, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be", "service_id_is_static": false, "state": 1, "state_description": "active", "ttl": "1800", "updated_at": "2020-10-05T21:33:11Z", "versions_total": 1 }
Example imported certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "intermediate_included": true, "issuer": "GlobalSign", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate", "private_key_included": true, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "imported_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example imported certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "intermediate_included": true, "issuer": "GlobalSign", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate", "private_key_included": true, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "imported_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example response for imported certificate create
{ "managed_csr": { "require_cn": true, "common_name": "example.com", "alt_names": "alt-name-1,alt-name-2", "ip_sans": "127.0.0.1", "uri_sans": "https://www.example.com/test", "other_sans": "2.5.4.5;UTF8:*.example.com", "exclude_cn_from_sans": false, "server_flag": true, "client_flag": true, "code_signing_flag": false, "email_protection_flag": false, "ou": [], "organization": [], "country": [], "locality": [], "province": [], "street_address": [], "postal_code": [], "key_type": "rsa", "key_bits": 2048, "user_ids": "user-1,user-2", "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDCCAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHOA==\n-----END CERTIFICATE REQUEST-----", "private_key": "obfuscated" }, "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate-managed-csr", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "imported_cert", "state": 0, "state_description": "pre_activation", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 0 }
Example response for imported certificate create
{ "managed_csr": { "require_cn": true, "common_name": "example.com", "alt_names": "alt-name-1,alt-name-2", "ip_sans": "127.0.0.1", "uri_sans": "https://www.example.com/test", "other_sans": "2.5.4.5;UTF8:*.example.com", "exclude_cn_from_sans": false, "server_flag": true, "client_flag": true, "code_signing_flag": false, "email_protection_flag": false, "ou": [], "organization": [], "country": [], "locality": [], "province": [], "street_address": [], "postal_code": [], "key_type": "rsa", "key_bits": 2048, "user_ids": "user-1,user-2", "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDCCAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHOA==\n-----END CERTIFICATE REQUEST-----", "private_key": "obfuscated" }, "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate-managed-csr", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "imported_cert", "state": 0, "state_description": "pre_activation", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 0 }
Example kv secret
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my key-value secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-kv-secret", "data": { "key1": "val1" }, "secret_type": "kv", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example kv secret
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my key-value secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-kv-secret", "data": { "key1": "val1" }, "secret_type": "kv", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example private certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "certificate_authority": "example-intermediate-CA", "certificate_template": "example-certificate-template", "common_name": "example.com", "created_at": "2022-10-02T14:08:07Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2030-03-02T15:08:37Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "issuer": "example.com", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-private-certificate", "next_rotation_date": "2022-03-02T14:08:07Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "month" }, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "ca_chain": [ "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----" ], "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "private_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-03-02T14:08:37Z", "validity": { "not_before": "2022-03-02T15:08:37Z", "not_after": "2030-03-01T00:00:00Z" }, "versions_total": 1 }
Example private certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "certificate_authority": "example-intermediate-CA", "certificate_template": "example-certificate-template", "common_name": "example.com", "created_at": "2022-10-02T14:08:07Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2030-03-02T15:08:37Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "issuer": "example.com", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-private-certificate", "next_rotation_date": "2022-03-02T14:08:07Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "month" }, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "ca_chain": [ "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----" ], "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "private_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-03-02T14:08:37Z", "validity": { "not_before": "2022-03-02T15:08:37Z", "not_after": "2030-03-01T00:00:00Z" }, "versions_total": 1 }
Example of created public certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2022-10-06T06:15:55Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description of my public certificate.", "downloaded": false, "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "issuance_info": { "auto_rotated": false, "ordered_on": "2022-10-06T06:15:55Z", "state": 0, "state_description": "pre_activation" }, "bundle_certs": true, "ca": "lets-encrypt-config", "dns": "cloud-internet-services-config", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-public-certificate", "rotation": { "auto_rotate": true, "rotate_keys": true }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "public_cert", "state": 0, "state_description": "pre_activation", "updated_at": "2022-10-06T06:15:55Z", "versions_total": 1 }
Example of created public certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2022-10-06T06:15:55Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description of my public certificate.", "downloaded": false, "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "issuance_info": { "auto_rotated": false, "ordered_on": "2022-10-06T06:15:55Z", "state": 0, "state_description": "pre_activation" }, "bundle_certs": true, "ca": "lets-encrypt-config", "dns": "cloud-internet-services-config", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-public-certificate", "rotation": { "auto_rotate": true, "rotate_keys": true }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "public_cert", "state": 0, "state_description": "pre_activation", "updated_at": "2022-10-06T06:15:55Z", "versions_total": 1 }
A sample service credentials secret body.
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "credentials": { "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS", "cos_hmac_keys": { "access_key_id": "af56af3af56a4c738afea662c47840b3", "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d" }, "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints", "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer", "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234", "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234::" }, "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "The description for my service credentials secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-service-credentials-secret", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": true, "interval": 10, "unit": "day" }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "service_credentials", "source_service": { "instance": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::" }, "parameters": { "HMAC": true, "serviceid_crn": "existing sid" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "iam": { "apikey": { "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3", "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "serviceid": { "crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234" }, "resource_key": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3", "name": "secret_name_versionid" } } }, "state": 1, "state_description": "active", "ttl": "86400", "updated_at": "2022-10-05T21:33:11Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "versions_total": 1 }
A sample service credentials secret body.
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "credentials": { "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS", "cos_hmac_keys": { "access_key_id": "af56af3af56a4c738afea662c47840b3", "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d" }, "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints", "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer", "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234", "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234::" }, "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "The description for my service credentials secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-service-credentials-secret", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": true, "interval": 10, "unit": "day" }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "service_credentials", "source_service": { "instance": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::" }, "parameters": { "HMAC": true, "serviceid_crn": "existing sid" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "iam": { "apikey": { "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3", "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "serviceid": { "crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234" }, "resource_key": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3", "name": "secret_name_versionid" } } }, "state": 1, "state_description": "active", "ttl": "86400", "updated_at": "2022-10-05T21:33:11Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "versions_total": 1 }
Example user credentials
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my user credentials secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-username-password", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "day" }, "password_generation_policy": { "length": 32, "include_digits": true, "include_symbols": true, "include_uppercase": true }, "username": "admin", "password": "admin1234", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "username_password", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example user credentials
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my user credentials secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-username-password", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "day" }, "password_generation_policy": { "length": 32, "include_digits": true, "include_symbols": true, "include_uppercase": true }, "username": "admin", "password": "admin1234", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "username_password", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example UnprocessableEntity error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 422, "errors": [ { "code": "unprocessable_entity", "message": "The API key is locked. Unlock the API key to complete this operation.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example UnprocessableEntity error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 422, "errors": [ { "code": "unprocessable_entity", "message": "The API key is locked. Unlock the API key to complete this operation.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
List secrets
List the secrets that are available in your Secrets Manager instance.
List the secrets that are available in your Secrets Manager instance.
List the secrets that are available in your Secrets Manager instance.
List the secrets that are available in your Secrets Manager instance.
List the secrets that are available in your Secrets Manager instance.
GET /api/v2/secrets
ServiceCall<SecretMetadataPaginatedCollection> listSecrets(ListSecretsOptions listSecretsOptions)
listSecrets(params)
list_secrets(
self,
*,
offset: Optional[int] = None,
limit: Optional[int] = None,
sort: Optional[str] = None,
search: Optional[str] = None,
groups: Optional[List[str]] = None,
secret_types: Optional[List[str]] = None,
match_all_labels: Optional[List[str]] = None,
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) ListSecrets(listSecretsOptions *ListSecretsOptions) (result *SecretMetadataPaginatedCollection, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) ListSecretsWithContext(ctx context.Context, listSecretsOptions *ListSecretsOptions) (result *SecretMetadataPaginatedCollection, response *core.DetailedResponse, err error)
Request
Use the ListSecretsOptions.Builder
to create a ListSecretsOptions
object that contains the parameter values for the listSecrets
method.
Instantiate the ListSecretsOptions
struct and set the fields to provide parameter values for the ListSecrets
method.
Query Parameters
The number of secrets to skip. By specifying
offset
, you retrieve a subset of items that starts with theoffset
value. Useoffset
withlimit
to page through your available resources.Usage: If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use
..?offset=25&limit=25
.Possible values: 0 ≤ value ≤ 10000000
Default:
0
The number of secrets to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use
limit
withoffset
to page through your available resources. Maximum limit allowed is 1000 secrets.Usage: If you want to retrieve only the first 25 secrets in your instance, use
..?limit=25
.Possible values: 1 ≤ value ≤ 1000
Default:
200
Sort a collection of secrets by the specified field in ascending order. To sort in descending order use the
-
characterAvailable values: id | created_at | updated_at | expiration_date | secret_type | name
Usage: To sort a list of secrets by their creation date, use
../secrets?sort=created_at
.Possible values: 2 ≤ length ≤ 17, Value must match regular expression
^-?(id|created_at|updated_at|expiration_date|secret_type|name)$
Example:
created_at
Obtain a collection of secrets that contain the specified string in one or more of the fields:
id
,name
,description
,labels
,secret_type
.Usage: If you want to list only the secrets that contain the string
text
, use../secrets?search=text
.Possible values: 2 ≤ length ≤ 128, Value must match regular expression
(.*?)
Example:
example
Filter secrets by groups.
You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets that are in the default secret group, use the
default
keyword.Usage: To retrieve a list of secrets that are associated with an existing secret group or the default group, use
..?groups={secret_group_ID},default
.Possible values: 0 ≤ number of items ≤ 201, 7 ≤ length ≤ 36, Value must match regular expression
^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$
Examples:[ "default", "cac40995-c37a-4dcb-9506-472869077634" ]
Filter secrets by types.
You can apply multiple filters by using a comma-separated list of secret types.
Usage: To retrieve a list of imported certificates and public certificates use
..?secret_types=imported_cert,public_cert
.Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]Possible values: 0 ≤ number of items ≤ 8, allows empty value
Examples:[ "arbitrary", "kv" ]
Filter secrets by labels.
You can use a comma-separated list of labels to filter secrets that include all of the labels in the list.
Usage: To retrieve a list of secrets that include both the label "dev" and the label "us-south" in their list of labels, use
..?labels=dev,us-south
.Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
(.*?)
Examples:[ "dev", "us-south" ]
The listSecrets options.
The number of secrets to skip. By specifying
offset
, you retrieve a subset of items that starts with theoffset
value. Useoffset
withlimit
to page through your available resources.Usage: If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use
..?offset=25&limit=25
.Possible values: 0 ≤ value ≤ 10000000
Default:
0
The number of secrets to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use
limit
withoffset
to page through your available resources. Maximum limit allowed is 1000 secrets.Usage: If you want to retrieve only the first 25 secrets in your instance, use
..?limit=25
.Possible values: 1 ≤ value ≤ 1000
Default:
200
Examples:10
Sort a collection of secrets by the specified field in ascending order. To sort in descending order use the
-
characterAvailable values: id | created_at | updated_at | expiration_date | secret_type | name
Usage: To sort a list of secrets by their creation date, use
../secrets?sort=created_at
.Possible values: 2 ≤ length ≤ 17, Value must match regular expression
/^-?(id|created_at|updated_at|expiration_date|secret_type|name)$/
Examples:created_at
Obtain a collection of secrets that contain the specified string in one or more of the fields:
id
,name
,description
,labels
,secret_type
.Usage: If you want to list only the secrets that contain the string
text
, use../secrets?search=text
.Possible values: 2 ≤ length ≤ 128, Value must match regular expression
/(.*?)/
Examples:example
Filter secrets by groups.
You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets that are in the default secret group, use the
default
keyword.Usage: To retrieve a list of secrets that are associated with an existing secret group or the default group, use
..?groups={secret_group_ID},default
.Possible values: 0 ≤ number of items ≤ 201, 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:[ "default", "cac40995-c37a-4dcb-9506-472869077634" ]
Filter secrets by types.
You can apply multiple filters by using a comma-separated list of secret types.
Usage: To retrieve a list of imported certificates and public certificates use
..?secret_types=imported_cert,public_cert
.Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]Possible values: 0 ≤ number of items ≤ 8
Examples:[ "arbitrary", "kv" ]
Filter secrets by labels.
You can use a comma-separated list of labels to filter secrets that include all of the labels in the list.
Usage: To retrieve a list of secrets that include both the label "dev" and the label "us-south" in their list of labels, use
..?labels=dev,us-south
.Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:[ "dev", "us-south" ]
parameters
The number of secrets to skip. By specifying
offset
, you retrieve a subset of items that starts with theoffset
value. Useoffset
withlimit
to page through your available resources.Usage: If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use
..?offset=25&limit=25
.Possible values: 0 ≤ value ≤ 10000000
Default:
0
The number of secrets to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use
limit
withoffset
to page through your available resources. Maximum limit allowed is 1000 secrets.Usage: If you want to retrieve only the first 25 secrets in your instance, use
..?limit=25
.Possible values: 1 ≤ value ≤ 1000
Default:
200
Sort a collection of secrets by the specified field in ascending order. To sort in descending order use the
-
characterAvailable values: id | created_at | updated_at | expiration_date | secret_type | name
Usage: To sort a list of secrets by their creation date, use
../secrets?sort=created_at
.Possible values: 2 ≤ length ≤ 17, Value must match regular expression
/^-?(id|created_at|updated_at|expiration_date|secret_type|name)$/
Examples:Obtain a collection of secrets that contain the specified string in one or more of the fields:
id
,name
,description
,labels
,secret_type
.Usage: If you want to list only the secrets that contain the string
text
, use../secrets?search=text
.Possible values: 2 ≤ length ≤ 128, Value must match regular expression
/(.*?)/
Examples:Filter secrets by groups.
You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets that are in the default secret group, use the
default
keyword.Usage: To retrieve a list of secrets that are associated with an existing secret group or the default group, use
..?groups={secret_group_ID},default
.Possible values: 0 ≤ number of items ≤ 201, 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:Filter secrets by types.
You can apply multiple filters by using a comma-separated list of secret types.
Usage: To retrieve a list of imported certificates and public certificates use
..?secret_types=imported_cert,public_cert
.Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]Possible values: 0 ≤ number of items ≤ 8
Examples:Filter secrets by labels.
You can use a comma-separated list of labels to filter secrets that include all of the labels in the list.
Usage: To retrieve a list of secrets that include both the label "dev" and the label "us-south" in their list of labels, use
..?labels=dev,us-south
.Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:
parameters
The number of secrets to skip. By specifying
offset
, you retrieve a subset of items that starts with theoffset
value. Useoffset
withlimit
to page through your available resources.Usage: If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use
..?offset=25&limit=25
.Possible values: 0 ≤ value ≤ 10000000
Default:
0
The number of secrets to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use
limit
withoffset
to page through your available resources. Maximum limit allowed is 1000 secrets.Usage: If you want to retrieve only the first 25 secrets in your instance, use
..?limit=25
.Possible values: 1 ≤ value ≤ 1000
Default:
200
Sort a collection of secrets by the specified field in ascending order. To sort in descending order use the
-
characterAvailable values: id | created_at | updated_at | expiration_date | secret_type | name
Usage: To sort a list of secrets by their creation date, use
../secrets?sort=created_at
.Possible values: 2 ≤ length ≤ 17, Value must match regular expression
/^-?(id|created_at|updated_at|expiration_date|secret_type|name)$/
Examples:Obtain a collection of secrets that contain the specified string in one or more of the fields:
id
,name
,description
,labels
,secret_type
.Usage: If you want to list only the secrets that contain the string
text
, use../secrets?search=text
.Possible values: 2 ≤ length ≤ 128, Value must match regular expression
/(.*?)/
Examples:Filter secrets by groups.
You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets that are in the default secret group, use the
default
keyword.Usage: To retrieve a list of secrets that are associated with an existing secret group or the default group, use
..?groups={secret_group_ID},default
.Possible values: 0 ≤ number of items ≤ 201, 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:Filter secrets by types.
You can apply multiple filters by using a comma-separated list of secret types.
Usage: To retrieve a list of imported certificates and public certificates use
..?secret_types=imported_cert,public_cert
.Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]Possible values: 0 ≤ number of items ≤ 8
Examples:Filter secrets by labels.
You can use a comma-separated list of labels to filter secrets that include all of the labels in the list.
Usage: To retrieve a list of secrets that include both the label "dev" and the label "us-south" in their list of labels, use
..?labels=dev,us-south
.Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListSecrets options.
The number of secrets to skip. By specifying
offset
, you retrieve a subset of items that starts with theoffset
value. Useoffset
withlimit
to page through your available resources.Usage: If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use
..?offset=25&limit=25
.Possible values: 0 ≤ value ≤ 10000000
Default:
0
The number of secrets to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use
limit
withoffset
to page through your available resources. Maximum limit allowed is 1000 secrets.Usage: If you want to retrieve only the first 25 secrets in your instance, use
..?limit=25
.Possible values: 1 ≤ value ≤ 1000
Default:
200
Examples:10
Sort a collection of secrets by the specified field in ascending order. To sort in descending order use the
-
characterAvailable values: id | created_at | updated_at | expiration_date | secret_type | name
Usage: To sort a list of secrets by their creation date, use
../secrets?sort=created_at
.Possible values: 2 ≤ length ≤ 17, Value must match regular expression
/^-?(id|created_at|updated_at|expiration_date|secret_type|name)$/
Examples:created_at
Obtain a collection of secrets that contain the specified string in one or more of the fields:
id
,name
,description
,labels
,secret_type
.Usage: If you want to list only the secrets that contain the string
text
, use../secrets?search=text
.Possible values: 2 ≤ length ≤ 128, Value must match regular expression
/(.*?)/
Examples:example
Filter secrets by groups.
You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets that are in the default secret group, use the
default
keyword.Usage: To retrieve a list of secrets that are associated with an existing secret group or the default group, use
..?groups={secret_group_ID},default
.Possible values: 0 ≤ number of items ≤ 201, 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:[ "default", "cac40995-c37a-4dcb-9506-472869077634" ]
Filter secrets by types.
You can apply multiple filters by using a comma-separated list of secret types.
Usage: To retrieve a list of imported certificates and public certificates use
..?secret_types=imported_cert,public_cert
.Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]Possible values: 0 ≤ number of items ≤ 8
Examples:[ "arbitrary", "kv" ]
Filter secrets by labels.
You can use a comma-separated list of labels to filter secrets that include all of the labels in the list.
Usage: To retrieve a list of secrets that include both the label "dev" and the label "us-south" in their list of labels, use
..?labels=dev,us-south
.Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:[ "dev", "us-south" ]
curl -X GET --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" "${base_url}/api/v2/secrets?sort=created_at&search=example&groups=default,cac40995-c37a-4dcb-9506-472869077634&secret_types=arbitrary,kv&match_all_labels=dev,us-south"
ListSecretsOptions listSecretsOptions = new ListSecretsOptions.Builder() .limit(Long.valueOf("10")) .sort("created_at") .search("example") .groups(java.util.Arrays.asList("default", "cac40995-c37a-4dcb-9506-472869077634")) .secretTypes(java.util.Arrays.asList("arbitrary", "kv")) .matchAllLabels(java.util.Arrays.asList("dev", "us-south")) .build(); SecretsPager pager = new SecretsPager(secretsManagerService, listSecretsOptions); List<SecretMetadata> allResults = new ArrayList<>(); while (pager.hasNext()) { List<SecretMetadata> nextPage = pager.getNext(); allResults.addAll(nextPage); } System.out.println(GsonSingleton.getGson().toJson(allResults));
const params = { limit: 10, sort: 'created_at', search: 'example', groups: ['default', 'cac40995-c37a-4dcb-9506-472869077634'], secretTypes: ['arbitrary', 'kv'], matchAllLabels: ['dev', 'us-south'], }; const allResults = []; try { const pager = new SecretsManagerV2.SecretsPager(secretsManagerService, params); while (pager.hasNext()) { const nextPage = await pager.getNext(); expect(nextPage).not.toBeNull(); allResults.push(...nextPage); } console.log(JSON.stringify(allResults, null, 2)); } catch (err) { console.warn(err); }
all_results = [] pager = SecretsPager( client=secrets_manager_service, limit=10, sort='created_at', search='example', groups=['default', 'cac40995-c37a-4dcb-9506-472869077634'], secret_types=['arbitrary', 'kv'], match_all_labels=['dev', 'us-south'], ) while pager.has_next(): next_page = pager.get_next() assert next_page is not None all_results.extend(next_page) print(json.dumps(all_results, indent=2))
listSecretsOptions := &secretsmanagerv2.ListSecretsOptions{ Limit: core.Int64Ptr(int64(10)), Sort: core.StringPtr("created_at"), Search: core.StringPtr("example"), Groups: []string{"default", "cac40995-c37a-4dcb-9506-472869077634"}, SecretTypes: []string{"arbitrary", "kv"}, MatchAllLabels: []string{"dev", "us-south"}, } pager, err := secretsManagerService.NewSecretsPager(listSecretsOptions) if err != nil { panic(err) } var allResults []secretsmanagerv2.SecretMetadataIntf for pager.HasNext() { nextPage, err := pager.GetNext() if err != nil { panic(err) } allResults = append(allResults, nextPage...) } b, _ := json.MarshalIndent(allResults, "", " ") fmt.Println(string(b))
Response
Properties that describe a paginated collection of your secret metadata.
The total number of resources in a collection.
Possible values: 0 ≤ value ≤ 10000000
The number of items that are retrieved in a collection.
Possible values: 0 ≤ value ≤ 10000
The number of items that are skipped in a collection.
Possible values: 0 ≤ value ≤ 10000000
A URL that points to the first page in a collection.
A URL that points to the last page in a collection.
A collection of secret metadata.
Possible values: 0 ≤ number of items ≤ 1000
- secrets
A URL that points to the next page in a collection.
A URL that points to the previous page in a collection.
Properties that describe a paginated collection of your secret metadata.
The total number of resources in a collection.
Possible values: 0 ≤ value ≤ 10000000
The number of items that are retrieved in a collection.
Possible values: 0 ≤ value ≤ 10000
The number of items that are skipped in a collection.
Possible values: 0 ≤ value ≤ 10000000
A URL that points to the first page in a collection.
- first
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A URL that points to the next page in a collection.
- next
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A URL that points to the previous page in a collection.
- previous
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A URL that points to the last page in a collection.
- last
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A collection of secret metadata.
Possible values: 0 ≤ number of items ≤ 1000
- secrets
Properties of the metadata of your arbitrary secret..
- SecretMetadata
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
Properties that describe a paginated collection of your secret metadata.
The total number of resources in a collection.
Possible values: 0 ≤ value ≤ 10000000
The number of items that are retrieved in a collection.
Possible values: 0 ≤ value ≤ 10000
The number of items that are skipped in a collection.
Possible values: 0 ≤ value ≤ 10000000
A URL that points to the first page in a collection.
- first
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A URL that points to the next page in a collection.
- next
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A URL that points to the previous page in a collection.
- previous
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A URL that points to the last page in a collection.
- last
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A collection of secret metadata.
Possible values: 0 ≤ number of items ≤ 1000
- secrets
Properties of the metadata of your arbitrary secret..
- SecretMetadata
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
Properties that describe a paginated collection of your secret metadata.
The total number of resources in a collection.
Possible values: 0 ≤ value ≤ 10000000
The number of items that are retrieved in a collection.
Possible values: 0 ≤ value ≤ 10000
The number of items that are skipped in a collection.
Possible values: 0 ≤ value ≤ 10000000
A URL that points to the first page in a collection.
- first
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A URL that points to the next page in a collection.
- next
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A URL that points to the previous page in a collection.
- previous
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A URL that points to the last page in a collection.
- last
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A collection of secret metadata.
Possible values: 0 ≤ number of items ≤ 1000
- secrets
Properties of the metadata of your arbitrary secret..
- SecretMetadata
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
Properties that describe a paginated collection of your secret metadata.
The total number of resources in a collection.
Possible values: 0 ≤ value ≤ 10000000
The number of items that are retrieved in a collection.
Possible values: 0 ≤ value ≤ 10000
The number of items that are skipped in a collection.
Possible values: 0 ≤ value ≤ 10000000
A URL that points to the first page in a collection.
- First
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A URL that points to the next page in a collection.
- Next
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A URL that points to the previous page in a collection.
- Previous
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A URL that points to the last page in a collection.
- Last
A URL that points to a page in a collection.
Possible values: 0 ≤ length ≤ 256
A collection of secret metadata.
Possible values: 0 ≤ number of items ≤ 1000
- Secrets
Properties of the metadata of your arbitrary secret..
- SecretMetadata
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
Status Code
The list of secrets was successfully retrieved.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
InternalServerError
BadGatewayError
ServiceUnavailableError
Example secret metadata collection response
{ "first": { "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?limit=50" }, "previous": { "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?offset=50&limit=50" }, "last": { "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?offset=200&limit=50" }, "limit": 50, "next": { "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?offset=150&limit=50" }, "offset": 100, "secrets": [ { "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:a931192f-b6a9-43d6-a59a-834f3003af7b", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "a931192f-b6a9-43d6-a59a-834f3003af7b", "intermediate_included": true, "issuer": "DigiCert", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-imported-certificate", "private_key_included": true, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "secret_type": "imported_cert", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }, { "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "issuer": "Lets Encrypt", "issuance_info": { "auto_rotated": false, "ordered_on": "2022-10-06T06:15:55Z", "state": 1, "state_description": "active" }, "bundle_certs": true, "ca": "lets-encrypt-config", "dns": "cloud-internet-services-config", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "updated_at": "2022-10-05T21:33:11Z", "locks_total": 0, "name": "my-public-certificate", "rotation": { "auto_rotate": true, "rotate_keys": true }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "secret_type": "public_cert", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 } ], "total_count": 232 }
Example secret metadata collection response
{ "first": { "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?limit=50" }, "previous": { "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?offset=50&limit=50" }, "last": { "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?offset=200&limit=50" }, "limit": 50, "next": { "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?offset=150&limit=50" }, "offset": 100, "secrets": [ { "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:a931192f-b6a9-43d6-a59a-834f3003af7b", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "a931192f-b6a9-43d6-a59a-834f3003af7b", "intermediate_included": true, "issuer": "DigiCert", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-imported-certificate", "private_key_included": true, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "secret_type": "imported_cert", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }, { "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "issuer": "Lets Encrypt", "issuance_info": { "auto_rotated": false, "ordered_on": "2022-10-06T06:15:55Z", "state": 1, "state_description": "active" }, "bundle_certs": true, "ca": "lets-encrypt-config", "dns": "cloud-internet-services-config", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "updated_at": "2022-10-05T21:33:11Z", "locks_total": 0, "name": "my-public-certificate", "rotation": { "auto_rotate": true, "rotate_keys": true }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "secret_type": "public_cert", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 } ], "total_count": 232 }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Get a secret
Get a secret and its details by specifying the ID of the secret.
A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.
Get a secret and its details by specifying the ID of the secret.
A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.
Get a secret and its details by specifying the ID of the secret.
A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.
Get a secret and its details by specifying the ID of the secret.
A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.
Get a secret and its details by specifying the ID of the secret.
A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.
GET /api/v2/secrets/{id}
ServiceCall<Secret> getSecret(GetSecretOptions getSecretOptions)
getSecret(params)
get_secret(
self,
id: str,
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) GetSecret(getSecretOptions *GetSecretOptions) (result SecretIntf, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) GetSecretWithContext(ctx context.Context, getSecretOptions *GetSecretOptions) (result SecretIntf, response *core.DetailedResponse, err error)
Request
Use the GetSecretOptions.Builder
to create a GetSecretOptions
object that contains the parameter values for the getSecret
method.
Instantiate the GetSecretOptions
struct and set the fields to provide parameter values for the GetSecret
method.
Path Parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
Example:
0b5571f7-21e6-42b7-91c5-3f5ac9793a46
The getSecret options.
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:0b5571f7-21e6-42b7-91c5-3f5ac9793a46
parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:
parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetSecret options.
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:0b5571f7-21e6-42b7-91c5-3f5ac9793a46
curl -X GET --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" "${base_url}/api/v2/secrets/${id}"
GetSecretOptions getSecretOptions = new GetSecretOptions.Builder() .id(secretIdForGetSecretLink) .build(); Response<Secret> response = secretsManagerService.getSecret(getSecretOptions).execute(); Secret secret = response.getResult(); System.out.println(secret);
const params = { id: secretIdForGetSecretLink, }; let res; try { res = await secretsManagerService.getSecret(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
response = secrets_manager_service.get_secret( id=secret_id_for_get_secret_link, ) secret = response.get_result() print(json.dumps(secret, indent=2))
getSecretOptions := secretsManagerService.NewGetSecretOptions( secretIdForGetSecretLink, ) secret, response, err := secretsManagerService.GetSecret(getSecretOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secret, "", " ") fmt.Println(string(b))
Response
Your secret.
Possible values: [
arbitrary
]
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
Status Code
The secret was successfully retrieved.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
Conflict
InternalServerError
BadGatewayError
ServiceUnavailableError
Example of an arbitrary secret.
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my arbitrary secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-arbitrary-secret", "payload": "secret-data", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "arbitrary", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of an arbitrary secret.
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my arbitrary secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-arbitrary-secret", "payload": "secret-data", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "arbitrary", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example IAM Credentials using Service ID
{ "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-iam-credentials-secret", "reuse_api_key": false, "api_key": "RmnPBn6n1dzoo0v3kyznKEpg0WzdTpW9lW7FtKa017_u", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be", "service_id_is_static": false, "state": 1, "state_description": "active", "ttl": "1800", "updated_at": "2020-10-05T21:33:11Z", "versions_total": 1 }
Example IAM Credentials using Service ID
{ "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-iam-credentials-secret", "reuse_api_key": false, "api_key": "RmnPBn6n1dzoo0v3kyznKEpg0WzdTpW9lW7FtKa017_u", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be", "service_id_is_static": false, "state": 1, "state_description": "active", "ttl": "1800", "updated_at": "2020-10-05T21:33:11Z", "versions_total": 1 }
Example imported certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "intermediate_included": true, "issuer": "GlobalSign", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate", "private_key_included": true, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "imported_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example imported certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "intermediate_included": true, "issuer": "GlobalSign", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate", "private_key_included": true, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "imported_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example kv secret
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my key-value secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-kv-secret", "data": { "key1": "val1" }, "secret_type": "kv", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example kv secret
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my key-value secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-kv-secret", "data": { "key1": "val1" }, "secret_type": "kv", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example private certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "certificate_authority": "example-intermediate-CA", "certificate_template": "example-certificate-template", "common_name": "example.com", "created_at": "2022-10-02T14:08:07Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2030-03-02T15:08:37Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "issuer": "example.com", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-private-certificate", "next_rotation_date": "2022-03-02T14:08:07Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "month" }, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "ca_chain": [ "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----" ], "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "private_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-03-02T14:08:37Z", "validity": { "not_before": "2022-03-02T15:08:37Z", "not_after": "2030-03-01T00:00:00Z" }, "versions_total": 1 }
Example private certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "certificate_authority": "example-intermediate-CA", "certificate_template": "example-certificate-template", "common_name": "example.com", "created_at": "2022-10-02T14:08:07Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2030-03-02T15:08:37Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "issuer": "example.com", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-private-certificate", "next_rotation_date": "2022-03-02T14:08:07Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "month" }, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "ca_chain": [ "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----" ], "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "private_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-03-02T14:08:37Z", "validity": { "not_before": "2022-03-02T15:08:37Z", "not_after": "2030-03-01T00:00:00Z" }, "versions_total": 1 }
Example public certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "issuer": "Lets Encrypt", "issuance_info": { "auto_rotated": false, "ordered_on": "2022-10-06T06:15:55Z", "state": 1, "state_description": "active" }, "bundle_certs": true, "ca": "lets-encrypt-config", "dns": "cloud-internet-services-config", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-public-certificate", "rotation": { "auto_rotate": true, "rotate_keys": true }, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "secret_type": "public_cert", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example public certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "issuer": "Lets Encrypt", "issuance_info": { "auto_rotated": false, "ordered_on": "2022-10-06T06:15:55Z", "state": 1, "state_description": "active" }, "bundle_certs": true, "ca": "lets-encrypt-config", "dns": "cloud-internet-services-config", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-public-certificate", "rotation": { "auto_rotate": true, "rotate_keys": true }, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "secret_type": "public_cert", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
A sample service credentials secret body.
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "credentials": { "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS", "cos_hmac_keys": { "access_key_id": "af56af3af56a4c738afea662c47840b3", "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d" }, "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints", "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer", "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234", "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234::" }, "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "The description for my service credentials secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-service-credentials-secret", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": true, "interval": 10, "unit": "day" }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "service_credentials", "source_service": { "instance": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::" }, "parameters": { "HMAC": true, "serviceid_crn": "existing sid" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "iam": { "apikey": { "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3", "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "serviceid": { "crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234" }, "resource_key": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3", "name": "secret_name_versionid" } } }, "state": 1, "state_description": "active", "ttl": "86400", "updated_at": "2022-10-05T21:33:11Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "versions_total": 1 }
A sample service credentials secret body.
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "credentials": { "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS", "cos_hmac_keys": { "access_key_id": "af56af3af56a4c738afea662c47840b3", "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d" }, "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints", "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer", "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234", "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234::" }, "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "The description for my service credentials secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-service-credentials-secret", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": true, "interval": 10, "unit": "day" }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "service_credentials", "source_service": { "instance": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::" }, "parameters": { "HMAC": true, "serviceid_crn": "existing sid" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "iam": { "apikey": { "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3", "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "serviceid": { "crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234" }, "resource_key": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3", "name": "secret_name_versionid" } } }, "state": 1, "state_description": "active", "ttl": "86400", "updated_at": "2022-10-05T21:33:11Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "versions_total": 1 }
Example user credentials
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my user credentials secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-username-password", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "day" }, "password_generation_policy": { "length": 32, "include_digits": true, "include_symbols": true, "include_uppercase": true }, "username": "admin", "password": "admin1234", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "username_password", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example user credentials
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my user credentials secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-username-password", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "day" }, "password_generation_policy": { "length": 32, "include_digits": true, "include_symbols": true, "include_uppercase": true }, "username": "admin", "password": "admin1234", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "username_password", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Delete a secret
Delete a secret by specifying the ID of the secret.
Delete a secret by specifying the ID of the secret.
Delete a secret by specifying the ID of the secret.
Delete a secret by specifying the ID of the secret.
Delete a secret by specifying the ID of the secret.
DELETE /api/v2/secrets/{id}
ServiceCall<Void> deleteSecret(DeleteSecretOptions deleteSecretOptions)
deleteSecret(params)
delete_secret(
self,
id: str,
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) DeleteSecret(deleteSecretOptions *DeleteSecretOptions) (response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) DeleteSecretWithContext(ctx context.Context, deleteSecretOptions *DeleteSecretOptions) (response *core.DetailedResponse, err error)
Request
Use the DeleteSecretOptions.Builder
to create a DeleteSecretOptions
object that contains the parameter values for the deleteSecret
method.
Instantiate the DeleteSecretOptions
struct and set the fields to provide parameter values for the DeleteSecret
method.
Path Parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
Example:
0b5571f7-21e6-42b7-91c5-3f5ac9793a46
The deleteSecret options.
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:0b5571f7-21e6-42b7-91c5-3f5ac9793a46
parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:
parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteSecret options.
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:0b5571f7-21e6-42b7-91c5-3f5ac9793a46
curl -X DELETE --location --header "Authorization: Bearer ${iam_token}" "${base_url}/api/v2/secrets/${id}"
DeleteSecretOptions deleteSecretOptions = new DeleteSecretOptions.Builder() .id(secretIdForGetSecretLink) .build(); Response<Void> response = secretsManagerService.deleteSecret(deleteSecretOptions).execute();
const params = { id: secretIdForGetSecretLink, }; try { await secretsManagerService.deleteSecret(params); } catch (err) { console.warn(err); }
response = secrets_manager_service.delete_secret( id=secret_id_for_get_secret_link, )
deleteSecretOptions := secretsManagerService.NewDeleteSecretOptions( secretIdForGetSecretLink, ) response, err := secretsManagerService.DeleteSecret(deleteSecretOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from DeleteSecret(): %d\n", response.StatusCode) }
Response
Status Code
The secret was successfully deleted.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
Conflict
UnprocessableEntity
InternalServerError
BadGatewayError
ServiceUnavailableError
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example UnprocessableEntity error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 422, "errors": [ { "code": "unprocessable_entity", "message": "The API key is locked. Unlock the API key to complete this operation.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example UnprocessableEntity error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 422, "errors": [ { "code": "unprocessable_entity", "message": "The API key is locked. Unlock the API key to complete this operation.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Get the metadata of a secret
Get the metadata of a secret by specifying the ID of the secret.
Get the metadata of a secret by specifying the ID of the secret.
Get the metadata of a secret by specifying the ID of the secret.
Get the metadata of a secret by specifying the ID of the secret.
Get the metadata of a secret by specifying the ID of the secret.
GET /api/v2/secrets/{id}/metadata
ServiceCall<SecretMetadata> getSecretMetadata(GetSecretMetadataOptions getSecretMetadataOptions)
getSecretMetadata(params)
get_secret_metadata(
self,
id: str,
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) GetSecretMetadata(getSecretMetadataOptions *GetSecretMetadataOptions) (result SecretMetadataIntf, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) GetSecretMetadataWithContext(ctx context.Context, getSecretMetadataOptions *GetSecretMetadataOptions) (result SecretMetadataIntf, response *core.DetailedResponse, err error)
Request
Use the GetSecretMetadataOptions.Builder
to create a GetSecretMetadataOptions
object that contains the parameter values for the getSecretMetadata
method.
Instantiate the GetSecretMetadataOptions
struct and set the fields to provide parameter values for the GetSecretMetadata
method.
Path Parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
Example:
0b5571f7-21e6-42b7-91c5-3f5ac9793a46
The getSecretMetadata options.
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:0b5571f7-21e6-42b7-91c5-3f5ac9793a46
parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:
parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetSecretMetadata options.
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:0b5571f7-21e6-42b7-91c5-3f5ac9793a46
curl -X GET --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" "${base_url}/api/v2/secrets/${id}/metadata"
GetSecretMetadataOptions getSecretMetadataOptions = new GetSecretMetadataOptions.Builder() .id(secretIdForGetSecretLink) .build(); Response<SecretMetadata> response = secretsManagerService.getSecretMetadata(getSecretMetadataOptions).execute(); SecretMetadata secretMetadata = response.getResult(); System.out.println(secretMetadata);
const params = { id: secretIdForGetSecretLink, }; let res; try { res = await secretsManagerService.getSecretMetadata(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
response = secrets_manager_service.get_secret_metadata( id=secret_id_for_get_secret_link, ) secret_metadata = response.get_result() print(json.dumps(secret_metadata, indent=2))
getSecretMetadataOptions := secretsManagerService.NewGetSecretMetadataOptions( secretIdForGetSecretLink, ) secretMetadata, response, err := secretsManagerService.GetSecretMetadata(getSecretMetadataOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secretMetadata, "", " ") fmt.Println(string(b))
Response
Properties of your secret metadata.
Possible values: [
arbitrary
]
Properties of the metadata of your arbitrary secret..
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
Properties of the metadata of your arbitrary secret..
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
Properties of the metadata of your arbitrary secret..
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
Properties of the metadata of your arbitrary secret..
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
Status Code
The secret metadata was successfully retrieved.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
InternalServerError
BadGatewayError
ServiceUnavailableError
Example of arbitrary secret's metadata
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my arbitrary secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-arbitrary-secret", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "arbitrary", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of arbitrary secret's metadata
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my arbitrary secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-arbitrary-secret", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "arbitrary", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example IAM Credentials metadata
{ "access_groups": [ "AccessGroupId-45884031-54be-4dd7-86ff-112511e92699" ], "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "locks_total": 2, "name": "example-iam-credentials-secret", "reuse_api_key": false, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be", "service_id_is_static": false, "state": 1, "state_description": "active", "ttl": "1800", "updated_at": "2020-10-05T21:33:11Z", "versions_total": 1 }
Example IAM Credentials metadata
{ "access_groups": [ "AccessGroupId-45884031-54be-4dd7-86ff-112511e92699" ], "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "locks_total": 2, "name": "example-iam-credentials-secret", "reuse_api_key": false, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be", "service_id_is_static": false, "state": 1, "state_description": "active", "ttl": "1800", "updated_at": "2020-10-05T21:33:11Z", "versions_total": 1 }
Example of imported certificate's metadata
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2022-06-27T11:58:15Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "intermediate_included": true, "issuer": "GlobalSign", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate", "private_key_included": true, "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "imported_cert", "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2022-06-27T11:58:15Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example of imported certificate's metadata
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2022-06-27T11:58:15Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "intermediate_included": true, "issuer": "GlobalSign", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate", "private_key_included": true, "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "imported_cert", "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2022-06-27T11:58:15Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example of KV secret's metadata
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description of my key-value secret..", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-kv-secret", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "kv", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of KV secret's metadata
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description of my key-value secret..", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-kv-secret", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "kv", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of private certificate metadata
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "certificate_authority": "example-intermediate-CA", "certificate_template": "example-certificate-template", "common_name": "example.com", "created_at": "2022-03-02T14:08:07Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2022-03-02T15:08:37Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "issuer": "example.com", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 1, "name": "example-private-certificate", "next_rotation_date": "2022-03-02T14:08:07Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "month" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "private_cert", "serial_number": "d9:be:fe:35:ba:09:42:b5", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-03-02T14:08:37Z", "validity": { "not_after": "2022-03-01T00:00:00Z", "not_before": "2022-03-02T15:08:37Z" }, "versions_total": 1 }
Example of private certificate metadata
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "certificate_authority": "example-intermediate-CA", "certificate_template": "example-certificate-template", "common_name": "example.com", "created_at": "2022-03-02T14:08:07Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2022-03-02T15:08:37Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "issuer": "example.com", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 1, "name": "example-private-certificate", "next_rotation_date": "2022-03-02T14:08:07Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "month" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "private_cert", "serial_number": "d9:be:fe:35:ba:09:42:b5", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-03-02T14:08:37Z", "validity": { "not_after": "2022-03-01T00:00:00Z", "not_before": "2022-03-02T15:08:37Z" }, "versions_total": 1 }
Example of public certificates' metadata
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2022-10-06T06:15:55Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description of my public certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "issuance_info": { "auto_rotated": false, "ordered_on": "2022-10-06T06:15:55Z", "state": 1, "state_description": "active" }, "bundle_certs": true, "ca": "lets-encrypt-config", "dns": "cloud-internet-services-config", "issuer": "Lets Encrypt", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-public-certificate", "rotation": { "auto_rotate": true, "rotate_keys": true }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "public_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example of public certificates' metadata
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2022-10-06T06:15:55Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description of my public certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "issuance_info": { "auto_rotated": false, "ordered_on": "2022-10-06T06:15:55Z", "state": 1, "state_description": "active" }, "bundle_certs": true, "ca": "lets-encrypt-config", "dns": "cloud-internet-services-config", "issuer": "Lets Encrypt", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-public-certificate", "rotation": { "auto_rotate": true, "rotate_keys": true }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "public_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
A sample metadata body for a service credentials secret.
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "The description for my service credentials secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-service-credentials-secret", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": true, "interval": 10, "unit": "day" }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "service_credentials", "source_service": { "instance": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::" }, "parameters": { "HMAC": true, "serviceid_crn": "existing sid" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "iam": { "apikey": { "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3", "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "serviceid": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" } }, "resource_key": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3", "name": "secret_name_versionid" } }, "state": 1, "state_description": "active", "ttl": "86400", "updated_at": "2022-10-05T21:33:11Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "versions_total": 1 }
A sample metadata body for a service credentials secret.
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "The description for my service credentials secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-service-credentials-secret", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": true, "interval": 10, "unit": "day" }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "service_credentials", "source_service": { "instance": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::" }, "parameters": { "HMAC": true, "serviceid_crn": "existing sid" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "iam": { "apikey": { "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3", "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "serviceid": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" } }, "resource_key": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3", "name": "secret_name_versionid" } }, "state": 1, "state_description": "active", "ttl": "86400", "updated_at": "2022-10-05T21:33:11Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "versions_total": 1 }
Example of the metadata of a user's credentials.
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my user credentials secret.", "downloaded": true, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-username-password-secret", "rotation": { "auto_rotate": false, "interval": 1, "unit": "day" }, "password_generation_policy": { "length": 32, "include_digits": true, "include_symbols": true, "include_uppercase": true }, "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "username_password", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of the metadata of a user's credentials.
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my user credentials secret.", "downloaded": true, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-username-password-secret", "rotation": { "auto_rotate": false, "interval": 1, "unit": "day" }, "password_generation_policy": { "length": 32, "include_digits": true, "include_symbols": true, "include_uppercase": true }, "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "username_password", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Update the metadata of a secret
Update the metadata of a secret, such as its name or description.
Update the metadata of a secret, such as its name or description.
Update the metadata of a secret, such as its name or description.
Update the metadata of a secret, such as its name or description.
Update the metadata of a secret, such as its name or description.
PATCH /api/v2/secrets/{id}/metadata
ServiceCall<SecretMetadata> updateSecretMetadata(UpdateSecretMetadataOptions updateSecretMetadataOptions)
updateSecretMetadata(params)
update_secret_metadata(
self,
id: str,
secret_metadata_patch: 'SecretMetadataPatch',
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) UpdateSecretMetadata(updateSecretMetadataOptions *UpdateSecretMetadataOptions) (result SecretMetadataIntf, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) UpdateSecretMetadataWithContext(ctx context.Context, updateSecretMetadataOptions *UpdateSecretMetadataOptions) (result SecretMetadataIntf, response *core.DetailedResponse, err error)
Request
Use the UpdateSecretMetadataOptions.Builder
to create a UpdateSecretMetadataOptions
object that contains the parameter values for the updateSecretMetadata
method.
Instantiate the UpdateSecretMetadataOptions
struct and set the fields to provide parameter values for the UpdateSecretMetadata
method.
Path Parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
Example:
0b5571f7-21e6-42b7-91c5-3f5ac9793a46
Example update input of arbitrary secret
{
"custom_metadata": {
"metadata_custom_key": "metadata_custom_value"
},
"description": "updated Arbitrary Secret description",
"labels": [
"dev",
"us-south"
],
"name": "updated-arbitrary-secret-name-example"
}
The updateSecretMetadata options.
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:0b5571f7-21e6-42b7-91c5-3f5ac9793a46
JSON Merge-Patch content for update_secret_metadata.
Examples:{ "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "updated Arbitrary Secret description", "labels": [ "dev", "us-south" ], "name": "updated-arbitrary-secret-name-example" }
parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:Update your secret metadata.
- secretMetadataPatch
A human-readable name to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
Examples:my-secret-example
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:2033-04-12T23:20:50.520Z
parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:Update your secret metadata.
- secret_metadata_patch
A human-readable name to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
Examples:my-secret-example
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:2033-04-12T23:20:50.520Z
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateSecretMetadata options.
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:0b5571f7-21e6-42b7-91c5-3f5ac9793a46
JSON Merge-Patch content for update_secret_metadata.
Examples:{ "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "updated Arbitrary Secret description", "labels": [ "dev", "us-south" ], "name": "updated-arbitrary-secret-name-example" }
curl -X PATCH --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" --header "Content-Type: application/merge-patch+json" --data '{"custom_metadata":{"metadata_custom_key":"metadata_custom_value"},"description":"updated Arbitrary Secret description","labels":["dev","us-south"],"name":"updated-arbitrary-secret-name-example"}' "${base_url}/api/v2/secrets/${id}/metadata"
ArbitrarySecretMetadataPatch secretMetadataPatchModel = new ArbitrarySecretMetadataPatch.Builder() .name("updated-arbitrary-secret-name-example") .description("updated Arbitrary Secret description") .labels(java.util.Arrays.asList("dev", "us-south")) .build(); Map<String, Object> secretMetadataPatchModelAsPatch = secretMetadataPatchModel.asPatch(); UpdateSecretMetadataOptions updateSecretMetadataOptions = new UpdateSecretMetadataOptions.Builder() .id(secretIdForGetSecretLink) .secretMetadataPatch(secretMetadataPatchModelAsPatch) .build(); Response<SecretMetadata> response = secretsManagerService.updateSecretMetadata(updateSecretMetadataOptions).execute(); SecretMetadata secretMetadata = response.getResult(); System.out.println(secretMetadata);
// Request models needed by this operation. // ArbitrarySecretMetadataPatch const secretMetadataPatchModel = { name: 'updated-arbitrary-secret-name-example', description: 'updated Arbitrary Secret description', labels: ['dev', 'us-south'], custom_metadata: { metadata_custom_key: 'metadata_custom_value' }, }; const params = { id: secretIdForGetSecretLink, secretMetadataPatch: secretMetadataPatchModel, }; let res; try { res = await secretsManagerService.updateSecretMetadata(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
secret_metadata_patch_model = { 'name': 'updated-arbitrary-secret-name-example', 'description': 'updated Arbitrary Secret description', 'labels': ['dev', 'us-south'], 'custom_metadata': {'metadata_custom_key': 'metadata_custom_value'}, } response = secrets_manager_service.update_secret_metadata( id=secret_id_for_get_secret_link, secret_metadata_patch=secret_metadata_patch_model, ) secret_metadata = response.get_result() print(json.dumps(secret_metadata, indent=2))
secretMetadataPatchModel := &secretsmanagerv2.ArbitrarySecretMetadataPatch{ Name: core.StringPtr("updated-arbitrary-secret-name-example"), Description: core.StringPtr("updated Arbitrary Secret description"), Labels: []string{"dev", "us-south"}, } secretMetadataPatchModelAsPatch, asPatchErr := secretMetadataPatchModel.AsPatch() Expect(asPatchErr).To(BeNil()) updateSecretMetadataOptions := secretsManagerService.NewUpdateSecretMetadataOptions( secretIdForGetSecretLink, secretMetadataPatchModelAsPatch, ) secretMetadata, response, err := secretsManagerService.UpdateSecretMetadata(updateSecretMetadataOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secretMetadata, "", " ") fmt.Println(string(b))
Response
Properties of your secret metadata.
Possible values: [
arbitrary
]
Properties of the metadata of your arbitrary secret..
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
Properties of the metadata of your arbitrary secret..
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
Properties of the metadata of your arbitrary secret..
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
Properties of the metadata of your arbitrary secret..
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
Status Code
The secret's metadata was successfully updated.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
Conflict
InternalServerError
BadGatewayError
ServiceUnavailableError
Example of arbitrary secret's metadata
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my arbitrary secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-arbitrary-secret", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "arbitrary", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of arbitrary secret's metadata
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my arbitrary secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-arbitrary-secret", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "arbitrary", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example IAM Credentials metadata
{ "access_groups": [ "AccessGroupId-45884031-54be-4dd7-86ff-112511e92699" ], "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "locks_total": 2, "name": "example-iam-credentials-secret", "reuse_api_key": false, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be", "service_id_is_static": false, "state": 1, "state_description": "active", "ttl": "1800", "updated_at": "2020-10-05T21:33:11Z", "versions_total": 1 }
Example IAM Credentials metadata
{ "access_groups": [ "AccessGroupId-45884031-54be-4dd7-86ff-112511e92699" ], "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "locks_total": 2, "name": "example-iam-credentials-secret", "reuse_api_key": false, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be", "service_id_is_static": false, "state": 1, "state_description": "active", "ttl": "1800", "updated_at": "2020-10-05T21:33:11Z", "versions_total": 1 }
Example of imported certificate's metadata
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2022-06-27T11:58:15Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "intermediate_included": true, "issuer": "GlobalSign", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate", "private_key_included": true, "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "imported_cert", "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2022-06-27T11:58:15Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example of imported certificate's metadata
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2022-06-27T11:58:15Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "intermediate_included": true, "issuer": "GlobalSign", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate", "private_key_included": true, "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "imported_cert", "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2022-06-27T11:58:15Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example of imported certificate's metadata
{ "alt_names": [ "alt-name-1", "alt-name-2", "alt-name-3" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2022-06-27T11:58:15Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": true, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "intermediate_included": true, "issuer": "GlobalSign", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate", "managed_csr": { "require_cn": true, "common_name": "example.com", "alt_names": "alt-name-1,alt-name-2,alt-name-3", "ip_sans": "127.0.0.1", "uri_sans": "https://www.example.com/test", "other_sans": "2.5.4.5;UTF8:*.example.com", "exclude_cn_from_sans": false, "server_flag": true, "client_flag": true, "code_signing_flag": false, "email_protection_flag": false, "ou": [], "organization": [], "country": [], "locality": [], "province": [], "street_address": [], "postal_code": [], "key_type": "rsa", "key_bits": 2048, "user_ids": "user-1,user-2", "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDGGAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHBB==\n-----END CERTIFICATE REQUEST-----", "private_key": "obfuscated", "rotate_keys": true }, "private_key_included": true, "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "imported_cert", "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2022-06-27T11:58:15Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example of imported certificate's metadata
{ "alt_names": [ "alt-name-1", "alt-name-2", "alt-name-3" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2022-06-27T11:58:15Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": true, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "intermediate_included": true, "issuer": "GlobalSign", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate", "managed_csr": { "require_cn": true, "common_name": "example.com", "alt_names": "alt-name-1,alt-name-2,alt-name-3", "ip_sans": "127.0.0.1", "uri_sans": "https://www.example.com/test", "other_sans": "2.5.4.5;UTF8:*.example.com", "exclude_cn_from_sans": false, "server_flag": true, "client_flag": true, "code_signing_flag": false, "email_protection_flag": false, "ou": [], "organization": [], "country": [], "locality": [], "province": [], "street_address": [], "postal_code": [], "key_type": "rsa", "key_bits": 2048, "user_ids": "user-1,user-2", "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDGGAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHBB==\n-----END CERTIFICATE REQUEST-----", "private_key": "obfuscated", "rotate_keys": true }, "private_key_included": true, "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "imported_cert", "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2022-06-27T11:58:15Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example of KV secret's metadata
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description of my key-value secret..", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-kv-secret", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "kv", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of KV secret's metadata
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description of my key-value secret..", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-kv-secret", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "kv", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of private certificate metadata
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "certificate_authority": "example-intermediate-CA", "certificate_template": "example-certificate-template", "common_name": "example.com", "created_at": "2022-03-02T14:08:07Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2022-03-02T15:08:37Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "issuer": "example.com", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 1, "name": "example-private-certificate", "next_rotation_date": "2022-03-02T14:08:07Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "month" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "private_cert", "serial_number": "d9:be:fe:35:ba:09:42:b5", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-03-02T14:08:37Z", "validity": { "not_after": "2022-03-01T00:00:00Z", "not_before": "2022-03-02T15:08:37Z" }, "versions_total": 1 }
Example of private certificate metadata
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "certificate_authority": "example-intermediate-CA", "certificate_template": "example-certificate-template", "common_name": "example.com", "created_at": "2022-03-02T14:08:07Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2022-03-02T15:08:37Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "issuer": "example.com", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 1, "name": "example-private-certificate", "next_rotation_date": "2022-03-02T14:08:07Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "month" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "private_cert", "serial_number": "d9:be:fe:35:ba:09:42:b5", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-03-02T14:08:37Z", "validity": { "not_after": "2022-03-01T00:00:00Z", "not_before": "2022-03-02T15:08:37Z" }, "versions_total": 1 }
Example of public certificates' metadata
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2022-10-06T06:15:55Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description of my public certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "issuance_info": { "auto_rotated": false, "ordered_on": "2022-10-06T06:15:55Z", "state": 1, "state_description": "active" }, "bundle_certs": true, "ca": "lets-encrypt-config", "dns": "cloud-internet-services-config", "issuer": "Lets Encrypt", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-public-certificate", "rotation": { "auto_rotate": true, "rotate_keys": true }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "public_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example of public certificates' metadata
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2022-10-06T06:15:55Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description of my public certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "issuance_info": { "auto_rotated": false, "ordered_on": "2022-10-06T06:15:55Z", "state": 1, "state_description": "active" }, "bundle_certs": true, "ca": "lets-encrypt-config", "dns": "cloud-internet-services-config", "issuer": "Lets Encrypt", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-public-certificate", "rotation": { "auto_rotate": true, "rotate_keys": true }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "public_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
A sample metadata body for a service credentials secret.
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "The description for my service credentials secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-service-credentials-secret", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": true, "interval": 10, "unit": "day" }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "service_credentials", "source_service": { "instance": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::" }, "parameters": { "HMAC": true, "serviceid_crn": "existing sid" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "iam": { "apikey": { "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3", "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "serviceid": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" } }, "resource_key": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3", "name": "secret_name_versionid" } }, "state": 1, "state_description": "active", "ttl": "86400", "updated_at": "2022-10-05T21:33:11Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "versions_total": 1 }
A sample metadata body for a service credentials secret.
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "The description for my service credentials secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-service-credentials-secret", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": true, "interval": 10, "unit": "day" }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "service_credentials", "source_service": { "instance": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::" }, "parameters": { "HMAC": true, "serviceid_crn": "existing sid" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "iam": { "apikey": { "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3", "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "serviceid": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" } }, "resource_key": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3", "name": "secret_name_versionid" } }, "state": 1, "state_description": "active", "ttl": "86400", "updated_at": "2022-10-05T21:33:11Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "versions_total": 1 }
Example of user credentials' metadata
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for my user credentials secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-username-password-secret", "rotation": { "auto_rotate": true, "interval": 30, "unit": "day" }, "password_generation_policy": { "length": 32, "include_digits": true, "include_symbols": true, "include_uppercase": true }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "username_password", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of user credentials' metadata
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for my user credentials secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-username-password-secret", "rotation": { "auto_rotate": true, "interval": 30, "unit": "day" }, "password_generation_policy": { "length": 32, "include_digits": true, "include_symbols": true, "include_uppercase": true }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "username_password", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Create a secret action
Create a secret action. This operation supports the following actions:
Create a secret action. This operation supports the following actions:.
Create a secret action. This operation supports the following actions:.
Create a secret action. This operation supports the following actions:.
Create a secret action. This operation supports the following actions:.
POST /api/v2/secrets/{id}/actions
ServiceCall<SecretAction> createSecretAction(CreateSecretActionOptions createSecretActionOptions)
createSecretAction(params)
create_secret_action(
self,
id: str,
secret_action_prototype: 'SecretActionPrototype',
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) CreateSecretAction(createSecretActionOptions *CreateSecretActionOptions) (result SecretActionIntf, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) CreateSecretActionWithContext(ctx context.Context, createSecretActionOptions *CreateSecretActionOptions) (result SecretActionIntf, response *core.DetailedResponse, err error)
Request
Use the CreateSecretActionOptions.Builder
to create a CreateSecretActionOptions
object that contains the parameter values for the createSecretAction
method.
Instantiate the CreateSecretActionOptions
struct and set the fields to provide parameter values for the CreateSecretAction
method.
Path Parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
Example:
0b5571f7-21e6-42b7-91c5-3f5ac9793a46
The request body to specify the properties of the action to revoke the private certificate.
The request body of the action to revoke private certificates.
{
"action_type": "private_cert_action_revoke_certificate"
}
Allowable values: [
private_cert_action_revoke_certificate
]
The createSecretAction options.
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:0b5571f7-21e6-42b7-91c5-3f5ac9793a46
The request body to specify the properties of the action to revoke the private certificate.
- secretActionPrototype
The type of secret action.
Allowable values: [
public_cert_action_validate_dns_challenge
,private_cert_action_revoke_certificate
]
parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:The request body to specify the properties of the action to revoke the private certificate.
- secretActionPrototype
The type of secret action.
Allowable values: [
public_cert_action_validate_dns_challenge
,private_cert_action_revoke_certificate
]
parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:The request body to specify the properties of the action to revoke the private certificate.
- secret_action_prototype
The type of secret action.
Allowable values: [
public_cert_action_validate_dns_challenge
,private_cert_action_revoke_certificate
]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateSecretAction options.
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:0b5571f7-21e6-42b7-91c5-3f5ac9793a46
The request body to specify the properties of the action to revoke the private certificate.
- SecretActionPrototype
The type of secret action.
Allowable values: [
public_cert_action_validate_dns_challenge
,private_cert_action_revoke_certificate
]
ibmcloud secrets-manager secret-action-create --id=0b5571f7-21e6-42b7-91c5-3f5ac9793a46 --secret-action-type=public_cert_action_validate_dns_challenge ibmcloud secrets-manager secret-action-create \ --id=0b5571f7-21e6-42b7-91c5-3f5ac9793a46 \ --secret-action-prototype='{"action_type": "public_cert_action_validate_dns_challenge"}'
curl -X POST --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" --header "Content-Type: application/json" --data '{ "action_type": "private_cert_action_revoke_certificate" }' "${base_url}/api/v2/secrets/${id}/actions"
PrivateCertificateActionRevokePrototype secretActionPrototypeModel = new PrivateCertificateActionRevokePrototype.Builder() .actionType("private_cert_action_revoke_certificate") .build(); CreateSecretActionOptions createSecretActionOptions = new CreateSecretActionOptions.Builder() .id(secretIdForGetSecretLink) .secretActionPrototype(secretActionPrototypeModel) .build(); Response<SecretAction> response = secretsManagerService.createSecretAction(createSecretActionOptions).execute(); SecretAction secretAction = response.getResult(); System.out.println(secretAction);
// Request models needed by this operation. // PrivateCertificateActionRevokePrototype const secretActionPrototypeModel = { action_type: 'private_cert_action_revoke_certificate', }; const params = { id: secretIdForGetSecretLink, secretActionPrototype: secretActionPrototypeModel, }; let res; try { res = await secretsManagerService.createSecretAction(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
secret_action_prototype_model = { 'action_type': 'private_cert_action_revoke_certificate', } response = secrets_manager_service.create_secret_action( id=secret_id_for_get_secret_link, secret_action_prototype=secret_action_prototype_model, ) secret_action = response.get_result() print(json.dumps(secret_action, indent=2))
secretActionPrototypeModel := &secretsmanagerv2.PrivateCertificateActionRevokePrototype{ ActionType: core.StringPtr("private_cert_action_revoke_certificate"), } createSecretActionOptions := secretsManagerService.NewCreateSecretActionOptions( secretIdForGetSecretLink, secretActionPrototypeModel, ) secretAction, response, err := secretsManagerService.CreateSecretAction(createSecretActionOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secretAction, "", " ") fmt.Println(string(b))
Response
The response body to specify the properties of the action to create a secret.
Possible values: [
public_cert_action_validate_dns_challenge
]
The response body of the action to validate manual DNS challenges for the public certificate.
The type of secret action.
Possible values: [
public_cert_action_validate_dns_challenge
,private_cert_action_revoke_certificate
]
The response body of the action to validate manual DNS challenges for the public certificate.
The type of secret action.
Possible values: [
public_cert_action_validate_dns_challenge
,private_cert_action_revoke_certificate
]
The response body of the action to validate manual DNS challenges for the public certificate.
The type of secret action.
Possible values: [
public_cert_action_validate_dns_challenge
,private_cert_action_revoke_certificate
]
The response body of the action to validate manual DNS challenges for the public certificate.
The type of secret action.
Possible values: [
public_cert_action_validate_dns_challenge
,private_cert_action_revoke_certificate
]
Status Code
The secret action was successfully created.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
Conflict
InternalServerError
BadGatewayError
ServiceUnavailableError
The request body of the action to revoke private certificates.
{ "action_type": "private_cert_action_revoke_certificate", "revocation_time_seconds": 1667982994 }
The request body of the action to revoke private certificates.
{ "action_type": "private_cert_action_revoke_certificate", "revocation_time_seconds": 1667982994 }
The response body of the action to validate manual DNS challenges for public certificates.
{ "action_type": "public_cert_action_validate_dns_challenge" }
The response body of the action to validate manual DNS challenges for public certificates.
{ "action_type": "public_cert_action_validate_dns_challenge" }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Get a secret by name
Get a secret and its details by specifying the Name and Type of the secret.
A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.
Get a secret and its details by specifying the Name and Type of the secret.
A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.
Get a secret and its details by specifying the Name and Type of the secret.
A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.
Get a secret and its details by specifying the Name and Type of the secret.
A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.
Get a secret and its details by specifying the Name and Type of the secret.
A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.
GET /api/v2/secret_groups/{secret_group_name}/secret_types/{secret_type}/secrets/{name}
ServiceCall<Secret> getSecretByNameType(GetSecretByNameTypeOptions getSecretByNameTypeOptions)
getSecretByNameType(params)
get_secret_by_name_type(
self,
secret_type: str,
name: str,
secret_group_name: str,
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) GetSecretByNameType(getSecretByNameTypeOptions *GetSecretByNameTypeOptions) (result SecretIntf, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) GetSecretByNameTypeWithContext(ctx context.Context, getSecretByNameTypeOptions *GetSecretByNameTypeOptions) (result SecretIntf, response *core.DetailedResponse, err error)
Request
Use the GetSecretByNameTypeOptions.Builder
to create a GetSecretByNameTypeOptions
object that contains the parameter values for the getSecretByNameType
method.
Instantiate the GetSecretByNameTypeOptions
struct and set the fields to provide parameter values for the GetSecretByNameType
method.
Path Parameters
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]A human-readable name to assign to your secret. To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
^\w(([\w-.]+)?\w)?$
Example:
my-secret
The name of your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
(.*?)
Example:
default
The getSecretByNameType options.
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]A human-readable name to assign to your secret. To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
The name of your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:default
parameters
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]A human-readable name to assign to your secret. To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:The name of your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:
parameters
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]A human-readable name to assign to your secret. To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:The name of your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetSecretByNameType options.
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]A human-readable name to assign to your secret. To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
The name of your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:default
curl -X GET --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" "${base_url}/api/v2/secret_groups/${secret_group_name}/secret_types/${secret_type}/secrets/${name}"
GetSecretByNameTypeOptions getSecretByNameTypeOptions = new GetSecretByNameTypeOptions.Builder() .secretType("arbitrary") .name(secretNameLink) .secretGroupName("default") .build(); Response<Secret> response = secretsManagerService.getSecretByNameType(getSecretByNameTypeOptions).execute(); Secret secret = response.getResult(); System.out.println(secret);
const params = { secretType: 'arbitrary', name: secretNameLink, secretGroupName: 'default', }; let res; try { res = await secretsManagerService.getSecretByNameType(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
response = secrets_manager_service.get_secret_by_name_type( secret_type='arbitrary', name=secret_name_link, secret_group_name='default', ) secret = response.get_result() print(json.dumps(secret, indent=2))
getSecretByNameTypeOptions := secretsManagerService.NewGetSecretByNameTypeOptions( "arbitrary", secretNameLink, "default", ) secret, response, err := secretsManagerService.GetSecretByNameType(getSecretByNameTypeOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secret, "", " ") fmt.Println(string(b))
Response
Your secret.
Possible values: [
arbitrary
]
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
A CRN that uniquely identifies an IBM Cloud resource.
Possible values: 9 ≤ length ≤ 512, Value must match regular expression
/^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
The secret metadata that a user can customize.
Examples:{ "key": "value" }
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
Possible values: 0 ≤ length ≤ 1024, Value must match regular expression
/(.*?)/
Examples:Extended description for this secret.
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Labels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-64 characters, including spaces.
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
The number of locks of the secret.
Possible values: 0 ≤ value ≤ 1000
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]The secret state that is based on
NIST SP 800-57
. States are integers and correspond to thePre-activation = 0
,Active = 1
,Suspended = 2
,Deactivated = 3
, andDestroyed = 5
values.Possible values: [
0
,1
,2
,3
,5
]Possible values: 0 ≤ value ≤ 5
A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:active
The date when a resource was modified. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
The number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The list of configurations that have a reference to the secret.
Possible values: 0 ≤ number of items ≤ 50, 2 ≤ length ≤ 128, Value must match regular expression
/^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
Status Code
The secret was successfully retrieved.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
Conflict
InternalServerError
The specified api is not implemented
BadGatewayError
ServiceUnavailableError
Example of an arbitrary secret.
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my arbitrary secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-arbitrary-secret", "payload": "secret-data", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "arbitrary", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of an arbitrary secret.
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my arbitrary secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-arbitrary-secret", "payload": "secret-data", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "arbitrary", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example IAM Credentials using Service ID
{ "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-iam-credentials-secret", "reuse_api_key": false, "api_key": "RmnPBn6n1dzoo0v3kyznKEpg0WzdTpW9lW7FtKa017_u", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be", "service_id_is_static": false, "state": 1, "state_description": "active", "ttl": "1800", "updated_at": "2020-10-05T21:33:11Z", "versions_total": 1 }
Example IAM Credentials using Service ID
{ "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-iam-credentials-secret", "reuse_api_key": false, "api_key": "RmnPBn6n1dzoo0v3kyznKEpg0WzdTpW9lW7FtKa017_u", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be", "service_id_is_static": false, "state": 1, "state_description": "active", "ttl": "1800", "updated_at": "2020-10-05T21:33:11Z", "versions_total": 1 }
Example imported certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "intermediate_included": true, "issuer": "GlobalSign", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate", "private_key_included": true, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "imported_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example imported certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "created_at": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my imported certificate.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "intermediate_included": true, "issuer": "GlobalSign", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-imported-certificate", "private_key_included": true, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "imported_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example kv secret
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my key-value secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-kv-secret", "data": { "key1": "val1" }, "secret_type": "kv", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example kv secret
{ "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my key-value secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-kv-secret", "data": { "key1": "val1" }, "secret_type": "kv", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example private certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "certificate_authority": "example-intermediate-CA", "certificate_template": "example-certificate-template", "common_name": "example.com", "created_at": "2022-10-02T14:08:07Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2030-03-02T15:08:37Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "issuer": "example.com", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-private-certificate", "next_rotation_date": "2022-03-02T14:08:07Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "month" }, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "ca_chain": [ "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----" ], "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "private_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-03-02T14:08:37Z", "validity": { "not_before": "2022-03-02T15:08:37Z", "not_after": "2030-03-01T00:00:00Z" }, "versions_total": 1 }
Example private certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "certificate_authority": "example-intermediate-CA", "certificate_template": "example-certificate-template", "common_name": "example.com", "created_at": "2022-10-02T14:08:07Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": true, "expiration_date": "2030-03-02T15:08:37Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "issuer": "example.com", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-private-certificate", "next_rotation_date": "2022-03-02T14:08:07Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "month" }, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "ca_chain": [ "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----" ], "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "private_cert", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-03-02T14:08:37Z", "validity": { "not_before": "2022-03-02T15:08:37Z", "not_after": "2030-03-01T00:00:00Z" }, "versions_total": 1 }
Example public certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "issuer": "Lets Encrypt", "issuance_info": { "auto_rotated": false, "ordered_on": "2022-10-06T06:15:55Z", "state": 1, "state_description": "active" }, "bundle_certs": true, "ca": "lets-encrypt-config", "dns": "cloud-internet-services-config", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-public-certificate", "rotation": { "auto_rotate": true, "rotate_keys": true }, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "secret_type": "public_cert", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
Example public certificate
{ "alt_names": [ "s1.example.com", "*.s2.example.com" ], "common_name": "example.com", "created_at": "2020-10-05T21:33:11Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Extended description for this secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1", "issuer": "Lets Encrypt", "issuance_info": { "auto_rotated": false, "ordered_on": "2022-10-06T06:15:55Z", "state": 1, "state_description": "active" }, "bundle_certs": true, "ca": "lets-encrypt-config", "dns": "cloud-internet-services-config", "key_algorithm": "RSA2048", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "my-public-certificate", "rotation": { "auto_rotate": true, "rotate_keys": true }, "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----", "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----", "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd", "secret_type": "public_cert", "signing_algorithm": "SHA256-RSA", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2030-10-05T11:49:42Z" }, "versions_total": 1 }
A sample service credentials secret body.
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "credentials": { "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS", "cos_hmac_keys": { "access_key_id": "af56af3af56a4c738afea662c47840b3", "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d" }, "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints", "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer", "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234", "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234::" }, "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "The description for my service credentials secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-service-credentials-secret", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": true, "interval": 10, "unit": "day" }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "service_credentials", "source_service": { "instance": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::" }, "parameters": { "HMAC": true, "serviceid_crn": "existing sid" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "iam": { "apikey": { "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3", "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "serviceid": { "crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234" }, "resource_key": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3", "name": "secret_name_versionid" } } }, "state": 1, "state_description": "active", "ttl": "86400", "updated_at": "2022-10-05T21:33:11Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "versions_total": 1 }
A sample service credentials secret body.
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "credentials": { "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS", "cos_hmac_keys": { "access_key_id": "af56af3af56a4c738afea662c47840b3", "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d" }, "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints", "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898", "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer", "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234", "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234::" }, "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "The description for my service credentials secret.", "downloaded": false, "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-service-credentials-secret", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": true, "interval": 10, "unit": "day" }, "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa", "secret_type": "service_credentials", "source_service": { "instance": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::" }, "parameters": { "HMAC": true, "serviceid_crn": "existing sid" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "iam": { "apikey": { "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3", "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898", "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898" }, "role": { "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer" }, "serviceid": { "crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234" }, "resource_key": { "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3", "name": "secret_name_versionid" } } }, "state": 1, "state_description": "active", "ttl": "86400", "updated_at": "2022-10-05T21:33:11Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "versions_total": 1 }
Example user credentials
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my user credentials secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-username-password", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "day" }, "password_generation_policy": { "length": 32, "include_digits": true, "include_symbols": true, "include_uppercase": true }, "username": "admin", "password": "admin1234", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "username_password", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example user credentials
{ "created_at": "2022-06-27T11:58:15Z", "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712", "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my user credentials secret.", "downloaded": false, "expiration_date": "2030-10-05T11:49:42Z", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "locks_total": 0, "name": "example-username-password", "next_rotation_date": "2022-10-10T21:33:11Z", "rotation": { "auto_rotate": false, "interval": 1, "unit": "day" }, "password_generation_policy": { "length": 32, "include_digits": true, "include_symbols": true, "include_uppercase": true }, "username": "admin", "password": "admin1234", "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a", "secret_type": "username_password", "state": 1, "state_description": "active", "updated_at": "2022-10-05T21:33:11Z", "versions_total": 1 }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad request error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 400, "errors": [ { "code": "bad_request", "message": "required.name:property \"name\" is missing", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of unauthorized error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "You provided no credentials or invalid credentials.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of payment required error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 402, "errors": [ { "code": "payment_required", "message": "Your Trial plan is now expired.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of forbidden error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 403, "errors": [ { "code": "access_forbidden", "message": "You are not allowed to access this resource.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of
NotFound
error{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 404, "errors": [ { "code": "not_found", "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example Conflict error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 409, "errors": [ { "code": "conflict", "message": "The request conflicts with the current state of the target resource", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of internal server error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 500, "errors": [ { "code": "internal_server_error", "message": "Internal server error", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of Not Implemented error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 501, "errors": [ { "code": "not_implemented", "message": "The specified api is not implemented.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of Not Implemented error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 501, "errors": [ { "code": "not_implemented", "message": "The specified api is not implemented.", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of bad gateway error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 502, "errors": [ { "code": "bad_gateway", "message": "Bad Gateway", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Example of service unavailable error
{ "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca", "status_code": 503, "errors": [ { "code": "service_unavailable", "message": "Service Unavailable", "more_info": "https://cloud.ibm.com/apidocs/secrets-manager" } ] }
Create a new secret version
Create a new secret version.
Create a new secret version.
Create a new secret version.
Create a new secret version.
Create a new secret version.
POST /api/v2/secrets/{secret_id}/versions
ServiceCall<SecretVersion> createSecretVersion(CreateSecretVersionOptions createSecretVersionOptions)
createSecretVersion(params)
create_secret_version(
self,
secret_id: str,
secret_version_prototype: 'SecretVersionPrototype',
**kwargs,
) -> DetailedResponse
(secretsManager *SecretsManagerV2) CreateSecretVersion(createSecretVersionOptions *CreateSecretVersionOptions) (result SecretVersionIntf, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) CreateSecretVersionWithContext(ctx context.Context, createSecretVersionOptions *CreateSecretVersionOptions) (result SecretVersionIntf, response *core.DetailedResponse, err error)
Request
Use the CreateSecretVersionOptions.Builder
to create a CreateSecretVersionOptions
object that contains the parameter values for the createSecretVersion
method.
Instantiate the CreateSecretVersionOptions
struct and set the fields to provide parameter values for the CreateSecretVersion
method.
Path Parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
Example:
0b5571f7-21e6-42b7-91c5-3f5ac9793a46
The request body to rotate arbitrary secrets.
{
"custom_metadata": {
"metadata_custom_key": "metadata_custom_value"
},
"payload": "updated secret credentials",
"version_custom_metadata": {
"custom_version_key": "custom_version_value"
}
}
The createSecretVersion options.
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:0b5571f7-21e6-42b7-91c5-3f5ac9793a46
Specify the properties for your new secret version.
- secretVersionPrototype
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
The secret metadata that a user can customize.
Examples:{ "key": "value" }
The secret version metadata that a user can customize.
Examples:{ "key": "value" }
parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:Specify the properties for your new secret version.
- secretVersionPrototype
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
The secret metadata that a user can customize.
Examples:{ "key": "value" }
The secret version metadata that a user can customize.
Examples:{ "key": "value" }
parameters
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:Specify the properties for your new secret version.
- secret_version_prototype
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
The secret metadata that a user can customize.
Examples:{ "key": "value" }
The secret version metadata that a user can customize.
Examples:{ "key": "value" }
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateSecretVersion options.
The UUID that uniquely identifies your secret.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:0b5571f7-21e6-42b7-91c5-3f5ac9793a46
Specify the properties for your new secret version.
- SecretVersionPrototype
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
The secret metadata that a user can customize.
Examples:{ "key": "value" }
The secret version metadata that a user can customize.
Examples:{ "key": "value" }
ibmcloud secrets-manager secret-version-create --secret-id 0b5571f7-21e6-42b7-91c5-3f5ac9793a46 --arbitrary-payload='updated secret credentials' --secret-version-custom-metadata='{"anyKey": "anyValue"}' ibmcloud secrets-manager secret-version-create \ --secret-id=0b5571f7-21e6-42b7-91c5-3f5ac9793a46 \ --secret-version-prototype='{"payload": "updated secret credentials", "custom_metadata": {"anyKey": "anyValue"}, "version_custom_metadata": {"anyKey": "anyValue"}}'
curl -X POST --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" --header "Content-Type: application/json" --data '{ "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "payload": "updated secret credentials", "version_custom_metadata": { "custom_version_key": "custom_version_value" } }' "${base_url}/api/v2/secrets/${secret_id}/versions"
ArbitrarySecretVersionPrototype secretVersionPrototypeModel = new ArbitrarySecretVersionPrototype.Builder() .payload("updated secret credentials") .build(); CreateSecretVersionOptions createSecretVersionOptions = new CreateSecretVersionOptions.Builder() .secretId(secretIdForGetSecretLink) .secretVersionPrototype(secretVersionPrototypeModel) .build(); Response<SecretVersion> response = secretsManagerService.createSecretVersion(createSecretVersionOptions).execute(); SecretVersion secretVersion = response.getResult(); System.out.println(secretVersion);
// Request models needed by this operation. // ArbitrarySecretVersionPrototype const secretVersionPrototypeModel = { payload: 'updated secret credentials', custom_metadata: { metadata_custom_key: 'metadata_custom_value' }, version_custom_metadata: { custom_version_key: 'custom_version_value' }, }; const params = { secretId: secretIdForGetSecretLink, secretVersionPrototype: secretVersionPrototypeModel, }; let res; try { res = await secretsManagerService.createSecretVersion(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
secret_version_prototype_model = { 'payload': 'updated secret credentials', 'custom_metadata': {'metadata_custom_key': 'metadata_custom_value'}, 'version_custom_metadata': {'custom_version_key': 'custom_version_value'}, } response = secrets_manager_service.create_secret_version( secret_id=secret_id_for_get_secret_link, secret_version_prototype=secret_version_prototype_model, ) secret_version = response.get_result() print(json.dumps(secret_version, indent=2))
secretVersionPrototypeModel := &secretsmanagerv2.ArbitrarySecretVersionPrototype{ Payload: core.StringPtr("updated secret credentials"), } createSecretVersionOptions := secretsManagerService.NewCreateSecretVersionOptions( secretIdForGetSecretLink, secretVersionPrototypeModel, ) secretVersion, response, err := secretsManagerService.CreateSecretVersion(createSecretVersionOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secretVersion, "", " ") fmt.Println(string(b))
Response
Your secret version.
Possible values: [
arbitrary
]
Your arbitrary secret version.
Indicates whether the version of the secret was created by automatic rotation.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples:my-secret
The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.
Possible values: [
arbitrary
,iam_credentials
,imported_cert
,kv
,private_cert
,public_cert
,service_credentials
,username_password
]A UUID identifier, or
default
secret group.Possible values: 7 ≤ length ≤ 36, Value must match regular expression
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
Examples:default
Indicates whether the secret payload is available in this secret version.
A human-readable alias that describes the secret version. 'Current' is used for version
n
and 'previous' is used for versionn-1
.Possible values: [
current
,previous
]The secret version metadata that a user can customize.
Examples:{ "key": "value" }
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, and username_password.Examples:2033-04-12T23:20:50.520Z
The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:secret-credentials
Your arbitrary secret version.
Indicates whether the version of the secret was created by automatic rotation.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 256
Examples:iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when the resource was created. The date format follows
RFC 3339
.Examples:2022-04-12T23:20:50.520Z
This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A UUID identifier.
Possible values: length = 36, Value must match regular expression
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
Examples:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
The human-readable name of your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
Examples: