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. If you haven't upgraded to this version of the API yet, you can still access Version 1.0, which is deprecated.
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 (
"github.com/IBM/secrets-manager-go-sdk/secretsmanagerv2"
)
Go get
go get -u github.com/IBM/secrets-manager-go-sdk
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
- 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.
If you copy the endpoint URL from your Secrets Manager service dashboard, be sure to add /api
to the URL to use it with the SDK.
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
- 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.
If you copy the endpoint URL from your Secrets Manager service dashboard, be sure to add /api
to the URL to use it with the SDK.
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
- 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.
If you copy the endpoint URL from your Secrets Manager service dashboard, be sure to add /api
to the URL to use it with the SDK.
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
- 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.
If you copy the endpoint URL from your Secrets Manager service dashboard, be sure to add /api
to the URL to use it with the SDK.
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
- 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/api");
Example for the Dallas location
const IbmCloudSecretsManagerApiV1 = 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/api',
});
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/api')
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/api",
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 | The parameters were valid but the request failed due insufficient permissions. |
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 "github.com/IBM/secrets-manager-go-sdk/ibm-cloud-secrets-manager-api-v1"
// Instantiate a service
secretsManagerApi, err := sm.NewIbmCloudSecretsManagerV1(options)
// 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: 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.
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:ViewAn 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:View
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:value_source_lines_htmlAn 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:value_source_lines_html
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:value_source_lines_htmlAn 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:value_source_lines_html
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:ViewAn 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:View
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 v4 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
.Example:
2022-04-12T23:20:50.52Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Example:
iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Example:
2022-04-12T23:20:50.52Z
Properties that describe a secret group.
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
Properties that describe a secret group.
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
Properties that describe a secret group.
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
Properties that describe a secret group.
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
Status Code
The secret group was successfully created.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
InternalServerError
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 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: value ≥ 0
Properties that describe a collection of secret groups.
A collection of secret groups.
Possible values: 1 ≤ number of items ≤ 201
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
secretGroups
The total number of resources in a collection.
Possible values: value ≥ 0
Properties that describe a collection of secret groups.
A collection of secret groups.
Possible values: 1 ≤ number of items ≤ 201
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
secret_groups
The total number of resources in a collection.
Possible values: value ≥ 0
Properties that describe a collection of secret groups.
A collection of secret groups.
Possible values: 1 ≤ number of items ≤ 201
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
secret_groups
The total number of resources in a collection.
Possible values: value ≥ 0
Properties that describe a collection of secret groups.
A collection of secret groups.
Possible values: 1 ≤ number of items ≤ 201
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
SecretGroups
The total number of resources in a collection.
Possible values: value ≥ 0
Status Code
The list of secret groups was successfully retrieved.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
InternalServerError
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 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 v4 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 v4 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:View
parameters
The v4 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:value_source_lines_html
parameters
The v4 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:value_source_lines_html
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 v4 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:View
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 v4 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
.Example:
2022-04-12T23:20:50.52Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Example:
iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Example:
2022-04-12T23:20:50.52Z
Properties that describe a secret group.
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
Properties that describe a secret group.
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
Properties that describe a secret group.
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
Properties that describe a secret group.
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
Status Code
The secret group was successfully retrieved.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
InternalServerError
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 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 v4 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.
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 v4 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:ViewThe request body to update a secret group.
parameters
The v4 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:value_source_lines_htmlThe 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:value_source_lines_htmlAn 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:value_source_lines_html
parameters
The v4 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:value_source_lines_htmlUpdate the name or description of your secret group.
Examples:ViewThe 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:ViewAn 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:View
secret_group_patch
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 v4 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:ViewThe 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 v4 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
.Example:
2022-04-12T23:20:50.52Z
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Example:
iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21
The date when a resource was modified. The date format follows
RFC 3339
.Example:
2022-04-12T23:20:50.52Z
Properties that describe a secret group.
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
Properties that describe a secret group.
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
Properties that describe a secret group.
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
Properties that describe a secret group.
A v4 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:ViewThe name of your existing secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/(.*?)/
Examples:ViewAn 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:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewThe unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:View
Status Code
The secret group was successfully updated.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
InternalServerError
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 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 v4 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 v4 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:View
parameters
The v4 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:value_source_lines_html
parameters
The v4 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:value_source_lines_html
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 v4 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:View
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
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 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.
Allowable values: [
arbitrary
]
The createSecret options.
Specify the properties for your secret.
The secret metadata that a user can customize.
Examples:ViewAn 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:ViewThe date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:ViewLabels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-30 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 ≤ 30, 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:ViewA v4 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:ViewThe secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, kv, and username_password.
Allowable values: [
arbitrary
,imported_cert
,public_cert
,iam_credentials
,kv
,username_password
,private_cert
]The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:ViewThe secret version metadata that a user can customize.
Examples:View
secretPrototype
parameters
Specify the properties for your secret.
The secret metadata that a user can customize.
Examples:ViewAn 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:ViewThe date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:ViewLabels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-30 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 ≤ 30, 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:ViewA v4 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:ViewThe secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, kv, and username_password.
Allowable values: [
arbitrary
,imported_cert
,public_cert
,iam_credentials
,kv
,username_password
,private_cert
]The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:ViewThe secret version metadata that a user can customize.
Examples:View
secretPrototype
parameters
Specify the properties for your secret.
The secret metadata that a user can customize.
Examples:ViewAn 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:ViewThe date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:ViewLabels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-30 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 ≤ 30, 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:ViewA v4 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:ViewThe secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, kv, and username_password.
Allowable values: [
arbitrary
,imported_cert
,public_cert
,iam_credentials
,kv
,username_password
,private_cert
]The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:ViewThe secret version metadata that a user can customize.
Examples:View
secret_prototype
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.
The secret metadata that a user can customize.
Examples:ViewAn 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:ViewThe date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:ViewLabels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-30 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 ≤ 30, 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:ViewA v4 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:ViewThe secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, kv, and username_password.
Allowable values: [
arbitrary
,imported_cert
,public_cert
,iam_credentials
,kv
,username_password
,private_cert
]The secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:ViewThe secret version metadata that a user can customize.
Examples:View
SecretPrototype
ibmcloud secrets-manager secret-create --secret-name=example-arbitrary-secret --secret-secret-type=arbitrary --arbitrary-payload=super-secret-data ibmcloud secrets-manager secret-create \ --secret-prototype='{"name": "example-arbitrary-secret", "secret_type": "arbitrary", "payload":"super-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": "2023-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("2023-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: '2023-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': '2023-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 ≤ 128
Examples:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewA 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:ViewAn 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:ViewThis field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A v4 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:ViewLabels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-30 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 ≤ 30, 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:ViewA v4 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:ViewThe secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, kv, and username_password.
Possible values: [
arbitrary
,imported_cert
,public_cert
,iam_credentials
,kv
,username_password
,private_cert
]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
]A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:ViewThe number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:ViewThe secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:View
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewA 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:ViewAn 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:ViewThis field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A v4 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:ViewLabels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-30 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 ≤ 30, 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:ViewA v4 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:ViewThe secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, kv, and username_password.
Possible values: [
arbitrary
,imported_cert
,public_cert
,iam_credentials
,kv
,username_password
,private_cert
]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
]A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:ViewThe number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:ViewThe secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:View
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewA 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:ViewAn 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:ViewThis field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A v4 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:ViewLabels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-30 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 ≤ 30, 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:ViewA v4 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:ViewThe secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, kv, and username_password.
Possible values: [
arbitrary
,imported_cert
,public_cert
,iam_credentials
,kv
,username_password
,private_cert
]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
]A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:ViewThe number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:ViewThe secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:View
Your arbitrary secret.
The unique identifier that is associated with the entity that created the secret.
Possible values: 4 ≤ length ≤ 128
Examples:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewA 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:ViewAn 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:ViewThis field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A v4 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:ViewLabels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-30 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 ≤ 30, 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:ViewA v4 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:ViewThe secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, kv, and username_password.
Possible values: [
arbitrary
,imported_cert
,public_cert
,iam_credentials
,kv
,username_password
,private_cert
]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
]A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:ViewThe number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:ViewThe secret data that is assigned to an
arbitrary
secret.Possible values: 0 ≤ length ≤ 1000000, Value must match regular expression
/(.*?)/
Examples:View
Status Code
The secret was successfully created.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
Conflict
InternalServerError
ServiceUnavailableError
Example 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": "2023-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 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": "2023-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": "2023-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": "2023-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": "2023-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": "2023-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": "2023-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": "2023-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": "2023-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": "2023-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 }
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": "2023-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" }, "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": "2023-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" }, "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 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: int = None,
limit: int = None,
sort: str = None,
search: str = None,
groups: 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: value ≥ 0
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:View
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: value ≥ 0
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:ViewSort 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:ViewObtain 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:ViewFilter 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:View
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: value ≥ 0
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:value_source_lines_htmlObtain 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:value_source_lines_htmlFilter 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:value_source_lines_html
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: value ≥ 0
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:value_source_lines_htmlObtain 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:value_source_lines_htmlFilter 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:value_source_lines_html
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: value ≥ 0
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:ViewSort 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:ViewObtain 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:ViewFilter 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:View
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"
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")) .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'], }; 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'], ) 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"}, } 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: value ≥ 0
The number of items that are retrieved in a collection.
Possible values: value ≥ 0
The number of items that are skipped in a collection.
Possible values: value ≥ 0
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: value ≥ 0
The number of items that are retrieved in a collection.
Possible values: value ≥ 0
The number of items that are skipped in a collection.
Possible values: value ≥ 0
A URL that points to the first page in a collection.
A URL that points to a page in a collection.
first
A URL that points to the next page in a collection.
A URL that points to a page in a collection.
next
A URL that points to the previous page in a collection.
A URL that points to a page in a collection.
previous
A URL that points to the last page in a collection.
A URL that points to a page in a collection.
last
A collection of secret metadata.
Possible values: 0 ≤ number of items ≤ 1000
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 ≤ 128
Examples:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewA 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:ViewAn 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:ViewThis field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A v4 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:ViewLabels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-30 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 ≤ 30, 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:ViewA v4 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:ViewThe secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, kv, and username_password.
Possible values: [
arbitrary
,imported_cert
,public_cert
,iam_credentials
,kv
,username_password
,private_cert
]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
]A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:ViewThe number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:View
SecretMetadata
secrets
Properties that describe a paginated collection of your secret metadata.
The total number of resources in a collection.
Possible values: value ≥ 0
The number of items that are retrieved in a collection.
Possible values: value ≥ 0
The number of items that are skipped in a collection.
Possible values: value ≥ 0
A URL that points to the first page in a collection.
A URL that points to a page in a collection.
first
A URL that points to the next page in a collection.
A URL that points to a page in a collection.
next
A URL that points to the previous page in a collection.
A URL that points to a page in a collection.
previous
A URL that points to the last page in a collection.
A URL that points to a page in a collection.
last
A collection of secret metadata.
Possible values: 0 ≤ number of items ≤ 1000
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 ≤ 128
Examples:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewA 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:ViewAn 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:ViewThis field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A v4 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:ViewLabels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-30 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 ≤ 30, 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:ViewA v4 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:ViewThe secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, kv, and username_password.
Possible values: [
arbitrary
,imported_cert
,public_cert
,iam_credentials
,kv
,username_password
,private_cert
]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
]A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:ViewThe number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:View
SecretMetadata
secrets
Properties that describe a paginated collection of your secret metadata.
The total number of resources in a collection.
Possible values: value ≥ 0
The number of items that are retrieved in a collection.
Possible values: value ≥ 0
The number of items that are skipped in a collection.
Possible values: value ≥ 0
A URL that points to the first page in a collection.
A URL that points to a page in a collection.
first
A URL that points to the next page in a collection.
A URL that points to a page in a collection.
next
A URL that points to the previous page in a collection.
A URL that points to a page in a collection.
previous
A URL that points to the last page in a collection.
A URL that points to a page in a collection.
last
A collection of secret metadata.
Possible values: 0 ≤ number of items ≤ 1000
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 ≤ 128
Examples:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewA 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:ViewAn 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:ViewThis field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A v4 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:ViewLabels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-30 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 ≤ 30, 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:ViewA v4 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:ViewThe secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, kv, and username_password.
Possible values: [
arbitrary
,imported_cert
,public_cert
,iam_credentials
,kv
,username_password
,private_cert
]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
]A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:ViewThe number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:View
SecretMetadata
secrets
Properties that describe a paginated collection of your secret metadata.
The total number of resources in a collection.
Possible values: value ≥ 0
The number of items that are retrieved in a collection.
Possible values: value ≥ 0
The number of items that are skipped in a collection.
Possible values: value ≥ 0
A URL that points to the first page in a collection.
A URL that points to a page in a collection.
First
A URL that points to the next page in a collection.
A URL that points to a page in a collection.
Next
A URL that points to the previous page in a collection.
A URL that points to a page in a collection.
Previous
A URL that points to the last page in a collection.
A URL that points to a page in a collection.
Last
A collection of secret metadata.
Possible values: 0 ≤ number of items ≤ 1000
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 ≤ 128
Examples:ViewThe date when the resource was created. The date format follows
RFC 3339
.Examples:ViewA 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:ViewAn 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:ViewThis field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
A v4 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:ViewLabels that you can use to search secrets in your instance. Only 30 labels can be created.
Label can be between 2-30 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 ≤ 30, 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:ViewA v4 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:ViewThe secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, kv, and username_password.
Possible values: [
arbitrary
,imported_cert
,public_cert
,iam_credentials
,kv
,username_password
,private_cert
]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
]A text representation of the secret state.
Possible values: [
pre_activation
,active
,suspended
,deactivated
,destroyed
]Examples:ViewThe date when a resource was modified. The date format follows
RFC 3339
.Examples:ViewThe number of versions of your secret.
Possible values: 0 ≤ value ≤ 50
The date when the secret material expires. The date format follows the
RFC 3339
format. Supported secret types: Arbitrary, username_password.Examples:View
SecretMetadata
Secrets
Status Code
The list of secrets was successfully retrieved.
BadRequest
Unauthorized
PaymentRequired
Forbidden
The specified resource was not found
InternalServerError
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": "2023-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": "2023-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": "2023-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": "2023-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": "2023-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": "2023-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": "2023-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": "2023-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",