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, built on open source HashiCorp Vault.
SDKs for Java, Node, Python, and Go are available to make it easier to programmatically access the API from your code. The client libraries that are provided by the SDKs implement best practices for using the API and reduce the amount of code that you need to write. The tab for each language includes code examples that demonstrate how to use the client libraries.
For more information about using the SDKs, see the IBM Cloud SDK Common project on GitHub. For more information about getting started with Secrets Manager, check out the docs.
Installing the Java SDK
Maven
<dependency>
<groupId>com.ibm.cloud</groupId>
<artifactId>secrets-manager-sdk</artifactId>
<version>${version}</version>
</dependency>
Gradle
compile 'com.ibm.cloud:secrets-manager-sdk:${version}'
Replace {version}
in these examples with the release version.
View on GitHub
Installing the Python SDK
pip install --upgrade "ibm-secrets-manager-sdk"
View on GitHub
Installing the Go SDK
Go modules (recommended): Add the following import in your code, and then run go build
or go mod tidy
import (
"github.com/IBM/secrets-manager-go-sdk/secretsmanagerv1"
)
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 trim /api
from 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 trim /api
from 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 trim /api
from 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 trim /api
from 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.v1.SecretsManager;
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.model.*;
import com.ibm.cloud.sdk.core.http.Response;
import com.ibm.cloud.sdk.core.security.IamAuthenticator;
import java.util.Collections;
...
// Create an IAM authenticator
IamAuthenticator iamAuthenticator = new IamAuthenticator.Builder()
.apikey("<API_KEY>")
.build();
// Construct the service client
SecretsManager secretsManagerService = new SecretsManager("My Secrets-Manager service", iamAuthenticator);
// Set the service URL
secretsManagerService.setServiceUrl("https://{instance_ID}.us-south.secrets-manager.appdomain.cloud");
Example for the Dallas location
const IbmCloudSecretsManagerApiV1 = require('@ibm-cloud/secrets-manager/secrets-manager/v1');
const { IamAuthenticator } = require('@ibm-cloud/secrets-manager/auth');
const secretsManagerService = new IbmCloudSecretsManagerApiV1({
authenticator: new IamAuthenticator({
apikey: '<API_KEY>',
}),
serviceUrl: 'https://{instance_ID}.us-south.secrets-manager.appdomain.cloud',
});
Example for the Dallas location
from ibm_cloud_sdk_core.authenticators.iam_authenticator import IAMAuthenticator
from ibm_secrets_manager_sdk.secrets_manager_v1 import *
secrets_manager_service = SecretsManagerV1(
authenticator=IAMAuthenticator(apikey='<API_KEY>')
)
secrets_manager_service.set_service_url('https://{instance_ID}.us-south.secrets-manager.appdomain.cloud')
Example for the Dallas location
import (
"encoding/json"
"fmt"
"github.com/IBM/go-sdk-core/v5/core"
sm "github.com/IBM/secrets-manager-go-sdk/secretsmanagerv1"
)
func main() {
secretsManagerService, err := sm.NewSecretsManagerV1(&sm.SecretsManagerV1Options {
URL: "https://{instance_ID}.us-south.secrets-manager.appdomain.cloud",
Authenticator: & core.IamAuthenticator {
ApiKey: "<API_KEY>",
},
})
if err != nil {
panic(err)
}
}
Authentication
Authorization to the Secrets Manager API is enforced by using an IBM Cloud Identity and Access Management (IAM) access token. The token is used to determine the actions that a user or service ID has access to when they use the API.
To work with the API, include a valid IAM token in each outgoing request to the service. You can generate an access token by first creating an API key and then exchanging your API key for an IBM Cloud IAM token.
Don't have an API key? Try running ibmcloud iam oauth-tokens
in the IBM Cloud Shell to quickly generate a personal access token.
To generate an access token from your API key, use the following cURL command.
curl -X POST \
"https://iam.cloud.ibm.com/identity/token" \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--data-urlencode 'grant_type=urn:ibm:params:oauth:grant-type:apikey' \
--data-urlencode 'apikey=<API_KEY>'
Replace <API_KEY>
with your IBM Cloud API key.
When you use the SDK, configure an IAM authenticator with an IBM Cloud IAM API key. The authenticator automatically obtains the IAM access token for the API key and includes it with each request. You can configure an authenticator in either of two ways:
- Programmatically by constructing an IAM authenticator instance and supplying your IAM API key
- By defining the API key in external configuration properties and then using the SDK authenticator factory to construct an IAM authenticator that uses the configured IAM API key
For more information, see the Authentication section of the IBM Cloud SDK Common documentation.
Example API request
curl -X {request_method} "{base_url}/api/v1/{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.v1.SecretsManager;
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.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_v1 import *
secrets_manager_service = SecretsManagerV1(
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/secretsmanagerv1"
)
func main() {
secretsManagerService, err := sm.NewSecretsManagerV1(&sm.SecretsManagerV1Options {
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 IbmCloudSecretsManagerApiV1 = require('@ibm-cloud/secrets-manager/secrets-manager/v1');
const { IamAuthenticator } = require('@ibm-cloud/secrets-manager/auth');
const secretsManagerService = new IbmCloudSecretsManagerApiV1({
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. |
201 OK | Everything worked as expected. No content is returned. |
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. |
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 200 objects. To use a different page size, use the limit
query parameter.
Methods
Create a secret group
Create a secret group that you can use to organize secrets and control who on your team has access to them.
A successful request returns the ID value of the secret group, along with other metadata. To learn more about secret groups, check out the docs.
Create a secret group that you can use to organize secrets and control who on your team has access to them.
A successful request returns the ID value of the secret group, along with other metadata. To learn more about secret groups, check out the docs.
Create a secret group that you can use to organize secrets and control who on your team has access to them.
A successful request returns the ID value of the secret group, along with other metadata. To learn more about secret groups, check out the docs.
Create a secret group that you can use to organize secrets and control who on your team has access to them.
A successful request returns the ID value of the secret group, along with other metadata. To learn more about secret groups, check out the docs.
Create a secret group that you can use to organize secrets and control who on your team has access to them.
A successful request returns the ID value of the secret group, along with other metadata. To learn more about secret groups, check out the docs.
POST /api/v1/secret_groups
ServiceCall<SecretGroupDef> createSecretGroup(CreateSecretGroupOptions createSecretGroupOptions)
createSecretGroup(params)
create_secret_group(self,
metadata: 'CollectionMetadata',
resources: List['SecretGroupResource'],
**kwargs
) -> DetailedResponse
(secretsManager *SecretsManagerV1) CreateSecretGroup(createSecretGroupOptions *CreateSecretGroupOptions) (result *SecretGroupDef, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV1) CreateSecretGroupWithContext(ctx context.Context, createSecretGroupOptions *CreateSecretGroupOptions) (result *SecretGroupDef, 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.
Properties that describe a secret group.
The metadata that describes the resource array.
A collection of resources.
resources
The createSecretGroup options.
The metadata that describes the resource array.
Examples:ViewThe type of resources in the resource array.
Allowable values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:View
resources
parameters
The metadata that describes the resource array.
The type of resources in the resource array.
Allowable values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Examples:value_source_lines_htmlA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:View
resources
parameters
The metadata that describes the resource array.
The type of resources in the resource array.
Allowable values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Examples:value_source_lines_htmlA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:View
resources
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 metadata that describes the resource array.
Examples:ViewThe type of resources in the resource array.
Allowable values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
Metadata
A collection of resources.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:View
Resources
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Accept: application/json" --header "Content-Type: application/json" --data '{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret.group+json", "collection_total": 1 }, "resources": [ { "name": "my-secret-group", "description": "Extended description for this group." } ] }' "{base_url}/api/v1/secret_groups"
CollectionMetadata collectionMetadataModel = new CollectionMetadata.Builder() .collectionType("application/vnd.ibm.secrets-manager.secret.group+json") .collectionTotal(Long.valueOf("1")) .build(); SecretGroupResource secretGroupResourceModel = new SecretGroupResource.Builder() .name("my-secret-group") .description("Extended description for this group.") .build(); CreateSecretGroupOptions createSecretGroupOptions = new CreateSecretGroupOptions.Builder() .metadata(collectionMetadataModel) .resources(java.util.Arrays.asList(secretGroupResourceModel)) .build(); Response<SecretGroupDef> response = secretsManagerService.createSecretGroup(createSecretGroupOptions).execute(); SecretGroupDef secretGroupDef = response.getResult(); System.out.println(secretGroupDef);
// Request models needed by this operation. // CollectionMetadata const collectionMetadataModel = { collection_type: 'application/vnd.ibm.secrets-manager.secret.group+json', collection_total: 1, }; // SecretGroupResource const secretGroupResourceModel = { name: 'my-secret-group', description: 'Extended description for this group.', }; const params = { metadata: collectionMetadataModel, resources: [secretGroupResourceModel], }; let res; try { res = await secretsManagerService.createSecretGroup(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
collection_metadata_model = { 'collection_type': 'application/vnd.ibm.secrets-manager.secret.group+json', 'collection_total': 1, } secret_group_resource_model = { 'name': 'my-secret-group', 'description': 'Extended description for this group.', } secret_group_def = secrets_manager_service.create_secret_group( metadata=collection_metadata_model, resources=[secret_group_resource_model] ).get_result() print(json.dumps(secret_group_def, indent=2))
collectionMetadataModel := &secretsmanagerv1.CollectionMetadata{ CollectionType: core.StringPtr("application/vnd.ibm.secrets-manager.secret.group+json"), CollectionTotal: core.Int64Ptr(int64(1)), } secretGroupResourceModel := &secretsmanagerv1.SecretGroupResource{ Name: core.StringPtr("my-secret-group"), Description: core.StringPtr("Extended description for this group."), } createSecretGroupOptions := secretsManagerService.NewCreateSecretGroupOptions( collectionMetadataModel, []secretsmanagerv1.SecretGroupResource{*secretGroupResourceModel}, ) secretGroupDef, response, err := secretsManagerService.CreateSecretGroup(createSecretGroupOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secretGroupDef, "", " ") fmt.Println(string(b))
Response
Properties that describe a secret group.
The metadata that describes the resource array.
A collection of resources.
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
Metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
Resources
Status Code
The secret group was successfully created.
Bad Request
Unauthorized
Payment Required
Forbidden
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret.group+json", "collection_total": 1 }, "resources": [ { "creation_date": "2020-10-05T21:33:11Z", "description": "Extended description of this group.", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "last_update_date": "2020-10-05T21:33:11Z", "name": "my-secret-group", "type": "application/vnd.ibm.secrets-manager.secret.group+json" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret.group+json", "collection_total": 1 }, "resources": [ { "creation_date": "2020-10-05T21:33:11Z", "description": "Extended description of this group.", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "last_update_date": "2020-10-05T21:33:11Z", "name": "my-secret-group", "type": "application/vnd.ibm.secrets-manager.secret.group+json" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Malformed parameter" } ], "errors": [ { "code": "secrets-manager.Error05055", "message": "Malformed parameter" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Malformed parameter" } ], "errors": [ { "code": "secrets-manager.Error05055", "message": "Malformed parameter" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Unauthorized" } ], "errors": [ { "code": "secrets-manager.Error05162", "message": "Unauthorized" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Unauthorized" } ], "errors": [ { "code": "secrets-manager.Error05162", "message": "Unauthorized" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Your Trial plan is now expired" } ], "errors": [ { "code": "secrets-manager.Error04223", "message": "Your Trial plan is now expired" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Your Trial plan is now expired" } ], "errors": [ { "code": "secrets-manager.Error04223", "message": "Your Trial plan is now expired" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Forbidden" } ], "errors": [ { "code": "secrets-manager.Error05092", "message": "Forbidden" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Forbidden" } ], "errors": [ { "code": "secrets-manager.Error05092", "message": "Forbidden" } ] }
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/v1/secret_groups
ServiceCall<SecretGroupDef> listSecretGroups()
listSecretGroups(params)
list_secret_groups(self,
**kwargs
) -> DetailedResponse
(secretsManager *SecretsManagerV1) ListSecretGroups(listSecretGroupsOptions *ListSecretGroupsOptions) (result *SecretGroupDef, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV1) ListSecretGroupsWithContext(ctx context.Context, listSecretGroupsOptions *ListSecretGroupsOptions) (result *SecretGroupDef, 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/v1/secret_groups"
ListSecretGroupsOptions listSecretGroupsOptions = new ListSecretGroupsOptions(); Response<SecretGroupDef> response = secretsManagerService.listSecretGroups(listSecretGroupsOptions).execute(); SecretGroupDef secretGroupDef = response.getResult(); System.out.println(secretGroupDef);
let res; try { res = await secretsManagerService.listSecretGroups({}); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
secret_group_def = secrets_manager_service.list_secret_groups().get_result() print(json.dumps(secret_group_def, indent=2))
listSecretGroupsOptions := secretsManagerService.NewListSecretGroupsOptions() secretGroupDef, response, err := secretsManagerService.ListSecretGroups(listSecretGroupsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secretGroupDef, "", " ") fmt.Println(string(b))
Response
Properties that describe a secret group.
The metadata that describes the resource array.
A collection of resources.
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
Metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
Resources
Status Code
The list of secret groups was successfully retrieved.
Bad Request
Unauthorized
Payment Required
Forbidden
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret.group+json", "collection_total": 2 }, "resources": [ { "creation_date": "2020-10-05T21:33:11Z", "description": "Extended description for this group.", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "name": "my-secret-group", "last_update_date": "2020-11-25T22:13:10Z" }, { "creation_date": "2020-10-05T22:05:15Z", "description": "Extended description for this group.", "id": "19f88b9c-4f2f-405c-b877-a09338575c3f", "name": "my-second-secret-group", "last_update_date": "2020-11-25T22:13:10Z" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret.group+json", "collection_total": 2 }, "resources": [ { "creation_date": "2020-10-05T21:33:11Z", "description": "Extended description for this group.", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "name": "my-secret-group", "last_update_date": "2020-11-25T22:13:10Z" }, { "creation_date": "2020-10-05T22:05:15Z", "description": "Extended description for this group.", "id": "19f88b9c-4f2f-405c-b877-a09338575c3f", "name": "my-second-secret-group", "last_update_date": "2020-11-25T22:13:10Z" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Malformed parameter" } ], "errors": [ { "code": "secrets-manager.Error05055", "message": "Malformed parameter" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Malformed parameter" } ], "errors": [ { "code": "secrets-manager.Error05055", "message": "Malformed parameter" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Unauthorized" } ], "errors": [ { "code": "secrets-manager.Error05162", "message": "Unauthorized" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Unauthorized" } ], "errors": [ { "code": "secrets-manager.Error05162", "message": "Unauthorized" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Your Trial plan is now expired" } ], "errors": [ { "code": "secrets-manager.Error04223", "message": "Your Trial plan is now expired" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Your Trial plan is now expired" } ], "errors": [ { "code": "secrets-manager.Error04223", "message": "Your Trial plan is now expired" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Forbidden" } ], "errors": [ { "code": "secrets-manager.Error05092", "message": "Forbidden" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Forbidden" } ], "errors": [ { "code": "secrets-manager.Error05092", "message": "Forbidden" } ] }
Get a secret group
Get the metadata of an existing secret group by specifying the ID of the group.
Get the metadata of an existing secret group by specifying the ID of the group.
Get the metadata of an existing secret group by specifying the ID of the group.
Get the metadata of an existing secret group by specifying the ID of the group.
Get the metadata of an existing secret group by specifying the ID of the group.
GET /api/v1/secret_groups/{id}
ServiceCall<SecretGroupDef> getSecretGroup(GetSecretGroupOptions getSecretGroupOptions)
getSecretGroup(params)
get_secret_group(self,
id: str,
**kwargs
) -> DetailedResponse
(secretsManager *SecretsManagerV1) GetSecretGroup(getSecretGroupOptions *GetSecretGroupOptions) (result *SecretGroupDef, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV1) GetSecretGroupWithContext(ctx context.Context, getSecretGroupOptions *GetSecretGroupOptions) (result *SecretGroupDef, 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 the secret group.
Possible values: 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}
The getSecretGroup options.
The v4 UUID that uniquely identifies the secret group.
Possible values: 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}/
parameters
The v4 UUID that uniquely identifies the secret group.
Possible values: 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}/
parameters
The v4 UUID that uniquely identifies the secret group.
Possible values: 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}/
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 the secret group.
Possible values: 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}/
curl -X GET --location --header "Authorization: Bearer {iam_token}" --header "Accept: application/json" "{base_url}/api/v1/secret_groups/{id}"
GetSecretGroupOptions getSecretGroupOptions = new GetSecretGroupOptions.Builder() .id("testString") .build(); Response<SecretGroupDef> response = secretsManagerService.getSecretGroup(getSecretGroupOptions).execute(); SecretGroupDef secretGroupDef = response.getResult(); System.out.println(secretGroupDef);
const params = { id: 'testString', }; let res; try { res = await secretsManagerService.getSecretGroup(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
secret_group_def = secrets_manager_service.get_secret_group( id='testString' ).get_result() print(json.dumps(secret_group_def, indent=2))
getSecretGroupOptions := secretsManagerService.NewGetSecretGroupOptions( "testString", ) secretGroupDef, response, err := secretsManagerService.GetSecretGroup(getSecretGroupOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secretGroupDef, "", " ") fmt.Println(string(b))
Response
Properties that describe a secret group.
The metadata that describes the resource array.
A collection of resources.
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
Metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
Resources
Status Code
The secret group was successfully retrieved.
Bad Request
Unauthorized
Payment Required
Forbidden
Not Found
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret.group+json", "collection_total": 1 }, "resources": [ { "creation_date": "2020-10-05T21:33:11Z", "description": "Extended description for this group.", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "last_update_date": "2020-11-25T22:13:10Z", "name": "my-secret-group", "type": "application/vnd.ibm.secrets-manager.secret.group+json" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret.group+json", "collection_total": 1 }, "resources": [ { "creation_date": "2020-10-05T21:33:11Z", "description": "Extended description for this group.", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "last_update_date": "2020-11-25T22:13:10Z", "name": "my-secret-group", "type": "application/vnd.ibm.secrets-manager.secret.group+json" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Malformed parameter" } ], "errors": [ { "code": "secrets-manager.Error05055", "message": "Malformed parameter" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Malformed parameter" } ], "errors": [ { "code": "secrets-manager.Error05055", "message": "Malformed parameter" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Unauthorized" } ], "errors": [ { "code": "secrets-manager.Error05162", "message": "Unauthorized" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Unauthorized" } ], "errors": [ { "code": "secrets-manager.Error05162", "message": "Unauthorized" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Your Trial plan is now expired" } ], "errors": [ { "code": "secrets-manager.Error04223", "message": "Your Trial plan is now expired" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Your Trial plan is now expired" } ], "errors": [ { "code": "secrets-manager.Error04223", "message": "Your Trial plan is now expired" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Forbidden" } ], "errors": [ { "code": "secrets-manager.Error05092", "message": "Forbidden" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Forbidden" } ], "errors": [ { "code": "secrets-manager.Error05092", "message": "Forbidden" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Not Found" } ], "errors": [ { "code": "secrets-manager.Error05105", "message": "Not Found" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Not Found" } ], "errors": [ { "code": "secrets-manager.Error05105", "message": "Not Found" } ] }
Update a secret group
Update the metadata of an existing secret group, such as its name or description.
Update the metadata of an existing secret group, such as its name or description.
Update the metadata of an existing secret group, such as its name or description.
Update the metadata of an existing secret group, such as its name or description.
Update the metadata of an existing secret group, such as its name or description.
PUT /api/v1/secret_groups/{id}
ServiceCall<SecretGroupDef> updateSecretGroupMetadata(UpdateSecretGroupMetadataOptions updateSecretGroupMetadataOptions)
updateSecretGroupMetadata(params)
update_secret_group_metadata(self,
id: str,
metadata: 'CollectionMetadata',
resources: List['SecretGroupMetadataUpdatable'],
**kwargs
) -> DetailedResponse
(secretsManager *SecretsManagerV1) UpdateSecretGroupMetadata(updateSecretGroupMetadataOptions *UpdateSecretGroupMetadataOptions) (result *SecretGroupDef, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV1) UpdateSecretGroupMetadataWithContext(ctx context.Context, updateSecretGroupMetadataOptions *UpdateSecretGroupMetadataOptions) (result *SecretGroupDef, response *core.DetailedResponse, err error)
Request
Use the UpdateSecretGroupMetadataOptions.Builder
to create a UpdateSecretGroupMetadataOptions
object that contains the parameter values for the updateSecretGroupMetadata
method.
Instantiate the UpdateSecretGroupMetadataOptions
struct and set the fields to provide parameter values for the UpdateSecretGroupMetadata
method.
Path Parameters
The v4 UUID that uniquely identifies the secret group.
Possible values: 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}
Properties that describe a secret group.
The metadata that describes the resource array.
A collection of resources.
The updateSecretGroupMetadata options.
The v4 UUID that uniquely identifies the secret group.
Possible values: 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}/
The metadata that describes the resource array.
Examples:ViewThe type of resources in the resource array.
Allowable values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
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: length ≤ 1024
resources
parameters
The v4 UUID that uniquely identifies the secret group.
Possible values: 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}/
The metadata that describes the resource array.
The type of resources in the resource array.
Allowable values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Examples:value_source_lines_htmlA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
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: length ≤ 1024
resources
parameters
The v4 UUID that uniquely identifies the secret group.
Possible values: 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}/
The metadata that describes the resource array.
The type of resources in the resource array.
Allowable values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Examples:value_source_lines_htmlA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
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: length ≤ 1024
resources
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 UpdateSecretGroupMetadata options.
The v4 UUID that uniquely identifies the secret group.
Possible values: 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}/
The metadata that describes the resource array.
Examples:ViewThe type of resources in the resource array.
Allowable values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
Metadata
A collection of resources.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
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: length ≤ 1024
Resources
curl -X PUT --location --header "Authorization: Bearer {iam_token}" --header "Accept: application/json" --header "Content-Type: application/json" --data '{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret.group+json", "collection_total": 1 }, "resources": [ { "name": "updated-secret-group-name", "description": "Updated description for this group." } ] }' "{base_url}/api/v1/secret_groups/{id}"
CollectionMetadata collectionMetadataModel = new CollectionMetadata.Builder() .collectionType("application/vnd.ibm.secrets-manager.secret.group+json") .collectionTotal(Long.valueOf("1")) .build(); SecretGroupMetadataUpdatable secretGroupMetadataUpdatableModel = new SecretGroupMetadataUpdatable.Builder() .name("updated-secret-group-name") .description("Updated description for this group.") .build(); UpdateSecretGroupMetadataOptions updateSecretGroupMetadataOptions = new UpdateSecretGroupMetadataOptions.Builder() .id("testString") .metadata(collectionMetadataModel) .resources(java.util.Arrays.asList(secretGroupMetadataUpdatableModel)) .build(); Response<SecretGroupDef> response = secretsManagerService.updateSecretGroupMetadata(updateSecretGroupMetadataOptions).execute(); SecretGroupDef secretGroupDef = response.getResult(); System.out.println(secretGroupDef);
// Request models needed by this operation. // CollectionMetadata const collectionMetadataModel = { collection_type: 'application/vnd.ibm.secrets-manager.secret.group+json', collection_total: 1, }; // SecretGroupMetadataUpdatable const secretGroupMetadataUpdatableModel = { name: 'updated-secret-group-name', description: 'Updated description for this group.', }; const params = { id: 'testString', metadata: collectionMetadataModel, resources: [secretGroupMetadataUpdatableModel], }; let res; try { res = await secretsManagerService.updateSecretGroupMetadata(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
collection_metadata_model = { 'collection_type': 'application/vnd.ibm.secrets-manager.secret.group+json', 'collection_total': 1, } secret_group_metadata_updatable_model = { 'name': 'updated-secret-group-name', 'description': 'Updated description for this group.', } secret_group_def = secrets_manager_service.update_secret_group_metadata( id='testString', metadata=collection_metadata_model, resources=[secret_group_metadata_updatable_model] ).get_result() print(json.dumps(secret_group_def, indent=2))
collectionMetadataModel := &secretsmanagerv1.CollectionMetadata{ CollectionType: core.StringPtr("application/vnd.ibm.secrets-manager.secret.group+json"), CollectionTotal: core.Int64Ptr(int64(1)), } secretGroupMetadataUpdatableModel := &secretsmanagerv1.SecretGroupMetadataUpdatable{ Name: core.StringPtr("updated-secret-group-name"), Description: core.StringPtr("Updated description for this group."), } updateSecretGroupMetadataOptions := secretsManagerService.NewUpdateSecretGroupMetadataOptions( "testString", collectionMetadataModel, []secretsmanagerv1.SecretGroupMetadataUpdatable{*secretGroupMetadataUpdatableModel}, ) secretGroupDef, response, err := secretsManagerService.UpdateSecretGroupMetadata(updateSecretGroupMetadataOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(secretGroupDef, "", " ") fmt.Println(string(b))
Response
Properties that describe a secret group.
The metadata that describes the resource array.
A collection of resources.
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
resources
Properties that describe a secret group.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
Metadata
A collection of resources.
The v4 UUID that uniquely identifies the secret group.
Examples:ViewA human-readable name to assign to your secret group.
To protect your privacy, do not use personal data, such as your name or location, as a name for your secret group.
Possible values: 2 ≤ length ≤ 64
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: length ≤ 1024
Examples:ViewThe date the secret group was created. The date format follows RFC 3339.
Examples:ViewUpdates when the metadata of the secret group is modified. The date format follows RFC 3339.
Examples:ViewThe MIME type that represents the secret group.
Examples:View
Resources
Status Code
The secret group was successfully updated.
Bad Request
Unauthorized
Payment Required
Forbidden
Not Found
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret.group+json", "collection_total": 1 }, "resources": [ { "creation_date": "2020-10-05T21:33:11Z", "description": "Updated description for this group.", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "name": "updated-secret-group-name", "type": "application/vnd.ibm.secrets-manager.secret.group+json", "last_update_date": "2020-11-25T22:13:10Z" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret.group+json", "collection_total": 1 }, "resources": [ { "creation_date": "2020-10-05T21:33:11Z", "description": "Updated description for this group.", "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "name": "updated-secret-group-name", "type": "application/vnd.ibm.secrets-manager.secret.group+json", "last_update_date": "2020-11-25T22:13:10Z" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Malformed parameter" } ], "errors": [ { "code": "secrets-manager.Error05055", "message": "Malformed parameter" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Malformed parameter" } ], "errors": [ { "code": "secrets-manager.Error05055", "message": "Malformed parameter" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Unauthorized" } ], "errors": [ { "code": "secrets-manager.Error05162", "message": "Unauthorized" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Unauthorized" } ], "errors": [ { "code": "secrets-manager.Error05162", "message": "Unauthorized" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Your Trial plan is now expired" } ], "errors": [ { "code": "secrets-manager.Error04223", "message": "Your Trial plan is now expired" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Your Trial plan is now expired" } ], "errors": [ { "code": "secrets-manager.Error04223", "message": "Your Trial plan is now expired" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Forbidden" } ], "errors": [ { "code": "secrets-manager.Error05092", "message": "Forbidden" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Forbidden" } ], "errors": [ { "code": "secrets-manager.Error05092", "message": "Forbidden" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Not Found" } ], "errors": [ { "code": "secrets-manager.Error05105", "message": "Not Found" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Not Found" } ], "errors": [ { "code": "secrets-manager.Error05105", "message": "Not Found" } ] }
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/v1/secret_groups/{id}
ServiceCall<Void> deleteSecretGroup(DeleteSecretGroupOptions deleteSecretGroupOptions)
deleteSecretGroup(params)
delete_secret_group(self,
id: str,
**kwargs
) -> DetailedResponse
(secretsManager *SecretsManagerV1) DeleteSecretGroup(deleteSecretGroupOptions *DeleteSecretGroupOptions) (response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV1) 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 the secret group.
Possible values: 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}
The deleteSecretGroup options.
The v4 UUID that uniquely identifies the secret group.
Possible values: 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}/
parameters
The v4 UUID that uniquely identifies the secret group.
Possible values: 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}/
parameters
The v4 UUID that uniquely identifies the secret group.
Possible values: 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}/
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 the secret group.
Possible values: 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}/
curl -X DELETE --location --header "Authorization: Bearer {iam_token}" "{base_url}/api/v1/secret_groups/{id}"
DeleteSecretGroupOptions deleteSecretGroupOptions = new DeleteSecretGroupOptions.Builder() .id("testString") .build(); Response<Void> response = secretsManagerService.deleteSecretGroup(deleteSecretGroupOptions).execute();
const params = { id: 'testString', }; try { await secretsManagerService.deleteSecretGroup(params); } catch (err) { console.warn(err); }
response = secrets_manager_service.delete_secret_group( id='testString' )
deleteSecretGroupOptions := secretsManagerService.NewDeleteSecretGroupOptions( "testString", ) 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.
Unauthorized
Payment Required
Forbidden
Not Found
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Unauthorized" } ], "errors": [ { "code": "secrets-manager.Error05162", "message": "Unauthorized" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Unauthorized" } ], "errors": [ { "code": "secrets-manager.Error05162", "message": "Unauthorized" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Your Trial plan is now expired" } ], "errors": [ { "code": "secrets-manager.Error04223", "message": "Your Trial plan is now expired" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Your Trial plan is now expired" } ], "errors": [ { "code": "secrets-manager.Error04223", "message": "Your Trial plan is now expired" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Forbidden" } ], "errors": [ { "code": "secrets-manager.Error05092", "message": "Forbidden" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Forbidden" } ], "errors": [ { "code": "secrets-manager.Error05092", "message": "Forbidden" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Not Found" } ], "errors": [ { "code": "secrets-manager.Error05105", "message": "Not Found" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Not Found" } ], "errors": [ { "code": "secrets-manager.Error05105", "message": "Not Found" } ] }
Create a secret
Create a secret or import an existing value that you can use to access or authenticate to a protected resource.
Use this method to either generate or import an existing secret, such as an arbitrary value or 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 method to either generate or import an existing secret, such as an arbitrary value or 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 method to either generate or import an existing secret, such as an arbitrary value or 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 method to either generate or import an existing secret, such as an arbitrary value or 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 method to either generate or import an existing secret, such as an arbitrary value or 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/v1/secrets/{secret_type}
ServiceCall<CreateSecret> createSecret(CreateSecretOptions createSecretOptions)
createSecret(params)
create_secret(self,
secret_type: str,
metadata: 'CollectionMetadata',
resources: List['SecretResource'],
**kwargs
) -> DetailedResponse
(secretsManager *SecretsManagerV1) CreateSecret(createSecretOptions *CreateSecretOptions) (result *CreateSecret, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV1) CreateSecretWithContext(ctx context.Context, createSecretOptions *CreateSecretOptions) (result *CreateSecret, 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.
Path Parameters
The secret type.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,public_cert
,private_cert
,username_password
,kv
]
Properties that describe a secret.
The metadata that describes the resource array.
A collection of resources.
resources
The createSecret options.
The secret type.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,public_cert
,private_cert
,username_password
,kv
]The metadata that describes the resource array.
Examples:ViewThe type of resources in the resource array.
Allowable values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Examples:ViewProperties that describe a secret.
A human-readable alias to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as an alias for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret.
Possible values: 2 ≤ length ≤ 1024
The v4 UUID that uniquely identifies the secret group to assign to this secret.
If you omit this parameter, your secret is assigned to the
default
secret group.Possible values: 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}/
Labels that you can use to filter for secrets in your instance.
Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled bracket, comma, colon, ampersand, and vertical pipe character (|).
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
The date the secret material expires. The date format follows RFC 3339.
You can set an expiration date on supported secret types at their creation. If you create a secret without specifying an expiration date, the secret does not expire. The
expiration_date
field is supported for the following secret types:arbitrary
username_password
.
Examples:ViewThe new secret data to assign to the secret.
SecretResource
resources
parameters
The secret type.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,public_cert
,private_cert
,username_password
,kv
]The metadata that describes the resource array.
The type of resources in the resource array.
Allowable values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Examples:value_source_lines_htmlProperties that describe a secret.
A human-readable alias to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as an alias for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret.
Possible values: 2 ≤ length ≤ 1024
The v4 UUID that uniquely identifies the secret group to assign to this secret.
If you omit this parameter, your secret is assigned to the
default
secret group.Possible values: 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}/
Labels that you can use to filter for secrets in your instance.
Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled bracket, comma, colon, ampersand, and vertical pipe character (|).
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
The date the secret material expires. The date format follows RFC 3339.
You can set an expiration date on supported secret types at their creation. If you create a secret without specifying an expiration date, the secret does not expire. The
expiration_date
field is supported for the following secret types:arbitrary
username_password
.
Examples:ViewThe new secret data to assign to the secret.
SecretResource
resources
parameters
The secret type.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,public_cert
,private_cert
,username_password
,kv
]The metadata that describes the resource array.
The type of resources in the resource array.
Allowable values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Examples:value_source_lines_htmlProperties that describe a secret.
A human-readable alias to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as an alias for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret.
Possible values: 2 ≤ length ≤ 1024
The v4 UUID that uniquely identifies the secret group to assign to this secret.
If you omit this parameter, your secret is assigned to the
default
secret group.Possible values: 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}/
Labels that you can use to filter for secrets in your instance.
Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled bracket, comma, colon, ampersand, and vertical pipe character (|).
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
The date the secret material expires. The date format follows RFC 3339.
You can set an expiration date on supported secret types at their creation. If you create a secret without specifying an expiration date, the secret does not expire. The
expiration_date
field is supported for the following secret types:arbitrary
username_password
.
Examples:ViewThe new secret data to assign to the secret.
SecretResource
resources
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.
The secret type.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,public_cert
,private_cert
,username_password
,kv
]The metadata that describes the resource array.
Examples:ViewThe type of resources in the resource array.
Allowable values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
Metadata
A collection of resources.
Examples:ViewProperties that describe a secret.
A human-readable alias to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as an alias for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret.
Possible values: 2 ≤ length ≤ 1024
The v4 UUID that uniquely identifies the secret group to assign to this secret.
If you omit this parameter, your secret is assigned to the
default
secret group.Possible values: 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}/
Labels that you can use to filter for secrets in your instance.
Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled bracket, comma, colon, ampersand, and vertical pipe character (|).
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
The date the secret material expires. The date format follows RFC 3339.
You can set an expiration date on supported secret types at their creation. If you create a secret without specifying an expiration date, the secret does not expire. The
expiration_date
field is supported for the following secret types:arbitrary
username_password
.
Examples:ViewThe new secret data to assign to the secret.
SecretResource
Resources
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Accept: application/json" --header "Content-Type: application/json" --data '{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "name": "example-arbitrary-secret", "description": "Extended description for this secret.", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "payload": "secret-data", "labels": [ "dev", "us-south" ], "expiration_date": "2030-01-01T00:00:00Z" } ] }' "{base_url}/api/v1/secrets/{secret_type}"
CollectionMetadata collectionMetadataModel = new CollectionMetadata.Builder() .collectionType("application/vnd.ibm.secrets-manager.secret+json") .collectionTotal(Long.valueOf("1")) .build(); ArbitrarySecretResource secretResourceModel = new ArbitrarySecretResource.Builder() .name("example-arbitrary-secret") .description("Extended description for this secret.") .secretGroupId("bc656587-8fda-4d05-9ad8-b1de1ec7e712") .labels(java.util.Arrays.asList("dev", "us-south")) .expirationDate(DateUtils.parseAsDateTime("2030-01-01T00:00:00Z")) .payload("secret-data") .build(); CreateSecretOptions createSecretOptions = new CreateSecretOptions.Builder() .secretType("arbitrary") .metadata(collectionMetadataModel) .resources(java.util.Arrays.asList(secretResourceModel)) .build(); Response<CreateSecret> response = secretsManagerService.createSecret(createSecretOptions).execute(); CreateSecret createSecret = response.getResult(); System.out.println(createSecret);
// Request models needed by this operation. // CollectionMetadata const collectionMetadataModel = { collection_type: 'application/vnd.ibm.secrets-manager.secret+json', collection_total: 1, }; // ArbitrarySecretResource const secretResourceModel = { name: 'example-arbitrary-secret', description: 'Extended description for this secret.', secret_group_id: 'bc656587-8fda-4d05-9ad8-b1de1ec7e712', labels: ['dev', 'us-south'], expiration_date: '2030-01-01T00:00:00Z', payload: 'secret-data', }; const params = { secretType: 'arbitrary', metadata: collectionMetadataModel, resources: [secretResourceModel], }; let res; try { res = await secretsManagerService.createSecret(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
collection_metadata_model = { 'collection_type': 'application/vnd.ibm.secrets-manager.secret+json', 'collection_total': 1, } secret_resource_model = { 'name': 'example-arbitrary-secret', 'description': 'Extended description for this secret.', 'secret_group_id': 'bc656587-8fda-4d05-9ad8-b1de1ec7e712', 'labels': ['dev', 'us-south'], 'expiration_date': '2030-01-01T00:00:00Z', 'payload': 'secret-data', } create_secret = secrets_manager_service.create_secret( secret_type='arbitrary', metadata=collection_metadata_model, resources=[secret_resource_model] ).get_result() print(json.dumps(create_secret, indent=2))
collectionMetadataModel := &secretsmanagerv1.CollectionMetadata{ CollectionType: core.StringPtr("application/vnd.ibm.secrets-manager.secret+json"), CollectionTotal: core.Int64Ptr(int64(1)), } secretResourceModel := &secretsmanagerv1.ArbitrarySecretResource{ Name: core.StringPtr("example-arbitrary-secret"), Description: core.StringPtr("Extended description for this secret."), SecretGroupID: core.StringPtr("bc656587-8fda-4d05-9ad8-b1de1ec7e712"), Labels: []string{"dev", "us-south"}, Payload: core.StringPtr("secret-data"), } createSecretOptions := secretsManagerService.NewCreateSecretOptions( "arbitrary", collectionMetadataModel, []secretsmanagerv1.SecretResourceIntf{secretResourceModel}, ) createSecret, response, err := secretsManagerService.CreateSecret(createSecretOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(createSecret, "", " ") fmt.Println(string(b))
Response
Properties that describe a secret.
The metadata that describes the resource array.
A collection of resources.
resources
Properties that describe a secret.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Properties that describe a secret.
The v4 UUID that uniquely identifies the secret.
A human-readable alias to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as an alias for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret.
Possible values: 2 ≤ length ≤ 1024
The v4 UUID that uniquely identifies the secret group to assign to this secret.
If you omit this parameter, your secret is assigned to the
default
secret group.Possible values: 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}/
Labels that you can use to filter for secrets in your instance.
Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled bracket, comma, colon, ampersand, and vertical pipe character (|).
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
The secret state based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.
Possible values: [
0
,1
,2
,3
,5
]A text representation of the secret state.
Examples:ViewThe secret type.
Possible values: [
arbitrary
,username_password
,iam_credentials
,imported_cert
,public_cert
,private_cert
,kv
]The Cloud Resource Name (CRN) that uniquely identifies your Secrets Manager resource.
Examples:ViewThe date the secret was created. The date format follows RFC 3339.
Examples:ViewThe unique identifier for the entity that created the secret.
Updates when the actual secret is modified. The date format follows RFC 3339.
Examples:ViewThe number of versions that are associated with a secret.
Examples:ViewAn array that contains metadata for each secret version. For more information on the metadata properties, see Get secret version metadata.
The number of locks that are associated with a secret.
Examples:ViewThe date the secret material expires. The date format follows RFC 3339.
You can set an expiration date on supported secret types at their creation. If you create a secret without specifying an expiration date, the secret does not expire. The
expiration_date
field is supported for the following secret types:arbitrary
username_password
.
Examples:ViewThe data that is associated with the secret version.
The data object contains the field
payload
.
SecretResource
resources
Properties that describe a secret.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Properties that describe a secret.
The v4 UUID that uniquely identifies the secret.
A human-readable alias to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as an alias for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret.
Possible values: 2 ≤ length ≤ 1024
The v4 UUID that uniquely identifies the secret group to assign to this secret.
If you omit this parameter, your secret is assigned to the
default
secret group.Possible values: 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}/
Labels that you can use to filter for secrets in your instance.
Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled bracket, comma, colon, ampersand, and vertical pipe character (|).
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
The secret state based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.
Possible values: [
0
,1
,2
,3
,5
]A text representation of the secret state.
Examples:ViewThe secret type.
Possible values: [
arbitrary
,username_password
,iam_credentials
,imported_cert
,public_cert
,private_cert
,kv
]The Cloud Resource Name (CRN) that uniquely identifies your Secrets Manager resource.
Examples:ViewThe date the secret was created. The date format follows RFC 3339.
Examples:ViewThe unique identifier for the entity that created the secret.
Updates when the actual secret is modified. The date format follows RFC 3339.
Examples:ViewThe number of versions that are associated with a secret.
Examples:ViewAn array that contains metadata for each secret version. For more information on the metadata properties, see Get secret version metadata.
The number of locks that are associated with a secret.
Examples:ViewThe date the secret material expires. The date format follows RFC 3339.
You can set an expiration date on supported secret types at their creation. If you create a secret without specifying an expiration date, the secret does not expire. The
expiration_date
field is supported for the following secret types:arbitrary
username_password
.
Examples:ViewThe data that is associated with the secret version.
The data object contains the field
payload
.
SecretResource
resources
Properties that describe a secret.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Properties that describe a secret.
The v4 UUID that uniquely identifies the secret.
A human-readable alias to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as an alias for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret.
Possible values: 2 ≤ length ≤ 1024
The v4 UUID that uniquely identifies the secret group to assign to this secret.
If you omit this parameter, your secret is assigned to the
default
secret group.Possible values: 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}/
Labels that you can use to filter for secrets in your instance.
Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled bracket, comma, colon, ampersand, and vertical pipe character (|).
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
The secret state based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.
Possible values: [
0
,1
,2
,3
,5
]A text representation of the secret state.
Examples:ViewThe secret type.
Possible values: [
arbitrary
,username_password
,iam_credentials
,imported_cert
,public_cert
,private_cert
,kv
]The Cloud Resource Name (CRN) that uniquely identifies your Secrets Manager resource.
Examples:ViewThe date the secret was created. The date format follows RFC 3339.
Examples:ViewThe unique identifier for the entity that created the secret.
Updates when the actual secret is modified. The date format follows RFC 3339.
Examples:ViewThe number of versions that are associated with a secret.
Examples:ViewAn array that contains metadata for each secret version. For more information on the metadata properties, see Get secret version metadata.
The number of locks that are associated with a secret.
Examples:ViewThe date the secret material expires. The date format follows RFC 3339.
You can set an expiration date on supported secret types at their creation. If you create a secret without specifying an expiration date, the secret does not expire. The
expiration_date
field is supported for the following secret types:arbitrary
username_password
.
Examples:ViewThe data that is associated with the secret version.
The data object contains the field
payload
.
SecretResource
resources
Properties that describe a secret.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
Metadata
A collection of resources.
Properties that describe a secret.
The v4 UUID that uniquely identifies the secret.
A human-readable alias to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as an alias for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret.
Possible values: 2 ≤ length ≤ 1024
The v4 UUID that uniquely identifies the secret group to assign to this secret.
If you omit this parameter, your secret is assigned to the
default
secret group.Possible values: 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}/
Labels that you can use to filter for secrets in your instance.
Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled bracket, comma, colon, ampersand, and vertical pipe character (|).
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
The secret state based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.
Possible values: [
0
,1
,2
,3
,5
]A text representation of the secret state.
Examples:ViewThe secret type.
Possible values: [
arbitrary
,username_password
,iam_credentials
,imported_cert
,public_cert
,private_cert
,kv
]The Cloud Resource Name (CRN) that uniquely identifies your Secrets Manager resource.
Examples:ViewThe date the secret was created. The date format follows RFC 3339.
Examples:ViewThe unique identifier for the entity that created the secret.
Updates when the actual secret is modified. The date format follows RFC 3339.
Examples:ViewThe number of versions that are associated with a secret.
Examples:ViewAn array that contains metadata for each secret version. For more information on the metadata properties, see Get secret version metadata.
The number of locks that are associated with a secret.
Examples:ViewThe date the secret material expires. The date format follows RFC 3339.
You can set an expiration date on supported secret types at their creation. If you create a secret without specifying an expiration date, the secret does not expire. The
expiration_date
field is supported for the following secret types:arbitrary
username_password
.
Examples:ViewThe data that is associated with the secret version.
The data object contains the field
payload
.
SecretResource
Resources
Status Code
The secret was successfully created.
The secret was successfully created.
Secret creation request accepted.
Bad Request
Unauthorized
Payment Required
Forbidden
Not Found
Example response for creating an
arbitrary
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "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", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-arbitrary-secret", "secret_data": { "payload": "secret-data" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "arbitrary", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating an
arbitrary
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "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", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-arbitrary-secret", "secret_data": { "payload": "secret-data" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "arbitrary", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating a
kv
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "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", "description": "Extended description for this secret.", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-kv-secret", "secret_data": { "payload": "secret-data" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "kv", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating a
kv
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "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", "description": "Extended description for this secret.", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-kv-secret", "secret_data": { "payload": "secret-data" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "kv", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating a
username_password
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-username-password-secret", "secret_data": { "username": "user123", "password": "rainy-cloudy-coffee-book" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "username_password", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "auto_rotated": false, "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "934a9869-3a90-4725-87e8-848df7f926a3", "payload_available": true, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating a
username_password
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-username-password-secret", "secret_data": { "username": "user123", "password": "rainy-cloudy-coffee-book" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "username_password", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "auto_rotated": false, "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "934a9869-3a90-4725-87e8-848df7f926a3", "payload_available": true, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating an
iam_credentials
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "access_groups": [ "AccessGroupId-45884031-54be-4dd7-86ff-112511e92699" ], "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-iam-credentials-secret", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "state": 1, "state_description": "Active", "ttl": 1800, "reuse_api_key": false, "service_id_is_static": false, "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "934a9869-3a90-4725-87e8-848df7f926a3", "payload_available": true, "downloaded": true, "auto_rotated": false, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating an
iam_credentials
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "access_groups": [ "AccessGroupId-45884031-54be-4dd7-86ff-112511e92699" ], "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-iam-credentials-secret", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "state": 1, "state_description": "Active", "ttl": 1800, "reuse_api_key": false, "service_id_is_static": false, "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "934a9869-3a90-4725-87e8-848df7f926a3", "payload_available": true, "downloaded": true, "auto_rotated": false, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for importing a TLS certificate
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "name": "test-certificate", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "serial_number": "d9:be:fe:35:ba:09:42:b5", "algorithm": "SHA256-RSA", "key_algorithm": "RSA2048", "issuer": "GlobalSign", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2021-01-01T00:00:00Z" }, "common_name": "example.com", "alt_names": [ "www.sample.com" ], "intermediate_included": false, "private_key_included": false, "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "imported_cert", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "serial_number": "d9:be:fe:35:ba:09:42:b5", "expiration_date": "2021-01-01T00:00:00Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2021-01-01T00:00:00Z" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for importing a TLS certificate
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "name": "test-certificate", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "serial_number": "d9:be:fe:35:ba:09:42:b5", "algorithm": "SHA256-RSA", "key_algorithm": "RSA2048", "issuer": "GlobalSign", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2021-01-01T00:00:00Z" }, "common_name": "example.com", "alt_names": [ "www.sample.com" ], "intermediate_included": false, "private_key_included": false, "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "imported_cert", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "serial_number": "d9:be:fe:35:ba:09:42:b5", "expiration_date": "2021-01-01T00:00:00Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2021-01-01T00:00:00Z" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for a
private_cert
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2022-03-02T14:08:07Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "description": "Extended description for this secret.", "expiration_date": "2022-03-02T15:08:37Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "last_update_date": "2022-03-02T14:08:37Z", "name": "example-private-certifcate", "secret_type": "private_cert", "state": 1, "state_description": "Active", "serial_number": "d9:be:fe:35:ba:09:42:b5", "certificate_authority": "test-intermediate-CA", "certificate_template": "test-certificate-template", "algorithm": "SHA256-RSA", "key_algorithm": "RSA2048", "issuer": "example.com", "downloaded": true, "secret_data": { "certificate": "certificate_content", "ca_chain": [ "issuing_certificate_content" ], "issuing_ca": "issuing_certificate_content", "private_key": "certificate_private_key" }, "validity": { "not_before": "2022-03-02T15:08:37Z", "not_after": "2022-03-01T00:00:00Z" }, "next_rotation_date": "2022-03-02T14:08:07Z", "common_name": "example.com", "alt_names": [ "www.example.com" ], "rotation": { "auto_rotate": false, "interval": 1, "unit": "month" }, "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2022-03-02T14:08:07Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "downloaded": true, "auto_rotated": false, "serial_number": "d9:be:fe:35:ba:09:42:b5", "expiration_date": "2022-03-02T15:08:37Z", "state": 1, "state_description": "Active", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "validity": { "not_before": "2022-03-02T15:08:37Z", "not_after": "2022-03-02T14:08:07Z" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for a
private_cert
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2022-03-02T14:08:07Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "description": "Extended description for this secret.", "expiration_date": "2022-03-02T15:08:37Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "labels": [ "dev", "us-south" ], "last_update_date": "2022-03-02T14:08:37Z", "name": "example-private-certifcate", "secret_type": "private_cert", "state": 1, "state_description": "Active", "serial_number": "d9:be:fe:35:ba:09:42:b5", "certificate_authority": "test-intermediate-CA", "certificate_template": "test-certificate-template", "algorithm": "SHA256-RSA", "key_algorithm": "RSA2048", "issuer": "example.com", "downloaded": true, "secret_data": { "certificate": "certificate_content", "ca_chain": [ "issuing_certificate_content" ], "issuing_ca": "issuing_certificate_content", "private_key": "certificate_private_key" }, "validity": { "not_before": "2022-03-02T15:08:37Z", "not_after": "2022-03-01T00:00:00Z" }, "next_rotation_date": "2022-03-02T14:08:07Z", "common_name": "example.com", "alt_names": [ "www.example.com" ], "rotation": { "auto_rotate": false, "interval": 1, "unit": "month" }, "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2022-03-02T14:08:07Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "downloaded": true, "auto_rotated": false, "serial_number": "d9:be:fe:35:ba:09:42:b5", "expiration_date": "2022-03-02T15:08:37Z", "state": 1, "state_description": "Active", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "validity": { "not_before": "2022-03-02T15:08:37Z", "not_after": "2022-03-02T14:08:07Z" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating an
arbitrary
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "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", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-arbitrary-secret", "secret_data": { "payload": "secret-data" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "arbitrary", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating an
arbitrary
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "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", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-arbitrary-secret", "secret_data": { "payload": "secret-data" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "arbitrary", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating a
kv
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "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", "description": "Extended description for this secret.", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-kv-secret", "secret_data": { "payload": { "key1": "val1" } }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "kv", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating a
kv
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "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", "description": "Extended description for this secret.", "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-kv-secret", "secret_data": { "payload": { "key1": "val1" } }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "kv", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating a
username_password
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-username-password-secret", "secret_data": { "username": "user123", "password": "rainy-cloudy-coffee-book" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "username_password", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "auto_rotated": false, "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "934a9869-3a90-4725-87e8-848df7f926a3", "payload_available": true, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating a
username_password
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-username-password-secret", "secret_data": { "username": "user123", "password": "rainy-cloudy-coffee-book" }, "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "username_password", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "auto_rotated": false, "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "934a9869-3a90-4725-87e8-848df7f926a3", "payload_available": true, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating an
iam_credentials
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "access_groups": [ "AccessGroupId-45884031-54be-4dd7-86ff-112511e92699" ], "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-iam-credentials-secret", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "state": 1, "state_description": "Active", "ttl": 1800, "reuse_api_key": false, "service_id_is_static": false, "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "934a9869-3a90-4725-87e8-848df7f926a3", "payload_available": true, "downloaded": true, "auto_rotated": false, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for creating an
iam_credentials
secret.{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "access_groups": [ "AccessGroupId-45884031-54be-4dd7-86ff-112511e92699" ], "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "name": "example-iam-credentials-secret", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "iam_credentials", "state": 1, "state_description": "Active", "ttl": 1800, "reuse_api_key": false, "service_id_is_static": false, "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "934a9869-3a90-4725-87e8-848df7f926a3", "payload_available": true, "downloaded": true, "auto_rotated": false, "version_custom_metadata": { "custom_version_key": "custom_version_value" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for importing a TLS certificate
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "name": "test-certificate", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "serial_number": "d9:be:fe:35:ba:09:42:b5", "algorithm": "SHA256-RSA", "key_algorithm": "RSA2048", "issuer": "GlobalSign", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2021-01-01T00:00:00Z" }, "common_name": "example.com", "alt_names": [ "www.sample.com" ], "intermediate_included": false, "private_key_included": false, "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "imported_cert", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "serial_number": "d9:be:fe:35:ba:09:42:b5", "expiration_date": "2021-01-01T00:00:00Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2021-01-01T00:00:00Z" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for importing a TLS certificate
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "name": "test-certificate", "description": "Extended description for this secret.", "expiration_date": "2021-01-01T00:00:00Z", "serial_number": "d9:be:fe:35:ba:09:42:b5", "algorithm": "SHA256-RSA", "key_algorithm": "RSA2048", "issuer": "GlobalSign", "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2021-01-01T00:00:00Z" }, "common_name": "example.com", "alt_names": [ "www.sample.com" ], "intermediate_included": false, "private_key_included": false, "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "imported_cert", "state": 1, "state_description": "Active", "versions_total": 1, "versions": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973", "payload_available": true, "serial_number": "d9:be:fe:35:ba:09:42:b5", "expiration_date": "2021-01-01T00:00:00Z", "version_custom_metadata": { "custom_version_key": "custom_version_value" }, "validity": { "not_before": "2020-10-05T21:33:11Z", "not_after": "2021-01-01T00:00:00Z" } } ], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for Ordering a TLS certificate
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "name": "test-certificate", "description": "Extended description for this secret.", "algorithm": "SHA256-RSA", "key_algorithm": "RSA2048", "issuer": "Let's Encrypt", "common_name": "example.com", "alt_names": [ "www.sample.com" ], "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "public_cert", "state": 0, "state_description": "Pre-activation", "versions_total": 1, "issuance_info": { "ordered_on": "2020-10-05T21:33:11Z", "state": 0, "state_description": "Pre-activation", "error_code": "error_code", "error_message": "error_message", "auto_rotated": true, "bundle_certs": true, "ca": "ca_name", "dns": "dns_provider" }, "rotation": { "auto_rotate": false, "rotate_keys": false }, "versions": [], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
Example response for Ordering a TLS certificate
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1 }, "resources": [ { "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21", "creation_date": "2020-10-05T21:33:11Z", "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d", "name": "test-certificate", "description": "Extended description for this secret.", "algorithm": "SHA256-RSA", "key_algorithm": "RSA2048", "issuer": "Let's Encrypt", "common_name": "example.com", "alt_names": [ "www.sample.com" ], "id": "24ec2c34-38ee-4038-9f1d-9a629423158d", "labels": [ "dev", "us-south" ], "last_update_date": "2020-10-05T21:33:11Z", "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712", "secret_type": "public_cert", "state": 0, "state_description": "Pre-activation", "versions_total": 1, "issuance_info": { "ordered_on": "2020-10-05T21:33:11Z", "state": 0, "state_description": "Pre-activation", "error_code": "error_code", "error_message": "error_message", "auto_rotated": true, "bundle_certs": true, "ca": "ca_name", "dns": "dns_provider" }, "rotation": { "auto_rotate": false, "rotate_keys": false }, "versions": [], "locks_total": 0, "custom_metadata": { "custom_key": "custom_value" } } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Malformed parameter" } ], "errors": [ { "code": "secrets-manager.Error05055", "message": "Malformed parameter" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Malformed parameter" } ], "errors": [ { "code": "secrets-manager.Error05055", "message": "Malformed parameter" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Unauthorized" } ], "errors": [ { "code": "secrets-manager.Error05162", "message": "Unauthorized" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Unauthorized" } ], "errors": [ { "code": "secrets-manager.Error05162", "message": "Unauthorized" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Your Trial plan is now expired" } ], "errors": [ { "code": "secrets-manager.Error04223", "message": "Your Trial plan is now expired" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Your Trial plan is now expired" } ], "errors": [ { "code": "secrets-manager.Error04223", "message": "Your Trial plan is now expired" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Forbidden" } ], "errors": [ { "code": "secrets-manager.Error05092", "message": "Forbidden" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Forbidden" } ], "errors": [ { "code": "secrets-manager.Error05092", "message": "Forbidden" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Not Found" } ], "errors": [ { "code": "secrets-manager.Error05105", "message": "Not Found" } ] }
{ "metadata": { "collection_type": "application/vnd.ibm.secrets-manager.error+json", "collection_total": 1 }, "resources": [ { "error_message": "Not Found" } ], "errors": [ { "code": "secrets-manager.Error05105", "message": "Not Found" } ] }
List secrets by type
List the secrets in your Secrets Manager instance based on the type that you specify.
List the secrets in your Secrets Manager instance based on the type that you specify.
List the secrets in your Secrets Manager instance based on the type that you specify.
List the secrets in your Secrets Manager instance based on the type that you specify.
List the secrets in your Secrets Manager instance based on the type that you specify.
GET /api/v1/secrets/{secret_type}
ServiceCall<ListSecrets> listSecrets(ListSecretsOptions listSecretsOptions)
listSecrets(params)
list_secrets(self,
secret_type: str,
*,
limit: int = None,
offset: int = None,
**kwargs
) -> DetailedResponse
(secretsManager *SecretsManagerV1) ListSecrets(listSecretsOptions *ListSecretsOptions) (result *ListSecrets, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV1) ListSecretsWithContext(ctx context.Context, listSecretsOptions *ListSecretsOptions) (result *ListSecrets, 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.
Path Parameters
The secret type.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,public_cert
,private_cert
,username_password
,kv
]
Query Parameters
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.Usage: If you have 20 secrets in your instance, and you want to retrieve only the first 5 secrets, use
../secrets/{secret_type}?limit=5
.Possible values: 1 ≤ value ≤ 5000
Default:
200
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 listSecrets options.
The secret type.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,public_cert
,private_cert
,username_password
,kv
]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.Usage: If you have 20 secrets in your instance, and you want to retrieve only the first 5 secrets, use
../secrets/{secret_type}?limit=5
.Possible values: 1 ≤ value ≤ 5000
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
parameters
The secret type.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,public_cert
,private_cert
,username_password
,kv
]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.Usage: If you have 20 secrets in your instance, and you want to retrieve only the first 5 secrets, use
../secrets/{secret_type}?limit=5
.Possible values: 1 ≤ value ≤ 5000
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
parameters
The secret type.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,public_cert
,private_cert
,username_password
,kv
]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.Usage: If you have 20 secrets in your instance, and you want to retrieve only the first 5 secrets, use
../secrets/{secret_type}?limit=5
.Possible values: 1 ≤ value ≤ 5000
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
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 secret type.
Allowable values: [
arbitrary
,iam_credentials
,imported_cert
,public_cert
,private_cert
,username_password
,kv
]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.Usage: If you have 20 secrets in your instance, and you want to retrieve only the first 5 secrets, use
../secrets/{secret_type}?limit=5
.Possible values: 1 ≤ value ≤ 5000
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
curl -X GET --location --header "Authorization: Bearer {iam_token}" --header "Accept: application/json" "{base_url}/api/v1/secrets/{secret_type}"
ListSecretsOptions listSecretsOptions = new ListSecretsOptions.Builder() .secretType("arbitrary") .build(); Response<ListSecrets> response = secretsManagerService.listSecrets(listSecretsOptions).execute(); ListSecrets listSecrets = response.getResult(); System.out.println(listSecrets);
const params = { secretType: 'arbitrary', }; let res; try { res = await secretsManagerService.listSecrets(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
list_secrets = secrets_manager_service.list_secrets( secret_type='arbitrary' ).get_result() print(json.dumps(list_secrets, indent=2))
listSecretsOptions := secretsManagerService.NewListSecretsOptions( "arbitrary", ) listSecrets, response, err := secretsManagerService.ListSecrets(listSecretsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(listSecrets, "", " ") fmt.Println(string(b))
Response
Properties that describe a list of secrets.
The metadata that describes the resource array.
A collection of resources.
resources
Properties that describe a list of secrets.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Properties that describe a secret.
The v4 UUID that uniquely identifies the secret.
A human-readable alias to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as an alias for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret.
Possible values: 2 ≤ length ≤ 1024
The v4 UUID that uniquely identifies the secret group to assign to this secret.
If you omit this parameter, your secret is assigned to the
default
secret group.Possible values: 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}/
Labels that you can use to filter for secrets in your instance.
Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled bracket, comma, colon, ampersand, and vertical pipe character (|).
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
The secret state based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.
Possible values: [
0
,1
,2
,3
,5
]A text representation of the secret state.
Examples:ViewThe secret type.
Possible values: [
arbitrary
,username_password
,iam_credentials
,imported_cert
,public_cert
,private_cert
,kv
]The Cloud Resource Name (CRN) that uniquely identifies your Secrets Manager resource.
Examples:ViewThe date the secret was created. The date format follows RFC 3339.
Examples:ViewThe unique identifier for the entity that created the secret.
Updates when the actual secret is modified. The date format follows RFC 3339.
Examples:ViewThe number of versions that are associated with a secret.
Examples:ViewAn array that contains metadata for each secret version. For more information on the metadata properties, see Get secret version metadata.
The number of locks that are associated with a secret.
Examples:ViewThe date the secret material expires. The date format follows RFC 3339.
You can set an expiration date on supported secret types at their creation. If you create a secret without specifying an expiration date, the secret does not expire. The
expiration_date
field is supported for the following secret types:arbitrary
username_password
.
Examples:ViewThe data that is associated with the secret version.
The data object contains the field
payload
.
SecretResource
resources
Properties that describe a list of secrets.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Properties that describe a secret.
The v4 UUID that uniquely identifies the secret.
A human-readable alias to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as an alias for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret.
Possible values: 2 ≤ length ≤ 1024
The v4 UUID that uniquely identifies the secret group to assign to this secret.
If you omit this parameter, your secret is assigned to the
default
secret group.Possible values: 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}/
Labels that you can use to filter for secrets in your instance.
Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled bracket, comma, colon, ampersand, and vertical pipe character (|).
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
The secret state based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.
Possible values: [
0
,1
,2
,3
,5
]A text representation of the secret state.
Examples:ViewThe secret type.
Possible values: [
arbitrary
,username_password
,iam_credentials
,imported_cert
,public_cert
,private_cert
,kv
]The Cloud Resource Name (CRN) that uniquely identifies your Secrets Manager resource.
Examples:ViewThe date the secret was created. The date format follows RFC 3339.
Examples:ViewThe unique identifier for the entity that created the secret.
Updates when the actual secret is modified. The date format follows RFC 3339.
Examples:ViewThe number of versions that are associated with a secret.
Examples:ViewAn array that contains metadata for each secret version. For more information on the metadata properties, see Get secret version metadata.
The number of locks that are associated with a secret.
Examples:ViewThe date the secret material expires. The date format follows RFC 3339.
You can set an expiration date on supported secret types at their creation. If you create a secret without specifying an expiration date, the secret does not expire. The
expiration_date
field is supported for the following secret types:arbitrary
username_password
.
Examples:ViewThe data that is associated with the secret version.
The data object contains the field
payload
.
SecretResource
resources
Properties that describe a list of secrets.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
metadata
A collection of resources.
Properties that describe a secret.
The v4 UUID that uniquely identifies the secret.
A human-readable alias to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as an alias for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret.
Possible values: 2 ≤ length ≤ 1024
The v4 UUID that uniquely identifies the secret group to assign to this secret.
If you omit this parameter, your secret is assigned to the
default
secret group.Possible values: 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}/
Labels that you can use to filter for secrets in your instance.
Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled bracket, comma, colon, ampersand, and vertical pipe character (|).
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
The secret state based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.
Possible values: [
0
,1
,2
,3
,5
]A text representation of the secret state.
Examples:ViewThe secret type.
Possible values: [
arbitrary
,username_password
,iam_credentials
,imported_cert
,public_cert
,private_cert
,kv
]The Cloud Resource Name (CRN) that uniquely identifies your Secrets Manager resource.
Examples:ViewThe date the secret was created. The date format follows RFC 3339.
Examples:ViewThe unique identifier for the entity that created the secret.
Updates when the actual secret is modified. The date format follows RFC 3339.
Examples:ViewThe number of versions that are associated with a secret.
Examples:ViewAn array that contains metadata for each secret version. For more information on the metadata properties, see Get secret version metadata.
The number of locks that are associated with a secret.
Examples:ViewThe date the secret material expires. The date format follows RFC 3339.
You can set an expiration date on supported secret types at their creation. If you create a secret without specifying an expiration date, the secret does not expire. The
expiration_date
field is supported for the following secret types:arbitrary
username_password
.
Examples:ViewThe data that is associated with the secret version.
The data object contains the field
payload
.
SecretResource
resources
Properties that describe a list of secrets.
The metadata that describes the resource array.
The type of resources in the resource array.
Possible values: [
application/vnd.ibm.secrets-manager.config+json
,application/vnd.ibm.secrets-manager.secret+json
,application/vnd.ibm.secrets-manager.secret.version+json
,application/vnd.ibm.secrets-manager.secret.policy+json
,application/vnd.ibm.secrets-manager.secret.group+json
,application/vnd.ibm.secrets-manager.secret.lock+json
,application/vnd.ibm.secrets-manager.error+json
]The number of elements in the resource array.
Examples:View
Metadata
A collection of resources.
Properties that describe a secret.
The v4 UUID that uniquely identifies the secret.
A human-readable alias to assign to your secret.
To protect your privacy, do not use personal data, such as your name or location, as an alias for your secret.
Possible values: 2 ≤ length ≤ 256, Value must match regular expression
/^\\w(([\\w-.]+)?\\w)?$/
An extended description of your secret.
To protect your privacy, do not use personal data, such as your name or location, as a description for your secret.
Possible values: 2 ≤ length ≤ 1024
The v4 UUID that uniquely identifies the secret group to assign to this secret.
If you omit this parameter, your secret is assigned to the
default
secret group.Possible values: 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}/
Labels that you can use to filter for secrets in your instance.
Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled bracket, comma, colon, ampersand, and vertical pipe character (|).
To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.
The secret state based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.
Possible values: [
0
,1
,2
,3
,5
]A text representation of the secret state.
Examples:ViewThe secret type.
Possible values: [
arbitrary
,username_password
,iam_credentials
,imported_cert
,public_cert
,private_cert
,kv
]The Cloud Resource Name (CRN) that uniquely identifies your Secrets Manager resource.
Examples:ViewThe date the secret was created. The date format follows RFC 3339.
Examples:ViewThe unique identifier for the entity that created the secret.
Updates when the actual secret is modified. The date format follows RFC 3339.
Examples:ViewThe number of versions that are associated with a secret.
Examples:ViewAn array that contains metadata for each secret version. For more information on the metadata properties, see Get secret version metadata.
The number of locks that are associated with a secret.
Examples:ViewThe date the secret material expires. The date format follows RFC 3339.
You can set an expiration date on supported secret types at their creation. If you create a secret without specifying an expiration date, the secret does not expire. The
expiration_date
field is supported for the following secret types:arbitrary
username_password
.
Examples:ViewThe data that is associated with the secret version.
The data object contains the field
payload
.
SecretResource
Resources
Status Code
The list of secrets was successfully retrieved.
Bad Request
Unauthorized
Payment Required
Forbidden
{